diff --git a/.gitignore b/.gitignore index 66e84ace..40319197 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ build/* .vscode/* -*.txt *.cfg __* *.o @@ -9,3 +8,10 @@ core* 3ts rundb runcl +3ts_dbtest +*.swp +CMakeCache.txt +CMakeFiles/ +*.cmake +Makefile +cmake/* diff --git a/AUTHORS.txt b/AUTHORS.txt index a3efcca1..ea00b6d4 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -1,7 +1,4 @@ -Authors ordered by first contribution. - +Yuxing Chen +Yu Li Chang Liu -ZhanHao Zhao -HongYao Zhao -GuangLin Ma -Ming Yan +Xinpeng Chen diff --git a/README-zh.md b/README-zh.md deleted file mode 100644 index dcdec57c..00000000 --- a/README-zh.md +++ /dev/null @@ -1,75 +0,0 @@ -![](assets/logo.png) - -## 简介 - -![](https://img.shields.io/badge/license-GPLv3-brightgreen) - -**Tencent Transaction Processing Testbed System(简称3TS)**,是腾讯公司CynosDB(TDSQL)团队与中国人民大学数据工程与知识工程教育部重点实验室,联合研制的面向数据库事务处理的验证系统。该系统旨在通过设计和构建事务(包括分布式事务)处理统一框架,并通过框架提供的访问接口,方便使用者快速构建新的并发控制算法;通过验证系统提供的测试床,可以方便用户根据应用场景的需要,对目前主流的并发控制算法在相同的测试环境下进行公平的性能比较,选择一种最佳的并发控制算法。目前,验证系统已集成13种主流的并发控制算法,提供了TPC-C、PPS、YCSB等常见基准测试。3TS还进一步提供了一致性级别的测试基准,针对现阶段分布式数据库系统的井喷式发展而造成的系统选择难问题,提供一致性级别判别与性能测试比较。 - -如需更详细理解本项目目的,请参阅[3TS开源声明](doc/zh/announcement.md)。 - -## 特性 - -1. 支持三种history的生成方式:遍历生成、随机生成、从文本读取 -2. 内置多种算法,包括:可串行化、冲突可串行化、SSI、BOCC、FOCC等 -3. 支持从执行时间和回滚率两个角度评估算法开销 - -## 环境依赖 - -### 3TS-DA - -- 支持**C++17**或以上版本的编译器(建议使用g++8) -- libconfig 1.7.2 -- gflags 2.1.1 -- gtest 1.6.0 - -### Deneva - -- protobuf 3.9.1 -- curl 7.29.0 -- nanomsg 5.1.0 - -## 使用方法 - -- 执行`make.sh`编译代码,编译成功后会生成`3ts`二进制文件 -- 执行`cp config/config.cfg.template config.cfg`,复制一份配置文件 -- 执行`vi config.cfg`,填写配置,决定测试的行为 -- 执行`./t3s --conf_path=config.cfg`,即可执行测试,测试完成后会在本地生成测试结果文件 - -## 基本原理 - -3TS框架由四部分构成: - -- 运行模式(runner):负责控制框架的行为。目前框架提供两种运行方式,具体使用何种运行方式,请在配置文件中的`Target`配置项下指定,如`Target = ["FilterRun"]`。 - - `FilterRun`:输出各个算法对各个history的检测结果,同时可以对检测结果进行筛选 - - `BenchmarkRun`:用于测试性能,输出不同事务数量、变量数量场景下,各个算法检测指定数量的history所需要消耗的时间 -- 生成器(generator):负责生成history。 -- 算法(algorithm):对生成器所生成的history进行检测。目前框架提供如下算法: - - 可串行化检测算法(基于可串行化的定义,判断history是否满足可串行化条件,但判定**并发序列和串行序列的执行结果是否一致**的标准,以及**各个事务所采取的读策略**有所不同): - - 四种读策略下,以**各事务读集相同**和**各变量终态一致**为标准的,可串行化检测算法 - - `"SerializableAlgorithm_ALL_SAME_RU"` // 未提交读策略 - - `"SerializableAlgorithm_ALL_SAME_RC"` // 已提交读策略(读取最新的已提交版本,天然避免了由**脏读**异常带来的不可串行化情况) - - `"SerializableAlgorithm_ALL_SAME_RR"` // 可重复读策略(当事务第二次读到某一变量时,取第一次读到的版本,天然避免了由**不可重复读**异常带来的不可串行化情况) - - `"SerializableAlgorithm_ALL_SAME_SI"` // 快照读策略(天然避免了由**幻读**异常带来的不可串行化情况) - - 四种读策略下,以**各提交状态事务读集相同**和**各变量终态一致**为标准的,可串行化检测算法 - - `"SerializableAlgorithm_COMMIT_SAME_RU"` // 未提交读策略 - - `"SerializableAlgorithm_COMMIT_SAME_RC"` // 已提交读策略 - - `"SerializableAlgorithm_COMMIT_SAME_RR"` // 可重复读策略 - - `"SerializableAlgorithm_COMMIT_SAME_SI"` // 快照读策略 - - 四种读策略下,仅以**各变量终态一致**为标准的,可串行化检测算法 - - `"SerializableAlgorithm_FINAL_SAME_RU"` // 未提交读策略 - - `"SerializableAlgorithm_FINAL_SAME_RC"` // 已提交读策略 - - `"SerializableAlgorithm_FINAL_SAME_RR"` // 可重复读策略 - - `"SerializableAlgorithm_FINAL_SAME_SI"` // 快照读策略 - - 冲突可串行化检测算法:`"ConflictSerializableAlgorithm"` - - SSI检测算法:`"SSI"` - - WSI检测算法:`"WSI"` - - BOCC检测算法:`"BOCC"` - - FOCC检测算法:`"FOCC"` -- 输出器(outputter):对算法的检测结果进行相应统计,并输出到指定文件中。 - -**其余配置项说明,请参考配置文件相关注释。** - -## 许可证 - -GPLv3 @ Tencent diff --git a/README.md b/README.md index 7057de41..ee81166d 100644 --- a/README.md +++ b/README.md @@ -4,72 +4,135 @@ ![](https://img.shields.io/badge/license-GPLv3-brightgreen) -**Tencent Transaction Processing Testbed System (3TS)** that is jointly developed by Tencent's CynosDB (TDSQL) team and the Key Laboratory of Data Engineering and Knowledge Engineering of the Ministry of Education of Renmin University of China. The system aims to design and construct a unified framework for transaction processing (including distributed transactions). It enables users to quickly build new concurrency control approaches via the access interface provided by the framework. Based on an comprehensive experiment study over the benchmarks, and the applications abstracted, users can select an optimal concurrency control approach. At present, 3TS has been integrated 13 mainstream concurrency control approaches, and provides common benchmarks such as TPC-C、PPS and YCSB. 3TS further provides a consistency level test benchmark, to address the issue of system selection difficulty caused by the blowout development of distributed database systems, and provides consistency level discrimination and performance test comparison. +**Tencent Transaction Processing Testbed System (3TS)** that is jointly developed by Tencent's CynosDB (TDSQL) team and the Key Laboratory of Data Engineering and Knowledge Engineering of the Ministry of Education of Renmin University of China. The system aims to design and construct a unified framework for transaction processing (including distributed transactions). It enables users to quickly build new concurrency control approaches via the access interface provided by the framework. Based on an comprehensive experiment study over the benchmarks, and the applications abstracted, users can select an optimal concurrency control approach. At present, 3TS has been integrated 13 mainstream concurrency control approaches, and provides common benchmarks such as TPC-C, PPS, and YCSB. 3TS further provides a consistency level test benchmark, to address the issue of system selection difficulty caused by the blowout development of distributed database systems, and provides consistency level discrimination and performance test comparison. If you want to better understand the aims of our project, please view [3TS opensource announcement](doc/en/announcement.md). -## Features +## Coo: Consistency Check -1. Support three ways to generate histories: Traversing Generating, Randomly Generating, Generating From the Text File. -2. Built-in multiple algorithms, including Serializable Algorithm, Conflict Serializable Algorithm, SSI, BOCC, FOCC, etc. -3. Support evaluating algorithm cost from the execution time and rollback rate two perspectives. +To test the consistency of real databases. +We generate the anomaly histories, and simulate multi-users transaction requesting to databases. -## Dependence +Check out some test cases (e.g., [Dirty Write](test_result/test_cases/wat_sda_dirty_write_2commit.txt)) and result (e.g., [passed by MySQL](test_result/centralizend_result/mysql/serializable/wat_sda_dirty_write_2commit.txt) at Serializable Level). -### 3TS-DA +You can explore all results on [report webpage](https://axingguchen.github.io/3TS/). -- a compilter supporting C++17 or upper versions (recommend g++8) -- libconfig 1.7.2 -- gflags 2.1.1 -- gtest 1.6.0 +Paper from the project: -### Deneva +- VLDB'23: [PolySI: Efficient Black-box Checking of Snapshot Isolation in Databases](https://github.com/hengxin/PolySI-PVLDB2023-Artifacts) + +- VLDB'24 DEMO: [IsoVista: Black-box Checking Database Isolation Guarantees](https://github.com/hengxin/IsoVista) + +- ICDE'25: [Boosting End-to-End Database Isolation Checking via Mini-Transactions](https://www.computer.org/csdl/proceedings-article/icde/2025/360300d998/26FZCeQ3uJW) + +- ICDE'25: [Online Timestamp-Based Transactional Isolation Checking of Database Systems](https://www.computer.org/csdl/proceedings-article/icde/2025/360300d738/26FZC0ImYsU) -- protobuf 3.9.1 -- curl 7.29.0 -- nanomsg 5.1.0 ## Usage +Provide two installation methods for the project environment: **Docker** and **Compilation**, and you can freely choose the installation method. + +### Docker installation + +If you have not installed Docker, you can use the following command to install it with one click. + +```shell +curl -s https://get.docker.com/ | sh +``` + +Obtain Mirror + +```shell +docker pull registry.cn-hangzhou.aliyuncs.com/open_projects/3ts_coo:1.0 +``` + +Obtain Mirror to view the image ID and generate a container based on the image ID + +```shell +docker images +docker run -it [image_id] /bin/bash +``` + +View all containers and enter the generated container + +```shell +docker ps -a +docker exec -it [container_id] /bin/bash +``` + +### Compile Installation + + To generate Makefile (all commands are executed under '3TS/src/dbtest'): + +``` +cmake -S ./ +``` + +To complie the code: + +``` +make +``` + +## Example + +If using Docker installation, the container defaults to installing and configuring the database PostgreSQL,Start it using the following command (if you choose to compile the installation method, you need to install the database and configure it): + +```shell +/etc/init.d/postgresql start +``` + +For test cases, it specify in "do_test_list.txt". Use "#" to exclude (comment) the test case. +We provide three levels of test cases, i.e., the basic cases (33 anomalies in the paper), the predicate cases, and the MDA cases (with multiple transactions and objects). For specific test cases to evaluate, we specify it in do_test_list.txt. + +``` +// to test all test cases +cp t/bk_do_test_list_all.txt do_test_list.txt + +// to test only basic cases +cp t/bk_do_test_list_basic.txt do_test_list.txt + +// to test only predicate cases +cp t/bk_do_test_list_predicate.txt do_test_list.txt +``` + +Edit "auto_test.sh" for database configurations (e.g., username, password). Edit "auto_test_all.sh" for database (e.g., PostgreSQL, and MySQL) and isolation (e.g., SERIALIZABLE, REPEATABLE READ, READ COMMITTED, and READ UNCOMMITTED) configuration. + + +To run the test (under '3TS/src/dbtest'): +``` +./auto_test_all.sh +``` + +## Analyze an anomaly case run by PostgreSQL + +### Setup PostgreSQL +Please check out the general environment [setup](doc/en/setup_db_environment) and PostgreSQL [setup](doc/en/setup_db_postgresql). + +Check if it successfully connects to PostgreSQL server by isql, +``` +isql pg -v +``` +Once the connected information showed, we are able to run our code to test designed anomaly schedules. + +Under "src/dbtest/" folder, add rat_dda_write_read_skew and rat_dda_write_read_skew_committed to "do_test_list.txt". +Add the following to "auto_test_all.sh" for running PostgreSQL with four isolation levels: +``` +./auto_test.sh "pg" "read-uncommitted" +./auto_test.sh "pg" "read-committed" +./auto_test.sh "pg" "repeatable-read" +./auto_test.sh "pg" "serializable" +``` +Run test by "./auto_test_all.sh". The test result are in the following: +| Isolation level | Write-read Skew ([SQL](test_result/test_cases/rat_dda_write_read_skew.txt)) | Write-read Skew Committed ([SQL](test_result/test_cases/rat_dda_write_read_skew_committed.txt)) | +| ----------- | ----------- | ----------- | +| Serializable | Rollback ([result](test_result/centralizend_result/pg/serializable/rat_dda_write_read_skew.txt)) | Rollback ([result](test_result/centralizend_result/pg/serializable/rat_dda_write_read_skew_committed.txt)) | +| Repeatable Read | Anomaly reported ([result](test_result/centralizend_result/pg/repeatable-read/rat_dda_write_read_skew.txt)) | Anomaly reported ([result](test_result/centralizend_result/pg/repeatable-read/rat_dda_write_read_skew_committed.txt)) | +| Read (Un)Committed | Anomaly reported ([result](test_result/centralizend_result/pg/read-committed/rat_dda_write_read_skew.txt)) | Pass the test ([result](test_result/centralizend_result/pg/read-committed/rat_dda_write_read_skew_committed.txt)) | + +At serializable level, both tested cases detected consecutive RW conflicts. +At Repeatable Read level, both generated two consecutive RW conflicts and allowed. +At Read (Un)Committed level, Write-read Skew test case generated two consecutive RW ($R_2W_1,R_1W_2$) conflicts while Write-read Skew Committed test case read the newest committed version and executed into non-anomaly schedule ($R_2W_1,W_2C_2R_1$). -- Run `make.sh` to compile the code. The `3ts` binary will be generated if compiling successfully. -- Run `cp config/config.cfg.template config.cfg` to copy the configuration file. -- Run `vi config.cfg` to modify the configuration file to determine the behavior of the testbed. -- Run `./t3s --conf_path=config.cfg` to execute test. The test result file will be generated when test is over. - -## Principle - -3TS framework can be divided into four parts: - -- Runner: To determine the behavior of the testbed. The testbed now supports two runners. Please specify the runner behind the `Target` configuration item, e.g. `Target = ["FilterRun"]`. - - `FilterRun`: To output the detection result from each algorithms with each history and the result can be filtered. - - `BenchmarkRun`: To test performance by outputting the time cost of each algorithm detecting anomalies from the same number of histories in different transaction numbers and variable item numbers. -- Generator: To generate histories. -- Algorithm: To detect anomalies in each history generated by Generator. The testbed supports following algorithms: - - Serializable Algorithm (Judge whether the history is serializable or not based on the definition of serializable. But the standard to **check the consistency between the execution results of concurrent history and serialized history** and **the read strategy of each transaction** are different.): - - The Serializable Algorithms based on standard that **every correspond transactions' read set** and **every correspond variable items' final version** are all same in the four read strategies. - - `"SerializableAlgorithm_ALL_SAME_RU"` // uncommitted read strategy - - `"SerializableAlgorithm_ALL_SAME_RC"` // committed read strategy (read the latest committed version by which naturally avoid the unserializable cases caused by **dirty read** anomaly) - - `"SerializableAlgorithm_ALL_SAME_RR"` // repeatable read strategy (read the previous version when second reading the same variable item in the same transaction by which naturally avoid the unserializable cases caused by **non-repeatable read anomaly**) - - `"SerializableAlgorithm_ALL_SAME_SI"` // snapshot read strategy (naturally avoid the unserializable cases caused by **phantom anomaly**) - - The Serializable Algorithms based on standard that **the every committed correspond transactions' read set** and **every correspond variable items' final version** are all same in the four read strategies. - - `"SerializableAlgorithm_COMMIT_SAME_RU"` // uncommitted read strategy - - `"SerializableAlgorithm_COMMIT_SAME_RC"` // committed read strategy - - `"SerializableAlgorithm_COMMIT_SAME_RR"` // repeatable read strategy - - `"SerializableAlgorithm_COMMIT_SAME_SI"` // snapshot read strategy - - The Serializable Algorithms based on standard that only **the every correspond variable items' final version** are same in the four read strategies. - - `"SerializableAlgorithm_FINAL_SAME_RU"` // uncommitted read strategy - - `"SerializableAlgorithm_FINAL_SAME_RC"` // committed read strategy - - `"SerializableAlgorithm_FINAL_SAME_RR"` // repeatable read strategy - - `"SerializableAlgorithm_FINAL_SAME_SI"` // snapshot read strategy - - Conflict Serializable Algorithm:`"ConflictSerializableAlgorithm"` - - Serializable Snapshot Isolation:`"SSI"` - - Write-Snapshot Isolation:`"WSI"` - - Backward Optimistic Concurrency Control:`"BOCC"` - - Forward Optimistic Concurrency Control:`"FOCC"` - -- Outputter: To statistics the results and output to the specific file. - -**For explanations to other configuration items, please view the comments in configuration file.** ## License diff --git a/assets/logo.png b/assets/logo.png index decfd5b1..48b4bfe4 100644 Binary files a/assets/logo.png and b/assets/logo.png differ diff --git a/assets/overflow.png b/assets/overflow.png new file mode 100644 index 00000000..900f4b53 Binary files /dev/null and b/assets/overflow.png differ diff --git a/config.cfg.template b/config.cfg.template deleted file mode 100644 index 88d02b27..00000000 --- a/config.cfg.template +++ /dev/null @@ -1,82 +0,0 @@ -Target = ("FilterRun"); // The runner to run. - -/* ========== runners ========= */ - -// For each algorithm's result, do filter if field is set. If is set true/false, -// only output the result when the algorithm consider the history OK/NG. -FilterRun = { - thread_num = 10L; // number of threads - generator = "TraversalGenerator"; // history generator - outputters = ("CompareOutputter", "RollbackRateOutputter"); // result outputters - algorithms = ( // concurrency control algorithms and filters - { name = "SerializableAlgorithm_COMMIT_SAME_SI"; }, - { name = "BOCC"; } - ); -}; - -// Output time required for each algorithm in different transaction or variable item numbers. -BenchmarkRun = { - trans_nums = (2L, 4L, 6L); // numbers of transactions - item_nums = (2L, 4L, 6L); // numbers of variable items - algorithms = ("SSI"); // concurrent algorithms - history_num = 1024L; // number of histories to generate - with_abort = true; // generate history with Abort operation - tail_tcl = true; // generate TCL operation only on the tail of history - os = "cout"; // filename the benchmark result output to, "cout" means standard output -}; - -/* ========== history generators ========= */ - -// Generate all histories meeting such conditions. -TraversalGenerator = { - trans_num = 2L; // number of transactions - item_num = 2L; // number of variable items - max_dml = 6L; // max number of DML operations - subtask_num = 10L; // number of subtasks - subtask_id = 0L; // the id of subtask to run - with_abort = true; // generate history with Abort operation - tail_tcl = false; // generate TCL operation only on the tail of history - allow_empty_trans = false; // transactions generated can be without DML operations - dynamic_history_len = false; // number of DML operation can be less than -}; - -// Generate histories described in the file. -InputGenerator = { - file = "input.txt"; // input file contains histories -} - -// Generate random histories. -RandomGenerator = { - trans_num = 1L; // number of transactions - item_num = 7L; // number of variable items - max_dml = 2L; // max number of DML operations - history_num = 100L; // number of histories to generate - with_abort = true; // generate history with Abort operation - tail_tcl = true; // generate TCL operation only on the tail of history - allow_empty_trans = false; // transactions generated can be without DML operations - dynamic_history_len = false; // number of DML operation can be less than -} - -/* ========== result outputters ========= */ - -// Output the rollback rate information of each algorithm supporing rollback rate statistic. -RollbackRateOutputter = { - file = "rollback_rate.txt"; // filename to output -} - -// Output the detail information of each algorithm in each history. -DetailOutputter = { - file = "detail.txt"; // filename to output -} - -// Compare each algorithm's result and output in classification. -CompareOutputter = { - file = "compare.txt"; // filename to output -} - -// Pick the first algorithm as datum algorithm, and calculate each algorithm's miss/wrong judgment -// rate or true/false rollback rate with the datum algorithm. -DatumOutputter = { - file = "testall.txt"; // filename to output -} - diff --git a/contrib/deneva/Authors b/contrib/deneva/Authors deleted file mode 100644 index 08418a71..00000000 --- a/contrib/deneva/Authors +++ /dev/null @@ -1,3 +0,0 @@ -Massachusetts Institute of Technology (rhardin@mit.edu) -Dana Van Aken (dvanaken@cs.cmu.edu) -Xiangyao Yu (yxy@csail.mit.edu) diff --git a/contrib/deneva/Authors.zip b/contrib/deneva/Authors.zip deleted file mode 100644 index bfb1fc48..00000000 Binary files a/contrib/deneva/Authors.zip and /dev/null differ diff --git a/contrib/deneva/LICENSE b/contrib/deneva/LICENSE deleted file mode 100644 index 8f71f43f..00000000 --- a/contrib/deneva/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/contrib/deneva/Makefile b/contrib/deneva/Makefile deleted file mode 100644 index 5390c9e5..00000000 --- a/contrib/deneva/Makefile +++ /dev/null @@ -1,113 +0,0 @@ -CC=/usr/bin/g++ -CFLAGS=-Wall -Werror -std=c++11 -g3 -ggdb -O0 -fno-strict-aliasing -fno-omit-frame-pointer -D_GLIBCXX_USE_CXX11_ABI=0 -#CFLAGS += -fsanitize=address -fno-stack-protector -fno-omit-frame-pointer -NNMSG=./nanomsg-0.5-beta - -.SUFFIXES: .o .cpp .h .cc - -SRC_DIRS = ./ ./benchmarks/ ./client/ ./concurrency_control/ ./storage/ ./transport/ ./system/ ./statistics/#./unit_tests/ -DEPS = -I. -I./benchmarks -I./client/ -I./concurrency_control -I./storage -I./transport -I./system -I./statistics #-I./unit_tests - -CFLAGS += $(DEPS) -D NOGRAPHITE=1 -Wno-sizeof-pointer-memaccess -LDFLAGS = -Wall -L. -L$(NNMSG) -Wl,-rpath -pthread -lrt -lnanomsg -lanl -lcurl -lprotobuf -lpthread -#LDFLAGS = -Wall -L. -L$(NNMSG) -L$(JEMALLOC)/lib -Wl,-rpath,$(JEMALLOC)/lib -pthread -gdwarf-3 -lrt -std=c++11 -LDFLAGS += $(CFLAGS) -LIBS = - -DB_MAINS = ./client/client_main.cpp ./system/sequencer_main.cpp ./unit_tests/unit_main.cpp -CL_MAINS = ./system/main.cpp ./system/sequencer_main.cpp ./unit_tests/unit_main.cpp -UNIT_MAINS = ./system/main.cpp ./client/client_main.cpp ./system/sequencer_main.cpp - -CPPS_DB = $(foreach dir,$(SRC_DIRS),$(filter-out $(DB_MAINS), $(wildcard $(dir)*.cpp))) -CPPS_CL = $(foreach dir,$(SRC_DIRS),$(filter-out $(CL_MAINS), $(wildcard $(dir)*.cpp))) -CPPS_UNIT = $(foreach dir,$(SRC_DIRS),$(filter-out $(UNIT_MAINS), $(wildcard $(dir)*.cpp))) - -#CPPS = $(wildcard *.cpp) -OBJS_DB = $(addprefix obj/, $(notdir $(CPPS_DB:.cpp=.o))) -OBJS_CL = $(addprefix obj/, $(notdir $(CPPS_CL:.cpp=.o))) -OBJS_UNIT = $(addprefix obj/, $(notdir $(CPPS_UNIT:.cpp=.o))) - -#NOGRAPHITE=1 - -all: rundb runcl -#unit_test - -.PHONY: deps_db -deps:$(CPPS_DB) - $(CC) $(CFLAGS) -MM $^ > obj/deps - sed '/^[^ ]/s/^/obj\//g' obj/deps > obj/deps.tmp - mv obj/deps.tmp obj/deps --include obj/deps - -unit_test : $(OBJS_UNIT) -# $(CC) -o $@ $^ $(LDFLAGS) $(LIBS) - $(CC) -o $@ $^ $(LDFLAGS) $(LIBS) -./obj/%.o: transport/%.cpp -# $(CC) -c $(CFLAGS) $(INCLUDE) $(LIBS) -o $@ $< - $(CC) -c $(CFLAGS) $(INCLUDE) $(LIBS) -o $@ $< -./obj/%.o: unit_tests/%.cpp - $(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< -./obj/%.o: benchmarks/%.cpp - $(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< -./obj/%.o: storage/%.cpp - $(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< -./obj/%.o: system/%.cpp - $(CC) -c -DSTATS_ENABLE=false $(CFLAGS) $(INCLUDE) -o $@ $< -./obj/%.o: concurrency_control/%.cpp - $(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< -./obj/%.o: client/%.cpp - $(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< -./obj/%.o: %.cpp - $(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< - - -rundb : $(OBJS_DB) - $(CC) -o $@ $^ $(LDFLAGS) $(LIBS) -# $(CC) -o $@ $^ $(LDFLAGS) $(LIBS) -./obj/%.o: transport/%.cpp - $(CC) -c $(CFLAGS) $(INCLUDE) $(LIBS) -o $@ $< -# $(CC) -c $(CFLAGS) $(INCLUDE) $(LIBS) -o $@ $< -#./deps/%.d: %.cpp -# $(CC) -MM -MT $*.o -MF $@ $(CFLAGS) $< -./obj/%.o: benchmarks/%.cpp - $(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< -./obj/%.o: storage/%.cpp - $(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< -./obj/%.o: system/%.cpp - $(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< -./obj/%.o: statistics/%.cpp - $(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< -./obj/%.o: concurrency_control/%.cpp - $(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< -./obj/%.o: client/%.cpp - $(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< -./obj/%.o: %.cpp - $(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< - - -runcl : $(OBJS_CL) - $(CC) -o $@ $^ $(LDFLAGS) $(LIBS) -# $(CC) -o $@ $^ $(LDFLAGS) $(LIBS) -./obj/%.o: transport/%.cpp - $(CC) -c $(CFLAGS) $(INCLUDE) $(LIBS) -o $@ $< -# $(CC) -c $(CFLAGS) $(INCLUDE) $(LIBS) -o $@ $< -#./deps/%.d: %.cpp -# $(CC) -MM -MT $*.o -MF $@ $(CFLAGS) $< -./obj/%.o: benchmarks/%.cpp - $(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< -./obj/%.o: storage/%.cpp - $(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< -./obj/%.o: system/%.cpp - $(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< -./obj/%.o: statistics/%.cpp - $(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< -./obj/%.o: concurrency_control/%.cpp - $(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< -./obj/%.o: client/%.cpp - $(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< -./obj/%.o: %.cpp - $(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< - -.PHONY: clean -clean: - rm -f obj/*.o obj/.depend rundb runcl runsq unit_test diff --git a/contrib/deneva/README b/contrib/deneva/README deleted file mode 100644 index 6b7b7316..00000000 --- a/contrib/deneva/README +++ /dev/null @@ -1,130 +0,0 @@ -SETUP ------------------------------ -== Dependencies == -nanomsg (nanomsg.org) -jemalloc (www.canonware.com/jemalloc) - - -HOW TO RUN ------------------------------ - -Create a file called ifconfig.txt with IP addresses for the servers and clients, one per line. - -$ make -$ ./rundb -nid[unique server ID] & -$ ./runcl -nid[unique client ID] & - -DBMS BENCHMARK ------------------------------- - -== General Features == - - ddbms is a OLTP database benchmark with the following features. - - 1. Seven different concurrency control algorithms are supported. - NO_WAIT[1] : no wait two phase locking - WAIT_DIE[1] : wait and die two phase locking - TIMESTAMP[1] : basic T/O - MVCC[2] : multi-version T/O - OCC[3] : optimistic concurrency control (MaaT) - CALVIN[4] : Calvin - BOCC[5] : Basic optimistic concurrency control - FOCC[5] : Forward oriented optimistic concurrency control - SILO[6] : SILO - Sundial[7] : Sundial - SSI[8,9] : Serializable Snapshot Isolation - WSI[10] : Write Snapshot Isolation - - [1] Phlip Bernstein, Nathan Goodman, "Concurrency Control in Distributed Database Systems", Computing Surveys, June 1981 - [2] Phlip Bernstein, Nathan Goodman, "Multiversion Concurrency Control -- Theory and Algorithms", Transactions on Database Systems, Dec 1983 - [3] H. Mahmoud et al, "MaaT: Effective and Scalable Coordination of Distributed Transactions in the Cloud", VLDB 2014 - [4] A. Thomson et al, "Calvin: Fast Distributed Transactions for Partitioned Database Systems", SIGMOD 2012 - [5] Theo Härder: Observations on optimistic concurrency control schemes. Inf. Syst. 9(2): 111-120 (1984) - [6] Stephen Tu, Wenting Zheng, Eddie Kohler, Barbara Liskov, Samuel Madden: Speedy transactions in multicore in-memory databases. SOSP 2013: 18-32 - [7] Xiangyao Yu, Yu Xia, Andrew Pavlo, Daniel Sánchez, Larry Rudolph, Srinivas Devadas: -Sundial: Harmonizing Concurrency Control and Caching in a Distributed OLTP Database Management System. Proc. VLDB Endow. 11(10): 1289-1302 (2018) - [8] Alan D. Fekete, Dimitrios Liarokapis, Elizabeth J. O'Neil, Patrick E. O'Neil, Dennis E. Shasha: Making snapshot isolation serializable. ACM Trans. Database Syst. 30(2): 492-528 (2005) - [9] Michael J. Cahill, Uwe Röhm, Alan D. Fekete: Serializable isolation for snapshot databases. SIGMOD Conference 2008: 729-738 - [10] Maysam Yabandeh, Daniel Gómez Ferro: A critique of snapshot isolation. EuroSys 2012: 155-168 - - - 2. Three benchmarks are supported. - 2.1 YCSB[5] - 2.2 TPCC[6] - Only Payment and New Order transactions are modeled. - 2.2 Product-Parts-Supplier (PPS) - - [5] B. Cooper et al, "Benchmarking Cloud Serving Systems with YCSB", SoCC 201 - [6] http://www.tpc.org/tpcc/ - -== Config File == - -dbms benchmark has the following parameters in the config file. Parameters with a * sign should not be changed. - - CORE_CNT : number of cores modeled in the system. - NODE_CNT : number of computation nodes modeled in the system - PART_CNT : number of logical partitions in the system; Should equal CORE_CNT * NODE_CNT - THREAD_CNT : number of worker threads - REM_THREAD_CNT : number of message receiver threads - SEND_THREAD_CNT : number of message sender threads - TPORT_TYPE : communication protocol (TCP, IPC) - ENVIRONMENT_EC2 : true if running on Amazon EC2 - - PAGE_SIZE : memory page size - CL_SIZE : cache line size - - DONE_TIMER : number of nanoseconds to run experiment - WARMUP_TIMER : number of nanoseconds to run for warmup - SEQ_BATCH_TIMER : number of nanoseconds between CALVIN batches - WORKLOAD : workload supported (TPCC, YCSB, or PPS) - CC_ALG : concurrency control algorithm (WAIT_DIE, NO_WAIT, TIMESTAMP, MVCC, CALVIN, or MAAT) - ISOLATION_LEVEL : system isolation level (SERIALIZABLE, READ_COMMITTED, READ_UNCOMMITTED, or NOLOCK) - - THREAD_ALLOC : per thread allocator. - * MEM_PAD : enable memory padding to avoid false sharing. - MEM_ALLIGN : allocated blocks are alligned to MEM_ALLIGN bytes - - * ROLL_BACK : roll back the modifications if a transaction aborts. - - ENABLE_LATCH : enable latching in btree index - * CENTRAL_INDEX : centralized index structure - * CENTRAL_MANAGER : centralized lock/timestamp manager - INDEX_STRCT : data structure for index. - BTREE_ORDER : fanout of each B-tree node - - TS_TWR : enable Thomas Write Rule (TWR) in TIMESTAMP - HIS_RECYCLE_LEN : in MVCC, history will be recycled if they are too long. - MAX_WRITE_SET : the max size of a write set in OCC. - - MAX_ROW_PER_TXN : max number of rows touched per transaction. - QUERY_INTVL : the rate at which database queries come - MAX_TXN_PER_PART : maximum transactions to run per partition. - - // for YCSB Benchmark - SYNTH_TABLE_SIZE : table size - ZIPF_THETA : theta in zipfian distribution (rows accessed follow zipfian distribution) - READ_PERC : - WRITE_PERC : - SCAN_PERC : percentage of read/write/scan queries. they should add up to 1. - SCAN_LEN : number of rows touched per scan query. - PART_PER_TXN : number of logical partitions to touch per transaction - PERC_MULTI_PART : percentage of multi-partition transactions - REQ_PER_QUERY : number of queries per transaction - FIRST_PART_LOCAL : with this being true, the first touched partition is always the local partition. - - // for TPCC Benchmark - NUM_WH : number of warehouses being modeled. - PERC_PAYMENT : percentage of payment transactions. - DIST_PER_WH : number of districts in one warehouse - MAX_ITEMS : number of items modeled. - CUST_PER_DIST : number of customers per district - ORD_PER_DIST : number of orders per district - FIRSTNAME_LEN : length of first name - MIDDLE_LEN : length of middle name - LASTNAME_LEN : length of last name - - // for PPS Benchmark - MAX_PPS_PART_KEY : number of parts in the parts table - MAX_PPS_PRODUCT_KEY : number of products in the products table - MAX_PPS_SUPPLIER_KEY : number of suppliers in the suppliers table - MAX_PPS_PARTS_PER : number of parts per product or supplier diff --git a/contrib/deneva/README.md b/contrib/deneva/README.md deleted file mode 100644 index d5ae2508..00000000 --- a/contrib/deneva/README.md +++ /dev/null @@ -1,45 +0,0 @@ -DDBMS -======= - -DDBMS is a testbed of an OLTP distributed database management system (DBMS). It supports 6 concurrency control algorithms. - -This testbed is based on the DBx1000 system, whose concurrency control scalability study can be found in the following paper: - - Staring into the Abyss: An Evaluation of Concurrency Control with One Thousand Cores - Xiangyao Yu, George Bezerra, Andrew Pavlo, Srinivas Devadas, Michael Stonebraker - http://voltdb.com/downloads/datasheets_collateral/vdb_whitepaper_staring_into_the_abyss.pdf - -Build & Test ------------- - -To build the database. - - make deps - make -j - -Configuration -------------- - -DBMS configurations can be changed in the config.h file. Please refer to README for the meaning of each configuration. Here we only list several most important ones. - - NODE_CNT : Number of server nodes in the database - THREAD_CNT : Number of worker threads running per server - WORKLOAD : Supported workloads include YCSB and TPCC - CC_ALG : Concurrency control algorithm. Twelve algorithms are supported - (NO_WAIT, WAIT_DIE, TIMESTAMP, MVCC, OCC, CALVIN, SUNDIAL, SILO, BOCC, FOCC, SSI, WSI) - MAX_TXN_IN_FLIGHT : Maximum number of active transactions at each server at a given time - DONE_TIMER : Amount of time to run experiment - -Configurations can also be specified as command argument at runtime. Run the following command for a full list of program argument. - - ./rundb -h - -Run ---- - -The DBMS can be run with - - ./rundb -nid[N] - ./runcl -nid[M] - -where N and M are the ID of a server and client, respectively diff --git a/contrib/deneva/benchmarks/PPS_schema.txt b/contrib/deneva/benchmarks/PPS_schema.txt deleted file mode 100644 index b4baf0ac..00000000 --- a/contrib/deneva/benchmarks/PPS_schema.txt +++ /dev/null @@ -1,63 +0,0 @@ -TABLE=PARTS - 8,int64_t,PART_KEY - 8,int64_t,PART_AMOUNT - 10,string,FIELD1 - 10,string,FIELD2 - 10,string,FIELD3 - 10,string,FIELD4 - 10,string,FIELD5 - 10,string,FIELD6 - 10,string,FIELD7 - 10,string,FIELD8 - 10,string,FIELD9 - 10,string,FIELD10 - -TABLE=PRODUCTS - 8,int64_t,PRODUCT_KEY - 10,string,FIELD1 - 10,string,FIELD2 - 10,string,FIELD3 - 10,string,FIELD4 - 10,string,FIELD5 - 10,string,FIELD6 - 10,string,FIELD7 - 10,string,FIELD8 - 10,string,FIELD9 - 10,string,FIELD10 - -TABLE=SUPPLIERS - 8,int64_t,SUPPLIER_KEY - 10,string,FIELD1 - 10,string,FIELD2 - 10,string,FIELD3 - 10,string,FIELD4 - 10,string,FIELD5 - 10,string,FIELD6 - 10,string,FIELD7 - 10,string,FIELD8 - 10,string,FIELD9 - 10,string,FIELD10 - -TABLE=USES - 8,int64_t,PRODUCT_KEY - 8,int64_t,PART_KEY - -TABLE=SUPPLIES - 8,int64_t,SUPPLIER_KEY - 8,int64_t,PART_KEY - -INDEX=PARTS_IDX - PARTS,0 - -INDEX=PRODUCTS_IDX - PRODUCTS,0 - -INDEX=SUPPLIERS_IDX - SUPPLIERS,0 - -INDEX=SUPPLIES_IDX - SUPPLIES,0 - -INDEX=USES_IDX - USES,0 - diff --git a/contrib/deneva/benchmarks/TPCC_full_schema.txt b/contrib/deneva/benchmarks/TPCC_full_schema.txt deleted file mode 100644 index 9d9e8087..00000000 --- a/contrib/deneva/benchmarks/TPCC_full_schema.txt +++ /dev/null @@ -1,134 +0,0 @@ -//size,type,name -TABLE=WAREHOUSE - 8,int64_t,W_ID - 10,string,W_NAME - 20,string,W_STREET_1 - 20,string,W_STREET_2 - 20,string,W_CITY - 2,string,W_STATE - 9,string,W_ZIP - 8,double,W_TAX - 8,double,W_YTD - -TABLE=DISTRICT - 8,int64_t,D_ID - 8,int64_t,D_W_ID - 10,string,D_NAME - 20,string,D_STREET_1 - 20,string,D_STREET_2 - 20,string,D_CITY - 2,string,D_STATE - 9,string,D_ZIP - 8,double,D_TAX - 8,double,D_YTD - 8,int64_t,D_NEXT_O_ID - -TABLE=CUSTOMER - 8,int64_t,C_ID - 8,int64_t,C_D_ID - 8,int64_t,C_W_ID - 16,string,C_FIRST - 2,string,C_MIDDLE - 16,string,C_LAST - 20,string,C_STREET_1 - 20,string,C_STREET_2 - 20,string,C_CITY - 2,string,C_STATE - 9,string,C_ZIP - 16,string,C_PHONE - 8,int64_t,C_SINCE - 2,string,C_CREDIT - 8,int64_t,C_CREDIT_LIM - 8,int64_t,C_DISCOUNT - 8,double,C_BALANCE - 8,double,C_YTD_PAYMENT - 8,uint64_t,C_PAYMENT_CNT - 8,uint64_t,C_DELIVERY_CNT - 500,string,C_DATA - -TABLE=HISTORY - 8,int64_t,H_C_ID - 8,int64_t,H_C_D_ID - 8,int64_t,H_C_W_ID - 8,int64_t,H_D_ID - 8,int64_t,H_W_ID - 8,int64_t,H_DATE - 8,double,H_AMOUNT - 24,string,H_DATA - -TABLE=NEW-ORDER - 8,int64_t,NO_O_ID - 8,int64_t,NO_D_ID - 8,int64_t,NO_W_ID - -TABLE=ORDER - 8,int64_t,O_ID - 8,int64_t,O_C_ID - 8,int64_t,O_D_ID - 8,int64_t,O_W_ID - 8,int64_t,O_ENTRY_D - 8,int64_t,O_CARRIER_ID - 8,int64_t,O_OL_CNT - 8,int64_t,O_ALL_LOCAL - -TABLE=ORDER-LINE - 8,int64_t,OL_O_ID - 8,int64_t,OL_D_ID - 8,int64_t,OL_W_ID - 8,int64_t,OL_NUMBER - 8,int64_t,OL_I_ID - 8,int64_t,OL_SUPPLY_W_ID - 8,int64_t,OL_DELIVERY_D - 8,int64_t,OL_QUANTITY - 8,double,OL_AMOUNT - 8,int64_t,OL_DIST_INFO - -TABLE=ITEM - 8,int64_t,I_ID - 8,int64_t,I_IM_ID - 24,string,I_NAME - 8,int64_t,I_PRICE - 50,string,I_DATA - -TABLE=STOCK - 8,int64_t,S_I_ID - 8,int64_t,S_W_ID - 8,int64_t,S_QUANTITY - 24,string,S_DIST_01 - 24,string,S_DIST_02 - 24,string,S_DIST_03 - 24,string,S_DIST_04 - 24,string,S_DIST_05 - 24,string,S_DIST_06 - 24,string,S_DIST_07 - 24,string,S_DIST_08 - 24,string,S_DIST_09 - 24,string,S_DIST_10 - 8,int64_t,S_YTD - 8,int64_t,S_ORDER_CNT - 8,int64_t,S_REMOTE_CNT - 50,string,S_DATA - -INDEX=ITEM_IDX - ITEM,0 - -INDEX=WAREHOUSE_IDX - WAREHOUSE,0 - -INDEX=DISTRICT_IDX - DISTRICT,0 - -INDEX=CUSTOMER_ID_IDX - CUSTOMER,0 - -INDEX=CUSTOMER_LAST_IDX - CUSTOMER,0 - -INDEX=STOCK_IDX - STOCK,0 - -INDEX=ORDER_IDX - ORDER,0 - -INDEX=ORDER-LINE_IDX - ORDER-LINE,0 diff --git a/contrib/deneva/benchmarks/TPCC_short_schema.txt b/contrib/deneva/benchmarks/TPCC_short_schema.txt deleted file mode 100644 index 13ef9dd7..00000000 --- a/contrib/deneva/benchmarks/TPCC_short_schema.txt +++ /dev/null @@ -1,100 +0,0 @@ -//size,type,name -TABLE=WAREHOUSE - 8,int64_t,W_ID - 10,string,W_NAME - 20,string,W_STREET_1 - 20,string,W_STREET_2 - 20,string,W_CITY - 2,string,W_STATE - 9,string,W_ZIP - 8,double,W_TAX - 8,double,W_YTD - -TABLE=DISTRICT - 8,int64_t,D_ID - 8,int64_t,D_W_ID - 10,string,D_NAME - 20,string,D_STREET_1 - 20,string,D_STREET_2 - 20,string,D_CITY - 2,string,D_STATE - 9,string,D_ZIP - 8,double,D_TAX - 8,double,D_YTD - 8,int64_t,D_NEXT_O_ID - -TABLE=CUSTOMER - 8,int64_t,C_ID - 8,int64_t,C_D_ID - 8,int64_t,C_W_ID - 2,string,C_MIDDLE - 16,string,C_LAST - 2,string,C_STATE - 2,string,C_CREDIT - 8,int64_t,C_DISCOUNT - 8,double,C_BALANCE - 8,double,C_YTD_PAYMENT - 8,uint64_t,C_PAYMENT_CNT - -TABLE=HISTORY - 8,int64_t,H_C_ID - 8,int64_t,H_C_D_ID - 8,int64_t,H_C_W_ID - 8,int64_t,H_D_ID - 8,int64_t,H_W_ID - 8,int64_t,H_DATE - 8,double,H_AMOUNT - -TABLE=NEW-ORDER - 8,int64_t,NO_O_ID - 8,int64_t,NO_D_ID - 8,int64_t,NO_W_ID - -TABLE=ORDER - 8,int64_t,O_ID - 8,int64_t,O_C_ID - 8,int64_t,O_D_ID - 8,int64_t,O_W_ID - 8,int64_t,O_ENTRY_D - 8,int64_t,O_CARRIER_ID - 8,int64_t,O_OL_CNT - 8,int64_t,O_ALL_LOCAL - -TABLE=ORDER-LINE - 8,int64_t,OL_O_ID - 8,int64_t,OL_D_ID - 8,int64_t,OL_W_ID - 8,int64_t,OL_NUMBER - 8,int64_t,OL_I_ID - -TABLE=ITEM - 8,int64_t,I_ID - 8,int64_t,I_IM_ID - 24,string,I_NAME - 8,int64_t,I_PRICE - 50,string,I_DATA - -TABLE=STOCK - 8,int64_t,S_I_ID - 8,int64_t,S_W_ID - 8,int64_t,S_QUANTITY - 8,int64_t,S_REMOTE_CNT - -INDEX=ITEM_IDX - ITEM,0 - -INDEX=WAREHOUSE_IDX - WAREHOUSE,0 - -INDEX=DISTRICT_IDX - DISTRICT,0 - -INDEX=CUSTOMER_ID_IDX - CUSTOMER,0 - -INDEX=CUSTOMER_LAST_IDX - CUSTOMER,0 - -INDEX=STOCK_IDX - STOCK,0 - diff --git a/contrib/deneva/benchmarks/YCSB_schema.txt b/contrib/deneva/benchmarks/YCSB_schema.txt deleted file mode 100644 index 6db84cf9..00000000 --- a/contrib/deneva/benchmarks/YCSB_schema.txt +++ /dev/null @@ -1,15 +0,0 @@ -//size, type, name -TABLE=MAIN_TABLE - 100,string,F0 - 100,string,F1 - 100,string,F2 - 100,string,F3 - 100,string,F4 - 100,string,F5 - 100,string,F6 - 100,string,F7 - 100,string,F8 - 100,string,F9 - -INDEX=MAIN_INDEX - MAIN_TABLE,0 diff --git a/contrib/deneva/benchmarks/creator.cpp b/contrib/deneva/benchmarks/creator.cpp deleted file mode 100644 index e395773c..00000000 --- a/contrib/deneva/benchmarks/creator.cpp +++ /dev/null @@ -1,195 +0,0 @@ - -#include - -#include "creator.h" - - - InputActionSequenceCreator::InputActionSequenceCreator(const std::string &path) : path_(path) {} - InputActionSequenceCreator::~InputActionSequenceCreator() {} - void InputActionSequenceCreator::DeliverActionSequences( - const std::function &handle) const { - std::ifstream fs(path_); - if (!fs) { - std::cerr << "Open Action Sequences File Failed" << std::endl; - return; - } - uint64_t seq_id=0; - ActionSequence act_seq; - while (fs >> act_seq) { - handle(std::move(act_seq),seq_id); - } - } - - - - -uint64_t TraversalActionSequenceCreator::cut_down_ = 0; -//uint64_t TraversalActionSequenceCreator::seq_id_ = 0; - - TraversalActionSequenceCreator::TraversalActionSequenceCreator(const Options &opt) - : trans_num_(opt.trans_num), - item_num_(opt.item_num), - dml_act_num_(opt.max_dml), - subtask_num_(opt.subtask_num), - dfs_cnt_(opt.subtask_num - opt.subtask_id), - with_abort_(opt.with_abort), - tail_dtl_(opt.tail_dtl), - save_history_with_empty_opt_(opt.save_history_with_empty_opt), - dynamic_seq_len_(opt.dynamic_seq_len), - seq_id_(0) {} - - void TraversalActionSequenceCreator::DeliverActionSequences(const std::function &handle) const { - std::vector tmp_actions; - RecursiveFillDMLActionSeq( - [this, &handle](const ActionSequence &dml_act_seq,uint64_t seq_id, const uint64_t max_trans_id) { - HandleDMLActionSeq(handle, seq_id, dml_act_seq, max_trans_id); - }, - tmp_actions, 0, 0); - } - - - void TraversalActionSequenceCreator::HandleActionSeq(const std::function &handle,uint64_t seq_id, - const ActionSequence &act_seq) const { - ActionSequence act_seq_copy = act_seq; // copy ActionSequence - handle(std::move(act_seq_copy),seq_id); - } - void TraversalActionSequenceCreator::HandleDTLActionSeq(const std::function &handle,uint64_t seq_id, - const ActionSequence &dml_act_seq, - const ActionSequence &dtl_act_seq) const { - // Firstly, append every dml_act_seq with dtl_act_seq. - ActionSequence act_seq_tot = dml_act_seq + dtl_act_seq; - // Then move dtl_act_seq at a suitable location, forward. - RecursiveMoveForwardDTLAction( - [this, &handle,seq_id](const ActionSequence &act_seq) { HandleActionSeq(handle, seq_id ,act_seq); }, - act_seq_tot, dml_act_seq.size()); - } - void TraversalActionSequenceCreator::HandleDMLActionSeq(const std::function &handle,uint64_t seq_id, - const ActionSequence &dml_act_seq, const uint64_t max_trans_id) const { - std::vector dtl_act_types; - RecursiveFillDTLActionSeq( - [this, &handle, &dml_act_seq,seq_id](const ActionSequence &dtl_act_seq) { - HandleDTLActionSeq(handle, seq_id,dml_act_seq, dtl_act_seq); - }, - dtl_act_types, max_trans_id, 0); - } - - bool TraversalActionSequenceCreator::SkipDMLAction(const std::vector &actions) const { - assert(!actions.empty()); - if (actions.size() == 1) { - return false; - } - const Action &last_action = actions[actions.size() - 2]; - const Action &cur_action = actions[actions.size() - 1]; - const bool is_same_trans = (last_action.trans_id() == cur_action.trans_id()); - const bool is_same_item = (last_action.item_id() == cur_action.item_id()); - return - /* WW WR same item in same transaction is meaningless */ - (is_same_trans && is_same_item && - (Action::Type::WRITE == last_action.type() || Action::Type::READ == cur_action.type())) || - /* actions for different items in same transaction can be swapped, so we support item_id - must be ascending */ - (is_same_trans && last_action.item_id() > cur_action.item_id()) || - /* read actions in different transactions can be swapped */ - //(Action::Type::READ == last_action.type() && Action::Type::READ == cur_action.type() && - // last_action.trans_id() > cur_action.trans_id()) || - false; - } - - bool TraversalActionSequenceCreator::OnlyOneTrans(const std::vector &actions) const { - for (uint64_t i = 1; i < actions.size(); ++i) { - if (actions[i].trans_id() != actions[i - 1].trans_id()) { - return false; - } - } - return true; - } - - void TraversalActionSequenceCreator::RecursiveFillDMLActionSeq( - const std::function &handle, - std::vector &actions, uint64_t max_trans_id, uint64_t max_item_id) const { - size_t cur = actions.size(); - if (dynamic_seq_len_ || cur == dml_act_num_) { - if (dfs_cnt_ == subtask_num_) { - if (max_trans_id == trans_num_ || save_history_with_empty_opt_) - handle(ActionSequence(max_trans_id, item_num_, actions),seq_id_, max_trans_id); - else - cut_down_++; - dfs_cnt_ -= subtask_num_; - } - ++seq_id_; - ++dfs_cnt_; - } - if (cur != dml_act_num_) { - // Make sure trans id is increment - for (uint64_t trans_id = 0; trans_id < std::min(max_trans_id + 1, trans_num_); ++trans_id) - for (uint64_t item_id = 0; item_id < std::min(max_item_id + 1, item_num_); ++item_id) - for (Action::Type dml_act_type : {Action::Type::READ, Action::Type::WRITE}) { - // Continuous read in same transaction is meaningless - if (cur > 0 && dml_act_type == Action::Type::READ && - dml_act_type == actions[cur - 1].type() && - trans_id == actions[cur - 1].trans_id() && item_id == actions[cur - 1].item_id()) { - continue; - } - actions.emplace_back(dml_act_type, trans_id, item_id); - // if (!SkipDMLAction(actions)) { RecursiveFillDMLActionSeq(handle, actions, versions); - // } - RecursiveFillDMLActionSeq(handle, actions, std::max(trans_id + 1, max_trans_id), - std::max(item_id + 1, max_item_id)); - actions.pop_back(); - } - } - } - /***************************************************************************** - * Just like backtrace structure, condition-if includes the end-condition. And condition-else - *does the loop works. This function firstly build the Full Permutation of DTL. And then merge - *it with DML. At last handle() it. args: dtl_act_types: set of DTL - * - * - ****************************************************************************/ - void TraversalActionSequenceCreator::RecursiveFillDTLActionSeq(const std::function &handle, - std::vector &dtl_act_types, - const uint64_t max_trans_id, uint64_t abort_trans_num) const { - if (!with_abort_) { - dtl_act_types.assign(max_trans_id, Action::Type::COMMIT); - } - if (dtl_act_types.size() == max_trans_id) { - std::vector trans_order; - for (uint64_t trans_id = 0; trans_id < max_trans_id; ++trans_id) { - trans_order.push_back(trans_id); - } - do { - std::vector dtl_actions; - for (uint64_t trans_id : trans_order) { - dtl_actions.emplace_back(dtl_act_types[trans_id], trans_id); - } - handle(ActionSequence(max_trans_id, item_num_, dtl_actions, abort_trans_num)); - } while (std::next_permutation(trans_order.begin(), trans_order.end())); - } else { - for (Action::Type dtl_act_type : {Action::Type::COMMIT, Action::Type::ABORT}) { - dtl_act_types.emplace_back(dtl_act_type); - if (dtl_act_type == Action::Type::ABORT) abort_trans_num++; - RecursiveFillDTLActionSeq(handle, dtl_act_types, max_trans_id, abort_trans_num); - dtl_act_types.pop_back(); - } - } - } - - void TraversalActionSequenceCreator::RecursiveMoveForwardDTLAction(const std::function &handle, - ActionSequence &act_seq, const size_t pos) const { - if (pos == act_seq.size() || tail_dtl_) { - handle(act_seq); - } else { - RecursiveMoveForwardDTLAction(handle, act_seq, pos + 1); - size_t i = pos; - while (i > 0 && act_seq[i - 1].trans_id() != act_seq[i].trans_id() && - (act_seq[i - 1].IsPointDML() || act_seq[i - 1].type() == Action::Type::SCAN_ODD)) { - std::swap(act_seq[i - 1], act_seq[i]); - RecursiveMoveForwardDTLAction(handle, act_seq, pos + 1); - --i; - } - while (i < pos) { - std::swap(act_seq[i], act_seq[i + 1]); - ++i; - } - } - } diff --git a/contrib/deneva/benchmarks/creator.h b/contrib/deneva/benchmarks/creator.h deleted file mode 100644 index b9ad90de..00000000 --- a/contrib/deneva/benchmarks/creator.h +++ /dev/null @@ -1,75 +0,0 @@ -#pragma once -#include - -#include "generic.h" - - -class ActionSequenceCreator { - public: - ActionSequenceCreator() {} - ~ActionSequenceCreator() {} - virtual void DeliverActionSequences(const std::function &handle) const = 0; -}; - -class InputActionSequenceCreator : public ActionSequenceCreator { - public: - InputActionSequenceCreator(const std::string &path); - ~InputActionSequenceCreator(); - virtual void DeliverActionSequences( - const std::function &handle) const; - - private: - const std::string path_; -}; - - - - -class TraversalActionSequenceCreator : public ActionSequenceCreator { - public: - TraversalActionSequenceCreator(const Options &opt); - - void DeliverActionSequences(const std::function &handle) const; - static uint64_t cut_down_; - - - private: - void HandleActionSeq(const std::function &handle,uint64_t seq_id, - const ActionSequence &act_seq) const ; - void HandleDTLActionSeq(const std::function &handle,uint64_t seq_id, - const ActionSequence &dml_act_seq, - const ActionSequence &dtl_act_seq) const ; - void HandleDMLActionSeq(const std::function &handle,uint64_t seq_id, - const ActionSequence &dml_act_seq, const uint64_t max_trans_id) const ; - - bool SkipDMLAction(const std::vector &actions) const ; - bool OnlyOneTrans(const std::vector &actions) const ; - void RecursiveFillDMLActionSeq( - const std::function &handle, - std::vector &actions, uint64_t max_trans_id, uint64_t max_item_id) const ; - /***************************************************************************** - * Just like backtrace structure, condition-if includes the end-condition. And condition-else - *does the loop works. This function firstly build the Full Permutation of DTL. And then merge - *it with DML. At last handle() it. args: dtl_act_types: set of DTL - * - * - ****************************************************************************/ - void RecursiveFillDTLActionSeq(const std::function &handle, - std::vector &dtl_act_types, - const uint64_t max_trans_id, uint64_t abort_trans_num) const ; - - void RecursiveMoveForwardDTLAction(const std::function &handle, - ActionSequence &act_seq, const size_t pos) const ; - - const uint64_t trans_num_; - const uint64_t item_num_; - const uint64_t dml_act_num_; - const uint64_t subtask_num_; - mutable uint64_t dfs_cnt_; - const bool with_abort_; - const bool tail_dtl_; - const bool save_history_with_empty_opt_; - const bool dynamic_seq_len_; - mutable uint64_t seq_id_; - -}; diff --git a/contrib/deneva/benchmarks/da.h b/contrib/deneva/benchmarks/da.h deleted file mode 100644 index 967d2189..00000000 --- a/contrib/deneva/benchmarks/da.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef _DA_H_ -#define _DA_H_ -#include "config.h" -#include "query.h" -#include "row.h" -#include "txn.h" -#include "wl.h" -#include "creator.h" - -class DAQuery; -class DAQueryMessage; -struct Item_no; - -class table_t; -class INDEX; -class DAQuery; - -class DAWorkload : public Workload { - public: - RC init(); - RC init_table(); - RC init_schema(const char* schema_file); - RC get_txn_man(TxnManager*& txn_manager); - void reset_tab_idx(); - table_t* t_datab; - uint64_t nextstate; - INDEX* i_datab; - bool** delivering; - - private: - //void init_tab_DAtab(int id, uint64_t w_id); - void init_tab_DAtab(); - static void* threadInitDAtab(void* This); -}; - -struct DA_thr_args { - DAWorkload* wl; - UInt32 id; - UInt32 tot; -}; - -class DATxnManager : public TxnManager { - public: - void init(uint64_t thd_id, Workload* h_wl); - void reset(); - RC acquire_locks(); - RC run_txn(); - RC run_txn_post_wait(); - RC run_calvin_txn(); - - void copy_remote_items(DAQueryMessage* msg); - - private: - DAWorkload* _wl; - volatile RC _rc; - row_t* row; - - uint64_t next_item_id; - - bool is_done(); - bool is_local_item(uint64_t idx); - RC send_remote_request(); - RC run_delivery(DAQuery* query); -}; -#endif diff --git a/contrib/deneva/benchmarks/da_block_queue.cpp b/contrib/deneva/benchmarks/da_block_queue.cpp deleted file mode 100644 index 8bf0dd61..00000000 --- a/contrib/deneva/benchmarks/da_block_queue.cpp +++ /dev/null @@ -1,82 +0,0 @@ - -#include "da_block_queue.h" - - -void DABlockQueue::LockQueue() //queue lock -{ - pthread_mutex_lock(&mutex); -} -void DABlockQueue::UnlockQueue() -{ - pthread_mutex_unlock(&mutex); -} -void DABlockQueue::ProductWait() -{ - pthread_cond_wait(&full,&mutex); -} -void DABlockQueue::ConsumeWait() -{ - pthread_cond_wait(&empty,&mutex); -} -void DABlockQueue::NotifyProduct() -{ - pthread_cond_signal(&full); -} -void DABlockQueue::NotifyConsume() -{ - pthread_cond_signal(&empty); -} -bool DABlockQueue::IsEmpty() -{ - return (q.size() == 0 ? true : false); -} -bool DABlockQueue::IsFull() -{ - return (q.size() == cap ? true : false); -} - -DABlockQueue::DABlockQueue(size_t _cap = 50):cap(_cap) -{ - pthread_mutex_init(&mutex,NULL); - pthread_cond_init(&full,NULL); - pthread_cond_init(&empty,NULL); -} -DABlockQueue::~DABlockQueue() -{ - pthread_mutex_destroy(&mutex); - pthread_cond_destroy(&full); - pthread_cond_destroy(&empty); -} -void DABlockQueue::push_data(BaseQuery* data) -{ - LockQueue(); - while(IsFull()) - { - NotifyConsume(); - std::cout<<"queue full,notify consume data,product stop!!"<().swap(q); - ConsumeWait(); - } - - data = q.front(); - q.pop_front(); - NotifyProduct(); - UnlockQueue(); - return data; -} - diff --git a/contrib/deneva/benchmarks/da_block_queue.h b/contrib/deneva/benchmarks/da_block_queue.h deleted file mode 100644 index 669c1138..00000000 --- a/contrib/deneva/benchmarks/da_block_queue.h +++ /dev/null @@ -1,28 +0,0 @@ -#pragma once - -#include "global.h" - - -class DABlockQueue -{ - private: - //std::queue q; - std::list q; - size_t cap; - pthread_mutex_t mutex; - pthread_cond_t full; - pthread_cond_t empty; - void LockQueue(); - void UnlockQueue(); - void ProductWait(); - void ConsumeWait(); - void NotifyProduct(); - void NotifyConsume(); - bool IsEmpty(); - bool IsFull(); - public: - DABlockQueue(size_t _cnt); - ~DABlockQueue(); - void push_data(BaseQuery* data); - BaseQuery* pop_data(); -}; diff --git a/contrib/deneva/benchmarks/da_const.h b/contrib/deneva/benchmarks/da_const.h deleted file mode 100644 index e681ee7a..00000000 --- a/contrib/deneva/benchmarks/da_const.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -enum { - X, - Y, - Z, - }; - -enum{ - ID, - VALUE -}; diff --git a/contrib/deneva/benchmarks/da_query.cpp b/contrib/deneva/benchmarks/da_query.cpp deleted file mode 100644 index 1c349831..00000000 --- a/contrib/deneva/benchmarks/da_query.cpp +++ /dev/null @@ -1,139 +0,0 @@ - -#include "query.h" -#include "da_query.h" -#include "da.h" -#include "mem_alloc.h" -#include "wl.h" -#include "table.h" -#include "message.h" - - -void DAQuery::init(uint64_t thd_id, Workload * h_wl){ - BaseQuery::init(); -} - -void DAQuery::init() { - BaseQuery::init(); -} - - -void DAQuery::release() { - BaseQuery::release(); -} - -void DAQuery::print() -{ - std::cout<< - "trans_id:"< DAQuery::participants(Message * msg, Workload * wl) { - std::set participant_set; - return participant_set; -} - -uint64_t DAQueryGenerator::action_2_state(ActionSequence& act_seq,size_t i, uint64_t seq_id) -{ - - //turn to 64bit in order to not overflow - uint64_t ret=0, trans_id2=0, item_id2=0, type2=0, seq_id2=0, number2=0; - if(i<0||i>=act_seq.actions().size()) - return ret; - trans_id2=act_seq.actions()[i].trans_id(); - if(act_seq.actions()[i].IsPointDML()) - item_id2=act_seq.actions()[i].item_id(); - type2=static_cast(act_seq.actions()[i].type()); - seq_id2=seq_id; - number2=i; - - - ret = ret | trans_id2; - ret = ret | (item_id2 << 8 ); - ret = ret | (type2 << 16); - ret = ret | (seq_id2 << 24); - ret = ret | (number2 << 32); - return ret; -} -DATxnType type_trans(char type) -{ - if(type=='R') - return DA_READ; - else if(type=='W') - return DA_WRITE; - else if(type=='C') - return DA_COMMIT; - else if(type=='A') - return DA_ABORT; - else - return DA_SCAN; -} -uint64_t DAQueryGenerator::seq_num=0; -BaseQuery * DAQueryGenerator::create_query(Workload * h_wl, uint64_t home_partition_id) -{ - #if CREATOR_USE_T - struct Options opt; - opt.trans_num=TRANS_CNT; - opt.item_num=ITEM_CNT; - opt.subtask_num=SUBTASK_NUM; - opt.subtask_id=SUBTASK_ID; - if(opt.subtask_num>1) - opt.subtask_id=home_partition_id; - opt.max_dml=MAX_DML; - opt.with_abort=WITH_ABORT; - opt.tail_dtl=TAIL_DTL; - opt.save_history_with_empty_opt=SAVE_HISTROY_WITH_EMPTY_OPT; - opt.dynamic_seq_len=DYNAMIC_SEQ_LEN; - TraversalActionSequenceCreator creator(opt); - #else - InputActionSequenceCreator creator(string(INPUT_FILE_PATH)); - #endif - BaseQuery * ret=NULL; - const auto handle = [this](ActionSequence &&act_seq,uint64_t seq_id) { - size_t seq_size=act_seq.actions().size(); - int* t_version=(int*)malloc(act_seq.item_num()*sizeof(int)); - memset(t_version,0,act_seq.item_num()*sizeof(int)); - //bool pu=false; - for(size_t i=0;itrans_id=act_seq.actions()[i].trans_id(); - DAQ_t->item_id=act_seq.actions()[i].item_id(); - DAQ_t->seq_id=seq_num;//*opt.subtask_num+opt.subtask_id; - DAQ_t->state=action_2_state(act_seq,i,DAQ_t->seq_id); - DAQ_t->next_state=action_2_state(act_seq,i+1,DAQ_t->seq_id); - DAQ_t->last_state=action_2_state(act_seq,i-1,DAQ_t->seq_id); - DAQ_t->txn_type=type_trans(static_cast(act_seq.actions()[i].type())); - if(act_seq.actions()[i].type()==Action::Type::WRITE) - t_version[DAQ_t->item_id]++; - DAQ_t->write_version=t_version[DAQ_t->item_id]; - da_gen_qry_queue.push_data(DAQ_t); - /* - while(!(pu=da_query_queue.push(DAQ_t))); - if(pu) - printf("true "); - else - printf("false "); - fflush(stdout); - */ - } - free(t_version); - seq_num++; - printf("product: %lu\n",seq_num); - fflush(stdout); - }; - - creator.DeliverActionSequences(handle); - printf("history thread exit\n"); - fflush(stdout); - return ret; -} diff --git a/contrib/deneva/benchmarks/da_query.h b/contrib/deneva/benchmarks/da_query.h deleted file mode 100644 index 94987f33..00000000 --- a/contrib/deneva/benchmarks/da_query.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _DAQuery_H_ -#define _DAQuery_H_ - -#include "global.h" -#include "helper.h" -#include "query.h" -#include "da.h" -//#include "creator.h" - -class Workload; -class Message; - -class DAQuery : public BaseQuery { -public: - DAQuery() - { - trans_id=0; - item_id=0; - seq_id=0; - state=0; - next_state=0; - last_state=0; - } - void init(); - void init(uint64_t thd_id, Workload * h_wl); - void release(); - void print(); - bool readonly(); - - static std::set participants(Message * msg, Workload * wl); - DATxnType txn_type; - uint64_t trans_id; - uint64_t item_id; - uint64_t seq_id; - uint64_t write_version; - uint64_t state; - uint64_t next_state; - uint64_t last_state; - - -}; - -class DAQueryGenerator : public QueryGenerator { -public: - BaseQuery * create_query(Workload * h_wl, uint64_t home_partition_id); - static uint64_t seq_num; -private: - uint64_t action_2_state(ActionSequence& act_seq,size_t i, uint64_t seq_id); -}; -#endif diff --git a/contrib/deneva/benchmarks/da_query_queue.cpp b/contrib/deneva/benchmarks/da_query_queue.cpp deleted file mode 100644 index a91e38d8..00000000 --- a/contrib/deneva/benchmarks/da_query_queue.cpp +++ /dev/null @@ -1,16 +0,0 @@ - -/*#include"da_query_queue.h" -#include"da_query.h" - - -bool DAQueryQueue::push(DAQuery query) -{ - if(!queue.push(query)) - return false; - else - return true; -} -int DAQueryQueue::pop(); -int DAQueryQueue::is_full(); -int DAQueryQueue::is_empty(); -*/ diff --git a/contrib/deneva/benchmarks/da_query_queue.h b/contrib/deneva/benchmarks/da_query_queue.h deleted file mode 100644 index 5e0eea27..00000000 --- a/contrib/deneva/benchmarks/da_query_queue.h +++ /dev/null @@ -1,14 +0,0 @@ -/*#include - - -class DAQueryQueue -{ - public: - bool push(); - bool pop(); - bool is_full(); - bool is_empty(); - private: - boost::lockfree::queue> q{100}; - uint64_t size; -};*/ diff --git a/contrib/deneva/benchmarks/da_txn.cpp b/contrib/deneva/benchmarks/da_txn.cpp deleted file mode 100644 index 2f87cfa8..00000000 --- a/contrib/deneva/benchmarks/da_txn.cpp +++ /dev/null @@ -1,173 +0,0 @@ -#include - -#include "config.h" -#include "da.h" -#include "da_const.h" -#include "da_query.h" -#include "index_btree.h" -#include "index_hash.h" -#include "message.h" -#include "msg_queue.h" -#include "query.h" -#include "row.h" -#include "table.h" -#include "thread.h" -#include "transport.h" -#include "wl.h" - -void DATxnManager::init(uint64_t thd_id, Workload *h_wl) { - TxnManager::init(thd_id, h_wl); - _wl = (DAWorkload *)h_wl; - reset(); -} -RC DATxnManager::run_txn_post_wait() { - get_row_post_wait(row); - return RCOK; -} -RC DATxnManager::acquire_locks(){return RCOK;} -RC DATxnManager::run_calvin_txn(){return RCOK;} -void DATxnManager::reset(){TxnManager::reset();} -RC DATxnManager::run_txn() { -#if MODE == SETUP_MODE - return RCOK; -#endif - RC rc = RCOK; - //uint64_t starttime = get_sys_clock(); - if (IS_LOCAL(txn->txn_id)) { - DEBUG("Running txn %ld\n", txn->txn_id); -#if DISTR_DEBUG - query->print(); -#endif - query->partitions_touched.add_unique(GET_PART_ID(0, g_node_id)); - } - DAQuery *da_query = (DAQuery *)query; - uint64_t trans_id = da_query->trans_id; - uint64_t item_id = da_query->item_id; // item_id from 0-2 represent X,Y,Z - //uint64_t seq_id = da_query->seq_id; - uint64_t state = da_query->state; - uint64_t version = da_query->write_version; - //uint64_t next_state = da_query->next_state; - //uint64_t last_state = da_query->last_state; - DATxnType txn_type = da_query->txn_type; - bool jump=false; - - switch (txn_type) - { - case DA_WRITE: - DA_history_mem.push_back('W'); - break; - case DA_READ: - DA_history_mem.push_back('R'); - break; - case DA_COMMIT: - DA_history_mem.push_back('C'); - break; - case DA_ABORT: - DA_history_mem.push_back('A'); - break; - case DA_SCAN: - DA_history_mem.push_back('S'); - break; - } - DA_history_mem.push_back(static_cast('0'+trans_id));//trans_id - if(txn_type==DA_WRITE || txn_type==DA_READ) - DA_history_mem.push_back(static_cast('a'+item_id));//item_id - DA_history_mem.push_back(' '); - #if WORKLOAD ==DA - printf("thd_id:%lu check: state:%lu nextstate:%lu \n",h_thd->_thd_id, state, _wl->nextstate); - fflush(stdout); - #endif - if(_wl->nextstate!=0) - { - while (state != _wl->nextstate&&!simulation->is_done()); - } - - if(already_abort_tab.count(trans_id)>0) - { - if(txn_type==DA_WRITE || txn_type==DA_READ||txn_type==DA_COMMIT||txn_type==DA_ABORT) - { - jump=true; - if(txn_type==DA_ABORT) - INC_STATS(get_thd_id(), positive_txn_abort_cnt, 1); - } - //else if(txn_type==DA_COMMIT) - //txn_type=DA_ABORT; - } - - if(!jump) - { - //enum RC { RCOK = 0, Commit, Abort, WAIT, WAIT_REM, ERROR, FINISH, NONE }; - itemid_t *item; - INDEX *index = _wl->i_datab; - uint64_t value[3]; - - item = index_read(index, item_id, 0); - assert(item != NULL); - row_t *TempRow = ((row_t *)item->location); - - switch (txn_type) { - case DA_WRITE: { - rc = get_row(TempRow, WR, row); - if(rc == RCOK) - row->set_value(VALUE, version); - else - { - rc = start_abort(); - already_abort_tab.insert(trans_id); - } - break; - } - case DA_READ: { - rc = get_row(TempRow, RD, row); - if(rc == RCOK) - row->get_value(VALUE, value[0]); - else - { - rc = start_abort(); - already_abort_tab.insert(trans_id); - } - break; - } - case DA_COMMIT: { - rc=start_commit(); - break; - } - case DA_ABORT: { - INC_STATS(get_thd_id(), positive_txn_abort_cnt, 1); - rc = start_abort(); - break; - } - case DA_SCAN: { - row_t *TempRow; - for (int i = 0; i < ITEM_CNT; i++) { - item = index_read(index, item_id, 0); - assert(item != NULL); - TempRow = ((row_t *)item->location); - rc = get_row(TempRow, WR, row); - row->get_value(VALUE, value[i]); - } - break; - } - } - //if(rc==Abort||rc==WAIT) - //{ - // rc = start_abort(); - //} - } - _wl->nextstate = da_query->next_state; - if(_wl->nextstate==0) - { - if(abort_history) - abort_file<reset_tab_idx(); - already_abort_tab.clear(); - da_start_trans_tab.clear(); - } - return rc; -} diff --git a/contrib/deneva/benchmarks/da_wl.cpp b/contrib/deneva/benchmarks/da_wl.cpp deleted file mode 100644 index 9d979365..00000000 --- a/contrib/deneva/benchmarks/da_wl.cpp +++ /dev/null @@ -1,95 +0,0 @@ -#include "da.h" -#include "da_const.h" -#include "global.h" -#include "helper.h" -#include "index_btree.h" -#include "index_hash.h" -#include "mem_alloc.h" -#include "query.h" -#include "row.h" -#include "table.h" -#include "thread.h" -#include "txn.h" -#include "wl.h" -#include - -RC DAWorkload::init() { - Workload::init(); - char *cpath = getenv("SCHEMA_PATH"); - string path; - if (cpath == NULL) - path = "./benchmarks/"; - else { - path = string(cpath); - } - path += "da_schema.txt"; - cout << "reading schema file: " << path << endl; - delivering = new bool *[g_num_wh + 1]; - for (UInt32 wid = 1; wid <= g_num_wh; wid++) - delivering[wid] = (bool *)mem_allocator.alloc(CL_SIZE); - printf("Initializing schema... "); - fflush(stdout); - init_schema(path.c_str()); - printf("Done\n"); - printf("Initializing table... "); - fflush(stdout); - init_table(); - printf("Done\n"); - fflush(stdout); - nextstate=0; - return RCOK; -} - -RC DAWorkload::init_schema(const char *schema_file) { - Workload::init_schema(schema_file); - printf("base Workload init_schema over"); - t_datab = tables["DAtab"]; - i_datab = indexes["DAtab_IDX"]; - return RCOK; -} - -RC DAWorkload::init_table() { - //pthread_t *p_thds = new pthread_t[g_init_parallelism - 1]; - DA_thr_args *tt = new DA_thr_args[g_init_parallelism]; - for (UInt32 i = 0; i < g_init_parallelism; i++) { - tt[i].wl = this; - tt[i].id = i; - } - // DA table - threadInitDAtab(&tt[0]); - nextstate=0; - printf("DAtab Done\n"); - return RCOK; -} - -void DAWorkload::init_tab_DAtab() { - row_t *row; - uint64_t row_id; - for (int i = 0; i < ITEM_CNT; i++) { - t_datab->get_new_row(row, 0, row_id); - row->set_value(ID, i); - row->set_value(VALUE, 0); - //insert_row(row, _wl->t_datab); - index_insert(i_datab, i, row, 0); - } -} - -void DAWorkload::reset_tab_idx() -{ - index_delete_all(); - init_tab_DAtab(); -} - -void *DAWorkload::threadInitDAtab(void *This) { - DAWorkload *wl = ((DA_thr_args *)This)->wl; - wl->init_tab_DAtab(); - return NULL; -} - -RC DAWorkload::get_txn_man(TxnManager *&txn_manager) { - DEBUG_M("DAWorkload::get_txn_man DATxnManager alloc\n"); - txn_manager = (DATxnManager *)mem_allocator.align_alloc(sizeof(DATxnManager)); - new (txn_manager) DATxnManager(); - // txn_manager->init( this); - return RCOK; -} diff --git a/contrib/deneva/benchmarks/generic.cpp b/contrib/deneva/benchmarks/generic.cpp deleted file mode 100644 index b2e697e5..00000000 --- a/contrib/deneva/benchmarks/generic.cpp +++ /dev/null @@ -1,484 +0,0 @@ -#include"generic.h" - -std::unordered_map Anomally2Name= -{ - //I, II - {DIRTY_WRITE,"DIRTY_WRITE"}, - {EDGE_CROESS,"EDGE_CROESS"}, - {LOST_UPDATE,"LOST_UPDATE"}, - {READ_SKEW,"READ_SKEW"}, - {READ_WRITE_SKEW,"READ_WRITE_SKEW"}, - {THREE_TRANS_WRITE_SKEW,"THREE_TRANS_WRITE_SKEW"}, - {MULTI_TRANS_ANOMALY,"MULTI_TRANS_ANOMALY"}, - //WSI - {WRITE_SKEW, "WRITE_SKEW"}, - {WW_CONFLICT,"WW_CONFLICT"}, - //SSI - {RW_CONFLICT,"RW_CONFLICT"}, - //BOCC FOCC UNKNOWN - {UNKNOWN,"UNKNOWN"} -}; - -std::ostream& operator<<(std::ostream& os, const Anomally e) { - switch (e) { - case DIRTY_WRITE: \ - return os << "DIRTY_WRITE"; - case EDGE_CROESS: \ - return os << "EDGE_CROESS"; - case LOST_UPDATE: \ - return os << "LOST_UPDATE"; - case READ_SKEW: \ - return os << "READ_SKEW"; - case READ_WRITE_SKEW: \ - return os << "READ_WRITE_SKEW"; - case THREE_TRANS_WRITE_SKEW: \ - return os << "THREE_TRANS_WRITE_SKEW"; - case MULTI_TRANS_ANOMALY: \ - return os << "MULTI_TRANS_ANOMALY"; - case WRITE_SKEW: \ - return os << "WRITE_SKEW"; - case WW_CONFLICT: \ - return os << "WW_CONFLICT"; - case RW_CONFLICT: \ - return os << "RW_CONFLICT"; - default: - return os << "UNKNOWN"; - } -} - - -enum class SerializeReadPolicy { UNCOMMITTED_READ, COMMITTED_READ, REPEATABLE_READ, SI_READ }; - -template -std::unique_ptr MakeUnique(Ts&&... args) { - return std::unique_ptr(new T(std::forward(args)...)); -} - - template - Optional::Optional() : has_value_(false), value_(nullptr) {} - template - Optional::Optional(const T& value) : has_value_(true), value_(new T(value)) {} - template - Optional::Optional(T&& value) : has_value_(true), value_(new T(std::forward(value))) {} - template - Optional::Optional(const Optional& o) - : has_value_(o.has_value_), value_(o.value_ ? new T(*o.value_) : nullptr) {} - template - Optional::Optional(Optional&& o) = default; - template - Optional::~Optional() {} - template - Optional& Optional::operator=(const Optional& o) { - has_value_ = o.has_value_; - value_ = o.value_ ? MakeUnique(*o.value_) : nullptr; - return *this; - } - template - Optional& Optional::operator=(Optional&&) = default; - template - bool Optional::HasValue() const { return has_value_; } - template - void Optional::Set(T&& value) { - value_ = MakeUnique(std::move(value)); - has_value_ = true; - } - template - void Optional::Set(const T& value) { - value_ = MakeUnique(value); - has_value_ = true; - } - template - T& Optional::Get() { - if (!has_value_) { - throw "Empty Optional"; - } - return *value_; - } - template - const T& Optional::Get() const { - if (!has_value_) { - throw "Empty Optional"; - } - return *value_; - } - - - - - Action::Action() : type_(Type::UNKNOWN), trans_id_(0) {} - Action::Action(const Type dtl_type, const uint64_t trans_id) : type_(dtl_type), trans_id_(trans_id) { - if (!IsDTL()) { - throw std::to_string(static_cast(dtl_type)) + " is not a DTL Action"; - } - } - Action::Action(const Type dml_type, const uint64_t trans_id, const uint64_t item_id, - const Optional version) - : type_(dml_type), trans_id_(trans_id), item_id_(item_id), version_(version) { - if (!IsPointDML()) { - throw std::to_string(static_cast(dml_type)) + " is not a Point DML Action"; - } - } - Action& Action::operator=(const Action& action) = default; - Action::~Action() {} - - Action::Type Action::type() const { return type_; } - uint64_t Action::trans_id() const { return trans_id_; } - uint64_t Action::item_id() const { - if(item_id_.HasValue()) - return item_id_.Get(); - else - return 0; - } - uint64_t Action::version() const { return version_.Get(); } - void Action::SetTransId(uint64_t trans_id) { trans_id_ = trans_id; } - void Action::SetItemId(const uint64_t item_id) { - if (IsDTL()) { - throw "DTL actions update item id is meaningless"; - } - item_id_.Set(item_id); - } - void Action::UpdateVersion(const uint64_t version) { - if (IsDTL()) { - throw "DML actions update version is meaningless"; - } - version_.Set(version); - } - - std::ostream& operator<<(std::ostream& os, const Action& action) { - os << static_cast(action.type_) << action.trans_id_; - if (action.IsPointDML()) { - if (action.item_id_.Get() >= 26) { - throw "Not support item_id equal or larger than 26 yet"; - } - os << static_cast('a' + action.item_id_.Get()); - } - - return os; - } - - std::istream& operator>>(std::istream& is, Action::Type& type) { - char c; - is >> c; - switch (c) { - case 'W': - type = Action::Type::WRITE; - break; - case 'R': - type = Action::Type::READ; - break; - case 'C': - type = Action::Type::COMMIT; - break; - case 'A': - type = Action::Type::ABORT; - break; - case 'S': - type = Action::Type::SCAN_ODD; - break; - default: - type = Action::Type::UNKNOWN; - is.setstate(std::ios::failbit); - } - return is; - } - - std::istream& operator>>(std::istream& is, Action& action) { - if (!(is >> action.type_) || !(is >> action.trans_id_)) { - return is; - } - if (action.type_ == Action::Type::WRITE || action.type_ == Action::Type::READ) { - char item_c; - if (!(is >> item_c) || !std::islower(item_c)) { - is.setstate(std::ios::failbit); - return is; - } - action.item_id_ = item_c - 'a'; - } - return is; - } - - bool Action::IsPointDML() const { return IsPointDML(type_); } - bool Action::IsDTL() const { return IsDTL(type_); } - bool Action::IsPointDML(const Type& type) { return type == Type::READ || type == Type::WRITE; } - bool Action::IsDTL(const Type& type) { return type == Type::COMMIT || type == Type::ABORT; } - // surport std::map - bool Action::operator<(const Action& r) const { - if (trans_id() == r.trans_id()) { - uint64_t l_item_id = item_id_.HasValue() ? item_id() : -1; - uint64_t r_item_id = r.item_id_.HasValue() ? r.item_id() : -1; - if (l_item_id == r_item_id) { - uint64_t l_version = version_.HasValue() ? version() : -1; - uint64_t r_version = r.version_.HasValue() ? r.version() : -1; - if (l_version == r_version) return type() < r.type(); - return l_version < r.version(); - } - return l_item_id < r_item_id; - } - return trans_id() < r.trans_id(); - } - - - - ActionSequence::ActionSequence() : ActionSequence(0, 0, {}) {} - ActionSequence::ActionSequence(const uint64_t trans_num, const uint64_t item_num, - const std::vector& actions) - : trans_num_(trans_num),abort_trans_num_(0), item_num_(item_num), actions_(actions) {} - ActionSequence::ActionSequence(const uint64_t trans_num, const uint64_t item_num, std::vector&& actions) - : trans_num_(trans_num), abort_trans_num_(0),item_num_(item_num), actions_(actions) {} - ActionSequence::ActionSequence(const uint64_t trans_num, const uint64_t item_num, - const std::vector& actions, const uint64_t abort_trans_num) - : trans_num_(trans_num), - abort_trans_num_(abort_trans_num), - item_num_(item_num), - actions_(actions) - {} - ActionSequence::ActionSequence(ActionSequence&& act_seq) = default; - ActionSequence::ActionSequence(const ActionSequence& act_seq) = default; - ActionSequence::~ActionSequence() {} - - ActionSequence& ActionSequence::operator=(ActionSequence&& act_seq) = default; - ActionSequence ActionSequence::operator+(const ActionSequence& act_seq) const { - if (trans_num_ != act_seq.trans_num_ || item_num_ != act_seq.item_num_) { - throw "Action sequence mismatch"; - } - std::vector new_actions = actions_; - for (const auto& action : act_seq.actions_) { - new_actions.push_back(action); - } - return ActionSequence(trans_num_, item_num_, std::move(new_actions), - abort_trans_num_ + act_seq.abort_trans_num_); - } - std::string ActionSequence::to_string() const { - std::string ret; - for (size_t i = 0; i < actions_.size(); i++) { - ret.push_back(static_cast(actions_[i].type())); - ret.push_back('0' + actions_[i].trans_id()); - if (actions_[i].IsPointDML()) ret.push_back('a' + actions_[i].item_id()); - } - return ret; - } - std::vector& ActionSequence::actions() { return actions_; } - const std::vector& ActionSequence::actions() const { return actions_; } - uint64_t ActionSequence::trans_num() const { return trans_num_; } - uint64_t ActionSequence::abort_trans_num() const { return abort_trans_num_; } - uint64_t ActionSequence::item_num() const { return item_num_; } - size_t ActionSequence::size() const { return actions_.size(); } - - std::ostream& operator<<(std::ostream& os, const ActionSequence& act_seq) { - for (const Action& action : act_seq.actions_) { - os << action << ' '; - } - return os; - } - - std::istream& operator>>(std::istream& is, ActionSequence& act_seq) { - std::string s; - if (std::getline(is, s)) { - std::stringstream ss(s); - std::vector actions; - uint64_t trans_num = 0; - uint64_t item_num = 0; - for (std::stringstream ss(s); !ss.eof() && !ss.fail();) { - Action action; - if (ss >> action) { - actions.emplace_back(action); - trans_num = std::max(trans_num, action.trans_id() + 1); - if (action.IsPointDML()) { - item_num = std::max(item_num, action.item_id() + 1); - } - } - } - if (ss.fail()) { - std::cerr << "Invalid action sequence: \'" << s << "\'" << std::endl; - } else { - act_seq = ActionSequence(trans_num, item_num, actions); - } - } - return is; - } - - Action& ActionSequence::operator[](const size_t index) { return actions_[index]; } - - void ActionSequence::UpdateWriteVersions() { - std::vector item_version(item_num_, 0); - for (Action& action : actions_) { - if (action.type() == Action::Type::WRITE) { - action.UpdateVersion(++item_version[action.item_id()]); - } - } - } - // add - // update write version, clean up read version - void ActionSequence::FillWriteVersions() { - std::vector item_version(item_num_, 0); - for (Action& action : actions_) { - if (action.type() == Action::Type::WRITE) { - action.UpdateVersion(++item_version[action.item_id()]); - } else if (action.type() == Action::Type::READ) { - action.UpdateVersion(-1); // clear read version as -1 - } - } - } - -/* -template <> -void ActionSequence::FillReadVersions( - ActionSequence& act_seq) { - std::vector>> trans_write_item_versions( - act_seq.trans_num(), std::vector>(act_seq.item_num())); - std::vector>> item_version_link( - act_seq.item_num(), {0}); - - const auto latest_version = [&item_version_link](const uint64_t item_id) { - const std::vector>& version_link = item_version_link[item_id]; - uint64_t i = version_link.size() - 1; - for (; i >= 0 && !version_link[i].HasValue(); --i) - ; - assert(i < version_link.size()); - return version_link[i].Get(); - }; - const auto release_version = [&item_version_link](const uint64_t item_id, - const uint64_t version) { - for (Optional& cur_version : item_version_link[item_id]) { - if (cur_version.HasValue() && cur_version.Get() == version) { - cur_version = {}; - return; - } - } - assert(false); // cannot found the version - }; - for (Action& action : act_seq.actions()) { - if (action.type() == Action::Type::READ) { - // we did not change version when resort actions, so we use latest version instead of - // action.version() - // act_seq.PushTransReadResult(action.trans_id(), action.item_id(), - // latest_version(action.item_id())); - Optional read_version = - trans_write_item_versions[action.trans_id()][action.item_id()]; - if (read_version.HasValue()) { - action.UpdateVersion(read_version.Get()); - } else - action.UpdateVersion(0); - } else if (action.type() == Action::Type::WRITE) { - item_version_link[action.item_id()].push_back(action.version()); - Optional& my_last_write_version = - trans_write_item_versions[action.trans_id()][action.item_id()]; - if (my_last_write_version.HasValue()) { - release_version(action.item_id(), my_last_write_version.Get()); - } - my_last_write_version = action.version(); - } else if (action.type() == Action::Type::ABORT) { - for (uint64_t item_id = 0; item_id < act_seq.item_num(); ++item_id) { - const Optional& my_last_write_version = - trans_write_item_versions[action.trans_id()][item_id]; - if (my_last_write_version.HasValue()) { - release_version(item_id, my_last_write_version.Get()); - } - } - } else if (action.type() == Action::Type::COMMIT) { - } else { - throw "Unexpected action type:" + std::to_string(static_cast(action.type())); - } - } - - std::vector final_versions(act_seq.item_num()); - for (uint64_t item_id = 0; item_id < act_seq.item_num(); ++item_id) { - final_versions[item_id] = latest_version(item_id); - } - // act_seq.SetItemFinalVersions(std::move(final_versions)); -} -template <> -void ActionSequence::FillReadVersions( - ActionSequence& act_seq) { - std::vector>> trans_write_item_versions( - act_seq.trans_num(), std::vector>(act_seq.item_num())); - std::vector latest_versions(act_seq.item_num(), 0); - for (Action& action : act_seq.actions()) { - if (action.type() == Action::Type::READ) { - Optional read_version = - trans_write_item_versions[action.trans_id()][action.item_id()]; - if (read_version.HasValue()) - action.UpdateVersion(read_version.Get()); - else - action.UpdateVersion(latest_versions[action.item_id()]); - } else if (action.type() == Action::Type::WRITE) { - trans_write_item_versions[action.trans_id()][action.item_id()] = action.version(); - } else if (action.type() == Action::Type::ABORT) { - } else if (action.type() == Action::Type::COMMIT) { - for (uint64_t item_id = 0; item_id < act_seq.item_num(); item_id++) { - Optional write_version = trans_write_item_versions[action.trans_id()][item_id]; - if (write_version.HasValue()) { - latest_versions[item_id] = write_version.Get(); - } - } - } else { - throw "Unexpected action type:" + std::to_string(static_cast(action.type())); - } - } -} -template <> -void ActionSequence::FillReadVersions( - ActionSequence& act_seq) { - std::vector>> trans_read_item_versions( - act_seq.trans_num(), std::vector>(act_seq.item_num())); - std::vector>> trans_write_item_versions( - act_seq.trans_num(), std::vector>(act_seq.item_num())); - std::vector latest_versions(act_seq.item_num(), 0); - for (Action& action : act_seq.actions()) { - if (action.type() == Action::Type::READ) { - const Optional& write_version = - trans_write_item_versions[action.trans_id()][action.item_id()]; - if (write_version.HasValue()) { // item has written - action.UpdateVersion(write_version.Get()); - } else { - Optional& read_version = - trans_read_item_versions[action.trans_id()][action.item_id()]; - if (!read_version.HasValue()) { // item has read - read_version = latest_versions[action.item_id()]; - } - action.UpdateVersion(read_version.Get()); - } - } else if (action.type() == Action::Type::WRITE) { - trans_write_item_versions[action.trans_id()][action.item_id()] = action.version(); - } else if (action.type() == Action::Type::ABORT) { - } else if (action.type() == Action::Type::COMMIT) { - for (uint64_t item_id = 0; item_id < act_seq.item_num(); item_id++) { - Optional write_version = trans_write_item_versions[action.trans_id()][item_id]; - if (write_version.HasValue()) { - latest_versions[item_id] = write_version.Get(); - } - } - } else { - throw "Unexpected action type:" + std::to_string(static_cast(action.type())); - } - } -} -template <> -void ActionSequence::FillReadVersions(ActionSequence& act_seq) { - std::vector latest_versions(act_seq.item_num(), 0); - std::vector> trans_item_versions_backup(act_seq.trans_num()); - std::vector> trans_item_versions_snapshot(act_seq.trans_num()); - for (Action& action : act_seq.actions()) { - if (trans_item_versions_snapshot[action.trans_id()].empty()) { - trans_item_versions_snapshot[action.trans_id()] = latest_versions; - trans_item_versions_backup[action.trans_id()] = latest_versions; - } - if (action.type() == Action::Type::READ) { - uint64_t read_version = trans_item_versions_snapshot[action.trans_id()][action.item_id()]; - action.UpdateVersion(read_version); - } else if (action.type() == Action::Type::WRITE) { - trans_item_versions_snapshot[action.trans_id()][action.item_id()] = action.version(); - } else if (action.type() == Action::Type::ABORT) { - } else if (action.type() == Action::Type::COMMIT) { - for (uint64_t item_id = 0; item_id < act_seq.item_num(); ++item_id) { - if (trans_item_versions_snapshot[action.trans_id()][item_id] != - trans_item_versions_backup[action.trans_id()][item_id]) { - latest_versions[item_id] = trans_item_versions_snapshot[action.trans_id()][item_id]; - } - } - } else { - throw "Unexpected action type:" + std::to_string(static_cast(action.type())); - } - } -} -*/ diff --git a/contrib/deneva/benchmarks/generic.h b/contrib/deneva/benchmarks/generic.h deleted file mode 100644 index 36c206d6..00000000 --- a/contrib/deneva/benchmarks/generic.h +++ /dev/null @@ -1,179 +0,0 @@ -#pragma once -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -enum Anomally -{ - //I, II - DIRTY_WRITE, - EDGE_CROESS, - LOST_UPDATE, - READ_SKEW, - READ_WRITE_SKEW, - THREE_TRANS_WRITE_SKEW, - MULTI_TRANS_ANOMALY, - //WSI - WRITE_SKEW, - WW_CONFLICT, - //SSI - RW_CONFLICT, - //BOCC FOCC UNKNOWN - UNKNOWN -}; - -extern std::unordered_map Anomally2Name; - - -std::ostream& operator<<(std::ostream& os, const Anomally e) ; - - -enum class SerializeReadPolicy; - -template -std::unique_ptr MakeUnique(Ts&&... args) ; - -template -class Optional final { - public: - Optional(); - Optional(const T& value); - Optional(T&& value); - Optional(const Optional& o); - Optional(Optional&& o); - ~Optional(); - Optional& operator=(const Optional& o); - Optional& operator=(Optional&&); - - bool HasValue() const; - void Set(T&& value) ; - void Set(const T& value) ; - T& Get(); - const T& Get() const; - - private: - bool has_value_; - std::unique_ptr value_; -}; - -class Action { - public: - enum class Type : char { - UNKNOWN = '?', - READ = 'R', - WRITE = 'W', - COMMIT = 'C', - ABORT = 'A', - SCAN_ODD = 'S' - }; - Action() ; - Action(const Type dtl_type, const uint64_t trans_id); - Action(const Type dml_type, const uint64_t trans_id, const uint64_t item_id, - const Optional version = {}); - Action& operator=(const Action& action); - virtual ~Action(); - - Type type() const; - uint64_t trans_id() const; - uint64_t item_id() const; - uint64_t version() const; - void SetTransId(uint64_t trans_id); - void SetItemId(const uint64_t item_id); - void UpdateVersion(const uint64_t version); - - friend std::ostream& operator<<(std::ostream& os, const Action& action); - - friend std::istream& operator>>(std::istream& is, Type& type); - - friend std::istream& operator>>(std::istream& is, Action& action); - - bool IsPointDML() const; - bool IsDTL() const; - static bool IsPointDML(const Type& type); - static bool IsDTL(const Type& type); - // surport std::map - bool operator<(const Action& r) const; - private: - Type type_; - uint64_t trans_id_; - Optional item_id_; - Optional version_; // version_ identify a unique version, but it CANNOT be compared to - // judge new or old -}; - -class ActionSequence { - public: - ActionSequence() ; - ActionSequence(const uint64_t trans_num, const uint64_t item_num, - const std::vector& actions); - ActionSequence(const uint64_t trans_num, const uint64_t item_num, std::vector&& actions); - ActionSequence(const uint64_t trans_num, const uint64_t item_num, - const std::vector& actions, const uint64_t abort_trans_num); - ActionSequence(ActionSequence&& act_seq); - ActionSequence(const ActionSequence& act_seq); - ~ActionSequence(); - - ActionSequence& operator=(ActionSequence&& act_seq); - ActionSequence operator+(const ActionSequence& act_seq) const; - std::string to_string() const; - std::vector& actions(); - const std::vector& actions() const; - uint64_t trans_num() const; - uint64_t abort_trans_num() const; - uint64_t item_num() const; - size_t size() const; - - friend std::ostream& operator<<(std::ostream& os, const ActionSequence& act_seq); - - friend std::istream& operator>>(std::istream& is, ActionSequence& act_seq); - - Action& operator[](const size_t index); - void UpdateWriteVersions(); - // add - // update write version, clean up read version - void FillWriteVersions(); - /* - - template - inline void FillReadVersions(ActionSequence& act_seq); -*/ - private: - uint64_t trans_num_; - uint64_t abort_trans_num_; - uint64_t item_num_; // 1 - std::vector actions_; -}; - -struct Options { - uint64_t trans_num; - uint64_t item_num; - - uint64_t subtask_num; - uint64_t subtask_id; - uint64_t max_dml; - - bool with_abort; - bool tail_dtl; - bool save_history_with_empty_opt; - bool dynamic_seq_len; -}; - diff --git a/contrib/deneva/benchmarks/pps.h b/contrib/deneva/benchmarks/pps.h deleted file mode 100644 index c048aba3..00000000 --- a/contrib/deneva/benchmarks/pps.h +++ /dev/null @@ -1,168 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _PPS_H_ -#define _PPS_H_ - -#include "wl.h" -#include "txn.h" -#include "query.h" -#include "row.h" - -class PPSQuery; -class PPSQueryMessage; -struct Item_no; - -class table_t; -class INDEX; -class PPSQuery; -enum PPSRemTxnType { - PPS_GETPART_S=0, - PPS_GETPART0, - PPS_GETPART1, - PPS_GETPRODUCT_S, - PPS_GETPRODUCT0, - PPS_GETPRODUCT1, - PPS_GETSUPPLIER_S, - PPS_GETSUPPLIER0, - PPS_GETSUPPLIER1, - PPS_GETPARTBYPRODUCT_S, - PPS_GETPARTBYPRODUCT0, - PPS_GETPARTBYPRODUCT1, - PPS_GETPARTBYPRODUCT2, - PPS_GETPARTBYPRODUCT3, - PPS_GETPARTBYPRODUCT4, - PPS_GETPARTBYPRODUCT5, - PPS_GETPARTBYSUPPLIER_S, - PPS_GETPARTBYSUPPLIER0, - PPS_GETPARTBYSUPPLIER1, - PPS_GETPARTBYSUPPLIER2, - PPS_GETPARTBYSUPPLIER3, - PPS_GETPARTBYSUPPLIER4, - PPS_GETPARTBYSUPPLIER5, - PPS_ORDERPRODUCT_S, - PPS_ORDERPRODUCT0, - PPS_ORDERPRODUCT1, - PPS_ORDERPRODUCT2, - PPS_ORDERPRODUCT3, - PPS_ORDERPRODUCT4, - PPS_ORDERPRODUCT5, - PPS_UPDATEPRODUCTPART_S, - PPS_UPDATEPRODUCTPART0, - PPS_UPDATEPRODUCTPART1, - PPS_UPDATEPART_S, - PPS_UPDATEPART0, - PPS_UPDATEPART1, - PPS_FIN, - PPS_RDONE -}; - -class PPSWorkload : public Workload { -public: - RC init(); - RC init_table(); - RC init_schema(const char * schema_file); - RC get_txn_man(TxnManager *& txn_manager); - table_t * t_suppliers; - table_t * t_products; - table_t * t_parts; - table_t * t_supplies; - table_t * t_uses; - - INDEX * i_parts; - INDEX * i_products; - INDEX * i_suppliers; - INDEX * i_supplies; - INDEX * i_uses; - -private: - void init_tab_suppliers(); - void init_tab_products(); - void init_tab_parts(); - void init_tab_supplies(); - void init_tab_uses(); - - static void * threadInitSuppliers(void * This); - static void * threadInitProducts(void * This); - static void * threadInitParts(void * This); - static void * threadInitSupplies(void * This); - static void * threadInitUses(void * This); -}; - -struct pps_thr_args{ - PPSWorkload * wl; - UInt32 id; - UInt32 tot; -}; - -class PPSTxnManager : public TxnManager { -public: - void init(uint64_t thd_id, Workload * h_wl); - void reset(); - RC acquire_locks(); - RC run_txn(); - RC run_txn_post_wait(); - RC run_calvin_txn(); - RC run_pps_phase2(); - RC run_pps_phase5(); - PPSRemTxnType state; - void copy_remote_items(PPSQueryMessage * msg); -private: - PPSWorkload * _wl; - volatile RC _rc; - row_t * row; - - uint64_t parts_processed_count; - - void next_pps_state(); - RC run_txn_state(); - bool is_done(); - bool is_local_item(uint64_t idx); - RC send_remote_request(); - -inline void getThreeFields(row_t *& r_local); -inline void getAllFields(row_t *& r_local); -inline RC run_getpart_0(uint64_t part_key, row_t *& r_local); -inline RC run_getpart_1(row_t *& r_local); -inline RC run_getproduct_0(uint64_t product_key, row_t *& r_local); -inline RC run_getproduct_1(row_t *& r_local); -inline RC run_getsupplier_0(uint64_t supplier_key, row_t *& r_local); -inline RC run_getsupplier_1(row_t *& r_local); -inline RC run_getpartsbyproduct_0(uint64_t product_key, row_t *& r_local); -inline RC run_getpartsbyproduct_1(row_t *& r_local); -inline RC run_getpartsbyproduct_2(uint64_t product_key, row_t *& r_local); -inline RC run_getpartsbyproduct_3(uint64_t &part_key, row_t *& r_local); -inline RC run_getpartsbyproduct_4(uint64_t part_key, row_t *& r_local); -inline RC run_getpartsbyproduct_5(row_t *& r_local); -inline RC run_getpartsbysupplier_0(uint64_t supplier_key, row_t *& r_local); -inline RC run_getpartsbysupplier_1(row_t *& r_local); -inline RC run_getpartsbysupplier_2(uint64_t supplier_key, row_t *& r_local); -inline RC run_getpartsbysupplier_3(uint64_t &part_key, row_t *& r_local); -inline RC run_getpartsbysupplier_4(uint64_t part_key, row_t *& r_local); -inline RC run_getpartsbysupplier_5(row_t *& r_local); -inline RC run_orderproduct_0(uint64_t product_key, row_t *& r_local); -inline RC run_orderproduct_1(row_t *& r_local); -inline RC run_orderproduct_2(uint64_t product_key, row_t *& r_local); -inline RC run_orderproduct_3(uint64_t &part_key, row_t *& r_local); -inline RC run_orderproduct_4(uint64_t part_key, row_t *& r_local); -inline RC run_orderproduct_5(row_t *& r_local); -inline RC run_updateproductpart_0(uint64_t product_key, row_t *& r_local); -inline RC run_updateproductpart_1(uint64_t part_key, row_t *& r_local); -inline RC run_updatepart_0(uint64_t part_key, row_t *& r_local); -inline RC run_updatepart_1(row_t *& r_local); -}; - -#endif diff --git a/contrib/deneva/benchmarks/pps_helper.cpp b/contrib/deneva/benchmarks/pps_helper.cpp deleted file mode 100644 index 168d299a..00000000 --- a/contrib/deneva/benchmarks/pps_helper.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "pps_helper.h" - -uint64_t parts_to_partition(uint64_t part_key) { return (part_key) % g_part_cnt; } - -uint64_t products_to_partition(uint64_t product_key) { return (product_key) % g_part_cnt; } - -uint64_t suppliers_to_partition(uint64_t supplier_key) { return (supplier_key) % g_part_cnt; } - -/* -uint64_t URand(uint64_t x, uint64_t y) { - return x + RAND(y - x + 1); -} -uint64_t RAND(uint64_t max) { - return rand() % max; -} -*/ diff --git a/contrib/deneva/benchmarks/pps_helper.h b/contrib/deneva/benchmarks/pps_helper.h deleted file mode 100644 index 374f7155..00000000 --- a/contrib/deneva/benchmarks/pps_helper.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _PPS_HELPER_H_ -#define _PPS_HELPER_H_ - -#include "global.h" -#include "helper.h" -#include "tpcc_helper.h" - -enum { - FIELD1=1, - FIELD2, - FIELD3, - FIELD4, - FIELD5, - FIELD6, - FIELD7, - FIELD8, - FIELD9, - FIELD10, - PART_AMOUNT, -}; - - -uint64_t parts_to_partition(uint64_t part_key); -uint64_t products_to_partition(uint64_t product_key); -uint64_t suppliers_to_partition(uint64_t supplier_key); - -/* -// return random data from [0, max-1] -uint64_t RAND(uint64_t max); -// random number from [x, y] -uint64_t URand(uint64_t x, uint64_t y); -*/ - -#endif diff --git a/contrib/deneva/benchmarks/pps_query.cpp b/contrib/deneva/benchmarks/pps_query.cpp deleted file mode 100644 index c6580ce0..00000000 --- a/contrib/deneva/benchmarks/pps_query.cpp +++ /dev/null @@ -1,501 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "query.h" -#include "pps_query.h" -#include "pps.h" -#include "pps_helper.h" -#include "mem_alloc.h" -#include "wl.h" -#include "table.h" -#include "message.h" - -BaseQuery * PPSQueryGenerator::create_query(Workload * h_wl,uint64_t home_partition_id) { - double x = (double)(rand() % 100) / 100.0; - if (x < g_perc_getparts) { - return gen_requests_parts(home_partition_id); - } - if (x < g_perc_getparts + g_perc_getsuppliers) { - return gen_requests_suppliers(home_partition_id); - } - if (x < g_perc_getparts + g_perc_getsuppliers + g_perc_getproducts) { - return gen_requests_products(home_partition_id); - } - if (x < g_perc_getparts + g_perc_getsuppliers + g_perc_getproducts + g_perc_getpartbysupplier) { - return gen_requests_partsbysupplier(home_partition_id); - } - if (x < g_perc_getparts + g_perc_getsuppliers + g_perc_getproducts + g_perc_getpartbysupplier + - g_perc_getpartbyproduct) { - return gen_requests_partsbyproduct(home_partition_id); - } - if (x < g_perc_getparts + g_perc_getsuppliers + g_perc_getproducts + g_perc_getpartbysupplier + - g_perc_getpartbyproduct + g_perc_orderproduct) { - return gen_requests_orderproduct(home_partition_id); - } - if (x < g_perc_getparts + g_perc_getsuppliers + g_perc_getproducts + g_perc_getpartbysupplier + - g_perc_getpartbyproduct + g_perc_orderproduct + g_perc_updateproductpart) { - return gen_requests_updateproductpart(home_partition_id); - } - if (x < g_perc_getparts + g_perc_getsuppliers + g_perc_getproducts + g_perc_getpartbysupplier + - g_perc_getpartbyproduct + g_perc_orderproduct + g_perc_updateproductpart + - g_perc_updatepart) { - return gen_requests_updatepart(home_partition_id); - } - assert(false); - return NULL; - -} - -void PPSQuery::init(uint64_t thd_id, Workload * h_wl) { - BaseQuery::init(); - part_keys.init(MAX_PPS_PART_PER_PRODUCT); -} - -void PPSQuery::init() { - BaseQuery::init(); - part_keys.init(MAX_PPS_PART_PER_PRODUCT); -} - -void PPSQuery::print() { - std::cout << "part_key: " << part_key << "supplier_key: " << supplier_key - << "product_key: " << product_key << std::endl; -} - -std::set PPSQuery::participants(Message * msg, Workload * wl) { - std::set participant_set; - PPSClientQueryMessage* pps_msg = ((PPSClientQueryMessage*)msg); - uint64_t id; - - switch(pps_msg->txn_type) { - case PPS_GETPART: - id = GET_NODE_ID(parts_to_partition(pps_msg->part_key)); - participant_set.insert(id); - break; - case PPS_GETPRODUCT: - id = GET_NODE_ID(products_to_partition(pps_msg->product_key)); - participant_set.insert(id); - break; - case PPS_GETSUPPLIER: - id = GET_NODE_ID(suppliers_to_partition(pps_msg->supplier_key)); - participant_set.insert(id); - break; - case PPS_GETPARTBYSUPPLIER: - id = GET_NODE_ID(suppliers_to_partition(pps_msg->supplier_key)); - participant_set.insert(id); - for (uint64_t key = 0; key < pps_msg->part_keys.size(); key++) { - uint64_t tmp = pps_msg->part_keys[key]; - id = GET_NODE_ID(parts_to_partition(tmp)); - participant_set.insert(id); - } - break; - case PPS_GETPARTBYPRODUCT: - id = GET_NODE_ID(products_to_partition(pps_msg->product_key)); - participant_set.insert(id); - for (uint64_t key = 0; key < pps_msg->part_keys.size(); key++) { - uint64_t tmp = pps_msg->part_keys[key]; - id = GET_NODE_ID(parts_to_partition(tmp)); - participant_set.insert(id); - } - break; - case PPS_ORDERPRODUCT: - id = GET_NODE_ID(products_to_partition(pps_msg->product_key)); - participant_set.insert(id); - for (uint64_t key = 0; key < pps_msg->part_keys.size(); key++) { - uint64_t tmp = pps_msg->part_keys[key]; - id = GET_NODE_ID(parts_to_partition(tmp)); - participant_set.insert(id); - } - break; - case PPS_UPDATEPRODUCTPART: - id = GET_NODE_ID(products_to_partition(pps_msg->product_key)); - participant_set.insert(id); - break; - case PPS_UPDATEPART: - id = GET_NODE_ID(parts_to_partition(pps_msg->part_key)); - participant_set.insert(id); - break; - default: - assert(false); - } - - return participant_set; -} - -// Depreciated -uint64_t PPSQuery::participants(bool *& pps,Workload * wl) { - int n = 0; - for (uint64_t i = 0; i < g_node_cnt; i++) pps[i] = false; - uint64_t id; - - switch(txn_type) { - case PPS_GETPART: - id = GET_NODE_ID(parts_to_partition(part_key)); - if(!pps[id]) { - pps[id] = true; - n++; - } - break; - case PPS_GETPRODUCT: - id = GET_NODE_ID(products_to_partition(product_key)); - if(!pps[id]) { - pps[id] = true; - n++; - } - break; - case PPS_GETSUPPLIER: - id = GET_NODE_ID(suppliers_to_partition(supplier_key)); - if(!pps[id]) { - pps[id] = true; - n++; - } - break; - case PPS_GETPARTBYSUPPLIER: - id = GET_NODE_ID(suppliers_to_partition(supplier_key)); - if(!pps[id]) { - pps[id] = true; - n++; - } - id = GET_NODE_ID(parts_to_partition(part_key)); - if(!pps[id]) { - pps[id] = true; - n++; - } - break; - case PPS_GETPARTBYPRODUCT: - id = GET_NODE_ID(products_to_partition(product_key)); - if(!pps[id]) { - pps[id] = true; - n++; - } - id = GET_NODE_ID(parts_to_partition(part_key)); - if(!pps[id]) { - pps[id] = true; - n++; - } - break; - case PPS_ORDERPRODUCT: - id = GET_NODE_ID(products_to_partition(product_key)); - if(!pps[id]) { - pps[id] = true; - n++; - } - id = GET_NODE_ID(parts_to_partition(part_key)); - if(!pps[id]) { - pps[id] = true; - n++; - } - break; - - default: - assert(false); - } - - return n; -} - -bool PPSQuery::readonly() { - if (txn_type == PPS_ORDERPRODUCT || txn_type == PPS_UPDATEPRODUCTPART || - txn_type == PPS_UPDATEPART) { - return false; - } - return true; -} - -BaseQuery * PPSQueryGenerator::gen_requests_parts(uint64_t home_partition) { - PPSQuery * query = new PPSQuery; - set partitions_accessed; - - query->txn_type = PPS_GETPART; - uint64_t part_key; - // select a part - if (FIRST_PART_LOCAL) { - while (parts_to_partition(part_key = URand(1, g_max_part_key)) != home_partition) { - } - } else - part_key = URand(1, g_max_part_key); - - query->part_key = part_key; - partitions_accessed.insert(parts_to_partition(part_key)); - - query->partitions.init(partitions_accessed.size()); - for(auto it = partitions_accessed.begin(); it != partitions_accessed.end(); ++it) { - query->partitions.add(*it); - } - return query; -} - -BaseQuery * PPSQueryGenerator::gen_requests_suppliers(uint64_t home_partition) { - PPSQuery * query = new PPSQuery; - set partitions_accessed; - - query->txn_type = PPS_GETSUPPLIER; - uint64_t supplier_key; - // select a part - if (FIRST_PART_LOCAL) { - while (suppliers_to_partition(supplier_key = URand(1, g_max_supplier_key)) != home_partition) { - } - } else - supplier_key = URand(1, g_max_supplier_key); - - query->supplier_key = supplier_key; - partitions_accessed.insert(suppliers_to_partition(supplier_key)); - - query->partitions.init(partitions_accessed.size()); - for(auto it = partitions_accessed.begin(); it != partitions_accessed.end(); ++it) { - query->partitions.add(*it); - } - return query; -} - - -BaseQuery * PPSQueryGenerator::gen_requests_products(uint64_t home_partition) { - PPSQuery * query = new PPSQuery; - set partitions_accessed; - - query->txn_type = PPS_GETPRODUCT; - uint64_t product_key; - // select a part - if (FIRST_PART_LOCAL) { - while (products_to_partition(product_key = URand(1, g_max_product_key)) != home_partition) { - } - } else - product_key = URand(1, g_max_product_key); - - query->product_key = product_key; - partitions_accessed.insert(products_to_partition(product_key)); - - query->partitions.init(partitions_accessed.size()); - for(auto it = partitions_accessed.begin(); it != partitions_accessed.end(); ++it) { - query->partitions.add(*it); - } - return query; -} - -BaseQuery * PPSQueryGenerator::gen_requests_partsbysupplier(uint64_t home_partition) { - PPSQuery * query = new PPSQuery; - set partitions_accessed; - - query->txn_type = PPS_GETPARTBYSUPPLIER; - uint64_t supplier_key; - // select a part - if (FIRST_PART_LOCAL) { - while (suppliers_to_partition(supplier_key = URand(1, g_max_supplier_key)) != home_partition) { - } - } else - supplier_key = URand(1, g_max_supplier_key); - - query->supplier_key = supplier_key; - partitions_accessed.insert(suppliers_to_partition(supplier_key)); - - query->partitions.init(partitions_accessed.size()); - for(auto it = partitions_accessed.begin(); it != partitions_accessed.end(); ++it) { - query->partitions.add(*it); - } - return query; -} - -BaseQuery * PPSQueryGenerator::gen_requests_partsbyproduct(uint64_t home_partition) { - PPSQuery * query = new PPSQuery; - set partitions_accessed; - - query->txn_type = PPS_GETPARTBYPRODUCT; - uint64_t product_key; - // select a part - if (FIRST_PART_LOCAL) { - while (products_to_partition(product_key = URand(1, g_max_product_key)) != home_partition) { - } - } else - product_key = URand(1, g_max_product_key); - - query->product_key = product_key; - partitions_accessed.insert(products_to_partition(product_key)); - - query->partitions.init(partitions_accessed.size()); - for(auto it = partitions_accessed.begin(); it != partitions_accessed.end(); ++it) { - query->partitions.add(*it); - } - return query; -} - -BaseQuery * PPSQueryGenerator::gen_requests_orderproduct(uint64_t home_partition) { - PPSQuery * query = new PPSQuery; - set partitions_accessed; - - query->txn_type = PPS_ORDERPRODUCT; - uint64_t product_key; - // select a part - if (FIRST_PART_LOCAL) { - while (products_to_partition(product_key = URand(1, g_max_product_key)) != home_partition) { - } - } else - product_key = URand(1, g_max_product_key); - - query->product_key = product_key; - partitions_accessed.insert(products_to_partition(product_key)); - - query->partitions.init(partitions_accessed.size()); - for(auto it = partitions_accessed.begin(); it != partitions_accessed.end(); ++it) { - query->partitions.add(*it); - } - return query; -} - -BaseQuery * PPSQueryGenerator::gen_requests_updateproductpart(uint64_t home_partition) { - PPSQuery * query = new PPSQuery; - set partitions_accessed; - - query->txn_type = PPS_UPDATEPRODUCTPART; - uint64_t product_key; - // select a part - if (FIRST_PART_LOCAL) { - while (products_to_partition(product_key = URand(1, g_max_product_key)) != home_partition) { - } - } else - product_key = URand(1, g_max_product_key); - - query->product_key = product_key; - partitions_accessed.insert(products_to_partition(product_key)); - query->part_key = URand(1, g_max_part_key); - - query->partitions.init(partitions_accessed.size()); - for(auto it = partitions_accessed.begin(); it != partitions_accessed.end(); ++it) { - query->partitions.add(*it); - } - return query; -} - - -BaseQuery * PPSQueryGenerator::gen_requests_updatepart(uint64_t home_partition) { - PPSQuery * query = new PPSQuery; - set partitions_accessed; - - query->txn_type = PPS_UPDATEPART; - uint64_t part_key; - // select a part - if (FIRST_PART_LOCAL) { - while (parts_to_partition(part_key = URand(1, g_max_part_key)) != home_partition) { - } - } else - part_key = URand(1, g_max_part_key); - - query->part_key = part_key; - partitions_accessed.insert(parts_to_partition(part_key)); - - query->partitions.init(partitions_accessed.size()); - for(auto it = partitions_accessed.begin(); it != partitions_accessed.end(); ++it) { - query->partitions.add(*it); - } - return query; -} - - -uint64_t PPSQuery::get_participants(Workload * wl) { - uint64_t participant_cnt = 0; - uint64_t active_cnt = 0; - assert(participant_nodes.size()==0); - assert(active_nodes.size()==0); - for(uint64_t i = 0; i < g_node_cnt; i++) { - participant_nodes.add(0); - active_nodes.add(0); - } - assert(participant_nodes.size()==g_node_cnt); - assert(active_nodes.size()==g_node_cnt); - uint64_t id; - - if (txn_type == PPS_GETPART) { - id = GET_NODE_ID(parts_to_partition(part_key)); - participant_nodes.set(id,1); - participant_cnt++; - } - if (txn_type == PPS_GETPRODUCT) { - id = GET_NODE_ID(products_to_partition(product_key)); - participant_nodes.set(id,1); - participant_cnt++; - } - if (txn_type == PPS_GETSUPPLIER) { - id = GET_NODE_ID(suppliers_to_partition(supplier_key)); - participant_nodes.set(id,1); - participant_cnt++; - } - if (txn_type == PPS_GETPARTBYPRODUCT) { - id = GET_NODE_ID(products_to_partition(product_key)); - participant_nodes.set(id,1); - participant_cnt++; - for (uint64_t key = 0; key < part_keys.size(); key++) { - id = GET_NODE_ID(parts_to_partition(part_keys[key])); - if (participant_nodes[id] == 0) { - participant_nodes.set(id,1); - participant_cnt++; - } - } - } - if (txn_type == PPS_GETPARTBYSUPPLIER) { - id = GET_NODE_ID(suppliers_to_partition(supplier_key)); - participant_nodes.set(id,1); - participant_cnt++; - for (uint64_t key = 0; key < part_keys.size(); key++) { - id = GET_NODE_ID(parts_to_partition(part_keys[key])); - if (participant_nodes[id] == 0) { - participant_nodes.set(id,1); - participant_cnt++; - } - } - } - if (txn_type == PPS_ORDERPRODUCT) { - id = GET_NODE_ID(products_to_partition(product_key)); - participant_nodes.set(id,1); - participant_cnt++; - for (uint64_t key = 0; key < part_keys.size(); key++) { - id = GET_NODE_ID(parts_to_partition(part_keys[key])); - if (participant_nodes[id] == 0) { - participant_nodes.set(id,1); - participant_cnt++; - } - if (active_nodes[id] == 0) { - active_nodes.set(id,1); - active_cnt++; - } - } - } - if (txn_type == PPS_UPDATEPRODUCTPART) { - id = GET_NODE_ID(products_to_partition(product_key)); - participant_nodes.set(id,1); - participant_cnt++; - active_nodes.set(id,1); - active_cnt++; - } - if (txn_type == PPS_UPDATEPART) { - id = GET_NODE_ID(parts_to_partition(part_key)); - participant_nodes.set(id,1); - participant_cnt++; - active_nodes.set(id,1); - active_cnt++; - } - - return participant_cnt; -} - -void PPSQuery::reset() { - BaseQuery::clear(); - part_keys.clear(); -} - -void PPSQuery::release() { - BaseQuery::release(); - part_keys.release(); - DEBUG_M("PPSQuery::release() free\n"); -} - diff --git a/contrib/deneva/benchmarks/pps_query.h b/contrib/deneva/benchmarks/pps_query.h deleted file mode 100644 index 878ff371..00000000 --- a/contrib/deneva/benchmarks/pps_query.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _PPSQUERY_H_ -#define _PPSQUERY_H_ - -#include "global.h" -#include "helper.h" -#include "query.h" - -class Workload; -class Message; -class PPSQueryMessage; -class PPSClientQueryMessage; - -class PPSQueryGenerator : public QueryGenerator { -public: - BaseQuery * create_query(Workload * h_wl, uint64_t home_partition_id); - -private: - BaseQuery * gen_requests_parts(uint64_t home_partition_id); - BaseQuery * gen_requests_suppliers(uint64_t home_partition_id); - BaseQuery * gen_requests_products(uint64_t home_partition_id); - BaseQuery * gen_requests_partsbysupplier(uint64_t home_partition_id); - BaseQuery * gen_requests_partsbyproduct(uint64_t home_partition_id); - BaseQuery * gen_requests_orderproduct(uint64_t home_partition_id); - BaseQuery * gen_requests_updateproductpart(uint64_t home_partition_id); - BaseQuery * gen_requests_updatepart(uint64_t home_partition_id); - myrand * mrand; -}; - -class PPSQuery : public BaseQuery { -public: - void init(uint64_t thd_id, Workload * h_wl); - void init(); - void reset(); - void release(); - void print(); - static std::set participants(Message * msg, Workload * wl); - uint64_t participants(bool *& pps,Workload * wl); - uint64_t get_participants(Workload * wl); - bool readonly(); - virtual bool isReconQuery() { - bool result = (txn_type == PPS_GETPARTBYSUPPLIER) || (txn_type == PPS_GETPARTBYPRODUCT) || - (txn_type == PPS_ORDERPRODUCT); - return result; - } - - PPSTxnType txn_type; - // txn input - - uint64_t rqry_req_cnt; - uint64_t part_key; - uint64_t supplier_key; - uint64_t product_key; - - // part keys from secondary lookup - Array part_keys; - - // track number of parts we've read - // in a getpartsbyX query - -}; - -#endif diff --git a/contrib/deneva/benchmarks/pps_txn.cpp b/contrib/deneva/benchmarks/pps_txn.cpp deleted file mode 100644 index f69cc294..00000000 --- a/contrib/deneva/benchmarks/pps_txn.cpp +++ /dev/null @@ -1,1246 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "pps.h" -#include "pps_query.h" -#include "pps_helper.h" -#include "query.h" -#include "wl.h" -#include "thread.h" -#include "table.h" -#include "row.h" -#include "index_hash.h" -#include "index_btree.h" -#include "transport.h" -#include "msg_queue.h" -#include "message.h" - -void PPSTxnManager::init(uint64_t thd_id, Workload * h_wl) { - TxnManager::init(thd_id, h_wl); - _wl = (PPSWorkload *) h_wl; - reset(); - TxnManager::reset(); -} - -void PPSTxnManager::reset() { - PPSQuery* pps_query = (PPSQuery*) query; - state = PPS_GETPART0; - - int txn_type = pps_query->txn_type; - - if (txn_type == PPS_GETPART) { - state = PPS_GETPART0; - } - if (txn_type == PPS_GETPRODUCT) { - state = PPS_GETPRODUCT0; - } - if (txn_type == PPS_GETSUPPLIER) { - state = PPS_GETSUPPLIER0; - } - if (txn_type == PPS_GETPARTBYPRODUCT) { - state = PPS_GETPARTBYPRODUCT0; - } - if (txn_type == PPS_GETPARTBYSUPPLIER) { - state = PPS_GETPARTBYSUPPLIER0; - } - if (txn_type == PPS_ORDERPRODUCT) { - state = PPS_ORDERPRODUCT0; - } - if (txn_type == PPS_UPDATEPRODUCTPART) { - state = PPS_UPDATEPRODUCTPART0; - } - if (txn_type == PPS_UPDATEPART) { - state = PPS_UPDATEPART0; - } - - parts_processed_count = 0; - pps_query->part_keys.clear(); - TxnManager::reset(); -} - -RC PPSTxnManager::run_txn_post_wait() { - get_row_post_wait(row); - next_pps_state(); - return RCOK; -} - - -RC PPSTxnManager::run_txn() { -#if MODE == SETUP_MODE - return RCOK; -#endif - RC rc = RCOK; - uint64_t starttime = get_sys_clock(); - -#if CC_ALG == CALVIN - rc = run_calvin_txn(); - return rc; -#endif - - if(IS_LOCAL(txn->txn_id) && - (state == PPS_GETPART0 || state == PPS_GETPRODUCT0 || state == PPS_GETSUPPLIER0 || - state == PPS_GETPARTBYSUPPLIER0 || state == PPS_GETPARTBYPRODUCT0 || - state == PPS_ORDERPRODUCT0 || state == PPS_UPDATEPRODUCTPART0 || state == PPS_UPDATEPART0)) { - DEBUG("Running txn %ld, type %d\n",txn->txn_id,((PPSQuery*)query)->txn_type); -#if DISTR_DEBUG - query->print(); -#endif - query->partitions_touched.add_unique(GET_PART_ID(0,g_node_id)); - } - - - while(rc == RCOK && !is_done()) { - rc = run_txn_state(); - } - - uint64_t curr_time = get_sys_clock(); - txn_stats.process_time += curr_time - starttime; - txn_stats.process_time_short += curr_time - starttime; - - if(IS_LOCAL(get_txn_id())) { - if(is_done() && rc == RCOK) - rc = start_commit(); - else if(rc == Abort) - rc = start_abort(); - } - - return rc; - -} - -bool PPSTxnManager::is_done() { - bool done = false; - done = state == PPS_FIN; - return done; -} - -RC PPSTxnManager::acquire_locks() { - uint64_t starttime = get_sys_clock(); - assert(CC_ALG == CALVIN); - locking_done = false; - RC rc = RCOK; - RC rc2 = RCOK; - INDEX * index; - itemid_t * item; - incr_lr(); - PPSQuery* pps_query = (PPSQuery*) query; - uint64_t part_key = pps_query->part_key; - uint64_t product_key = pps_query->product_key; - uint64_t supplier_key = pps_query->supplier_key; - uint64_t partition_id_part = parts_to_partition(pps_query->part_key); - uint64_t partition_id_product = products_to_partition(pps_query->product_key); - uint64_t partition_id_supplier = suppliers_to_partition(pps_query->supplier_key); - - switch(pps_query->txn_type) { - case PPS_GETPART: - if(GET_NODE_ID(partition_id_part) == g_node_id) { - index = _wl->i_parts; - item = index_read(index, part_key, partition_id_part); - row_t * row = ((row_t *)item->location); - rc2 = get_lock(row,RD); - if (rc2 != RCOK) rc = rc2; - } - break; - case PPS_GETPRODUCT: - if(GET_NODE_ID(partition_id_product) == g_node_id) { - index = _wl->i_products; - item = index_read(index, product_key, partition_id_product); - row_t * row = ((row_t *)item->location); - rc2 = get_lock(row,RD); - if (rc2 != RCOK) rc = rc2; - } - break; - case PPS_GETSUPPLIER: - if(GET_NODE_ID(partition_id_supplier) == g_node_id) { - index = _wl->i_suppliers; - item = index_read(index, supplier_key, partition_id_supplier); - row_t * row = ((row_t *)item->location); - rc2 = get_lock(row,RD); - if (rc2 != RCOK) rc = rc2; - } - break; - case PPS_GETPARTBYSUPPLIER: - if(GET_NODE_ID(partition_id_supplier) == g_node_id) { - index = _wl->i_suppliers; - item = index_read(index, supplier_key, partition_id_supplier); - row_t * row = ((row_t *)item->location); - rc2 = get_lock(row,RD); - if (rc2 != RCOK) rc = rc2; - - index = _wl->i_supplies; - int count = 0; - item = index_read(index, supplier_key, partition_id_product,count); - while (item != NULL) { - count++; - row_t * row = ((row_t *)item->location); - rc2 = get_lock(row,RD); - if (rc2 != RCOK) rc = rc2; - item = index_read(index, supplier_key, partition_id_product,count); - } - } - for (uint64_t i = 0; i < pps_query->part_keys.size(); i++) { - uint64_t key = pps_query->part_keys[i]; - uint64_t pid = parts_to_partition(key); - if(GET_NODE_ID(pid) == g_node_id) { - index = _wl->i_parts; - item = index_read(index, key, pid); - row_t * row = ((row_t *)item->location); - rc2 = get_lock(row,RD); - if (rc2 != RCOK) rc = rc2; - } - } - - break; - case PPS_GETPARTBYPRODUCT: - if(GET_NODE_ID(partition_id_product) == g_node_id) { - index = _wl->i_products; - item = index_read(index, product_key, partition_id_product); - row_t * row = ((row_t *)item->location); - rc2 = get_lock(row,RD); - if (rc2 != RCOK) rc = rc2; - - index = _wl->i_uses; - int count = 0; - item = index_read(index, product_key, partition_id_product,count); - while (item != NULL) { - count++; - row_t * row = ((row_t *)item->location); - rc2 = get_lock(row,RD); - if (rc2 != RCOK) rc = rc2; - item = index_read(index, product_key, partition_id_product,count); - } - } - for (uint64_t i = 0; i < pps_query->part_keys.size(); i++) { - uint64_t key = pps_query->part_keys[i]; - uint64_t pid = parts_to_partition(key); - if(GET_NODE_ID(pid) == g_node_id) { - index = _wl->i_parts; - item = index_read(index, key, pid); - row_t * row = ((row_t *)item->location); - rc2 = get_lock(row,RD); - if (rc2 != RCOK) rc = rc2; - } - } - - break; - case PPS_ORDERPRODUCT: - if(GET_NODE_ID(partition_id_product) == g_node_id) { - index = _wl->i_products; - item = index_read(index, product_key, partition_id_product); - row_t * row = ((row_t *)item->location); - rc2 = get_lock(row,RD); - if (rc2 != RCOK) rc = rc2; - - index = _wl->i_uses; - int count = 0; - item = index_read(index, product_key, partition_id_product,count); - while (item != NULL) { - count++; - row_t * row = ((row_t *)item->location); - rc2 = get_lock(row,RD); - if (rc2 != RCOK) rc = rc2; - item = index_read(index, product_key, partition_id_product,count); - } - } - for (uint64_t i = 0; i < pps_query->part_keys.size(); i++) { - uint64_t key = pps_query->part_keys[i]; - uint64_t pid = parts_to_partition(key); - if(GET_NODE_ID(pid) == g_node_id) { - index = _wl->i_parts; - item = index_read(index, key, pid); - row_t * row = ((row_t *)item->location); - rc2 = get_lock(row,WR); - if (rc2 != RCOK) rc = rc2; - } - } - - break; - case PPS_UPDATEPRODUCTPART: - if(GET_NODE_ID(partition_id_product) == g_node_id) { - index = _wl->i_products; - item = index_read(index, product_key, partition_id_product); - row_t * row = ((row_t *)item->location); - rc2 = get_lock(row,WR); - if (rc2 != RCOK) rc = rc2; - } - break; - case PPS_UPDATEPART: - if(GET_NODE_ID(partition_id_part) == g_node_id) { - index = _wl->i_parts; - item = index_read(index, part_key, partition_id_part); - row_t * row = ((row_t *)item->location); - rc2 = get_lock(row,WR); - if (rc2 != RCOK) rc = rc2; - } - break; - - default: - assert(false); - } - if(decr_lr() == 0) { - if (ATOM_CAS(lock_ready, 0, 1)) rc = RCOK; - } - txn_stats.wait_starttime = get_sys_clock(); - locking_done = true; - INC_STATS(get_thd_id(),calvin_sched_time,get_sys_clock() - starttime); - return rc; -} - - -void PPSTxnManager::next_pps_state() { - switch(state) { - case PPS_GETPART_S: - state = PPS_GETPART0; - break; - case PPS_GETPART0: - state = PPS_GETPART1; - break; - case PPS_GETPART1: - state = PPS_FIN; - break; - case PPS_GETPRODUCT_S: - state = PPS_GETPRODUCT0; - break; - case PPS_GETPRODUCT0: - state = PPS_GETPRODUCT1; - break; - case PPS_GETPRODUCT1: - state = PPS_FIN; - break; - case PPS_GETSUPPLIER_S: - state = PPS_GETSUPPLIER0; - break; - case PPS_GETSUPPLIER0: - state = PPS_GETSUPPLIER1; - break; - case PPS_GETSUPPLIER1: - state = PPS_FIN; - break; - case PPS_GETPARTBYSUPPLIER_S: - state = PPS_GETPARTBYSUPPLIER0; - break; - case PPS_GETPARTBYSUPPLIER0: - state = PPS_GETPARTBYSUPPLIER1; - break; - case PPS_GETPARTBYSUPPLIER1: - state = PPS_GETPARTBYSUPPLIER2; - break; - case PPS_GETPARTBYSUPPLIER2: - if (row == NULL) { - state = PPS_FIN; - } else { - ++parts_processed_count; - state = PPS_GETPARTBYSUPPLIER3; - } - break; - case PPS_GETPARTBYSUPPLIER3: - state = PPS_GETPARTBYSUPPLIER4; - break; - case PPS_GETPARTBYSUPPLIER4: - state = PPS_GETPARTBYSUPPLIER5; - break; - case PPS_GETPARTBYSUPPLIER5: - state = PPS_GETPARTBYSUPPLIER2; - if (!IS_LOCAL(txn->txn_id)) { - state = PPS_FIN; - } - break; - case PPS_GETPARTBYPRODUCT_S: - state = PPS_GETPARTBYPRODUCT0; - break; - case PPS_GETPARTBYPRODUCT0: - state = PPS_GETPARTBYPRODUCT1; - break; - case PPS_GETPARTBYPRODUCT1: - state = PPS_GETPARTBYPRODUCT2; - break; - case PPS_GETPARTBYPRODUCT2: - if (row == NULL) { - state = PPS_FIN; - } else { - ++parts_processed_count; - state = PPS_GETPARTBYPRODUCT3; - } - break; - case PPS_GETPARTBYPRODUCT3: - state = PPS_GETPARTBYPRODUCT4; - break; - case PPS_GETPARTBYPRODUCT4: - state = PPS_GETPARTBYPRODUCT5; - break; - case PPS_GETPARTBYPRODUCT5: - state = PPS_GETPARTBYPRODUCT2; - if (!IS_LOCAL(txn->txn_id)) { - state = PPS_FIN; - } - //state = PPS_FIN; - break; - case PPS_ORDERPRODUCT_S: - state = PPS_ORDERPRODUCT0; - break; - case PPS_ORDERPRODUCT0: - state = PPS_ORDERPRODUCT1; - break; - case PPS_ORDERPRODUCT1: - state = PPS_ORDERPRODUCT2; - break; - case PPS_ORDERPRODUCT2: - if(!IS_LOCAL(txn->txn_id) && row != NULL) { - ++parts_processed_count; - state = PPS_ORDERPRODUCT3; - } else { - state = PPS_FIN; - } - break; - case PPS_ORDERPRODUCT3: - state = PPS_ORDERPRODUCT4; - break; - case PPS_ORDERPRODUCT4: - state = PPS_ORDERPRODUCT5; - break; - case PPS_ORDERPRODUCT5: - state = PPS_ORDERPRODUCT2; - if (!IS_LOCAL(txn->txn_id)) { - state = PPS_FIN; - } - break; - case PPS_UPDATEPRODUCTPART_S: - state = PPS_UPDATEPRODUCTPART0; - break; - case PPS_UPDATEPRODUCTPART0: - state = PPS_UPDATEPRODUCTPART1; - break; - case PPS_UPDATEPRODUCTPART1: - state = PPS_FIN; - break; - case PPS_UPDATEPART_S: - state = PPS_UPDATEPART0; - break; - case PPS_UPDATEPART0: - state = PPS_UPDATEPART1; - break; - case PPS_UPDATEPART1: - state = PPS_FIN; - break; - case PPS_FIN: - break; - default: - assert(false); - } - -} - -// remote request should always be on a parts key, given our workload -RC PPSTxnManager::send_remote_request() { - assert(IS_LOCAL(get_txn_id())); - PPSQuery* pps_query = (PPSQuery*) query; - PPSRemTxnType next_state = PPS_FIN; - uint64_t part_key = pps_query->part_key; - uint64_t dest_node_id = UINT64_MAX; - dest_node_id = GET_NODE_ID(parts_to_partition(part_key)); - PPSQueryMessage * msg = (PPSQueryMessage*)Message::create_message(this,RQRY); - msg->state = state; - query->partitions_touched.add_unique(GET_PART_ID(0,dest_node_id)); - msg_queue.enqueue(get_thd_id(),msg,dest_node_id); - state = next_state; - return WAIT_REM; -} - -RC PPSTxnManager::run_txn_state() { - PPSQuery* pps_query = (PPSQuery*) query; - RC rc = RCOK; - uint64_t part_key = pps_query->part_key; - uint64_t product_key = pps_query->product_key; - uint64_t supplier_key = pps_query->supplier_key; - bool part_loc = GET_NODE_ID(parts_to_partition(part_key)) == g_node_id; - bool product_loc = GET_NODE_ID(products_to_partition(product_key)) == g_node_id; - bool supplier_loc = GET_NODE_ID(suppliers_to_partition(supplier_key)) == g_node_id; - switch(state) { - case PPS_GETPART0: - if (part_loc) - rc = run_getpart_0(part_key, row); - else - rc = send_remote_request(); - break; - case PPS_GETPART1: - rc = run_getpart_1(row); - break; - case PPS_GETPRODUCT0: - if (product_loc) - rc = run_getproduct_0(product_key, row); - else - rc = send_remote_request(); - break; - case PPS_GETPRODUCT1: - rc = run_getproduct_1(row); - break; - case PPS_GETSUPPLIER0: - if (supplier_loc) - rc = run_getsupplier_0(supplier_key, row); - else - rc = send_remote_request(); - break; - case PPS_GETSUPPLIER1: - rc = run_getsupplier_1(row); - break; - case PPS_GETPARTBYSUPPLIER0: - if (supplier_loc) - rc = run_getpartsbysupplier_0(supplier_key, row); - else - rc = send_remote_request(); - break; - case PPS_GETPARTBYSUPPLIER1: - rc = run_getpartsbysupplier_1(row); - break; - case PPS_GETPARTBYSUPPLIER2: - if (supplier_loc) - rc = run_getpartsbysupplier_2(supplier_key, row); - else - rc = send_remote_request(); - break; - case PPS_GETPARTBYSUPPLIER3: - rc = run_getpartsbysupplier_3(pps_query->part_key, row); - break; - case PPS_GETPARTBYSUPPLIER4: - if (part_loc) - rc = run_getpartsbysupplier_4(pps_query->part_key, row); - else - rc = send_remote_request(); - break; - case PPS_GETPARTBYSUPPLIER5: - rc = run_getpartsbysupplier_5(row); - break; - case PPS_GETPARTBYPRODUCT0: - if (product_loc) - rc = run_getpartsbyproduct_0(product_key, row); - else - rc = send_remote_request(); - break; - case PPS_GETPARTBYPRODUCT1: - rc = run_getpartsbyproduct_1(row); - break; - case PPS_GETPARTBYPRODUCT2: - if (product_loc) - rc = run_getpartsbyproduct_2(product_key, row); - else - rc = send_remote_request(); - break; - case PPS_GETPARTBYPRODUCT3: - rc = run_getpartsbyproduct_3(pps_query->part_key,row); - break; - case PPS_GETPARTBYPRODUCT4: - if (part_loc) - rc = run_getpartsbyproduct_4(pps_query->part_key, row); - else - rc = send_remote_request(); - break; - case PPS_GETPARTBYPRODUCT5: - rc = run_getpartsbyproduct_5(row); - break; - case PPS_ORDERPRODUCT0: - if (product_loc) - rc = run_orderproduct_0(product_key, row); - else - rc = send_remote_request(); - break; - case PPS_ORDERPRODUCT1: - rc = run_orderproduct_1(row); - break; - case PPS_ORDERPRODUCT2: - if (product_loc) - rc = run_orderproduct_2(product_key, row); - else - rc = send_remote_request(); - break; - case PPS_ORDERPRODUCT3: - rc = run_orderproduct_3(pps_query->part_key,row); - break; - case PPS_ORDERPRODUCT4: - if (part_loc) - rc = run_orderproduct_4(pps_query->part_key, row); - else - rc = send_remote_request(); - break; - case PPS_ORDERPRODUCT5: - rc = run_orderproduct_5(row); - break; - case PPS_UPDATEPRODUCTPART0: - if (product_loc) - rc = run_updateproductpart_0(product_key, row); - else - rc = send_remote_request(); - break; - case PPS_UPDATEPRODUCTPART1: - rc = run_updateproductpart_1(part_key, row); - break; - case PPS_UPDATEPART0: - if (part_loc) - rc = run_updatepart_0(part_key, row); - else - rc = send_remote_request(); - break; - case PPS_UPDATEPART1: - rc = run_updatepart_1(row); - break; - case PPS_FIN: - state = PPS_FIN; - break; - default: - assert(false); - } - if (rc == RCOK) next_pps_state(); - return rc; -} - -inline RC PPSTxnManager::run_getpart_0(uint64_t part_key, row_t *& r_local) { - /* - SELECT * FROM PARTS WHERE PART_KEY = :part_key; - */ - RC rc; - itemid_t * item; - INDEX * index = _wl->i_parts; - item = index_read(index, part_key, parts_to_partition(part_key)); - assert(item != NULL); - row_t* r_loc = (row_t *) item->location; - rc = get_row(r_loc, RD, r_local); - return rc; -} -inline RC PPSTxnManager::run_getpart_1(row_t *& r_local) { - /* - SELECT * FROM PARTS WHERE PART_KEY = :part_key; - */ - assert(r_local); - getAllFields(r_local); - return RCOK; -} - - -inline RC PPSTxnManager::run_getproduct_0(uint64_t product_key, row_t *& r_local) { - /* - SELECT * FROM PRODUCTS WHERE PRODUCT_KEY = :product_key; - */ - RC rc; - itemid_t * item; - INDEX * index = _wl->i_products; - item = index_read(index, product_key, products_to_partition(product_key)); - assert(item != NULL); - row_t* r_loc = (row_t *) item->location; - rc = get_row(r_loc, RD, r_local); - return rc; -} -inline RC PPSTxnManager::run_getproduct_1(row_t *& r_local) { - /* - SELECT * FROM PRODUCTS WHERE PRODUCT_KEY = :product_key; - */ - assert(r_local); - getAllFields(r_local); - return RCOK; -} - -inline void PPSTxnManager::getThreeFields(row_t *& r_local) { - //char * fields = new char[100]; - char * data __attribute__((unused)); - data = r_local->get_data(); - //r_local->get_value(FIELD1,fields); - //r_local->get_value(FIELD2,fields); - //r_local->get_value(FIELD3,fields); -} - -inline void PPSTxnManager::getAllFields(row_t *& r_local) { - char * data __attribute__((unused)); - data = r_local->get_data(); - /* - char * fields = new char[100]; - r_local->get_value(FIELD1,fields); - r_local->get_value(FIELD2,fields); - r_local->get_value(FIELD3,fields); - r_local->get_value(FIELD4,fields); - r_local->get_value(FIELD5,fields); - r_local->get_value(FIELD6,fields); - r_local->get_value(FIELD7,fields); - r_local->get_value(FIELD8,fields); - r_local->get_value(FIELD9,fields); - r_local->get_value(FIELD10,fields); - */ -} - -inline RC PPSTxnManager::run_getsupplier_0(uint64_t supplier_key, row_t *& r_local) { - /* - SELECT * FROM SUPPLIERS WHERE SUPPLIER_KEY = :supplier_key; - */ - RC rc; - itemid_t * item; - INDEX * index = _wl->i_suppliers; - item = index_read(index, supplier_key, suppliers_to_partition(supplier_key)); - assert(item != NULL); - row_t* r_loc = (row_t *) item->location; - rc = get_row(r_loc, RD, r_local); - return rc; - -} - -inline RC PPSTxnManager::run_getsupplier_1(row_t *& r_local) { - /* - SELECT * FROM SUPPLIERS WHERE SUPPLIER_KEY = :supplier_key; - */ - assert(r_local); - getAllFields(r_local); - return RCOK; - -} - -inline RC PPSTxnManager::run_getpartsbyproduct_0(uint64_t product_key, row_t *& r_local) { - /* - SELECT FIELD1, FIELD2, FIELD3 FROM PRODUCTS WHERE PRODUCT_KEY = ? - */ - RC rc; - itemid_t * item; - INDEX * index = _wl->i_products; - item = index_read(index, product_key, products_to_partition(product_key)); - assert(item != NULL); - row_t* r_loc = (row_t *) item->location; - rc = get_row(r_loc, RD, r_local); - return rc; -} -inline RC PPSTxnManager::run_getpartsbyproduct_1(row_t *& r_local) { - /* - SELECT FIELD1, FIELD2, FIELD3 FROM PRODUCTS WHERE PRODUCT_KEY = ? - */ - assert(r_local); - getThreeFields(r_local); - return RCOK; -} - -inline RC PPSTxnManager::run_getpartsbyproduct_2(uint64_t product_key, row_t *& r_local) { - /* - SELECT PART_KEY FROM USES WHERE PRODUCT_KEY = ? - */ - DEBUG("Getting product_key %ld count %ld\n",product_key,parts_processed_count); - RC rc; - itemid_t * item; - INDEX * index = _wl->i_uses; - item = index_read(index, product_key, products_to_partition(product_key),parts_processed_count); - if (item == NULL) { - r_local = NULL; - return RCOK; - } - assert(item != NULL); - row_t* r_loc = (row_t *) item->location; - rc = get_row(r_loc, RD, r_local); - DEBUG("From product_key %ld -- %lx\n",product_key,(uint64_t)r_local); - return rc; -} - -inline RC PPSTxnManager::run_getpartsbyproduct_3(uint64_t &part_key, row_t *& r_local) { - /* - SELECT PART_KEY FROM USES WHERE PRODUCT_KEY = ? - */ - //r_local->get_value(PART_KEY,part_key); - //char * data __attribute__((unused)); - //data = r_local->get_data(); - // PART_KEY is located at column 1 - r_local->get_value(1,part_key); - DEBUG("Read part_key %ld\n",part_key); - return RCOK; -} - -inline RC PPSTxnManager::run_getpartsbyproduct_4(uint64_t part_key, row_t *& r_local) { - /* - SELECT FIELD1, FIELD2, FIELD3 FROM PARTS WHERE PART_KEY = ? - */ - DEBUG("Access part_key %ld\n",part_key); - RC rc; - itemid_t * item; - INDEX * index = _wl->i_parts; - item = index_read(index, part_key, parts_to_partition(part_key)); - assert(item != NULL); - row_t* r_loc = (row_t *) item->location; - rc = get_row(r_loc, RD, r_local); - return rc; -} -inline RC PPSTxnManager::run_getpartsbyproduct_5(row_t *& r_local) { - /* - SELECT FIELD1, FIELD2, FIELD3 FROM PARTS WHERE PART_KEY = ? - */ - DEBUG("run_getpartsbyproduct_5\n"); - assert(r_local); - getThreeFields(r_local); - return RCOK; -} - -inline RC PPSTxnManager::run_orderproduct_0(uint64_t product_key, row_t *& r_local) { - /* - SELECT FIELD1, FIELD2, FIELD3 FROM PRODUCTS WHERE PRODUCT_KEY = ? - */ - RC rc; - itemid_t * item; - INDEX * index = _wl->i_products; - item = index_read(index, product_key, products_to_partition(product_key)); - assert(item != NULL); - row_t* r_loc = (row_t *) item->location; - rc = get_row(r_loc, RD, r_local); - return rc; -} -inline RC PPSTxnManager::run_orderproduct_1(row_t *& r_local) { - /* - SELECT FIELD1, FIELD2, FIELD3 FROM PRODUCTS WHERE PRODUCT_KEY = ? - */ - assert(r_local); - getThreeFields(r_local); - return RCOK; -} - -inline RC PPSTxnManager::run_orderproduct_2(uint64_t product_key, row_t *& r_local) { - /* - SELECT PART_KEY FROM USES WHERE PRODUCT_KEY = ? - */ - DEBUG("Getting product_key %ld count %ld\n",product_key,parts_processed_count); - RC rc; - itemid_t * item; - INDEX * index = _wl->i_uses; - item = index_read(index, product_key, products_to_partition(product_key),parts_processed_count); - if (item == NULL) { - r_local = NULL; - return RCOK; - } - assert(item != NULL); - row_t* r_loc = (row_t *) item->location; - rc = get_row(r_loc, RD, r_local); - DEBUG("From product_key %ld -- %lx\n",product_key,(uint64_t)r_local); - return rc; -} - -inline RC PPSTxnManager::run_orderproduct_3(uint64_t &part_key, row_t *& r_local) { - /* - SELECT PART_KEY FROM USES WHERE PRODUCT_KEY = ? - */ - //r_local->get_value(PART_KEY,part_key); - //char * data __attribute__((unused)); - //data = r_local->get_data(); - // PART_KEY is located at column 1 - r_local->get_value(1,part_key); - DEBUG("Read part_key %ld\n",part_key); - return RCOK; -} - -inline RC PPSTxnManager::run_orderproduct_4(uint64_t part_key, row_t *& r_local) { - /* - SELECT FIELD1, FIELD2, FIELD3 FROM PARTS WHERE PART_KEY = ? - */ - DEBUG("Access part_key %ld\n",part_key); - RC rc; - itemid_t * item; - INDEX * index = _wl->i_parts; - item = index_read(index, part_key, parts_to_partition(part_key)); - assert(item != NULL); - row_t* r_loc = (row_t *) item->location; - rc = get_row(r_loc, WR, r_local); - return rc; -} -inline RC PPSTxnManager::run_orderproduct_5(row_t *& r_local) { - /* - SELECT FIELD1, FIELD2, FIELD3 FROM PARTS WHERE PART_KEY = ? - */ - DEBUG("run_orderproduct_5\n"); - assert(r_local); - // update - // If part_amount is 0, should abort - uint64_t part_amount; - r_local->get_value(PART_AMOUNT,part_amount); - r_local->set_value(PART_AMOUNT,part_amount-1); - return RCOK; -} - - -inline RC PPSTxnManager::run_getpartsbysupplier_0(uint64_t supplier_key, row_t *& r_local) { - /* - SELECT FIELD1, FIELD2, FIELD3 FROM suppliers WHERE supplier_KEY = ? - */ - RC rc; - itemid_t * item; - INDEX * index = _wl->i_suppliers; - item = index_read(index, supplier_key, suppliers_to_partition(supplier_key)); - assert(item != NULL); - row_t* r_loc = (row_t *) item->location; - rc = get_row(r_loc, RD, r_local); - return rc; -} -inline RC PPSTxnManager::run_getpartsbysupplier_1(row_t *& r_local) { - /* - SELECT FIELD1, FIELD2, FIELD3 FROM suppliers WHERE supplier_KEY = ? - */ - assert(r_local); - getThreeFields(r_local); - return RCOK; -} - -inline RC PPSTxnManager::run_getpartsbysupplier_2(uint64_t supplier_key, row_t *& r_local) { - /* - SELECT PART_KEY FROM USES WHERE supplier_KEY = ? - */ - RC rc; - itemid_t * item; - INDEX * index = _wl->i_supplies; - item = - index_read(index, supplier_key, suppliers_to_partition(supplier_key), parts_processed_count); - if (item == NULL) { - r_local = NULL; - return RCOK; - } - assert(item != NULL); - row_t* r_loc = (row_t *) item->location; - rc = get_row(r_loc, RD, r_local); - return rc; -} -inline RC PPSTxnManager::run_getpartsbysupplier_3(uint64_t &part_key, row_t *& r_local) { - /* - SELECT PART_KEY FROM USES WHERE supplier_KEY = ? - */ - r_local->get_value(1,part_key); - DEBUG("Read part_key %ld\n",part_key); - return RCOK; -} -inline RC PPSTxnManager::run_getpartsbysupplier_4(uint64_t part_key, row_t *& r_local) { - /* - SELECT FIELD1, FIELD2, FIELD3 FROM PARTS WHERE PART_KEY = ? - */ - RC rc; - itemid_t * item; - INDEX * index = _wl->i_parts; - item = index_read(index, part_key, parts_to_partition(part_key)); - assert(item != NULL); - row_t* r_loc = (row_t *) item->location; - rc = get_row(r_loc, RD, r_local); - return rc; -} -inline RC PPSTxnManager::run_getpartsbysupplier_5(row_t *& r_local) { - /* - SELECT FIELD1, FIELD2, FIELD3 FROM PARTS WHERE PART_KEY = ? - */ - assert(r_local); - getThreeFields(r_local); - return RCOK; -} - -inline RC PPSTxnManager::run_updateproductpart_0(uint64_t product_key, row_t *& r_local) { - /* - SELECT FIELD1, FIELD2, FIELD3 FROM PRODUCTS WHERE PRODUCT_KEY = ? - */ - RC rc; - itemid_t * item; - INDEX * index = _wl->i_uses; - // XXX this will always return the first part for this product - item = index_read(index, product_key, products_to_partition(product_key)); - assert(item != NULL); - row_t* r_loc = (row_t *) item->location; - rc = get_row(r_loc, WR, r_local); - return rc; -} -inline RC PPSTxnManager::run_updateproductpart_1(uint64_t part_key, row_t *& r_local) { - /* - UPDATE PART_KEY FROM PRODUCTS WHERE PRODUCT_KEY = ? - */ - assert(r_local); - r_local->set_value(1,part_key); - return RCOK; -} - -inline RC PPSTxnManager::run_updatepart_0(uint64_t part_key, row_t *& r_local) { - /* - SELECT * FROM PARTS WHERE PART_KEY = :part_key; - */ - RC rc; - itemid_t * item; - INDEX * index = _wl->i_parts; - item = index_read(index, part_key, parts_to_partition(part_key)); - assert(item != NULL); - row_t* r_loc = (row_t *) item->location; - rc = get_row(r_loc, WR, r_local); - return rc; -} -inline RC PPSTxnManager::run_updatepart_1(row_t *& r_local) { - /* - SELECT * FROM PARTS WHERE PART_KEY = :part_key; - */ - assert(r_local); - uint64_t amount; - r_local->get_value(1,amount); - r_local->set_value(1,amount+100); - return RCOK; -} - -RC PPSTxnManager::run_calvin_txn() { - RC rc = RCOK; - uint64_t starttime = get_sys_clock(); - PPSQuery* pps_query = (PPSQuery*) query; - DEBUG("(%ld,%ld) Run calvin txn %d (recon: %d)\n", txn->txn_id, txn->batch_id, - pps_query->txn_type, isRecon()); - while(!calvin_exec_phase_done() && rc == RCOK) { - DEBUG("(%ld,%ld) phase %d\n",txn->txn_id,txn->batch_id,this->phase); - switch(this->phase) { - case CALVIN_RW_ANALYSIS: - // Phase 1: Read/write set analysis - calvin_expected_rsp_cnt = pps_query->get_participants(_wl); - if(query->participant_nodes[g_node_id] == 1) { - calvin_expected_rsp_cnt--; - } - - DEBUG("(%ld,%ld) expects %d responses; %ld participants, %ld active\n", txn->txn_id, - txn->batch_id, calvin_expected_rsp_cnt, query->participant_nodes.size(), - query->active_nodes.size()); - - this->phase = CALVIN_LOC_RD; - break; - case CALVIN_LOC_RD: - // Phase 2: Perform local reads - DEBUG("(%ld,%ld) local reads\n",txn->txn_id,txn->batch_id); - rc = run_pps_phase2(); - //release_read_locks(pps_query); - if (isRecon()) { - this->phase = CALVIN_DONE; - } else { - this->phase = CALVIN_SERVE_RD; - } - - break; - case CALVIN_SERVE_RD: - // Phase 3: Serve remote reads - if(query->participant_nodes[g_node_id] == 1) { - rc = send_remote_reads(); - } - if(query->active_nodes[g_node_id] == 1) { - this->phase = CALVIN_COLLECT_RD; - if(calvin_collect_phase_done()) { - rc = RCOK; - } else { - assert(calvin_expected_rsp_cnt > 0); - DEBUG("(%ld,%ld) wait in collect phase; %d / %d rfwds received\n", txn->txn_id, - txn->batch_id, rsp_cnt, calvin_expected_rsp_cnt); - rc = WAIT; - } - } else { // Done - rc = RCOK; - this->phase = CALVIN_DONE; - } - break; - case CALVIN_COLLECT_RD: - // Phase 4: Collect remote reads - this->phase = CALVIN_EXEC_WR; - break; - case CALVIN_EXEC_WR: - // Phase 5: Execute transaction / perform local writes - DEBUG("(%ld,%ld) execute writes\n",txn->txn_id,txn->batch_id); - if (txn->rc == RCOK) { - rc = run_pps_phase5(); - } - this->phase = CALVIN_DONE; - break; - default: - assert(false); - } - } - uint64_t curr_time = get_sys_clock(); - txn_stats.process_time += curr_time - starttime; - txn_stats.process_time_short += curr_time - starttime; - txn_stats.wait_starttime = get_sys_clock(); - return rc; - -} - - -RC PPSTxnManager::run_pps_phase2() { - PPSQuery* pps_query = (PPSQuery*) query; - RC rc = RCOK; - uint64_t part_key = pps_query->part_key; - uint64_t product_key = pps_query->product_key; - uint64_t supplier_key = pps_query->supplier_key; - bool part_loc = GET_NODE_ID(parts_to_partition(part_key)) == g_node_id; - bool product_loc = GET_NODE_ID(products_to_partition(product_key)) == g_node_id; - bool supplier_loc = GET_NODE_ID(suppliers_to_partition(supplier_key)) == g_node_id; - assert(CC_ALG == CALVIN); - - switch (pps_query->txn_type) { - case PPS_GETPART: - if (part_loc) { - rc = run_getpart_0(part_key, row); - rc = run_getpart_1(row); - } - break; - case PPS_GETSUPPLIER: - if (supplier_loc) { - rc = run_getsupplier_0(supplier_key, row); - rc = run_getsupplier_1(row); - } - break; - case PPS_GETPRODUCT: - if (product_loc) { - rc = run_getproduct_0(product_key, row); - rc = run_getproduct_1(row); - } - break; - case PPS_GETPARTBYSUPPLIER: - if (supplier_loc) { - rc = run_getpartsbysupplier_0(supplier_key, row); - rc = run_getpartsbysupplier_1(row); - rc = run_getpartsbysupplier_2(supplier_key, row); - while (row != NULL) { - ++parts_processed_count; - rc = run_getpartsbysupplier_3(part_key, row); - if (isRecon()) { - pps_query->part_keys.add(part_key); - } else { - break; - // check if the parts have changed since we did recon - if (!pps_query->part_keys.contains(part_key)) { - txn->rc = Abort; - break; - } - } - rc = run_getpartsbysupplier_2(supplier_key, row); - } - - } - if (txn->rc == Abort) { - break; - } - if (!isRecon()) { - for (uint64_t key = 0; key < pps_query->part_keys.size();key++) { - part_key = pps_query->part_keys[key]; - part_loc = GET_NODE_ID(parts_to_partition(part_key)) == g_node_id; - if (part_loc) { - rc = run_getpartsbysupplier_4(part_key, row); - rc = run_getpartsbysupplier_5(row); - } - } - } - break; - case PPS_GETPARTBYPRODUCT: - if (product_loc) { - rc = run_getpartsbyproduct_0(product_key, row); - rc = run_getpartsbyproduct_1(row); - rc = run_getpartsbyproduct_2(product_key, row); - while (row != NULL) { - ++parts_processed_count; - rc = run_getpartsbyproduct_3(part_key, row); - if (isRecon()) { - pps_query->part_keys.add(part_key); - } else { - // check if the parts have changed since we did recon - if (!pps_query->part_keys.contains(part_key)) { - txn->rc = Abort; - break; - } - } - rc = run_getpartsbyproduct_2(product_key, row); - } - - } - if (txn->rc == Abort) { - break; - } - if (!isRecon()) { - for (uint64_t key = 0; key < pps_query->part_keys.size();key++) { - part_key = pps_query->part_keys[key]; - part_loc = GET_NODE_ID(parts_to_partition(part_key)) == g_node_id; - if (part_loc) { - rc = run_getpartsbyproduct_4(part_key, row); - rc = run_getpartsbyproduct_5(row); - } - } - } - break; - case PPS_ORDERPRODUCT: - if (product_loc) { - rc = run_orderproduct_0(product_key, row); - rc = run_orderproduct_1(row); - rc = run_orderproduct_2(product_key, row); - while (row != NULL) { - ++parts_processed_count; - rc = run_orderproduct_3(part_key, row); - if (isRecon()) { - pps_query->part_keys.add(part_key); - } else { - // check if the parts have changed since we did recon - if (!pps_query->part_keys.contains(part_key)) { - txn->rc = Abort; - break; - } - } - rc = run_orderproduct_2(product_key, row); - } - } - break; - case PPS_UPDATEPRODUCTPART: - break; - case PPS_UPDATEPART: - break; - default: - assert(false); - } - return rc; -} - -RC PPSTxnManager::run_pps_phase5() { - PPSQuery* pps_query = (PPSQuery*) query; - RC rc = RCOK; - uint64_t part_key = pps_query->part_key; - uint64_t product_key = pps_query->product_key; - //uint64_t supplier_key = pps_query->supplier_key; - bool part_loc = GET_NODE_ID(parts_to_partition(part_key)) == g_node_id; - bool product_loc = GET_NODE_ID(products_to_partition(product_key)) == g_node_id; - //bool supplier_loc = GET_NODE_ID(suppliers_to_partition(supplier_key)) == g_node_id; - assert(CC_ALG == CALVIN); - - switch (pps_query->txn_type) { - case PPS_GETPART: - break; - case PPS_GETSUPPLIER: - break; - case PPS_GETPRODUCT: - break; - case PPS_GETPARTBYSUPPLIER: - break; - case PPS_GETPARTBYPRODUCT: - break; - case PPS_ORDERPRODUCT: - for (uint64_t key = 0; key < pps_query->part_keys.size();key++) { - part_key = pps_query->part_keys[key]; - part_loc = GET_NODE_ID(parts_to_partition(part_key)) == g_node_id; - if (part_loc) { - rc = run_orderproduct_4(part_key, row); - rc = run_orderproduct_5(row); - } - } - break; - case PPS_UPDATEPRODUCTPART: - if (product_loc) { - - DEBUG("UPDATE Product %ld Part %ld\n",product_key,part_key); - rc = run_updateproductpart_0(product_key, row); - rc = run_updateproductpart_1(part_key, row); - } - break; - case PPS_UPDATEPART: - if (part_loc) { - rc = run_updatepart_0(part_key, row); - rc = run_updatepart_1(row); - } - break; - default: - assert(false); - } - return rc; -} diff --git a/contrib/deneva/benchmarks/pps_wl.cpp b/contrib/deneva/benchmarks/pps_wl.cpp deleted file mode 100644 index b419c3e8..00000000 --- a/contrib/deneva/benchmarks/pps_wl.cpp +++ /dev/null @@ -1,283 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "global.h" -#include "helper.h" -#include "pps.h" -#include "wl.h" -#include "thread.h" -#include "table.h" -#include "index_hash.h" -#include "index_btree.h" -#include "pps_helper.h" -#include "row.h" -#include "query.h" -#include "txn.h" -#include "mem_alloc.h" - -RC PPSWorkload::init() { - Workload::init(); - char * cpath = getenv("SCHEMA_PATH"); - string path; - if (cpath == NULL) - path = "./benchmarks/"; - else { - path = string(cpath); - } - path += "PPS_schema.txt"; - cout << "reading schema file: " << path << endl; - - printf("Initializing schema... "); - fflush(stdout); - init_schema( path.c_str() ); - printf("Done\n"); - printf("Initializing table... "); - fflush(stdout); - init_table(); - printf("Done\n"); - fflush(stdout); - return RCOK; -} - -RC PPSWorkload::init_schema(const char * schema_file) { - Workload::init_schema(schema_file); - t_suppliers = tables["SUPPLIERS"]; - t_products = tables["PRODUCTS"]; - t_parts = tables["PARTS"]; - t_supplies = tables["SUPPLIES"]; - t_uses = tables["USES"]; - - i_parts = indexes["PARTS_IDX"]; - i_suppliers = indexes["SUPPLIERS_IDX"]; - i_products = indexes["PRODUCTS_IDX"]; - i_uses = indexes["USES_IDX"]; - i_supplies = indexes["SUPPLIES_IDX"]; - return RCOK; -} - -RC PPSWorkload::init_table() { - -/******** fill in data ************/ -// data filling process: -// supplies -// --parts -// --suppliers -// uses -// --products -/**********************************/ - - pps_thr_args * tt = new pps_thr_args[g_init_parallelism]; - for (UInt32 i = 0; i < g_init_parallelism ; i++) { - tt[i].wl = this; - tt[i].id = i; - } - - threadInitParts(&tt[0]); - printf("PARTS Done\n"); - threadInitProducts(&tt[0]); - printf("PRODUCTS Done\n"); - threadInitSuppliers(&tt[0]); - printf("SUPPLIERS Done\n"); - threadInitUses(&tt[0]); - printf("USES Done\n"); - threadInitSupplies(&tt[0]); - printf("SUPPLIES Done\n"); - fflush(stdout); - printf("\nData Initialization Complete!\n\n"); - return RCOK; -} - -RC PPSWorkload::get_txn_man(TxnManager *& txn_manager) { - DEBUG_M("PPSWorkload::get_txn_man PPSTxnManager alloc\n"); - txn_manager = (PPSTxnManager *)mem_allocator.align_alloc(sizeof(PPSTxnManager)); - new(txn_manager) PPSTxnManager(); - //txn_manager->init( this); - return RCOK; -} - -void PPSWorkload::init_tab_parts() { - char * padding = new char[100]; - for (int i = 0; i < 100; i++) { - padding[i] = 'z'; - } - for (UInt32 id = 1; id <= g_max_part_key; id++) { - if (GET_NODE_ID(parts_to_partition(id)) != g_node_id) continue; - row_t * row; - uint64_t row_id; - t_parts->get_new_row(row, 0, row_id); - row->set_primary_key(id); - row->set_value(0,id); // part id - row->set_value(PART_AMOUNT,1000); // # of parts - row->set_value(FIELD1,padding); - row->set_value(FIELD2,padding); - row->set_value(FIELD3,padding); - row->set_value(FIELD4,padding); - row->set_value(FIELD5,padding); - row->set_value(FIELD6,padding); - row->set_value(FIELD7,padding); - row->set_value(FIELD8,padding); - row->set_value(FIELD9,padding); - row->set_value(FIELD10,padding); - - index_insert(i_parts, id, row, parts_to_partition(id)); - DEBUG("PARTS added (%d, ...)\n",id); - - } -} - -void PPSWorkload::init_tab_suppliers() { - char * padding = new char[100]; - for (int i = 0; i < 100; i++) { - padding[i] = 'z'; - } - for (UInt32 id = 1; id <= g_max_supplier_key; id++) { - if (GET_NODE_ID(suppliers_to_partition(id)) != g_node_id) continue; - row_t * row; - uint64_t row_id; - t_suppliers->get_new_row(row, 0, row_id); - row->set_primary_key(id); - row->set_value(0,id); - row->set_value(FIELD1,padding); - row->set_value(FIELD2,padding); - row->set_value(FIELD3,padding); - row->set_value(FIELD4,padding); - row->set_value(FIELD5,padding); - row->set_value(FIELD6,padding); - row->set_value(FIELD7,padding); - row->set_value(FIELD8,padding); - row->set_value(FIELD9,padding); - row->set_value(FIELD10,padding); - - index_insert(i_suppliers, id, row, suppliers_to_partition(id)); - - } -} - -void PPSWorkload::init_tab_products() { - char * padding = new char[100]; - for (int i = 0; i < 100; i++) { - padding[i] = 'z'; - } - for (UInt32 id = 1; id <= g_max_product_key; id++) { - if (GET_NODE_ID(products_to_partition(id)) != g_node_id) continue; - row_t * row; - uint64_t row_id; - t_products->get_new_row(row, 0, row_id); - row->set_primary_key(id); - row->set_value(0,id); - row->set_value(FIELD1,padding); - row->set_value(FIELD2,padding); - row->set_value(FIELD3,padding); - row->set_value(FIELD4,padding); - row->set_value(FIELD5,padding); - row->set_value(FIELD6,padding); - row->set_value(FIELD7,padding); - row->set_value(FIELD8,padding); - row->set_value(FIELD9,padding); - row->set_value(FIELD10,padding); - - index_insert(i_products, id, row, products_to_partition(id)); - DEBUG("PRODUCTS added (%d, ...)\n",id); - - } -} - -void PPSWorkload::init_tab_supplies() { - for (UInt32 id = 1; id <= g_max_supplier_key; id++) { - std::set parts_set; - for (UInt32 i = 0; i < g_max_parts_per; i++) { - parts_set.insert(URand(1,g_max_part_key)); - } - for(auto it = parts_set.begin(); it != parts_set.end();it++) { - row_t * row; - uint64_t row_id; - uint64_t part_id = *it; - t_supplies->get_new_row(row, 0, row_id); - row->set_primary_key(id); - //row->set_value(SUPPLIER_KEY,id); - //row->set_value(PART_KEY,part_id); - row->set_value(0,id); - row->set_value(1,part_id); - index_insert_nonunique(i_supplies, id, row, suppliers_to_partition(id)); - } - } - -} - -void PPSWorkload::init_tab_uses() { - for (UInt32 id = 1; id <= g_max_product_key; id++) { - std::set parts_set; - for (UInt32 i = 0; i < g_max_parts_per; i++) { - parts_set.insert(URand(1,g_max_part_key)); - } - for(auto it = parts_set.begin(); it != parts_set.end();it++) { - row_t * row; - uint64_t row_id; - uint64_t part_id = *it; - t_uses->get_new_row(row, 0, row_id); - row->set_primary_key(id); - //row->set_value(PRODUCT_KEY,id); - //row->set_value(PART_KEY,part_id); - row->set_value(0,id); - row->set_value(1,part_id); - index_insert_nonunique(i_uses, id, row, products_to_partition(id)); - DEBUG("USES added (%d, %ld) -- %lx\n",id,part_id,(uint64_t)row); - } - } - -} - - -/*==================================================================+ -| ROUTINE NAME -| InitPermutation -+==================================================================*/ - -void * PPSWorkload::threadInitSuppliers(void * This) { - PPSWorkload * wl = ((pps_thr_args*) This)->wl; - //int id = ((pps_thr_args*) This)->id; - wl->init_tab_suppliers(); - return NULL; -} - -void * PPSWorkload::threadInitProducts(void * This) { - PPSWorkload * wl = ((pps_thr_args*) This)->wl; - //int id = ((pps_thr_args*) This)->id; - wl->init_tab_products(); - return NULL; -} - -void * PPSWorkload::threadInitParts(void * This) { - PPSWorkload * wl = ((pps_thr_args*) This)->wl; - //int id = ((pps_thr_args*) This)->id; - wl->init_tab_parts(); - return NULL; -} - -void * PPSWorkload::threadInitSupplies(void * This) { - PPSWorkload * wl = ((pps_thr_args*) This)->wl; - //int id = ((pps_thr_args*) This)->id; - wl->init_tab_supplies(); - return NULL; -} - -void * PPSWorkload::threadInitUses(void * This) { - PPSWorkload * wl = ((pps_thr_args*) This)->wl; - //int id = ((pps_thr_args*) This)->id; - wl->init_tab_uses(); - return NULL; -} - diff --git a/contrib/deneva/benchmarks/tpcc.h b/contrib/deneva/benchmarks/tpcc.h deleted file mode 100644 index f817428d..00000000 --- a/contrib/deneva/benchmarks/tpcc.h +++ /dev/null @@ -1,183 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _TPCC_H_ -#define _TPCC_H_ - -#include "wl.h" -#include "txn.h" -#include "query.h" -#include "row.h" - -class TPCCQuery; -class TPCCQueryMessage; -struct Item_no; - -class table_t; -class INDEX; -class TPCCQuery; -enum TPCCRemTxnType { - TPCC_PAYMENT_S=0, - TPCC_PAYMENT0, - TPCC_PAYMENT1, - TPCC_PAYMENT2, - TPCC_PAYMENT3, - TPCC_PAYMENT4, - TPCC_PAYMENT5, - TPCC_NEWORDER_S, - TPCC_NEWORDER0, - TPCC_NEWORDER1, - TPCC_NEWORDER2, - TPCC_NEWORDER3, - TPCC_NEWORDER4, - TPCC_NEWORDER5, - TPCC_NEWORDER6, - TPCC_NEWORDER7, - TPCC_NEWORDER8, - TPCC_NEWORDER9, - TPCC_FIN, - TPCC_RDONE -}; - -class TPCCWorkload : public Workload { - -public: - RC init(); - RC init_table(); - RC init_schema(const char * schema_file); - RC get_txn_man(TxnManager *& txn_manager); - table_t * t_warehouse; - table_t * t_district; - table_t * t_customer; - table_t * t_history; - table_t * t_neworder; - table_t * t_order; - table_t * t_orderline; - table_t * t_item; - table_t * t_stock; - - INDEX * i_item; - INDEX * i_warehouse; - INDEX * i_district; - INDEX * i_customer_id; - INDEX * i_customer_last; - INDEX * i_stock; - INDEX * i_order; // key = (w_id, d_id, o_id) -// INDEX * i_order_wdo; // key = (w_id, d_id, o_id) -// INDEX * i_order_wdc; // key = (w_id, d_id, c_id) - INDEX * i_orderline; // key = (w_id, d_id, o_id) - INDEX * i_orderline_wd; // key = (w_id, d_id). - - // XXX HACK - // For delivary. Only one txn can be delivering a warehouse at a time. - // *_delivering[warehouse_id] -> the warehouse is delivering. - bool ** delivering; -// bool volatile ** delivering; - -private: - uint64_t num_wh; - void init_tab_item(int id); - void init_tab_wh(); - void init_tab_dist(uint64_t w_id); - void init_tab_stock(int id,uint64_t w_id); - // init_tab_cust initializes both tab_cust and tab_hist. - void init_tab_cust(int id, uint64_t d_id, uint64_t w_id); - void init_tab_hist(uint64_t c_id, uint64_t d_id, uint64_t w_id); - void init_tab_order(int id,uint64_t d_id, uint64_t w_id); - - UInt32 perm_count; - uint64_t * perm_c_id; - void init_permutation(); - uint64_t get_permutation(); - - static void * threadInitItem(void * This); - static void * threadInitWh(void * This); - static void * threadInitDist(void * This); - static void * threadInitStock(void * This); - static void * threadInitCust(void * This); - static void * threadInitHist(void * This); - static void * threadInitOrder(void * This); -}; - - struct thr_args{ - TPCCWorkload * wl; - UInt32 id; - UInt32 tot; - }; - -class TPCCTxnManager : public TxnManager { -public: - void init(uint64_t thd_id, Workload * h_wl); - void reset(); - RC acquire_locks(); - RC run_txn(); - RC run_txn_post_wait(); - RC run_calvin_txn(); - RC run_tpcc_phase2(); - RC run_tpcc_phase5(); - TPCCRemTxnType state; - void copy_remote_items(TPCCQueryMessage * msg); -private: - TPCCWorkload * _wl; - volatile RC _rc; - row_t * row; - - uint64_t next_item_id; - -void next_tpcc_state(); -RC run_txn_state(); - bool is_done(); - bool is_local_item(uint64_t idx); - RC send_remote_request(); - - RC run_payment_0(uint64_t w_id, uint64_t d_id, uint64_t d_w_id, double h_amount, - row_t*& r_wh_local); - RC run_payment_1(uint64_t w_id, uint64_t d_id, uint64_t d_w_id, double h_amount, - row_t* r_wh_local); - RC run_payment_2(uint64_t w_id, uint64_t d_id, uint64_t d_w_id, double h_amount, - row_t*& r_dist_local); - RC run_payment_3(uint64_t w_id, uint64_t d_id, uint64_t d_w_id, double h_amount, - row_t* r_dist_local); - RC run_payment_4(uint64_t w_id, uint64_t d_id, uint64_t c_id, uint64_t c_w_id, uint64_t c_d_id, - char* c_last, double h_amount, bool by_last_name, row_t*& r_cust_local); - RC run_payment_5(uint64_t w_id, uint64_t d_id, uint64_t c_id, uint64_t c_w_id, uint64_t c_d_id, - char* c_last, double h_amount, bool by_last_name, row_t* r_cust_local); - RC new_order_0(uint64_t w_id, uint64_t d_id, uint64_t c_id, bool remote, uint64_t ol_cnt, - uint64_t o_entry_d, uint64_t* o_id, row_t*& r_wh_local); - RC new_order_1(uint64_t w_id, uint64_t d_id, uint64_t c_id, bool remote, uint64_t ol_cnt, - uint64_t o_entry_d, uint64_t* o_id, row_t* r_wh_local); - RC new_order_2(uint64_t w_id, uint64_t d_id, uint64_t c_id, bool remote, uint64_t ol_cnt, - uint64_t o_entry_d, uint64_t* o_id, row_t*& r_cust_local); - RC new_order_3(uint64_t w_id, uint64_t d_id, uint64_t c_id, bool remote, uint64_t ol_cnt, - uint64_t o_entry_d, uint64_t* o_id, row_t* r_cust_local); - RC new_order_4(uint64_t w_id, uint64_t d_id, uint64_t c_id, bool remote, uint64_t ol_cnt, - uint64_t o_entry_d, uint64_t* o_id, row_t*& r_dist_local); - RC new_order_5(uint64_t w_id, uint64_t d_id, uint64_t c_id, bool remote, uint64_t ol_cnt, - uint64_t o_entry_d, uint64_t* o_id, row_t* r_dist_local); - RC new_order_6(uint64_t ol_i_id, row_t *& r_item_local); - RC new_order_7(uint64_t ol_i_id, row_t * r_item_local); - RC new_order_8(uint64_t w_id, uint64_t d_id, bool remote, uint64_t ol_i_id, - uint64_t ol_supply_w_id, uint64_t ol_quantity, uint64_t ol_number, uint64_t o_id, - row_t*& r_stock_local); - RC new_order_9(uint64_t w_id, uint64_t d_id, bool remote, uint64_t ol_i_id, - uint64_t ol_supply_w_id, uint64_t ol_quantity, uint64_t ol_number, - uint64_t ol_amount, uint64_t o_id, row_t* r_stock_local); - RC run_order_status(TPCCQuery * query); - RC run_delivery(TPCCQuery * query); - RC run_stock_level(TPCCQuery * query); -}; - -#endif diff --git a/contrib/deneva/benchmarks/tpcc_const.h b/contrib/deneva/benchmarks/tpcc_const.h deleted file mode 100644 index 8d1592a7..00000000 --- a/contrib/deneva/benchmarks/tpcc_const.h +++ /dev/null @@ -1,210 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#if TPCC_SMALL -enum { - W_ID, - W_NAME, - W_STREET_1, - W_STREET_2, - W_CITY, - W_STATE, - W_ZIP, - W_TAX, - W_YTD -}; -enum { - D_ID, - D_W_ID, - D_NAME, - D_STREET_1, - D_STREET_2, - D_CITY, - D_STATE, - D_ZIP, - D_TAX, - D_YTD, - D_NEXT_O_ID -}; -enum { - C_ID, - C_D_ID, - C_W_ID, - C_MIDDLE, - C_LAST, - C_STATE, - C_CREDIT, - C_DISCOUNT, - C_BALANCE, - C_YTD_PAYMENT, - C_PAYMENT_CNT -}; -enum { - H_C_ID, - H_C_D_ID, - H_C_W_ID, - H_D_ID, - H_W_ID, - H_DATE, - H_AMOUNT -}; -enum { - NO_O_ID, - NO_D_ID, - NO_W_ID -}; -enum { - O_ID, - O_C_ID, - O_D_ID, - O_W_ID, - O_ENTRY_D, - O_CARRIER_ID, - O_OL_CNT, - O_ALL_LOCAL -}; -enum { - OL_O_ID, - OL_D_ID, - OL_W_ID, - OL_NUMBER, - OL_I_ID -}; -enum { - I_ID, - I_IM_ID, - I_NAME, - I_PRICE, - I_DATA -}; -enum { - S_I_ID, - S_W_ID, - S_QUANTITY, - S_REMOTE_CNT -}; -#else -enum { - W_ID, - W_NAME, - W_STREET_1, - W_STREET_2, - W_CITY, - W_STATE, - W_ZIP, - W_TAX, - W_YTD -}; -enum { - D_ID, - D_W_ID, - D_NAME, - D_STREET_1, - D_STREET_2, - D_CITY, - D_STATE, - D_ZIP, - D_TAX, - D_YTD, - D_NEXT_O_ID -}; -enum { - C_ID, - C_D_ID, - C_W_ID, - C_FIRST, - C_MIDDLE, - C_LAST, - C_STREET_1, - C_STREET_2, - C_CITY, - C_STATE, - C_ZIP, - C_PHONE, - C_SINCE, - C_CREDIT, - C_CREDIT_LIM, - C_DISCOUNT, - C_BALANCE, - C_YTD_PAYMENT, - C_PAYMENT_CNT, - C_DELIVERY_CNT, - C_DATA -}; -enum { - H_C_ID, - H_C_D_ID, - H_C_W_ID, - H_D_ID, - H_W_ID, - H_DATE, - H_AMOUNT, - H_DATA -}; -enum { - NO_O_ID, - NO_D_ID, - NO_W_ID -}; -enum { - O_ID, - O_C_ID, - O_D_ID, - O_W_ID, - O_ENTRY_D, - O_CARRIER_ID, - O_OL_CNT, - O_ALL_LOCAL -}; -enum { - OL_O_ID, - OL_D_ID, - OL_W_ID, - OL_NUMBER, - OL_I_ID, - OL_SUPPLY_W_ID, - OL_DELIVERY_D, - OL_QUANTITY, - OL_AMOUNT, - OL_DIST_INFO -}; -enum { - I_ID, - I_IM_ID, - I_NAME, - I_PRICE, - I_DATA -}; -enum { - S_I_ID, - S_W_ID, - S_QUANTITY, - S_DIST_01, - S_DIST_02, - S_DIST_03, - S_DIST_04, - S_DIST_05, - S_DIST_06, - S_DIST_07, - S_DIST_08, - S_DIST_09, - S_DIST_10, - S_YTD, - S_ORDER_CNT, - S_REMOTE_CNT, - S_DATA -}; -#endif diff --git a/contrib/deneva/benchmarks/tpcc_helper.cpp b/contrib/deneva/benchmarks/tpcc_helper.cpp deleted file mode 100644 index 595f014b..00000000 --- a/contrib/deneva/benchmarks/tpcc_helper.cpp +++ /dev/null @@ -1,140 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "tpcc_helper.h" - -uint64_t distKey(uint64_t d_id, uint64_t d_w_id) { return d_w_id * g_dist_per_wh + d_id; } - -uint64_t custKey(uint64_t c_id, uint64_t c_d_id, uint64_t c_w_id) { - return (distKey(c_d_id, c_w_id) * g_cust_per_dist + c_id); -} - -uint64_t orderlineKey(uint64_t w_id, uint64_t d_id, uint64_t o_id) { - return distKey(d_id, w_id) * g_cust_per_dist + o_id; -} - -uint64_t orderPrimaryKey(uint64_t w_id, uint64_t d_id, uint64_t o_id) { - return orderlineKey(w_id, d_id, o_id); -} - -uint64_t custNPKey(char * c_last, uint64_t c_d_id, uint64_t c_w_id) { - uint64_t key = 0; - char offset = 'A'; - for (uint32_t i = 0; i < strlen(c_last); i++) key = (key << 1) + (c_last[i] - offset); - key = key << 10; - key += c_w_id * g_dist_per_wh + c_d_id; - return key; -} - -uint64_t stockKey(uint64_t s_i_id, uint64_t s_w_id) { return s_w_id * g_max_items + s_i_id; } - -uint64_t w_from_distKey(uint64_t d_key) { return d_key / g_dist_per_wh; } - -uint64_t w_from_custKey(uint64_t c_key) { return w_from_distKey(c_key / g_cust_per_dist); } - -uint64_t w_from_orderlineKey(uint64_t s_key) { return w_from_distKey(s_key / g_cust_per_dist); } - -uint64_t w_from_orderPrimaryKey(uint64_t s_key) { return w_from_orderlineKey(s_key); } - -uint64_t w_from_custNPKey(uint64_t cnp_key) { return (cnp_key / g_dist_per_wh) & 0x3ff; } - -uint64_t w_from_stockKey(uint64_t s_key) { return s_key / g_max_items; } -/* -uint64_t orderKey(uint64_t o_id, uint64_t o_d_id, uint64_t o_w_id) { - return ((o_w_id * g_dist_per_wh + o_d_id) * ORD_PER_DIST + o_id); -} -// the max of ol_number is 15. That's why there is a 15 here -uint64_t olKey(uint64_t ol_o_id, uint64_t ol_d_id, - uint64_t ol_w_id, uint64_t ol_number) { - return ((ol_w_id * g_dist_per_wh + ol_d_id) * ORD_PER_DIST + ol_o_id) * 15 - + ol_number; -} -*/ -uint64_t Lastname(uint64_t num, char* name) { - static const char* n[] = {"BAR", "OUGHT", "ABLE", "PRI", "PRES", - "ESE", "ANTI", "CALLY", "ATION", "EING"}; - strcpy(name, n[num/100]); - strcat(name, n[(num/10)%10]); - strcat(name, n[num%10]); - return strlen(name); -} - -uint64_t RAND(uint64_t max) { return rand() % max; } - -uint64_t URand(uint64_t x, uint64_t y) { return x + RAND(y - x + 1); } - -uint64_t NURand(uint64_t A, uint64_t x, uint64_t y) { - static bool C_255_init = false; - static bool C_1023_init = false; - static bool C_8191_init = false; - static uint64_t C_255, C_1023, C_8191; - int C = 0; - switch(A) { - case 255: - if(!C_255_init) { - C_255 = (uint64_t) URand(0,255); - C_255_init = true; - } - C = C_255; - break; - case 1023: - if(!C_1023_init) { - C_1023 = (uint64_t) URand(0,1023); - C_1023_init = true; - } - C = C_1023; - break; - case 8191: - if(!C_8191_init) { - C_8191 = (uint64_t) URand(0,8191); - C_8191_init = true; - } - C = C_8191; - break; - default: - M_ASSERT(false, "Error! NURand\n"); - exit(-1); - } - return(((URand(0,A) | URand(x,y))+C)%(y-x+1))+x; -} - -uint64_t MakeAlphaString(int min, int max, char* str) { - char char_list[] = {'1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', - 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', - 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', - 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', - 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'}; - uint64_t cnt = URand(min, max); - for (uint32_t i = 0; i < cnt; i++) str[i] = char_list[URand(0L, 60L)]; - for (int i = cnt; i < max; i++) str[i] = '\0'; - - return cnt; -} - -uint64_t MakeNumberString(int min, int max, char* str) { - - uint64_t cnt = URand(min, max); - for (UInt32 i = 0; i < cnt; i++) { - uint64_t r = URand(0L,9L); - str[i] = '0' + r; - } - return cnt; -} - -uint64_t wh_to_part(uint64_t wid) { - assert(g_part_cnt <= g_num_wh); - return (wid-1) % g_part_cnt ; -} diff --git a/contrib/deneva/benchmarks/tpcc_helper.h b/contrib/deneva/benchmarks/tpcc_helper.h deleted file mode 100644 index f6c491e0..00000000 --- a/contrib/deneva/benchmarks/tpcc_helper.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _TPCC_HELPER_H_ -#define _TPCC_HELPER_H_ - -#include "global.h" -#include "helper.h" - -uint64_t distKey(uint64_t d_id, uint64_t d_w_id); -uint64_t custKey(uint64_t c_id, uint64_t c_d_id, uint64_t c_w_id); -uint64_t orderlineKey(uint64_t w_id, uint64_t d_id, uint64_t o_id); -uint64_t orderPrimaryKey(uint64_t w_id, uint64_t d_id, uint64_t o_id); -// non-primary key -uint64_t custNPKey(char * c_last, uint64_t c_d_id, uint64_t c_w_id); -uint64_t stockKey(uint64_t s_i_id, uint64_t s_w_id); - -uint64_t w_from_distKey(uint64_t d_key); -uint64_t w_from_custKey(uint64_t c_key); -uint64_t w_from_orderlineKey(uint64_t s_key); -uint64_t w_from_orderPrimaryKey(uint64_t s_key); -uint64_t w_from_custNPKey(uint64_t cnp_key); -uint64_t w_from_stockKey(uint64_t s_key); -//uint64_t orderKey(uint64_t o_id, uint64_t o_d_id, uint64_t o_w_id); -// the max of ol_number is 15. That's why there is a 15 here -//uint64_t olKey(uint64_t ol_o_id, uint64_t ol_d_id, -// uint64_t ol_w_id, uint64_t ol_number); - -uint64_t Lastname(uint64_t num, char* name); - -// return random data from [0, max-1] -uint64_t RAND(uint64_t max); -// random number from [x, y] -uint64_t URand(uint64_t x, uint64_t y); -// non-uniform random number -uint64_t NURand(uint64_t A, uint64_t x, uint64_t y); -// random string with random length beteen min and max. -uint64_t MakeAlphaString(int min, int max, char * str); -uint64_t MakeNumberString(int min, int max, char* str); - -uint64_t wh_to_part(uint64_t wid); - -#endif diff --git a/contrib/deneva/benchmarks/tpcc_query.cpp b/contrib/deneva/benchmarks/tpcc_query.cpp deleted file mode 100644 index 81119b65..00000000 --- a/contrib/deneva/benchmarks/tpcc_query.cpp +++ /dev/null @@ -1,341 +0,0 @@ -/* - Tencent is pleased to support the open source community by making 3TS available. - - Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - Tencent Modifications are Copyright (C) THL A29 Limited. - - Author: hongyaozhao@ruc.edu.cn - - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "query.h" -#include "tpcc_query.h" -#include "tpcc.h" -#include "tpcc_helper.h" -#include "mem_alloc.h" -#include "wl.h" -#include "table.h" -#include "message.h" - -BaseQuery * TPCCQueryGenerator::create_query(Workload * h_wl,uint64_t home_partition_id) { - double x = (double)(rand() % 100) / 100.0; - if (x < g_perc_payment) - return gen_payment(home_partition_id); - else - return gen_new_order(home_partition_id); - -} - -void TPCCQuery::init(uint64_t thd_id, Workload * h_wl) { - items.init(g_max_items_per_txn); - BaseQuery::init(); -} - -void TPCCQuery::init() { - items.init(g_max_items_per_txn); - BaseQuery::init(); -} - -void TPCCQuery::print() { - - printf( - "TPCCQuery: %d " - "w_id: %ld, d_id: %ld, c_id: %ld, d_w_id: %ld, c_w_id: %ld, c_d_id: %ld\n", - (int)txn_type, w_id, d_id, c_id, d_w_id, c_w_id, c_d_id); - if(txn_type == TPCC_NEW_ORDER) { - printf("items: "); - for(uint64_t size = 0; size < items.size(); size++) { - printf("%ld, ", items[size]->ol_i_id); - } - printf("\n"); - } -} - -std::set TPCCQuery::participants(Message * msg, Workload * wl) { - std::set participant_set; - TPCCClientQueryMessage* tpcc_msg = ((TPCCClientQueryMessage*)msg); - uint64_t id; - - id = GET_NODE_ID(wh_to_part(tpcc_msg->w_id)); - participant_set.insert(id); - - switch(tpcc_msg->txn_type) { - case TPCC_PAYMENT: - id = GET_NODE_ID(wh_to_part(tpcc_msg->c_w_id)); - participant_set.insert(id); - break; - case TPCC_NEW_ORDER: - for(uint64_t i = 0; i < tpcc_msg->ol_cnt; i++) { - uint64_t req_nid = GET_NODE_ID(wh_to_part(tpcc_msg->items[i]->ol_supply_w_id)); - participant_set.insert(req_nid); - } - break; - default: - assert(false); - } - - return participant_set; -} - -uint64_t TPCCQuery::participants(bool *& pps,Workload * wl) { - int n = 0; - for (uint64_t i = 0; i < g_node_cnt; i++) pps[i] = false; - uint64_t id; - - switch(txn_type) { - case TPCC_PAYMENT: - id = GET_NODE_ID(wh_to_part(w_id)); - if(!pps[id]) { - pps[id] = true; - n++; - } - id = GET_NODE_ID(wh_to_part(c_w_id)); - if(!pps[id]) { - pps[id] = true; - n++; - } - break; - case TPCC_NEW_ORDER: - id = GET_NODE_ID(wh_to_part(w_id)); - if(!pps[id]) { - pps[id] = true; - n++; - } - /* - id = GET_NODE_ID(wh_to_part(c_w_id)); - if(!pps[id]) { - pps[id] = true; - n++; - } - id = GET_NODE_ID(wh_to_part(d_w_id)); - if(!pps[id]) { - pps[id] = true; - n++; - } - */ - for(uint64_t i = 0; i < ol_cnt; i++) { - uint64_t req_nid = GET_NODE_ID(wh_to_part(items[i]->ol_supply_w_id)); - if(!pps[req_nid]) { - pps[req_nid] = true; - n++; - } - } - break; - default: - assert(false); - } - - return n; -} - -bool TPCCQuery::readonly() { return false; } - -BaseQuery * TPCCQueryGenerator::gen_payment(uint64_t home_partition) { - TPCCQuery * query = new TPCCQuery; - set partitions_accessed; - - query->txn_type = TPCC_PAYMENT; - uint64_t home_warehouse; - if (FIRST_PART_LOCAL) { - while (wh_to_part(home_warehouse = URand(1, g_num_wh)) != home_partition) { - } - } else - home_warehouse = URand(1, g_num_wh); - query->w_id = home_warehouse; - query->d_w_id = home_warehouse; - - partitions_accessed.insert(wh_to_part(query->w_id)); - - query->d_id = URand(1, g_dist_per_wh); - query->h_amount = URand(1, 5000); - query->rbk = false; - double x = (double)(rand() % 10000) / 10000; - int y = URand(1, 100); - - // if(x > g_mpr) { -#ifdef NO_REMOTE - if(x >= 0) { -#else - if(x > 0.15) { -#endif - // home warehouse - query->c_d_id = query->d_id; - query->c_w_id = query->w_id; - } else { - // remote warehouse - query->c_d_id = URand(1, g_dist_per_wh); - if(g_num_wh > 1) { - while ((query->c_w_id = URand(1, g_num_wh)) == query->w_id) { - } - if (wh_to_part(query->w_id) != wh_to_part(query->c_w_id)) { - partitions_accessed.insert(wh_to_part(query->c_w_id)); - } - } else - query->c_w_id = query->w_id; - } - if(y <= 60) { - // by last name - query->by_last_name = true; - Lastname(NURand(255,0,999),query->c_last); - } else { - // by cust id - query->by_last_name = false; - query->c_id = NURand(1023, 1, g_cust_per_dist); - } - - query->partitions.init(partitions_accessed.size()); - for(auto it = partitions_accessed.begin(); it != partitions_accessed.end(); ++it) { - query->partitions.add(*it); - } - return query; -} - -BaseQuery * TPCCQueryGenerator::gen_new_order(uint64_t home_partition) { - TPCCQuery * query = new TPCCQuery; - set partitions_accessed; - - query->txn_type = TPCC_NEW_ORDER; - query->items.init(g_max_items_per_txn); - if (FIRST_PART_LOCAL) { - while (wh_to_part(query->w_id = URand(1, g_num_wh)) != home_partition) { - } - } else - query->w_id = URand(1, g_num_wh); - - query->d_id = URand(1, g_dist_per_wh); - query->c_id = NURand(1023, 1, g_cust_per_dist); - // TODO TPCC rollback - //rbk = URand(1, 100) == 1 ? true : false; - query->rbk = false; - query->ol_cnt = URand(5, g_max_items_per_txn); - query->o_entry_d = 2013; - - partitions_accessed.insert(wh_to_part(query->w_id)); - - double r_mpr = (double)(rand() % 10000) / 10000; - uint64_t part_limit; -#ifdef NO_REMOTE - if(r_mpr < 0) -#else - if(r_mpr < g_mpr) -#endif - part_limit = g_part_per_txn; - else - part_limit = 1; - - std::set ol_i_ids; - while(query->items.size() < query->ol_cnt) { - Item_no * item = new Item_no; - - while (ol_i_ids.count(item->ol_i_id = NURand(8191, 1, g_max_items)) > 0) { - } - ol_i_ids.insert(item->ol_i_id); - item->ol_quantity = URand(1, 10); - double r_rem = (double)(rand() % 100000) / 100000; - if (r_rem > 0.01 || r_mpr > g_mpr || g_num_wh == 1) { - // home warehouse - item->ol_supply_w_id = query->w_id; - } else { - if(partitions_accessed.size() < part_limit) { - item->ol_supply_w_id = URand(1, g_num_wh); - partitions_accessed.insert(wh_to_part(item->ol_supply_w_id)); - } else { - // select warehouse from among those already selected - while (partitions_accessed.count(wh_to_part(item->ol_supply_w_id = URand(1, g_num_wh))) == - 0) { - } - } - } - - query->items.add(item); - } - - query->partitions.init(partitions_accessed.size()); - for(auto it = partitions_accessed.begin(); it != partitions_accessed.end(); ++it) { - query->partitions.add(*it); - } - return query; - -} - -uint64_t TPCCQuery::get_participants(Workload * wl) { - uint64_t participant_cnt = 0; - uint64_t active_cnt = 0; - assert(participant_nodes.size()==0); - assert(active_nodes.size()==0); - for(uint64_t i = 0; i < g_node_cnt; i++) { - participant_nodes.add(0); - active_nodes.add(0); - } - assert(participant_nodes.size()==g_node_cnt); - assert(active_nodes.size()==g_node_cnt); - - uint64_t home_wh_node; - home_wh_node = GET_NODE_ID(wh_to_part(w_id)); - participant_nodes.set(home_wh_node,1); - active_nodes.set(home_wh_node,1); - participant_cnt++; - active_cnt++; - if(txn_type == TPCC_PAYMENT) { - uint64_t req_nid = GET_NODE_ID(wh_to_part(c_w_id)); - if(participant_nodes[req_nid] == 0) { - participant_cnt++; - participant_nodes.set(req_nid,1); - active_cnt++; - active_nodes.set(req_nid,1); - } - - } else if (txn_type == TPCC_NEW_ORDER) { - for(uint64_t i = 0; i < ol_cnt; i++) { - uint64_t req_nid = GET_NODE_ID(wh_to_part(items[i]->ol_supply_w_id)); - if(participant_nodes[req_nid] == 0) { - participant_cnt++; - participant_nodes.set(req_nid,1); - active_cnt++; - active_nodes.set(req_nid,1); - } - } - } - return participant_cnt; -} - -void TPCCQuery::reset() { - BaseQuery::clear(); -#if CC_ALG != CALVIN - release_items(); -#endif - items.clear(); -} - -void TPCCQuery::release() { - BaseQuery::release(); - DEBUG_M("TPCCQuery::release() free\n"); -#if CC_ALG != CALVIN - release_items(); -#endif - items.release(); -} - -void TPCCQuery::release_items() { - // A bit of a hack to ensure that original requests in client query queue aren't freed - if (SERVER_GENERATE_QUERIES) return; - for(uint64_t i = 0; i < items.size(); i++) { - DEBUG_M("TPCCQuery::release() Item_no free\n"); - mem_allocator.free(items[i],sizeof(Item_no)); - } - -} diff --git a/contrib/deneva/benchmarks/tpcc_query.h b/contrib/deneva/benchmarks/tpcc_query.h deleted file mode 100644 index 4ca2dee4..00000000 --- a/contrib/deneva/benchmarks/tpcc_query.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _TPCCQuery_H_ -#define _TPCCQuery_H_ - -#include "global.h" -#include "helper.h" -#include "query.h" - -class Workload; -class Message; -class TPCCQueryMessage; -class TPCCClientQueryMessage; - -// items of new order transaction -struct Item_no { - uint64_t ol_i_id; - uint64_t ol_supply_w_id; - uint64_t ol_quantity; - void copy(Item_no * item) { - ol_i_id = item->ol_i_id; - ol_supply_w_id = item->ol_supply_w_id; - ol_quantity = item->ol_quantity; - } -}; - - -class TPCCQueryGenerator : public QueryGenerator { -public: - BaseQuery * create_query(Workload * h_wl, uint64_t home_partition_id); - -private: - BaseQuery * gen_requests(uint64_t home_partition_id, Workload * h_wl); - BaseQuery * gen_payment(uint64_t home_partition); - BaseQuery * gen_new_order(uint64_t home_partition); - myrand * mrand; -}; - -class TPCCQuery : public BaseQuery { -public: - void init(uint64_t thd_id, Workload * h_wl); - void init(); - void reset(); - void release(); - void release_items(); - void print(); - static std::set participants(Message * msg, Workload * wl); - uint64_t participants(bool *& pps,Workload * wl); - uint64_t get_participants(Workload * wl); - bool readonly(); - - TPCCTxnType txn_type; - // common txn input for both payment & new-order - uint64_t w_id; - uint64_t d_id; - uint64_t c_id; - // txn input for payment - uint64_t d_w_id; - uint64_t c_w_id; - uint64_t c_d_id; - char c_last[LASTNAME_LEN]; - double h_amount; - bool by_last_name; - // txn input for new-order - //Item_no * items; - Array items; - bool rbk; - bool remote; - uint64_t ol_cnt; - uint64_t o_entry_d; - // Input for delivery - uint64_t o_carrier_id; - uint64_t ol_delivery_d; - // for order-status - - // Other - uint64_t ol_i_id; - uint64_t ol_supply_w_id; - uint64_t ol_quantity; - uint64_t ol_number; - uint64_t ol_amount; - uint64_t o_id; - uint64_t rqry_req_cnt; - -}; - -#endif diff --git a/contrib/deneva/benchmarks/tpcc_txn.cpp b/contrib/deneva/benchmarks/tpcc_txn.cpp deleted file mode 100644 index effb03d4..00000000 --- a/contrib/deneva/benchmarks/tpcc_txn.cpp +++ /dev/null @@ -1,1142 +0,0 @@ -/* - Tencent is pleased to support the open source community by making 3TS available. - - Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - Tencent Modifications are Copyright (C) THL A29 Limited. - - Author: hongyaozhao@ruc.edu.cn - - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "tpcc.h" -#include "tpcc_query.h" -#include "tpcc_helper.h" -#include "query.h" -#include "wl.h" -#include "thread.h" -#include "table.h" -#include "row.h" -#include "index_hash.h" -#include "index_btree.h" -#include "tpcc_const.h" -#include "transport.h" -#include "msg_queue.h" -#include "message.h" - -void TPCCTxnManager::init(uint64_t thd_id, Workload * h_wl) { - TxnManager::init(thd_id, h_wl); - _wl = (TPCCWorkload *) h_wl; - reset(); - TxnManager::reset(); -} - -void TPCCTxnManager::reset() { - TPCCQuery* tpcc_query = (TPCCQuery*) query; - state = TPCC_PAYMENT0; - if(tpcc_query->txn_type == TPCC_PAYMENT) { - state = TPCC_PAYMENT0; - } else if (tpcc_query->txn_type == TPCC_NEW_ORDER) { - state = TPCC_NEWORDER0; - } - next_item_id = 0; - TxnManager::reset(); -} - -RC TPCCTxnManager::run_txn_post_wait() { - get_row_post_wait(row); - next_tpcc_state(); - return RCOK; -} - - -RC TPCCTxnManager::run_txn() { -#if MODE == SETUP_MODE - return RCOK; -#endif - RC rc = RCOK; - uint64_t starttime = get_sys_clock(); - -#if CC_ALG == CALVIN - rc = run_calvin_txn(); - return rc; -#endif - - if(IS_LOCAL(txn->txn_id) && (state == TPCC_PAYMENT0 || state == TPCC_NEWORDER0)) { - DEBUG("Running txn %ld\n",txn->txn_id); -#if DISTR_DEBUG - query->print(); -#endif - query->partitions_touched.add_unique(GET_PART_ID(0,g_node_id)); - } - - - while(rc == RCOK && !is_done()) { - rc = run_txn_state(); - } - - uint64_t curr_time = get_sys_clock(); - txn_stats.process_time += curr_time - starttime; - txn_stats.process_time_short += curr_time - starttime; - - if(IS_LOCAL(get_txn_id())) { - if(is_done() && rc == RCOK) - rc = start_commit(); - else if(rc == Abort) - rc = start_abort(); - } - - return rc; - -} - -bool TPCCTxnManager::is_done() { - bool done = false; - TPCCQuery* tpcc_query = (TPCCQuery*) query; - switch(tpcc_query->txn_type) { - case TPCC_PAYMENT: - //done = state == TPCC_PAYMENT5 || state == TPCC_FIN; - done = state == TPCC_FIN; - break; - case TPCC_NEW_ORDER: - //done = next_item_id == tpcc_query->ol_cnt || state == TPCC_FIN; - done = next_item_id >= tpcc_query->items.size() || state == TPCC_FIN; - break; - default: - assert(false); - } - - return done; -} - -RC TPCCTxnManager::acquire_locks() { - uint64_t starttime = get_sys_clock(); - assert(CC_ALG == CALVIN); - locking_done = false; - RC rc = RCOK; - RC rc2; - INDEX * index; - itemid_t * item; - row_t* row; - uint64_t key; - incr_lr(); - TPCCQuery* tpcc_query = (TPCCQuery*) query; - - uint64_t w_id = tpcc_query->w_id; - uint64_t d_id = tpcc_query->d_id; - uint64_t c_id = tpcc_query->c_id; - uint64_t d_w_id = tpcc_query->d_w_id; - uint64_t c_w_id = tpcc_query->c_w_id; - uint64_t c_d_id = tpcc_query->c_d_id; - char * c_last = tpcc_query->c_last; - uint64_t part_id_w = wh_to_part(w_id); - uint64_t part_id_c_w = wh_to_part(c_w_id); - switch(tpcc_query->txn_type) { - case TPCC_PAYMENT: - if(GET_NODE_ID(part_id_w) == g_node_id) { - // WH - index = _wl->i_warehouse; - item = index_read(index, w_id, part_id_w); - row_t * row = ((row_t *)item->location); - rc2 = get_lock(row,g_wh_update? WR:RD); - if (rc2 != RCOK) rc = rc2; - - // Dist - key = distKey(d_id, d_w_id); - item = index_read(_wl->i_district, key, part_id_w); - row = ((row_t *)item->location); - rc2 = get_lock(row, WR); - if (rc2 != RCOK) rc = rc2; - } - if(GET_NODE_ID(part_id_c_w) == g_node_id) { - // Cust - if (tpcc_query->by_last_name) { - - key = custNPKey(c_last, c_d_id, c_w_id); - index = _wl->i_customer_last; - item = index_read(index, key, part_id_c_w); - int cnt = 0; - itemid_t * it = item; - itemid_t * mid = item; - while (it != NULL) { - cnt ++; - it = it->next; - if (cnt % 2 == 0) mid = mid->next; - } - row = ((row_t *)mid->location); - - } else { - key = custKey(c_id, c_d_id, c_w_id); - index = _wl->i_customer_id; - item = index_read(index, key, part_id_c_w); - row = (row_t *) item->location; - } - rc2 = get_lock(row, WR); - if (rc2 != RCOK) rc = rc2; - } - break; - case TPCC_NEW_ORDER: - if(GET_NODE_ID(part_id_w) == g_node_id) { - // WH - index = _wl->i_warehouse; - item = index_read(index, w_id, part_id_w); - row_t * row = ((row_t *)item->location); - rc2 = get_lock(row,RD); - if (rc2 != RCOK) rc = rc2; - // Cust - index = _wl->i_customer_id; - key = custKey(c_id, d_id, w_id); - item = index_read(index, key, wh_to_part(w_id)); - row = (row_t *) item->location; - rc2 = get_lock(row, RD); - if (rc2 != RCOK) rc = rc2; - // Dist - key = distKey(d_id, w_id); - item = index_read(_wl->i_district, key, wh_to_part(w_id)); - row = ((row_t *)item->location); - rc2 = get_lock(row, WR); - if (rc2 != RCOK) rc = rc2; - } - // Items - for(uint64_t i = 0; i < tpcc_query->ol_cnt; i++) { - if (GET_NODE_ID(wh_to_part(tpcc_query->items[i]->ol_supply_w_id)) != g_node_id) continue; - - key = tpcc_query->items[i]->ol_i_id; - item = index_read(_wl->i_item, key, 0); - row = ((row_t *)item->location); - rc2 = get_lock(row, RD); - if (rc2 != RCOK) rc = rc2; - key = stockKey(tpcc_query->items[i]->ol_i_id, tpcc_query->items[i]->ol_supply_w_id); - index = _wl->i_stock; - item = index_read(index, key, wh_to_part(tpcc_query->items[i]->ol_supply_w_id)); - row = ((row_t *)item->location); - rc2 = get_lock(row, WR); - if (rc2 != RCOK) rc = rc2; - } - break; - default: - assert(false); - } - if(decr_lr() == 0) { - if (ATOM_CAS(lock_ready, false, true)) rc = RCOK; - } - txn_stats.wait_starttime = get_sys_clock(); - locking_done = true; - INC_STATS(get_thd_id(),calvin_sched_time,get_sys_clock() - starttime); - return rc; -} - - -void TPCCTxnManager::next_tpcc_state() { - //TPCCQuery* tpcc_query = (TPCCQuery*) query; - - switch(state) { - case TPCC_PAYMENT_S: - state = TPCC_PAYMENT0; - break; - case TPCC_PAYMENT0: - state = TPCC_PAYMENT1; - break; - case TPCC_PAYMENT1: - state = TPCC_PAYMENT2; - break; - case TPCC_PAYMENT2: - state = TPCC_PAYMENT3; - break; - case TPCC_PAYMENT3: - state = TPCC_PAYMENT4; - break; - case TPCC_PAYMENT4: - state = TPCC_PAYMENT5; - break; - case TPCC_PAYMENT5: - state = TPCC_FIN; - break; - case TPCC_NEWORDER_S: - state = TPCC_NEWORDER0; - break; - case TPCC_NEWORDER0: - state = TPCC_NEWORDER1; - break; - case TPCC_NEWORDER1: - state = TPCC_NEWORDER2; - break; - case TPCC_NEWORDER2: - state = TPCC_NEWORDER3; - break; - case TPCC_NEWORDER3: - state = TPCC_NEWORDER4; - break; - case TPCC_NEWORDER4: - state = TPCC_NEWORDER5; - break; - case TPCC_NEWORDER5: - if(!IS_LOCAL(txn->txn_id) || !is_done()) { - state = TPCC_NEWORDER6; - } else { - state = TPCC_FIN; - } - break; - case TPCC_NEWORDER6: // loop pt 1 - state = TPCC_NEWORDER7; - break; - case TPCC_NEWORDER7: - state = TPCC_NEWORDER8; - break; - case TPCC_NEWORDER8: // loop pt 2 - state = TPCC_NEWORDER9; - break; - case TPCC_NEWORDER9: - ++next_item_id; - if(!IS_LOCAL(txn->txn_id) || !is_done()) { - state = TPCC_NEWORDER6; - } else { - state = TPCC_FIN; - } - break; - case TPCC_FIN: - break; - default: - assert(false); - } - -} - -bool TPCCTxnManager::is_local_item(uint64_t idx) { - TPCCQuery* tpcc_query = (TPCCQuery*) query; - uint64_t ol_supply_w_id = tpcc_query->items[idx]->ol_supply_w_id; - uint64_t part_id_ol_supply_w = wh_to_part(ol_supply_w_id); - return GET_NODE_ID(part_id_ol_supply_w) == g_node_id; -} - - -RC TPCCTxnManager::send_remote_request() { - assert(IS_LOCAL(get_txn_id())); - TPCCQuery* tpcc_query = (TPCCQuery*) query; - TPCCRemTxnType next_state = TPCC_FIN; - uint64_t w_id = tpcc_query->w_id; - uint64_t c_w_id = tpcc_query->c_w_id; - uint64_t dest_node_id = UINT64_MAX; - if(state == TPCC_PAYMENT0) { - dest_node_id = GET_NODE_ID(wh_to_part(w_id)); - next_state = TPCC_PAYMENT2; - } else if(state == TPCC_PAYMENT4) { - dest_node_id = GET_NODE_ID(wh_to_part(c_w_id)); - next_state = TPCC_FIN; - } else if(state == TPCC_NEWORDER0) { - dest_node_id = GET_NODE_ID(wh_to_part(w_id)); - next_state = TPCC_NEWORDER6; - } else if(state == TPCC_NEWORDER8) { - dest_node_id = GET_NODE_ID(wh_to_part(tpcc_query->items[next_item_id]->ol_supply_w_id)); - /* - while(GET_NODE_ID(wh_to_part(tpcc_query->items[next_item_id]->ol_supply_w_id)) != dest_node_id) - { - msg->items.add(tpcc_query->items[next_item_id++]); - } - */ - if(is_done()) - next_state = TPCC_FIN; - else - next_state = TPCC_NEWORDER6; - } else { - assert(false); - } - TPCCQueryMessage * msg = (TPCCQueryMessage*)Message::create_message(this,RQRY); - msg->state = state; - query->partitions_touched.add_unique(GET_PART_ID(0,dest_node_id)); - msg_queue.enqueue(get_thd_id(),msg,dest_node_id); - state = next_state; - return WAIT_REM; -} - -void TPCCTxnManager::copy_remote_items(TPCCQueryMessage * msg) { - TPCCQuery* tpcc_query = (TPCCQuery*) query; - msg->items.init(tpcc_query->items.size()); - if (tpcc_query->txn_type == TPCC_PAYMENT) return; - uint64_t dest_node_id = GET_NODE_ID(wh_to_part(tpcc_query->items[next_item_id]->ol_supply_w_id)); - while (next_item_id < tpcc_query->items.size() && !is_local_item(next_item_id) && - GET_NODE_ID(wh_to_part(tpcc_query->items[next_item_id]->ol_supply_w_id)) == dest_node_id) { - Item_no * req = (Item_no*) mem_allocator.alloc(sizeof(Item_no)); - req->copy(tpcc_query->items[next_item_id++]); - msg->items.add(req); - } -} - - -RC TPCCTxnManager::run_txn_state() { - TPCCQuery* tpcc_query = (TPCCQuery*) query; - uint64_t w_id = tpcc_query->w_id; - uint64_t d_id = tpcc_query->d_id; - uint64_t c_id = tpcc_query->c_id; - uint64_t d_w_id = tpcc_query->d_w_id; - uint64_t c_w_id = tpcc_query->c_w_id; - uint64_t c_d_id = tpcc_query->c_d_id; - char * c_last = tpcc_query->c_last; - double h_amount = tpcc_query->h_amount; - bool by_last_name = tpcc_query->by_last_name; - bool remote = tpcc_query->remote; - uint64_t ol_cnt = tpcc_query->ol_cnt; - uint64_t o_entry_d = tpcc_query->o_entry_d; - uint64_t ol_i_id = 0; - uint64_t ol_supply_w_id = 0; - uint64_t ol_quantity = 0; - if(tpcc_query->txn_type == TPCC_NEW_ORDER) { - ol_i_id = tpcc_query->items[next_item_id]->ol_i_id; - ol_supply_w_id = tpcc_query->items[next_item_id]->ol_supply_w_id; - ol_quantity = tpcc_query->items[next_item_id]->ol_quantity; - } - uint64_t ol_number = next_item_id; - uint64_t ol_amount = tpcc_query->ol_amount; - uint64_t o_id = tpcc_query->o_id; - - uint64_t part_id_w = wh_to_part(w_id); - uint64_t part_id_c_w = wh_to_part(c_w_id); - uint64_t part_id_ol_supply_w = wh_to_part(ol_supply_w_id); - bool w_loc = GET_NODE_ID(part_id_w) == g_node_id; - bool c_w_loc = GET_NODE_ID(part_id_c_w) == g_node_id; - bool ol_supply_w_loc = GET_NODE_ID(part_id_ol_supply_w) == g_node_id; - - RC rc = RCOK; - - switch (state) { - case TPCC_PAYMENT0 : - if(w_loc) - rc = run_payment_0(w_id, d_id, d_w_id, h_amount, row); - else { - rc = send_remote_request(); - } - break; - case TPCC_PAYMENT1 : - rc = run_payment_1(w_id, d_id, d_w_id, h_amount, row); - break; - case TPCC_PAYMENT2 : - rc = run_payment_2(w_id, d_id, d_w_id, h_amount, row); - break; - case TPCC_PAYMENT3 : - rc = run_payment_3(w_id, d_id, d_w_id, h_amount, row); - break; - case TPCC_PAYMENT4 : - if(c_w_loc) - rc = run_payment_4( w_id, d_id, c_id, c_w_id, c_d_id, c_last, h_amount, by_last_name, row); - else { - rc = send_remote_request(); - } - break; - case TPCC_PAYMENT5 : - rc = run_payment_5( w_id, d_id, c_id, c_w_id, c_d_id, c_last, h_amount, by_last_name, row); - break; - case TPCC_NEWORDER0 : - if(w_loc) - rc = new_order_0( w_id, d_id, c_id, remote, ol_cnt, o_entry_d, &tpcc_query->o_id, row); - else { - rc = send_remote_request(); - } - break; - case TPCC_NEWORDER1 : - rc = new_order_1( w_id, d_id, c_id, remote, ol_cnt, o_entry_d, &tpcc_query->o_id, row); - break; - case TPCC_NEWORDER2 : - rc = new_order_2( w_id, d_id, c_id, remote, ol_cnt, o_entry_d, &tpcc_query->o_id, row); - break; - case TPCC_NEWORDER3 : - rc = new_order_3( w_id, d_id, c_id, remote, ol_cnt, o_entry_d, &tpcc_query->o_id, row); - break; - case TPCC_NEWORDER4 : - rc = new_order_4( w_id, d_id, c_id, remote, ol_cnt, o_entry_d, &tpcc_query->o_id, row); - break; - case TPCC_NEWORDER5 : - rc = new_order_5( w_id, d_id, c_id, remote, ol_cnt, o_entry_d, &tpcc_query->o_id, row); - break; - case TPCC_NEWORDER6 : - rc = new_order_6(ol_i_id, row); - break; - case TPCC_NEWORDER7 : - rc = new_order_7(ol_i_id, row); - break; - case TPCC_NEWORDER8 : - if(ol_supply_w_loc) { - rc = new_order_8(w_id, d_id, remote, ol_i_id, ol_supply_w_id, ol_quantity, ol_number, o_id, - row); - } else { - rc = send_remote_request(); - } - break; - case TPCC_NEWORDER9 : - rc = new_order_9(w_id, d_id, remote, ol_i_id, ol_supply_w_id, ol_quantity, ol_number, - ol_amount, o_id, row); - break; - case TPCC_FIN : - state = TPCC_FIN; - if (tpcc_query->rbk) return Abort; - //return finish(tpcc_query,false); - break; - default: - assert(false); - } - - if (rc == RCOK) next_tpcc_state(); - return rc; -} - -inline RC TPCCTxnManager::run_payment_0(uint64_t w_id, uint64_t d_id, uint64_t d_w_id, - double h_amount, row_t *&r_wh_local) { - - uint64_t key; - itemid_t * item; -/*====================================================+ - EXEC SQL UPDATE warehouse SET w_ytd = w_ytd + :h_amount - WHERE w_id=:w_id; - +====================================================*/ - /*===================================================================+ - EXEC SQL SELECT w_street_1, w_street_2, w_city, w_state, w_zip, w_name - INTO :w_street_1, :w_street_2, :w_city, :w_state, :w_zip, :w_name - FROM warehouse - WHERE w_id=:w_id; - +===================================================================*/ - - - RC rc; - key = w_id; - INDEX * index = _wl->i_warehouse; - item = index_read(index, key, wh_to_part(w_id)); - assert(item != NULL); - row_t * r_wh = ((row_t *)item->location); - if (g_wh_update) - rc = get_row(r_wh, WR, r_wh_local); - else - rc = get_row(r_wh, RD, r_wh_local); - - return rc; -} - -inline RC TPCCTxnManager::run_payment_1(uint64_t w_id, uint64_t d_id, uint64_t d_w_id, - double h_amount, row_t *r_wh_local) { - - assert(r_wh_local != NULL); -/*====================================================+ - EXEC SQL UPDATE warehouse SET w_ytd = w_ytd + :h_amount - WHERE w_id=:w_id; - +====================================================*/ - /*===================================================================+ - EXEC SQL SELECT w_street_1, w_street_2, w_city, w_state, w_zip, w_name - INTO :w_street_1, :w_street_2, :w_city, :w_state, :w_zip, :w_name - FROM warehouse - WHERE w_id=:w_id; - +===================================================================*/ - - - double w_ytd; - r_wh_local->get_value(W_YTD, w_ytd); - if (g_wh_update) { - r_wh_local->set_value(W_YTD, w_ytd + h_amount); - } - return RCOK; -} - -inline RC TPCCTxnManager::run_payment_2(uint64_t w_id, uint64_t d_id, uint64_t d_w_id, - double h_amount, row_t *&r_dist_local) { - /*=====================================================+ - EXEC SQL UPDATE district SET d_ytd = d_ytd + :h_amount - WHERE d_w_id=:w_id AND d_id=:d_id; - +=====================================================*/ - uint64_t key; - itemid_t * item; - key = distKey(d_id, d_w_id); - item = index_read(_wl->i_district, key, wh_to_part(w_id)); - assert(item != NULL); - row_t * r_dist = ((row_t *)item->location); - RC rc = get_row(r_dist, WR, r_dist_local); - return rc; -} - -inline RC TPCCTxnManager::run_payment_3(uint64_t w_id, uint64_t d_id, uint64_t d_w_id, - double h_amount, row_t *r_dist_local) { - assert(r_dist_local != NULL); - - /*=====================================================+ - EXEC SQL UPDATE district SET d_ytd = d_ytd + :h_amount - WHERE d_w_id=:w_id AND d_id=:d_id; - +=====================================================*/ - double d_ytd; - r_dist_local->get_value(D_YTD, d_ytd); - r_dist_local->set_value(D_YTD, d_ytd + h_amount); - - return RCOK; -} - -inline RC TPCCTxnManager::run_payment_4(uint64_t w_id, uint64_t d_id, uint64_t c_id, - uint64_t c_w_id, uint64_t c_d_id, char *c_last, - double h_amount, bool by_last_name, row_t *&r_cust_local) { - /*====================================================================+ - EXEC SQL SELECT d_street_1, d_street_2, d_city, d_state, d_zip, d_name - INTO :d_street_1, :d_street_2, :d_city, :d_state, :d_zip, :d_name - FROM district - WHERE d_w_id=:w_id AND d_id=:d_id; - +====================================================================*/ - - itemid_t * item; - uint64_t key; - row_t * r_cust; - if (by_last_name) { - /*==========================================================+ - EXEC SQL SELECT count(c_id) INTO :namecnt - FROM customer - WHERE c_last=:c_last AND c_d_id=:c_d_id AND c_w_id=:c_w_id; - +==========================================================*/ - /*==========================================================================+ - EXEC SQL DECLARE c_byname CURSOR FOR - SELECT c_first, c_middle, c_id, c_street_1, c_street_2, c_city, c_state, - c_zip, c_phone, c_credit, c_credit_lim, c_discount, c_balance, c_since - FROM customer - WHERE c_w_id=:c_w_id AND c_d_id=:c_d_id AND c_last=:c_last - ORDER BY c_first; - EXEC SQL OPEN c_byname; - +===========================================================================*/ - - key = custNPKey(c_last, c_d_id, c_w_id); - // XXX: the list is not sorted. But let's assume it's sorted... - // The performance won't be much different. - INDEX * index = _wl->i_customer_last; - item = index_read(index, key, wh_to_part(c_w_id)); - assert(item != NULL); - - int cnt = 0; - itemid_t * it = item; - itemid_t * mid = item; - while (it != NULL) { - cnt ++; - it = it->next; - if (cnt % 2 == 0) mid = mid->next; - } - r_cust = ((row_t *)mid->location); - - /*============================================================================+ - for (n=0; ni_customer_id; - item = index_read(index, key, wh_to_part(c_w_id)); - assert(item != NULL); - r_cust = (row_t *) item->location; - } - - /*======================================================================+ - EXEC SQL UPDATE customer SET c_balance = :c_balance, c_data = :c_new_data - WHERE c_w_id = :c_w_id AND c_d_id = :c_d_id AND c_id = :c_id; - +======================================================================*/ - RC rc = get_row(r_cust, WR, r_cust_local); - - return rc; -} - -inline RC TPCCTxnManager::run_payment_5(uint64_t w_id, uint64_t d_id, uint64_t c_id, - uint64_t c_w_id, uint64_t c_d_id, char *c_last, - double h_amount, bool by_last_name, row_t *r_cust_local) { - assert(r_cust_local != NULL); - double c_balance; - double c_ytd_payment; - double c_payment_cnt; - - r_cust_local->get_value(C_BALANCE, c_balance); - r_cust_local->set_value(C_BALANCE, c_balance - h_amount); - r_cust_local->get_value(C_YTD_PAYMENT, c_ytd_payment); - r_cust_local->set_value(C_YTD_PAYMENT, c_ytd_payment + h_amount); - r_cust_local->get_value(C_PAYMENT_CNT, c_payment_cnt); - r_cust_local->set_value(C_PAYMENT_CNT, c_payment_cnt + 1); - - //char * c_credit = r_cust_local->get_value(C_CREDIT); - - /*=============================================================================+ - EXEC SQL INSERT INTO - history (h_c_d_id, h_c_w_id, h_c_id, h_d_id, h_w_id, h_date, h_amount, h_data) - VALUES (:c_d_id, :c_w_id, :c_id, :d_id, :w_id, :datetime, :h_amount, :h_data); - +=============================================================================*/ - row_t * r_hist; - uint64_t row_id; - // Which partition should we be inserting into? - _wl->t_history->get_new_row(r_hist, wh_to_part(c_w_id), row_id); - r_hist->set_value(H_C_ID, c_id); - r_hist->set_value(H_C_D_ID, c_d_id); - r_hist->set_value(H_C_W_ID, c_w_id); - r_hist->set_value(H_D_ID, d_id); - r_hist->set_value(H_W_ID, w_id); - int64_t date = 2013; - r_hist->set_value(H_DATE, date); - r_hist->set_value(H_AMOUNT, h_amount); - insert_row(r_hist, _wl->t_history); - - return RCOK; -} - -// new_order 0 -inline RC TPCCTxnManager::new_order_0(uint64_t w_id, uint64_t d_id, uint64_t c_id, bool remote, - uint64_t ol_cnt, uint64_t o_entry_d, uint64_t *o_id, - row_t *&r_wh_local) { - uint64_t key; - itemid_t * item; - /*=======================================================================+ - EXEC SQL SELECT c_discount, c_last, c_credit, w_tax - INTO :c_discount, :c_last, :c_credit, :w_tax - FROM customer, warehouse - WHERE w_id = :w_id AND c_w_id = w_id AND c_d_id = :d_id AND c_id = :c_id; - +========================================================================*/ - key = w_id; - INDEX * index = _wl->i_warehouse; - item = index_read(index, key, wh_to_part(w_id)); - assert(item != NULL); - row_t * r_wh = ((row_t *)item->location); - RC rc = get_row(r_wh, RD, r_wh_local); - return rc; -} - -inline RC TPCCTxnManager::new_order_1(uint64_t w_id, uint64_t d_id, uint64_t c_id, bool remote, - uint64_t ol_cnt, uint64_t o_entry_d, uint64_t *o_id, - row_t *r_wh_local) { - assert(r_wh_local != NULL); - double w_tax; - r_wh_local->get_value(W_TAX, w_tax); - return RCOK; -} - -inline RC TPCCTxnManager::new_order_2(uint64_t w_id, uint64_t d_id, uint64_t c_id, bool remote, - uint64_t ol_cnt, uint64_t o_entry_d, uint64_t *o_id, - row_t *&r_cust_local) { - uint64_t key; - itemid_t * item; - key = custKey(c_id, d_id, w_id); - INDEX * index = _wl->i_customer_id; - item = index_read(index, key, wh_to_part(w_id)); - assert(item != NULL); - row_t * r_cust = (row_t *) item->location; - RC rc = get_row(r_cust, RD, r_cust_local); - return rc; -} - -inline RC TPCCTxnManager::new_order_3(uint64_t w_id, uint64_t d_id, uint64_t c_id, bool remote, - uint64_t ol_cnt, uint64_t o_entry_d, uint64_t *o_id, - row_t *r_cust_local) { - assert(r_cust_local != NULL); - uint64_t c_discount; - //char * c_last; - //char * c_credit; - r_cust_local->get_value(C_DISCOUNT, c_discount); - //c_last = r_cust_local->get_value(C_LAST); - //c_credit = r_cust_local->get_value(C_CREDIT); - return RCOK; -} - -inline RC TPCCTxnManager::new_order_4(uint64_t w_id, uint64_t d_id, uint64_t c_id, bool remote, - uint64_t ol_cnt, uint64_t o_entry_d, uint64_t *o_id, - row_t *&r_dist_local) { - uint64_t key; - itemid_t * item; - /*==================================================+ - EXEC SQL SELECT d_next_o_id, d_tax - INTO :d_next_o_id, :d_tax - FROM district WHERE d_id = :d_id AND d_w_id = :w_id; - EXEC SQL UPDATE d istrict SET d _next_o_id = :d _next_o_id + 1 - WH ERE d _id = :d_id AN D d _w _id = :w _id ; - +===================================================*/ - key = distKey(d_id, w_id); - item = index_read(_wl->i_district, key, wh_to_part(w_id)); - assert(item != NULL); - row_t * r_dist = ((row_t *)item->location); - RC rc = get_row(r_dist, WR, r_dist_local); - return rc; -} - -inline RC TPCCTxnManager::new_order_5(uint64_t w_id, uint64_t d_id, uint64_t c_id, bool remote, - uint64_t ol_cnt, uint64_t o_entry_d, uint64_t *o_id, - row_t *r_dist_local) { - assert(r_dist_local != NULL); - //double d_tax; - //int64_t o_id; - //d_tax = *(double *) r_dist_local->get_value(D_TAX); - *o_id = *(int64_t *) r_dist_local->get_value(D_NEXT_O_ID); - (*o_id) ++; - r_dist_local->set_value(D_NEXT_O_ID, *o_id); - - // return o_id - /*========================================================================================+ - EXEC SQL INSERT INTO ORDERS (o_id, o_d_id, o_w_id, o_c_id, o_entry_d, o_ol_cnt, o_all_local) - VALUES (:o_id, :d_id, :w_id, :c_id, :datetime, :o_ol_cnt, :o_all_local); - +========================================================================================*/ - row_t * r_order; - uint64_t row_id; - _wl->t_order->get_new_row(r_order, wh_to_part(w_id), row_id); - r_order->set_value(O_ID, *o_id); - r_order->set_value(O_C_ID, c_id); - r_order->set_value(O_D_ID, d_id); - r_order->set_value(O_W_ID, w_id); - r_order->set_value(O_ENTRY_D, o_entry_d); - r_order->set_value(O_OL_CNT, ol_cnt); - int64_t all_local = (remote? 0 : 1); - r_order->set_value(O_ALL_LOCAL, all_local); - insert_row(r_order, _wl->t_order); - /*=======================================================+ - EXEC SQL INSERT INTO NEW_ORDER (no_o_id, no_d_id, no_w_id) - VALUES (:o_id, :d_id, :w_id); - +=======================================================*/ - row_t * r_no; - _wl->t_neworder->get_new_row(r_no, wh_to_part(w_id), row_id); - r_no->set_value(NO_O_ID, *o_id); - r_no->set_value(NO_D_ID, d_id); - r_no->set_value(NO_W_ID, w_id); - insert_row(r_no, _wl->t_neworder); - - return RCOK; -} - - - -// new_order 1 -// Read from replicated read-only item table -inline RC TPCCTxnManager::new_order_6(uint64_t ol_i_id, row_t *& r_item_local) { - uint64_t key; - itemid_t * item; - /*===========================================+ - EXEC SQL SELECT i_price, i_name , i_data - INTO :i_price, :i_name, :i_data - FROM item - WHERE i_id = :ol_i_id; - +===========================================*/ - key = ol_i_id; - item = index_read(_wl->i_item, key, 0); - assert(item != NULL); - row_t * r_item = ((row_t *)item->location); - - RC rc = get_row(r_item, RD, r_item_local); - return rc; -} - -inline RC TPCCTxnManager::new_order_7(uint64_t ol_i_id, row_t * r_item_local) { - assert(r_item_local != NULL); - int64_t i_price; - //char * i_name; - //char * i_data; - - r_item_local->get_value(I_PRICE, i_price); - //i_name = r_item_local->get_value(I_NAME); - //i_data = r_item_local->get_value(I_DATA); - - return RCOK; -} - -// new_order 2 -inline RC TPCCTxnManager::new_order_8(uint64_t w_id, uint64_t d_id, bool remote, uint64_t ol_i_id, - uint64_t ol_supply_w_id, uint64_t ol_quantity, - uint64_t ol_number, uint64_t o_id, row_t *&r_stock_local) { - uint64_t key; - itemid_t * item; - - /*===================================================================+ - EXEC SQL SELECT s_quantity, s_data, - s_dist_01, s_dist_02, s_dist_03, s_dist_04, s_dist_05, - s_dist_06, s_dist_07, s_dist_08, s_dist_09, s_dist_10 - INTO :s_quantity, :s_data, - :s_dist_01, :s_dist_02, :s_dist_03, :s_dist_04, :s_dist_05, - :s_dist_06, :s_dist_07, :s_dist_08, :s_dist_09, :s_dist_10 - FROM stock - WHERE s_i_id = :ol_i_id AND s_w_id = :ol_supply_w_id; - EXEC SQL UPDATE stock SET s_quantity = :s_quantity - WHERE s_i_id = :ol_i_id - AND s_w_id = :ol_supply_w_id; - +===============================================*/ - - key = stockKey(ol_i_id, ol_supply_w_id); - INDEX * index = _wl->i_stock; - item = index_read(index, key, wh_to_part(ol_supply_w_id)); - assert(item != NULL); - row_t * r_stock = ((row_t *)item->location); - RC rc = get_row(r_stock, WR, r_stock_local); - return rc; -} - -inline RC TPCCTxnManager::new_order_9(uint64_t w_id, uint64_t d_id, bool remote, uint64_t ol_i_id, - uint64_t ol_supply_w_id, uint64_t ol_quantity, - uint64_t ol_number, uint64_t ol_amount, uint64_t o_id, - row_t *r_stock_local) { - assert(r_stock_local != NULL); - // XXX s_dist_xx are not retrieved. - UInt64 s_quantity; - int64_t s_remote_cnt; - s_quantity = *(int64_t *)r_stock_local->get_value(S_QUANTITY); -#if !TPCC_SMALL - int64_t s_ytd; - int64_t s_order_cnt; - char * s_data __attribute__ ((unused)); - r_stock_local->get_value(S_YTD, s_ytd); - r_stock_local->set_value(S_YTD, s_ytd + ol_quantity); - // In Coordination Avoidance, this record must be protected! - r_stock_local->get_value(S_ORDER_CNT, s_order_cnt); - r_stock_local->set_value(S_ORDER_CNT, s_order_cnt + 1); - s_data = r_stock_local->get_value(S_DATA); -#endif - if (remote) { - s_remote_cnt = *(int64_t*)r_stock_local->get_value(S_REMOTE_CNT); - s_remote_cnt ++; - r_stock_local->set_value(S_REMOTE_CNT, &s_remote_cnt); - } - uint64_t quantity; - if (s_quantity > ol_quantity + 10) { - quantity = s_quantity - ol_quantity; - } else { - quantity = s_quantity - ol_quantity + 91; - } - r_stock_local->set_value(S_QUANTITY, &quantity); - - /*====================================================+ - EXEC SQL INSERT - INTO order_line(ol_o_id, ol_d_id, ol_w_id, ol_number, - ol_i_id, ol_supply_w_id, - ol_quantity, ol_amount, ol_dist_info) - VALUES(:o_id, :d_id, :w_id, :ol_number, - :ol_i_id, :ol_supply_w_id, - :ol_quantity, :ol_amount, :ol_dist_info); - +====================================================*/ - row_t * r_ol; - uint64_t row_id; - _wl->t_orderline->get_new_row(r_ol, wh_to_part(ol_supply_w_id), row_id); - r_ol->set_value(OL_O_ID, &o_id); - r_ol->set_value(OL_D_ID, &d_id); - r_ol->set_value(OL_W_ID, &w_id); - r_ol->set_value(OL_NUMBER, &ol_number); - r_ol->set_value(OL_I_ID, &ol_i_id); -#if !TPCC_SMALL - r_ol->set_value(OL_SUPPLY_W_ID, &ol_supply_w_id); - r_ol->set_value(OL_QUANTITY, &ol_quantity); - r_ol->set_value(OL_AMOUNT, &ol_amount); -#endif - insert_row(r_ol, _wl->t_orderline); - - return RCOK; -} - - -RC TPCCTxnManager::run_calvin_txn() { - RC rc = RCOK; - uint64_t starttime = get_sys_clock(); - TPCCQuery* tpcc_query = (TPCCQuery*) query; - DEBUG("(%ld,%ld) Run calvin txn\n",txn->txn_id,txn->batch_id); - while(!calvin_exec_phase_done() && rc == RCOK) { - DEBUG("(%ld,%ld) phase %d\n",txn->txn_id,txn->batch_id,this->phase); - switch(this->phase) { - case CALVIN_RW_ANALYSIS: - // Phase 1: Read/write set analysis - calvin_expected_rsp_cnt = tpcc_query->get_participants(_wl); - if(query->participant_nodes[g_node_id] == 1) { - calvin_expected_rsp_cnt--; - } - - DEBUG("(%ld,%ld) expects %d responses; %ld participants, %ld active\n", txn->txn_id, - txn->batch_id, calvin_expected_rsp_cnt, query->participant_nodes.size(), - query->active_nodes.size()); - - this->phase = CALVIN_LOC_RD; - break; - case CALVIN_LOC_RD: - // Phase 2: Perform local reads - DEBUG("(%ld,%ld) local reads\n",txn->txn_id,txn->batch_id); - rc = run_tpcc_phase2(); - //release_read_locks(tpcc_query); - - this->phase = CALVIN_SERVE_RD; - break; - case CALVIN_SERVE_RD: - // Phase 3: Serve remote reads - if(query->participant_nodes[g_node_id] == 1) { - rc = send_remote_reads(); - } - if(query->active_nodes[g_node_id] == 1) { - this->phase = CALVIN_COLLECT_RD; - if(calvin_collect_phase_done()) { - rc = RCOK; - } else { - assert(calvin_expected_rsp_cnt > 0); - DEBUG("(%ld,%ld) wait in collect phase; %d / %d rfwds received\n", txn->txn_id, - txn->batch_id, rsp_cnt, calvin_expected_rsp_cnt); - rc = WAIT; - } - } else { // Done - rc = RCOK; - this->phase = CALVIN_DONE; - } - break; - case CALVIN_COLLECT_RD: - // Phase 4: Collect remote reads - this->phase = CALVIN_EXEC_WR; - break; - case CALVIN_EXEC_WR: - // Phase 5: Execute transaction / perform local writes - DEBUG("(%ld,%ld) execute writes\n",txn->txn_id,txn->batch_id); - rc = run_tpcc_phase5(); - this->phase = CALVIN_DONE; - break; - default: - assert(false); - } - } - uint64_t curr_time = get_sys_clock(); - txn_stats.process_time += curr_time - starttime; - txn_stats.process_time_short += curr_time - starttime; - txn_stats.wait_starttime = get_sys_clock(); - return rc; - -} - - -RC TPCCTxnManager::run_tpcc_phase2() { - TPCCQuery* tpcc_query = (TPCCQuery*) query; - RC rc = RCOK; - assert(CC_ALG == CALVIN); - - uint64_t w_id = tpcc_query->w_id; - uint64_t d_id = tpcc_query->d_id; - uint64_t c_id = tpcc_query->c_id; - //uint64_t d_w_id = tpcc_query->d_w_id; - //uint64_t c_w_id = tpcc_query->c_w_id; - //uint64_t c_d_id = tpcc_query->c_d_id; - //char * c_last = tpcc_query->c_last; - //double h_amount = tpcc_query->h_amount; - //bool by_last_name = tpcc_query->by_last_name; - bool remote = tpcc_query->remote; - uint64_t ol_cnt = tpcc_query->ol_cnt; - uint64_t o_entry_d = tpcc_query->o_entry_d; - //uint64_t o_id = tpcc_query->o_id; - - uint64_t part_id_w = wh_to_part(w_id); - //uint64_t part_id_c_w = wh_to_part(c_w_id); - bool w_loc = GET_NODE_ID(part_id_w) == g_node_id; - //bool c_w_loc = GET_NODE_ID(part_id_c_w) == g_node_id; - - - switch (tpcc_query->txn_type) { - case TPCC_PAYMENT : - break; - case TPCC_NEW_ORDER : - if(w_loc) { - rc = new_order_0( w_id, d_id, c_id, remote, ol_cnt, o_entry_d, &tpcc_query->o_id, row); - rc = new_order_1( w_id, d_id, c_id, remote, ol_cnt, o_entry_d, &tpcc_query->o_id, row); - rc = new_order_2( w_id, d_id, c_id, remote, ol_cnt, o_entry_d, &tpcc_query->o_id, row); - rc = new_order_3( w_id, d_id, c_id, remote, ol_cnt, o_entry_d, &tpcc_query->o_id, row); - rc = new_order_4( w_id, d_id, c_id, remote, ol_cnt, o_entry_d, &tpcc_query->o_id, row); - tpcc_query->o_id = *(int64_t *) row->get_value(D_NEXT_O_ID); - //rc = new_order_5( w_id, d_id, c_id, remote, ol_cnt, o_entry_d, &tpcc_query->o_id, row); - } - for(uint64_t i = 0; i < tpcc_query->ol_cnt; i++) { - - uint64_t ol_number = i; - uint64_t ol_i_id = tpcc_query->items[ol_number]->ol_i_id; - uint64_t ol_supply_w_id = tpcc_query->items[ol_number]->ol_supply_w_id; - //uint64_t ol_quantity = tpcc_query->items[ol_number].ol_quantity; - //uint64_t ol_amount = tpcc_query->ol_amount; - uint64_t part_id_ol_supply_w = wh_to_part(ol_supply_w_id); - bool ol_supply_w_loc = GET_NODE_ID(part_id_ol_supply_w) == g_node_id; - if(ol_supply_w_loc) { - rc = new_order_6(ol_i_id, row); - rc = new_order_7(ol_i_id, row); - } - } - break; - default: - assert(false); - } - return rc; -} - -RC TPCCTxnManager::run_tpcc_phase5() { - TPCCQuery* tpcc_query = (TPCCQuery*) query; - RC rc = RCOK; - assert(CC_ALG == CALVIN); - - uint64_t w_id = tpcc_query->w_id; - uint64_t d_id = tpcc_query->d_id; - uint64_t c_id = tpcc_query->c_id; - uint64_t d_w_id = tpcc_query->d_w_id; - uint64_t c_w_id = tpcc_query->c_w_id; - uint64_t c_d_id = tpcc_query->c_d_id; - char * c_last = tpcc_query->c_last; - double h_amount = tpcc_query->h_amount; - bool by_last_name = tpcc_query->by_last_name; - bool remote = tpcc_query->remote; - uint64_t ol_cnt = tpcc_query->ol_cnt; - uint64_t o_entry_d = tpcc_query->o_entry_d; - uint64_t o_id = tpcc_query->o_id; - - uint64_t part_id_w = wh_to_part(w_id); - uint64_t part_id_c_w = wh_to_part(c_w_id); - bool w_loc = GET_NODE_ID(part_id_w) == g_node_id; - bool c_w_loc = GET_NODE_ID(part_id_c_w) == g_node_id; - - - switch (tpcc_query->txn_type) { - case TPCC_PAYMENT : - if(w_loc) { - rc = run_payment_0(w_id, d_id, d_w_id, h_amount, row); - rc = run_payment_1(w_id, d_id, d_w_id, h_amount, row); - rc = run_payment_2(w_id, d_id, d_w_id, h_amount, row); - rc = run_payment_3(w_id, d_id, d_w_id, h_amount, row); - } - if(c_w_loc) { - rc = run_payment_4( w_id, d_id, c_id, c_w_id, c_d_id, c_last, h_amount, by_last_name, row); - rc = run_payment_5( w_id, d_id, c_id, c_w_id, c_d_id, c_last, h_amount, by_last_name, row); - } - break; - case TPCC_NEW_ORDER : - if(w_loc) { - //rc = new_order_4( w_id, d_id, c_id, remote, ol_cnt, o_entry_d, &tpcc_query->o_id, row); - rc = new_order_5( w_id, d_id, c_id, remote, ol_cnt, o_entry_d, &tpcc_query->o_id, row); - } - for(uint64_t i = 0; i < tpcc_query->ol_cnt; i++) { - - uint64_t ol_number = i; - uint64_t ol_i_id = tpcc_query->items[ol_number]->ol_i_id; - uint64_t ol_supply_w_id = tpcc_query->items[ol_number]->ol_supply_w_id; - uint64_t ol_quantity = tpcc_query->items[ol_number]->ol_quantity; - uint64_t ol_amount = tpcc_query->ol_amount; - uint64_t part_id_ol_supply_w = wh_to_part(ol_supply_w_id); - bool ol_supply_w_loc = GET_NODE_ID(part_id_ol_supply_w) == g_node_id; - if(ol_supply_w_loc) { - rc = new_order_8(w_id, d_id, remote, ol_i_id, ol_supply_w_id, ol_quantity, ol_number, - o_id, row); - rc = new_order_9(w_id, d_id, remote, ol_i_id, ol_supply_w_id, ol_quantity, ol_number, - ol_amount, o_id, row); - } - } - break; - default: - assert(false); - } - return rc; -} diff --git a/contrib/deneva/benchmarks/tpcc_wl.cpp b/contrib/deneva/benchmarks/tpcc_wl.cpp deleted file mode 100644 index e168af34..00000000 --- a/contrib/deneva/benchmarks/tpcc_wl.cpp +++ /dev/null @@ -1,623 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "global.h" -#include "helper.h" -#include "tpcc.h" -#include "wl.h" -#include "thread.h" -#include "table.h" -#include "index_hash.h" -#include "index_btree.h" -#include "tpcc_helper.h" -#include "row.h" -#include "query.h" -#include "txn.h" -#include "mem_alloc.h" -#include "tpcc_const.h" - -RC TPCCWorkload::init() { - Workload::init(); - //char * cpath = getenv("GRAPHITE_HOME"); - char * cpath = getenv("SCHEMA_PATH"); - string path; - if (cpath == NULL) - path = "./benchmarks/"; - else { - path = string(cpath); - // Graphite: - //path += "/tests/apps/dbms/"; - } -#if TPCC_SMALL - path += "TPCC_short_schema.txt"; -#else - path += "TPCC_full_schema.txt"; -#endif - cout << "reading schema file: " << path << endl; - delivering = new bool * [g_num_wh + 1]; - for (UInt32 wid = 1; wid <= g_num_wh; wid ++) - delivering[wid] = (bool *) mem_allocator.alloc(CL_SIZE); - - printf("Initializing schema... "); - fflush(stdout); - init_schema( path.c_str() ); - printf("Done\n"); - printf("Initializing table... "); - fflush(stdout); - init_table(); - printf("Done\n"); - fflush(stdout); - return RCOK; -} - -RC TPCCWorkload::init_schema(const char * schema_file) { - Workload::init_schema(schema_file); - t_warehouse = tables["WAREHOUSE"]; - t_district = tables["DISTRICT"]; - t_customer = tables["CUSTOMER"]; - t_history = tables["HISTORY"]; - t_neworder = tables["NEW-ORDER"]; - t_order = tables["ORDER"]; - t_orderline = tables["ORDER-LINE"]; - t_item = tables["ITEM"]; - t_stock = tables["STOCK"]; - - i_item = indexes["ITEM_IDX"]; - i_warehouse = indexes["WAREHOUSE_IDX"]; - i_district = indexes["DISTRICT_IDX"]; - i_customer_id = indexes["CUSTOMER_ID_IDX"]; - i_customer_last = indexes["CUSTOMER_LAST_IDX"]; - i_stock = indexes["STOCK_IDX"]; -// i_order = indexes["ORDER_IDX"]; -// i_orderline = indexes["ORDER-LINE_IDX"]; - return RCOK; -} - -RC TPCCWorkload::init_table() { - num_wh = g_num_wh; - -/******** fill in data ************/ -// data filling process: -//- item -//- wh -// - stock -// - dist -// - cust -// - hist -// - order -// - new order -// - order line -/**********************************/ - - pthread_t * p_thds = new pthread_t[g_init_parallelism - 1]; - thr_args * tt = new thr_args[g_init_parallelism]; - for (UInt32 i = 0; i < g_init_parallelism ; i++) { - tt[i].wl = this; - tt[i].id = i; - } - // Stock table - for (UInt32 i = 0; i < g_init_parallelism - 1; i++) { - pthread_create(&p_thds[i], NULL, threadInitStock, &tt[i]); - } - threadInitStock(&tt[g_init_parallelism-1]); - for (UInt32 i = 0; i < g_init_parallelism - 1; i++) { - int rc = pthread_join(p_thds[i], NULL); - if (rc) { - printf("ERROR; return code from pthread_join() is %d\n", rc); - exit(-1); - } - } - printf("STOCK Done\n"); - fflush(stdout); - // Item Table - for (UInt32 i = 0; i < g_init_parallelism - 1; i++) { - pthread_create(&p_thds[i], NULL, threadInitItem, &tt[i]); - } - threadInitItem(&tt[g_init_parallelism-1]); - for (UInt32 i = 0; i < g_init_parallelism - 1; i++) { - int rc = pthread_join(p_thds[i], NULL); - if (rc) { - printf("ERROR; return code from pthread_join() is %d\n", rc); - exit(-1); - } - } - printf("ITEM Done\n"); - fflush(stdout); - // Customer Table - for (UInt32 i = 0; i < g_init_parallelism - 1; i++) { - pthread_create(&p_thds[i], NULL, threadInitCust, &tt[i]); - } - threadInitCust(&tt[g_init_parallelism-1]); - for (UInt32 i = 0; i < g_init_parallelism - 1; i++) { - int rc = pthread_join(p_thds[i], NULL); - if (rc) { - printf("ERROR; return code from pthread_join() is %d\n", rc); - exit(-1); - } - } - printf("ITEM Done\n"); - fflush(stdout); - - // Order Table - /* - for (UInt32 i = 0; i < g_init_parallelism - 1; i++) { - pthread_create(&p_thds[i], NULL, threadInitOrder, &tt[i]); - } - threadInitOrder(&tt[g_init_parallelism-1]); - for (UInt32 i = 0; i < g_init_parallelism - 1; i++) { - int rc = pthread_join(p_thds[i], NULL); - if (rc) { - printf("ERROR; return code from pthread_join() is %d\n", rc); - exit(-1); - } - } - printf("ORDER Done\n"); - fflush(stdout); - */ - threadInitWh(this); - printf("WAREHOUSE Done\n"); - fflush(stdout); - threadInitDist(this); - printf("DISTRICT Done\n"); - fflush(stdout); - threadInitHist(this); - printf("HISTORY Done\n"); - fflush(stdout); - - /* - UInt32 cust_thr_cnt = g_dist_per_wh/2; - thr_args * tt = new thr_args[cust_thr_cnt]; - pthread_t * p_thds = new pthread_t[2+cust_thr_cnt]; - pthread_create(&p_thds[0], NULL, threadInitStock, this); - pthread_create(&p_thds[1], NULL, threadInitHist, this); - for(UInt32 i=0;iinit( this); - return RCOK; -} - -void TPCCWorkload::init_tab_item(int id) { - if (WL_VERB) printf("[init] loading item table\n"); - for (UInt32 i = id+1; i <= g_max_items; i+=g_init_parallelism) { - row_t * row; - uint64_t row_id; - t_item->get_new_row(row, 0, row_id); - row->set_primary_key(i); - row->set_value(I_ID, i); - row->set_value(I_IM_ID, URand(1L,10000L)); - char name[24]; - //MakeAlphaString(14, 24, name); - row->set_value(I_NAME, name); - row->set_value(I_PRICE, URand(1, 100)); - char data[50]; - //MakeAlphaString(26, 50, data); - if (RAND(10) == 0) strcpy(data, "original"); - row->set_value(I_DATA, data); - - index_insert(i_item, i, row, 0); - } -} - -void TPCCWorkload::init_tab_wh() { - if (WL_VERB) printf("[init] workload table.\n"); - for (UInt32 wid = 1; wid <= g_num_wh; wid ++) { - if(GET_NODE_ID(wh_to_part(wid)) != g_node_id) continue; - row_t * row; - uint64_t row_id; - t_warehouse->get_new_row(row, 0, row_id); - row->set_primary_key(wid); - - row->set_value(W_ID, wid); - char name[10]; - MakeAlphaString(6, 10, name); - row->set_value(W_NAME, name); - char street[20]; - MakeAlphaString(10, 20, street); - row->set_value(W_STREET_1, street); - MakeAlphaString(10, 20, street); - row->set_value(W_STREET_2, street); - MakeAlphaString(10, 20, street); - row->set_value(W_CITY, street); - char state[2]; - MakeAlphaString(2, 2, state); /* State */ - row->set_value(W_STATE, state); - char zip[9]; - MakeNumberString(9, 9, zip); /* Zip */ - row->set_value(W_ZIP, zip); - double tax = (double)URand(0L,200L)/1000.0; - double w_ytd=300000.00; - row->set_value(W_TAX, tax); - row->set_value(W_YTD, w_ytd); - - index_insert(i_warehouse, wid, row, wh_to_part(wid)); - } - - return; -} - -void TPCCWorkload::init_tab_dist(uint64_t wid) { - for (uint64_t did = 1; did <= g_dist_per_wh; did++) { - row_t * row; - uint64_t row_id; - t_district->get_new_row(row, 0, row_id); - row->set_primary_key(did); - - row->set_value(D_ID, did); - row->set_value(D_W_ID, wid); - char name[10]; - MakeAlphaString(6, 10, name); - row->set_value(D_NAME, name); - char street[20]; - MakeAlphaString(10, 20, street); - row->set_value(D_STREET_1, street); - MakeAlphaString(10, 20, street); - row->set_value(D_STREET_2, street); - MakeAlphaString(10, 20, street); - row->set_value(D_CITY, street); - char state[2]; - MakeAlphaString(2, 2, state); /* State */ - row->set_value(D_STATE, state); - char zip[9]; - MakeNumberString(9, 9, zip); /* Zip */ - row->set_value(D_ZIP, zip); - double tax = (double)URand(0L,200L)/1000.0; - double w_ytd=30000.00; - row->set_value(D_TAX, tax); - row->set_value(D_YTD, w_ytd); - row->set_value(D_NEXT_O_ID, 3001); - - index_insert(i_district, distKey(did, wid), row, wh_to_part(wid)); - } -} - -void TPCCWorkload::init_tab_stock(int id, uint64_t wid) { - - for (UInt32 sid = id + 1; sid <= g_max_items; sid+=g_init_parallelism) { - row_t * row; - uint64_t row_id; - t_stock->get_new_row(row, 0, row_id); - row->set_primary_key(sid); - row->set_value(S_I_ID, sid); - row->set_value(S_W_ID, wid); - row->set_value(S_QUANTITY, URand(10, 100)); - row->set_value(S_REMOTE_CNT, 0); -#if !TPCC_SMALL - char s_dist[25]; - char row_name[10] = "S_DIST_"; - for (int i = 1; i <= 10; i++) { - if (i < 10) { - row_name[7] = '0'; - row_name[8] = i + '0'; - } else { - row_name[7] = '1'; - row_name[8] = '0'; - } - row_name[9] = '\0'; - //MakeAlphaString(24, 24, s_dist); - row->set_value(row_name, s_dist); - } - row->set_value(S_YTD, 0); - row->set_value(S_ORDER_CNT, 0); - char s_data[50]; - /* - int len = MakeAlphaString(26, 50, s_data); - if (rand() % 100 < 10) { - int idx = URand(0, len - 8); - strcpy(&s_data[idx], "original"); - } - */ - row->set_value(S_DATA, s_data); -#endif - index_insert(i_stock, stockKey(sid, wid), row, wh_to_part(wid)); - } -} - -void TPCCWorkload::init_tab_cust(int id, uint64_t did, uint64_t wid) { - assert(g_cust_per_dist >= 1000); - for (UInt32 cid = id+1; cid <= g_cust_per_dist; cid += g_init_parallelism) { - row_t * row; - uint64_t row_id; - t_customer->get_new_row(row, 0, row_id); - row->set_primary_key(cid); - - row->set_value(C_ID, cid); - row->set_value(C_D_ID, did); - row->set_value(C_W_ID, wid); - char c_last[LASTNAME_LEN]; - if (cid <= 1000) - Lastname(cid - 1, c_last); - else - Lastname(NURand(255,0,999), c_last); - row->set_value(C_LAST, c_last); - /* -#if !TPCC_SMALL - char tmp[2]; - tmp[0] = 'O'; - tmp[1] = 'E'; - row->set_value(C_MIDDLE, tmp); - char c_first[FIRSTNAME_LEN]; - MakeAlphaString(FIRSTNAME_MINLEN, sizeof(c_first), c_first); - row->set_value(C_FIRST, c_first); - char street[20]; - MakeAlphaString(10, 20, street); - row->set_value(C_STREET_1, street); - MakeAlphaString(10, 20, street); - row->set_value(C_STREET_2, street); - MakeAlphaString(10, 20, street); - row->set_value(C_CITY, street); - char state[2]; - MakeAlphaString(2, 2, state); // State - row->set_value(C_STATE, state); - char zip[9]; - MakeNumberString(9, 9, zip); // Zip - row->set_value(C_ZIP, zip); - char phone[16]; - MakeNumberString(16, 16, phone); // Zip - row->set_value(C_PHONE, phone); - row->set_value(C_SINCE, 0); - row->set_value(C_CREDIT_LIM, 50000); - row->set_value(C_DELIVERY_CNT, 0); - char c_data[500]; - MakeAlphaString(300, 500, c_data); - row->set_value(C_DATA, c_data); - -#endif -*/ - if (RAND(10) == 0) { - char tmp[] = "GC"; - row->set_value(C_CREDIT, tmp); - } else { - char tmp[] = "BC"; - row->set_value(C_CREDIT, tmp); - } - row->set_value(C_DISCOUNT, (double)RAND(5000) / 10000); - row->set_value(C_BALANCE, -10.0); - row->set_value(C_YTD_PAYMENT, 10.0); - row->set_value(C_PAYMENT_CNT, 1); - uint64_t key; - key = custNPKey(c_last, did, wid); - index_insert(i_customer_last, key, row, wh_to_part(wid)); - key = custKey(cid, did, wid); - index_insert(i_customer_id, key, row, wh_to_part(wid)); - } -} - -void TPCCWorkload::init_tab_hist(uint64_t c_id, uint64_t d_id, uint64_t w_id) { - row_t * row; - uint64_t row_id; - t_history->get_new_row(row, 0, row_id); - row->set_primary_key(0); - row->set_value(H_C_ID, c_id); - row->set_value(H_C_D_ID, d_id); - row->set_value(H_D_ID, d_id); - row->set_value(H_C_W_ID, w_id); - row->set_value(H_W_ID, w_id); - row->set_value(H_DATE, 0); - row->set_value(H_AMOUNT, 10.0); -#if !TPCC_SMALL - char h_data[24]; - //MakeAlphaString(12, 24, h_data); - row->set_value(H_DATA, h_data); -#endif - -} - -void TPCCWorkload::init_tab_order(int id, uint64_t did, uint64_t wid) { - init_permutation(); /* initialize permutation of customer numbers */ - for (UInt32 oid = id+1; oid <= g_cust_per_dist; oid+=g_init_parallelism) { - row_t * row; - uint64_t row_id; - t_order->get_new_row(row, 0, row_id); - row->set_primary_key(oid); - uint64_t o_ol_cnt = 1; - uint64_t cid = get_permutation(); - row->set_value(O_ID, oid); - row->set_value(O_C_ID, cid); - row->set_value(O_D_ID, did); - row->set_value(O_W_ID, wid); - uint64_t o_entry = 2013; - row->set_value(O_ENTRY_D, o_entry); - if (oid < 2101) - row->set_value(O_CARRIER_ID, URand(1, 10)); - else - row->set_value(O_CARRIER_ID, 0); - o_ol_cnt = URand(5, 15); - row->set_value(O_OL_CNT, o_ol_cnt); - row->set_value(O_ALL_LOCAL, 1); - - // Insert to indexes -// uint64_t key = custKey(cid, did, wid); -// index_insert(i_order_wdc, key, row, wh_to_part(wid)); - -// key = orderPrimaryKey(wid, did, oid); -// index_insert(i_order_wdo, key, row, wh_to_part(wid)); - - // ORDER-LINE -#if !TPCC_SMALL - for (uint64_t ol = 1; ol <= o_ol_cnt; ol++) { - t_orderline->get_new_row(row, 0, row_id); - row->set_value(OL_O_ID, oid); - row->set_value(OL_D_ID, did); - row->set_value(OL_W_ID, wid); - row->set_value(OL_NUMBER, ol); - row->set_value(OL_I_ID, URand(1, 100000)); - row->set_value(OL_SUPPLY_W_ID, wid); - if (oid < 2101) { - row->set_value(OL_DELIVERY_D, o_entry); - row->set_value(OL_AMOUNT, 0); - } else { - row->set_value(OL_DELIVERY_D, 0); - row->set_value(OL_AMOUNT, (double)URand(1, 999999)/100); - } - row->set_value(OL_QUANTITY, 5); - char ol_dist_info[24]; - MakeAlphaString(24, 24, ol_dist_info); - row->set_value(OL_DIST_INFO, ol_dist_info); - -// uint64_t key = orderlineKey(wid, did, oid); -// index_insert(i_orderline, key, row, wh_to_part(wid)); - -// key = distKey(did, wid); -// index_insert(i_orderline_wd, key, row, wh_to_part(wid)); - } -#endif - // NEW ORDER - if (oid > 2100) { - t_neworder->get_new_row(row, 0, row_id); - row->set_value(NO_O_ID, oid); - row->set_value(NO_D_ID, did); - row->set_value(NO_W_ID, wid); - } - } -} - -/*==================================================================+ -| ROUTINE NAME -| InitPermutation -+==================================================================*/ - -void TPCCWorkload::init_permutation() { - UInt32 i; - perm_count = 0; - perm_c_id = new uint64_t[g_cust_per_dist]; - // Init with consecutive values - for(i = 0; i < g_cust_per_dist; i++) { - perm_c_id[i] = i+1; - } - - // shuffle - for(i=0; i < g_cust_per_dist-1; i++) { - uint64_t j = URand(i+1, g_cust_per_dist-1); - uint64_t tmp = perm_c_id[i]; - perm_c_id[i] = perm_c_id[j]; - perm_c_id[j] = tmp; - } - return; -} - - -/*==================================================================+ -| ROUTINE NAME -| GetPermutation -+==================================================================*/ - -uint64_t TPCCWorkload::get_permutation() { - if(perm_count >= g_cust_per_dist) { - // wrapped around, restart at 0 - perm_count = 0; - } - return (uint64_t) perm_c_id[perm_count++]; -} - -void * TPCCWorkload::threadInitItem(void * This) { - TPCCWorkload * wl = ((thr_args*) This)->wl; - int id = ((thr_args*) This)->id; - wl->init_tab_item(id); - printf("ITEM Done\n"); - return NULL; -} - -void * TPCCWorkload::threadInitWh(void * This) { - TPCCWorkload * wl = (TPCCWorkload*) This; - wl->init_tab_wh(); - printf("WAREHOUSE Done\n"); - return NULL; -} - -void * TPCCWorkload::threadInitDist(void * This) { - TPCCWorkload * wl = (TPCCWorkload*) This; - for (uint64_t wid = 1; wid <= g_num_wh; wid ++) { - if (GET_NODE_ID(wh_to_part(wid)) != g_node_id) continue; - wl->init_tab_dist(wid); - } - printf("DISTRICT Done\n"); - return NULL; -} - -void * TPCCWorkload::threadInitStock(void * This) { - TPCCWorkload * wl = ((thr_args*) This)->wl; - int id = ((thr_args*) This)->id; - for (uint64_t wid = 1; wid <= g_num_wh; wid ++) { - if (GET_NODE_ID(wh_to_part(wid)) != g_node_id) continue; - wl->init_tab_stock(id,wid); - } - printf("STOCK Done\n"); - return NULL; -} - -void * TPCCWorkload::threadInitCust(void * This) { - TPCCWorkload * wl = ((thr_args*) This)->wl; - int id = ((thr_args*) This)->id; - for (uint64_t wid = 1; wid <= g_num_wh; wid ++) { - if (GET_NODE_ID(wh_to_part(wid)) != g_node_id) continue; - for (uint64_t did = 1; did <= g_dist_per_wh; did++) { - wl->init_tab_cust(id,did, wid); - } - } - printf("CUSTOMER %d Done\n",((thr_args *)This)->id); - return NULL; -} - -void * TPCCWorkload::threadInitHist(void * This) { - TPCCWorkload * wl = (TPCCWorkload*) This; - for (uint64_t wid = 1; wid <= g_num_wh; wid ++) { - if (GET_NODE_ID(wh_to_part(wid)) != g_node_id) continue; - for (uint64_t did = 1; did <= g_dist_per_wh; did++) - for (uint64_t cid = 1; cid <= g_cust_per_dist; cid++) wl->init_tab_hist(cid, did, wid); - } - printf("HISTORY Done\n"); - return NULL; -} - -void * TPCCWorkload::threadInitOrder(void * This) { - TPCCWorkload * wl = ((thr_args*) This)->wl; - int id = ((thr_args*) This)->id; - for (uint64_t wid = 1; wid <= g_num_wh; wid ++) { - if (GET_NODE_ID(wh_to_part(wid)) != g_node_id) continue; - for (uint64_t did = 1; did <= g_dist_per_wh; did++) wl->init_tab_order(id, did, wid); - } - printf("ORDER Done\n"); - return NULL; -} - - - diff --git a/contrib/deneva/benchmarks/ycsb.h b/contrib/deneva/benchmarks/ycsb.h deleted file mode 100644 index ac1fc1ae..00000000 --- a/contrib/deneva/benchmarks/ycsb.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _SYNTH_BM_H_ -#define _SYNTH_BM_H_ - -#include "wl.h" -#include "txn.h" -#include "global.h" -#include "helper.h" - -class YCSBQuery; -class YCSBQueryMessage; -class ycsb_request; - -enum YCSBRemTxnType { - YCSB_0, - YCSB_1, - YCSB_FIN, - YCSB_RDONE -}; - -class YCSBWorkload : public Workload { -public : - RC init(); - RC init_table(); - RC init_schema(const char * schema_file); - RC get_txn_man(TxnManager *& txn_manager); - int key_to_part(uint64_t key); - INDEX * the_index; - table_t * the_table; -private: - void init_table_parallel(); - void * init_table_slice(); - static void * threadInitTable(void * This) { - ((YCSBWorkload *)This)->init_table_slice(); - return NULL; - } - pthread_mutex_t insert_lock; - // For parallel initialization - static int next_tid; -}; - -class YCSBTxnManager : public TxnManager { -public: - void init(uint64_t thd_id, Workload * h_wl); - void reset(); - void partial_reset(); - RC acquire_locks(); - RC run_txn(); - RC run_txn_post_wait(); - RC run_calvin_txn(); - void copy_remote_requests(YCSBQueryMessage * msg); -private: - void next_ycsb_state(); - RC run_txn_state(); - RC run_ycsb_0(ycsb_request * req,row_t *& row_local); - RC run_ycsb_1(access_t acctype, row_t * row_local); - RC run_ycsb(); - bool is_done() ; - bool is_local_request(uint64_t idx) ; - RC send_remote_request() ; - - row_t * row; - YCSBWorkload * _wl; - YCSBRemTxnType state; - uint64_t next_record_id; -}; - -#endif diff --git a/contrib/deneva/benchmarks/ycsb_query.cpp b/contrib/deneva/benchmarks/ycsb_query.cpp deleted file mode 100644 index f5d0ea9c..00000000 --- a/contrib/deneva/benchmarks/ycsb_query.cpp +++ /dev/null @@ -1,394 +0,0 @@ -/* - Tencent is pleased to support the open source community by making 3TS available. - - Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - Tencent Modifications are Copyright (C) THL A29 Limited. - - Author: hongyaozhao@ruc.edu.cn - - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "query.h" -#include "ycsb_query.h" -#include "mem_alloc.h" -#include "wl.h" -#include "ycsb.h" -#include "table.h" -#include "helper.h" -#include "message.h" - -uint64_t YCSBQueryGenerator::the_n = 0; -double YCSBQueryGenerator::denom = 0; - -void YCSBQueryGenerator::init() { - mrand = (myrand *) mem_allocator.alloc(sizeof(myrand)); - mrand->init(get_sys_clock()); - if (SKEW_METHOD == ZIPF) { - zeta_2_theta = zeta(2, g_zipf_theta); - uint64_t table_size = g_synth_table_size / g_part_cnt; - the_n = table_size - 1; - denom = zeta(the_n, g_zipf_theta); - } -} - -BaseQuery * YCSBQueryGenerator::create_query(Workload * h_wl, uint64_t home_partition_id) { - BaseQuery * query; - if (SKEW_METHOD == HOT) { - query = gen_requests_hot(home_partition_id, h_wl); - } else if (SKEW_METHOD == ZIPF){ - assert(the_n != 0); - query = gen_requests_zipf(home_partition_id, h_wl); - } - - return query; -} - -void YCSBQuery::print() { - - for(uint64_t i = 0; i < requests.size(); i++) { - printf("%d %ld, ",requests[i]->acctype,requests[i]->key); - } - printf("\n"); - /* - printf("YCSBQuery: %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld\n" - ,GET_NODE_ID(requests[0]->key) - ,GET_NODE_ID(requests[1]->key) - ,GET_NODE_ID(requests[2]->key) - ,GET_NODE_ID(requests[3]->key) - ,GET_NODE_ID(requests[4]->key) - ,GET_NODE_ID(requests[5]->key) - ,GET_NODE_ID(requests[6]->key) - ,GET_NODE_ID(requests[7]->key) - ,GET_NODE_ID(requests[8]->key) - ,GET_NODE_ID(requests[9]->key) - ); - */ -} - -void YCSBQuery::init() { - requests.init(g_req_per_query); - BaseQuery::init(); -} - -void YCSBQuery::copy_request_to_msg(YCSBQuery * ycsb_query, YCSBQueryMessage * msg, uint64_t id) { -/* - DEBUG_M("YCSBQuery::copy_request_to_msg ycsb_request alloc\n"); - ycsb_request * req = (ycsb_request*) mem_allocator.alloc(sizeof(ycsb_request)); - req->copy(ycsb_query->requests[id]); - msg->requests.add(req); -*/ - msg->requests.add(ycsb_query->requests[id]); -} - -void YCSBQuery::release_requests() { - // A bit of a hack to ensure that original requests in client query queue aren't freed - if (SERVER_GENERATE_QUERIES && requests.size() == g_req_per_query) return; - for(uint64_t i = 0; i < requests.size(); i++) { - DEBUG_M("YCSBQuery::release() ycsb_request free\n"); - mem_allocator.free(requests[i],sizeof(ycsb_request)); - } - -} - -void YCSBQuery::reset() { - BaseQuery::clear(); -#if CC_ALG != CALVIN - release_requests(); -#endif - requests.clear(); -} - -void YCSBQuery::release() { - BaseQuery::release(); - DEBUG_M("YCSBQuery::release() free\n"); -#if CC_ALG != CALVIN - release_requests(); -#endif - requests.release(); -} - -uint64_t YCSBQuery::get_participants(Workload * wl) { - - uint64_t participant_cnt = 0; - assert(participant_nodes.size()==0); - assert(active_nodes.size()==0); - for(uint64_t i = 0; i < g_node_cnt; i++) { - participant_nodes.add(0); - active_nodes.add(0); - } - assert(participant_nodes.size()==g_node_cnt); - assert(active_nodes.size()==g_node_cnt); - for(uint64_t i = 0; i < requests.size(); i++) { - uint64_t req_nid = GET_NODE_ID(((YCSBWorkload*)wl)->key_to_part(requests[i]->key)); - if(requests[i]->acctype == RD) { - if (participant_nodes[req_nid] == 0) ++participant_cnt; - participant_nodes.set(req_nid,1); - } - if (requests[i]->acctype == WR) active_nodes.set(req_nid, 1); - } - return participant_cnt; -} - -uint64_t YCSBQuery::participants(bool *& pps,Workload * wl) { - int n = 0; - for (uint64_t i = 0; i < g_node_cnt; i++) pps[i] = false; - - for(uint64_t i = 0; i < requests.size(); i++) { - uint64_t req_nid = GET_NODE_ID(((YCSBWorkload*)wl)->key_to_part(requests[i]->key)); - if (!pps[req_nid]) n++; - pps[req_nid] = true; - } - return n; -} - -std::set YCSBQuery::participants(Message * msg, Workload * wl) { - std::set participant_set; - YCSBClientQueryMessage* ycsb_msg = ((YCSBClientQueryMessage*)msg); - for(uint64_t i = 0; i < ycsb_msg->requests.size(); i++) { - uint64_t req_nid = GET_NODE_ID(((YCSBWorkload*)wl)->key_to_part(ycsb_msg->requests[i]->key)); - participant_set.insert(req_nid); - } - return participant_set; -} - -bool YCSBQuery::readonly() { - for(uint64_t i = 0; i < requests.size(); i++) { - if(requests[i]->acctype == WR) { - return false; - } - } - return true; -} - -// The following algorithm comes from the paper: -// Quickly generating billion-record synthetic databases -// However, it seems there is a small bug. -// The original paper says zeta(theta, 2.0). But I guess it should be -// zeta(2.0, theta). -double YCSBQueryGenerator::zeta(uint64_t n, double theta) { - double sum = 0; - for (uint64_t i = 1; i <= n; i++) sum += pow(1.0 / i, theta); - return sum; -} - -uint64_t YCSBQueryGenerator::zipf(uint64_t n, double theta) { - assert(this->the_n == n); - assert(theta == g_zipf_theta); - double alpha = 1 / (1 - theta); - double zetan = denom; - double eta = (1 - pow(2.0 / n, 1 - theta)) / (1 - zeta_2_theta / zetan); -// double eta = (1 - pow(2.0 / n, 1 - theta)) / -// (1 - zeta_2_theta / zetan); - double u = (double)(mrand->next() % 10000000) / 10000000; - double uz = u * zetan; - if (uz < 1) return 1; - if (uz < 1 + pow(0.5, theta)) return 2; - return 1 + (uint64_t)(n * pow(eta*u -eta + 1, alpha)); -} - - -BaseQuery * YCSBQueryGenerator::gen_requests_hot(uint64_t home_partition_id, Workload * h_wl) { - YCSBQuery * query = (YCSBQuery*) mem_allocator.alloc(sizeof(YCSBQuery)); - query->requests.init(g_req_per_query); - - uint64_t access_cnt = 0; - set all_keys; - set partitions_accessed; - double r_mpt = (double)(mrand->next() % 10000) / 10000; - uint64_t part_limit; - if(r_mpt < g_mpr) - part_limit = g_part_per_txn; - else - part_limit = 1; - uint64_t hot_key_max = (uint64_t)g_data_perc; - double r_twr = (double)(mrand->next() % 10000) / 10000; - - int rid = 0; - for (UInt32 i = 0; i < g_req_per_query; i ++) { - double r = (double)(mrand->next() % 10000) / 10000; - double hot = (double)(mrand->next() % 10000) / 10000; - uint64_t partition_id; - ycsb_request * req = (ycsb_request*) mem_allocator.alloc(sizeof(ycsb_request)); - if (r_twr < g_txn_read_perc || r < g_tup_read_perc) - req->acctype = RD; - else - req->acctype = WR; - - uint64_t row_id = 0; - if ( FIRST_PART_LOCAL && rid == 0) { - if(hot < g_access_perc) { - row_id = - (uint64_t)(mrand->next() % (hot_key_max / g_part_cnt)) * g_part_cnt + home_partition_id; - } else { - uint64_t nrand = (uint64_t)mrand->next(); - row_id = ((nrand % (g_synth_table_size / g_part_cnt - (hot_key_max / g_part_cnt))) + - hot_key_max / g_part_cnt) * - g_part_cnt + - home_partition_id; - } - - partition_id = row_id % g_part_cnt; - assert(row_id % g_part_cnt == home_partition_id); - } else { - while(1) { - if(hot < g_access_perc) { - row_id = (uint64_t)(mrand->next() % hot_key_max); - } else { - row_id = ((uint64_t)(mrand->next() % (g_synth_table_size - hot_key_max))) + hot_key_max; - } - partition_id = row_id % g_part_cnt; - - if (g_strict_ppt && partitions_accessed.size() < part_limit && - (partitions_accessed.size() + (g_req_per_query - rid) >= part_limit) && - partitions_accessed.count(partition_id) > 0) - continue; - if (partitions_accessed.count(partition_id) > 0) break; - if (partitions_accessed.size() == part_limit) continue; - break; - } - } - partitions_accessed.insert(partition_id); - assert(row_id < g_synth_table_size); - uint64_t primary_key = row_id; - //uint64_t part_id = row_id % g_part_cnt; - req->key = primary_key; - req->value = mrand->next() % (1<<8); - // Make sure a single row is not accessed twice - if (all_keys.find(req->key) == all_keys.end()) { - all_keys.insert(req->key); - access_cnt ++; - } else { - // Need to have the full g_req_per_query amount - i--; - continue; - } - rid ++; - - //query->requests.push_back(*req); - query->requests.add(req); - } - assert(query->requests.size() == g_req_per_query); - // Sort the requests in key order. - if (g_key_order) { - for(uint64_t i = 0; i < query->requests.size(); i++) { - for(uint64_t j = query->requests.size() - 1; j > i ; j--) { - if(query->requests[j]->key < query->requests[j-1]->key) { - query->requests.swap(j,j-1); - } - } - } - // std::sort(query->requests.begin(),query->requests.end(),[](ycsb_request lhs, ycsb_request - // rhs) { return lhs.key < rhs.key;}); - } - query->partitions.init(partitions_accessed.size()); - for(auto it = partitions_accessed.begin(); it != partitions_accessed.end(); ++it) { - query->partitions.add(*it); - } - - return query; - -} - -BaseQuery * YCSBQueryGenerator::gen_requests_zipf(uint64_t home_partition_id, Workload * h_wl) { - YCSBQuery * query = (YCSBQuery*) mem_allocator.alloc(sizeof(YCSBQuery)); - new(query) YCSBQuery(); - query->requests.init(g_req_per_query); - - uint64_t access_cnt = 0; - set all_keys; - set partitions_accessed; - uint64_t table_size = g_synth_table_size / g_part_cnt; - - double r_twr = (double)(mrand->next() % 10000) / 10000; - - int rid = 0; - for (UInt32 i = 0; i < g_req_per_query; i ++) { - double r = (double)(mrand->next() % 10000) / 10000; - uint64_t partition_id; -#ifdef LESS_DIS - if ( rid < 5) { - partition_id = home_partition_id;; - } else { - partition_id = (home_partition_id + 1) % g_part_cnt; - } -#else - #ifdef NO_REMOTE - partition_id = home_partition_id; - #else - if ( FIRST_PART_LOCAL && rid == 0) { - partition_id = home_partition_id; - } else { - partition_id = mrand->next() % g_part_cnt; - if(g_strict_ppt && g_part_per_txn <= g_part_cnt) { - while ((partitions_accessed.size() < g_part_per_txn && - partitions_accessed.count(partition_id) > 0) || - (partitions_accessed.size() == g_part_per_txn && - partitions_accessed.count(partition_id) == 0)) { - partition_id = mrand->next() % g_part_cnt; - } - } - } - #endif -#endif - ycsb_request * req = (ycsb_request*) mem_allocator.alloc(sizeof(ycsb_request)); - if (r_twr < g_txn_read_perc || r < g_tup_read_perc) - req->acctype = RD; - else - req->acctype = WR; - uint64_t row_id = zipf(table_size - 1, g_zipf_theta); - assert(row_id < table_size); - uint64_t primary_key = row_id * g_part_cnt + partition_id; - assert(primary_key < g_synth_table_size); - - req->key = primary_key; - req->value = mrand->next() % (1<<8); - // Make sure a single row is not accessed twice - if (all_keys.find(req->key) == all_keys.end()) { - all_keys.insert(req->key); - access_cnt ++; - } else { - // Need to have the full g_req_per_query amount - i--; - continue; - } - partitions_accessed.insert(partition_id); - rid ++; - - query->requests.add(req); - } - assert(query->requests.size() == g_req_per_query); - // Sort the requests in key order. - if (g_key_order) { - for(uint64_t i = 0; i < query->requests.size(); i++) { - for(uint64_t j = query->requests.size() - 1; j > i ; j--) { - if(query->requests[j]->key < query->requests[j-1]->key) { - query->requests.swap(j,j-1); - } - } - } - // std::sort(query->requests.begin(),query->requests.end(),[](ycsb_request lhs, ycsb_request - // rhs) { return lhs.key < rhs.key;}); - } - query->partitions.init(partitions_accessed.size()); - for(auto it = partitions_accessed.begin(); it != partitions_accessed.end(); ++it) { - query->partitions.add(*it); - } - - //query->print(); - return query; - -} diff --git a/contrib/deneva/benchmarks/ycsb_query.h b/contrib/deneva/benchmarks/ycsb_query.h deleted file mode 100644 index e3441e81..00000000 --- a/contrib/deneva/benchmarks/ycsb_query.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _YCSBQuery_H_ -#define _YCSBQuery_H_ - -#include "global.h" -#include "helper.h" -#include "query.h" -#include "array.h" - -class Workload; -class Message; -class YCSBQueryMessage; -class YCSBClientQueryMessage; - - -// Each YCSBQuery contains several ycsb_requests, -// each of which is a RD, WR or SCAN -// to a single table - -class ycsb_request { -public: - ycsb_request() {} - ycsb_request(const ycsb_request& req) : acctype(req.acctype), key(req.key), value(req.value) { } - void copy(ycsb_request * req) { - this->acctype = req->acctype; - this->key = req->key; - this->value = req->value; - } -// char table_name[80]; - access_t acctype; - uint64_t key; - char value; - // only for (qtype == SCAN) - //UInt32 scan_len; -}; - -class YCSBQueryGenerator : public QueryGenerator { -public: - void init(); - BaseQuery * create_query(Workload * h_wl, uint64_t home_partition_id); - -private: - BaseQuery * gen_requests_hot(uint64_t home_partition_id, Workload * h_wl); - BaseQuery * gen_requests_zipf(uint64_t home_partition_id, Workload * h_wl); - // for Zipfian distribution - double zeta(uint64_t n, double theta); - uint64_t zipf(uint64_t n, double theta); - - myrand * mrand; - static uint64_t the_n; - static double denom; - double zeta_2_theta; -}; - -class YCSBQuery : public BaseQuery { -public: - YCSBQuery() {} - ~YCSBQuery() {} - - void print(); - - void init(uint64_t thd_id, Workload * h_wl) {}; - void init(); - void release(); - void release_requests(); - void reset(); - uint64_t get_participants(Workload * wl); - static std::set participants(Message * msg, Workload * wl); - static void copy_request_to_msg(YCSBQuery * ycsb_query, YCSBQueryMessage * msg, uint64_t id); - uint64_t participants(bool *& pps,Workload * wl); - bool readonly(); - - //std::vector requests; - Array requests; - void* orig_request; - /* - uint64_t rid; - uint64_t access_cnt; - uint64_t request_cnt; - uint64_t req_i; - ycsb_request req; - uint64_t rqry_req_cnt; - */ - -}; - -#endif diff --git a/contrib/deneva/benchmarks/ycsb_txn.cpp b/contrib/deneva/benchmarks/ycsb_txn.cpp deleted file mode 100644 index 294f4a56..00000000 --- a/contrib/deneva/benchmarks/ycsb_txn.cpp +++ /dev/null @@ -1,356 +0,0 @@ -/* - Tencent is pleased to support the open source community by making 3TS available. - - Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - Tencent Modifications are Copyright (C) THL A29 Limited. - - Author: hongyaozhao@ruc.edu.cn - - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "global.h" -#include "helper.h" -#include "ycsb.h" -#include "ycsb_query.h" -#include "wl.h" -#include "thread.h" -#include "table.h" -#include "row.h" -#include "index_hash.h" -#include "index_btree.h" -#include "catalog.h" -#include "manager.h" -#include "row_lock.h" -#include "row_ts.h" -#include "row_mvcc.h" -#include "mem_alloc.h" -#include "query.h" -#include "msg_queue.h" -#include "message.h" - -void YCSBTxnManager::init(uint64_t thd_id, Workload * h_wl) { - TxnManager::init(thd_id, h_wl); - _wl = (YCSBWorkload *) h_wl; - reset(); -} - -void YCSBTxnManager::reset() { - state = YCSB_0; - next_record_id = 0; - TxnManager::reset(); -} - -RC YCSBTxnManager::acquire_locks() { - uint64_t starttime = get_sys_clock(); - assert(CC_ALG == CALVIN); - YCSBQuery* ycsb_query = (YCSBQuery*) query; - locking_done = false; - RC rc = RCOK; - incr_lr(); - assert(ycsb_query->requests.size() == g_req_per_query); - assert(phase == CALVIN_RW_ANALYSIS); - for (uint32_t rid = 0; rid < ycsb_query->requests.size(); rid ++) { - ycsb_request * req = ycsb_query->requests[rid]; - uint64_t part_id = _wl->key_to_part( req->key ); - DEBUG("LK Acquire (%ld,%ld) %d,%ld -> %ld\n", get_txn_id(), get_batch_id(), req->acctype, - req->key, GET_NODE_ID(part_id)); - if (GET_NODE_ID(part_id) != g_node_id) continue; - INDEX * index = _wl->the_index; - itemid_t * item; - item = index_read(index, req->key, part_id); - row_t * row = ((row_t *)item->location); - RC rc2 = get_lock(row,req->acctype); - if(rc2 != RCOK) { - rc = rc2; - } - } - if(decr_lr() == 0) { - if (ATOM_CAS(lock_ready, false, true)) rc = RCOK; - } - txn_stats.wait_starttime = get_sys_clock(); - /* - if(rc == WAIT && lock_ready_cnt == 0) { - if(ATOM_CAS(lock_ready,false,true)) - //lock_ready = true; - rc = RCOK; - } - */ - INC_STATS(get_thd_id(),calvin_sched_time,get_sys_clock() - starttime); - locking_done = true; - return rc; -} - - -RC YCSBTxnManager::run_txn() { - RC rc = RCOK; - assert(CC_ALG != CALVIN); - - if(IS_LOCAL(txn->txn_id) && state == YCSB_0 && next_record_id == 0) { - DEBUG("Running txn %ld\n",txn->txn_id); - //query->print(); - query->partitions_touched.add_unique(GET_PART_ID(0,g_node_id)); - } - - uint64_t starttime = get_sys_clock(); - - while(rc == RCOK && !is_done()) { - rc = run_txn_state(); - } - - uint64_t curr_time = get_sys_clock(); - txn_stats.process_time += curr_time - starttime; - txn_stats.process_time_short += curr_time - starttime; - txn_stats.wait_starttime = get_sys_clock(); - - if(IS_LOCAL(get_txn_id())) { - if(is_done() && rc == RCOK) - rc = start_commit(); - else if(rc == Abort) - rc = start_abort(); - } else if(rc == Abort){ - rc = abort(); - } - - return rc; - -} - -RC YCSBTxnManager::run_txn_post_wait() { - get_row_post_wait(row); - next_ycsb_state(); - return RCOK; -} - -bool YCSBTxnManager::is_done() { return next_record_id >= ((YCSBQuery*)query)->requests.size(); } - -void YCSBTxnManager::next_ycsb_state() { - switch(state) { - case YCSB_0: - state = YCSB_1; - break; - case YCSB_1: - next_record_id++; - if(!IS_LOCAL(txn->txn_id) || !is_done()) { - state = YCSB_0; - } else { - state = YCSB_FIN; - } - break; - case YCSB_FIN: - break; - default: - assert(false); - } -} - -bool YCSBTxnManager::is_local_request(uint64_t idx) { - return GET_NODE_ID(_wl->key_to_part(((YCSBQuery*)query)->requests[idx]->key)) == g_node_id; -} - -RC YCSBTxnManager::send_remote_request() { - YCSBQuery* ycsb_query = (YCSBQuery*) query; - uint64_t dest_node_id = GET_NODE_ID(ycsb_query->requests[next_record_id]->key); - ycsb_query->partitions_touched.add_unique(GET_PART_ID(0,dest_node_id)); - msg_queue.enqueue(get_thd_id(),Message::create_message(this,RQRY),dest_node_id); - return WAIT_REM; -} - -void YCSBTxnManager::copy_remote_requests(YCSBQueryMessage * msg) { - YCSBQuery* ycsb_query = (YCSBQuery*) query; - //msg->requests.init(ycsb_query->requests.size()); - uint64_t dest_node_id = GET_NODE_ID(ycsb_query->requests[next_record_id]->key); - while (next_record_id < ycsb_query->requests.size() && !is_local_request(next_record_id) && - GET_NODE_ID(ycsb_query->requests[next_record_id]->key) == dest_node_id) { - YCSBQuery::copy_request_to_msg(ycsb_query,msg,next_record_id++); - } -} - -RC YCSBTxnManager::run_txn_state() { - YCSBQuery* ycsb_query = (YCSBQuery*) query; - ycsb_request * req = ycsb_query->requests[next_record_id]; - uint64_t part_id = _wl->key_to_part( req->key ); - bool loc = GET_NODE_ID(part_id) == g_node_id; - - RC rc = RCOK; - - switch (state) { - case YCSB_0 : - if(loc) { - rc = run_ycsb_0(req,row); - } else { - rc = send_remote_request(); - - } - - break; - case YCSB_1 : - rc = run_ycsb_1(req->acctype,row); - break; - case YCSB_FIN : - state = YCSB_FIN; - break; - default: - assert(false); - } - - if (rc == RCOK) next_ycsb_state(); - - return rc; -} - -RC YCSBTxnManager::run_ycsb_0(ycsb_request * req,row_t *& row_local) { - RC rc = RCOK; - int part_id = _wl->key_to_part( req->key ); - access_t type = req->acctype; - itemid_t * m_item; - - m_item = index_read(_wl->the_index, req->key, part_id); - - row_t * row = ((row_t *)m_item->location); - - rc = get_row(row, type,row_local); - - return rc; - -} - -RC YCSBTxnManager::run_ycsb_1(access_t acctype, row_t * row_local) { - if (acctype == RD || acctype == SCAN) { - int fid = 0; - char * data = row_local->get_data(); - uint64_t fval __attribute__ ((unused)); - fval = *(uint64_t *)(&data[fid * 100]); -#if ISOLATION_LEVEL == READ_COMMITTED || ISOLATION_LEVEL == READ_UNCOMMITTED - // Release lock after read - release_last_row_lock(); -#endif - - } else { - assert(acctype == WR); - int fid = 0; - char * data = row_local->get_data(); - *(uint64_t *)(&data[fid * 100]) = 0; -#if YCSB_ABORT_MODE - if (data[0] == 'a') return RCOK; -#endif - -#if ISOLATION_LEVEL == READ_UNCOMMITTED - // Release lock after write - release_last_row_lock(); -#endif - } - return RCOK; -} -RC YCSBTxnManager::run_calvin_txn() { - RC rc = RCOK; - uint64_t starttime = get_sys_clock(); - YCSBQuery* ycsb_query = (YCSBQuery*) query; - DEBUG("(%ld,%ld) Run calvin txn\n",txn->txn_id,txn->batch_id); - while(!calvin_exec_phase_done() && rc == RCOK) { - DEBUG("(%ld,%ld) phase %d\n",txn->txn_id,txn->batch_id,this->phase); - switch(this->phase) { - case CALVIN_RW_ANALYSIS: - - // Phase 1: Read/write set analysis - calvin_expected_rsp_cnt = ycsb_query->get_participants(_wl); -#if YCSB_ABORT_MODE - if(query->participant_nodes[g_node_id] == 1) { - calvin_expected_rsp_cnt--; - } -#else - calvin_expected_rsp_cnt = 0; -#endif - DEBUG("(%ld,%ld) expects %d responses;\n", txn->txn_id, txn->batch_id, - calvin_expected_rsp_cnt); - - this->phase = CALVIN_LOC_RD; - break; - case CALVIN_LOC_RD: - // Phase 2: Perform local reads - DEBUG("(%ld,%ld) local reads\n",txn->txn_id,txn->batch_id); - rc = run_ycsb(); - //release_read_locks(query); - - this->phase = CALVIN_SERVE_RD; - break; - case CALVIN_SERVE_RD: - // Phase 3: Serve remote reads - // If there is any abort logic, relevant reads need to be sent to all active nodes... - if(query->participant_nodes[g_node_id] == 1) { - rc = send_remote_reads(); - } - if(query->active_nodes[g_node_id] == 1) { - this->phase = CALVIN_COLLECT_RD; - if(calvin_collect_phase_done()) { - rc = RCOK; - } else { - DEBUG("(%ld,%ld) wait in collect phase; %d / %d rfwds received\n", txn->txn_id, - txn->batch_id, rsp_cnt, calvin_expected_rsp_cnt); - rc = WAIT; - } - } else { // Done - rc = RCOK; - this->phase = CALVIN_DONE; - } - - break; - case CALVIN_COLLECT_RD: - // Phase 4: Collect remote reads - this->phase = CALVIN_EXEC_WR; - break; - case CALVIN_EXEC_WR: - // Phase 5: Execute transaction / perform local writes - DEBUG("(%ld,%ld) execute writes\n",txn->txn_id,txn->batch_id); - rc = run_ycsb(); - this->phase = CALVIN_DONE; - break; - default: - assert(false); - } - } - uint64_t curr_time = get_sys_clock(); - txn_stats.process_time += curr_time - starttime; - txn_stats.process_time_short += curr_time - starttime; - txn_stats.wait_starttime = get_sys_clock(); - return rc; -} - -RC YCSBTxnManager::run_ycsb() { - RC rc = RCOK; - assert(CC_ALG == CALVIN); - YCSBQuery* ycsb_query = (YCSBQuery*) query; - - for (uint64_t i = 0; i < ycsb_query->requests.size(); i++) { - ycsb_request * req = ycsb_query->requests[i]; - if (this->phase == CALVIN_LOC_RD && req->acctype == WR) continue; - if (this->phase == CALVIN_EXEC_WR && req->acctype == RD) continue; - - uint64_t part_id = _wl->key_to_part( req->key ); - bool loc = GET_NODE_ID(part_id) == g_node_id; - - if (!loc) continue; - - rc = run_ycsb_0(req,row); - assert(rc == RCOK); - - rc = run_ycsb_1(req->acctype,row); - assert(rc == RCOK); - } - return rc; - -} - diff --git a/contrib/deneva/benchmarks/ycsb_wl.cpp b/contrib/deneva/benchmarks/ycsb_wl.cpp deleted file mode 100644 index 213266b5..00000000 --- a/contrib/deneva/benchmarks/ycsb_wl.cpp +++ /dev/null @@ -1,213 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "global.h" -#include "helper.h" -#include "ycsb.h" -#include "wl.h" -#include "thread.h" -#include "table.h" -#include "row.h" -#include "index_hash.h" -#include "index_btree.h" -#include "catalog.h" -#include "manager.h" -#include "row_lock.h" -#include "row_ts.h" -#include "row_mvcc.h" -#include "mem_alloc.h" -#include "query.h" - -int YCSBWorkload::next_tid; - -RC YCSBWorkload::init() { - Workload::init(); - next_tid = 0; - char * cpath = getenv("SCHEMA_PATH"); - string path; - if (cpath == NULL) - path = "./benchmarks/YCSB_schema.txt"; - else { - path = string(cpath); - path += "YCSB_schema.txt"; - //path += "/tests/apps/dbms/YCSB_schema.txt"; - } - printf("Initializing schema... "); - fflush(stdout); - init_schema( path.c_str() ); - printf("Done\n"); - - printf("Initializing table... "); - fflush(stdout); - init_table_parallel(); - printf("Done\n"); - fflush(stdout); -// init_table(); - return RCOK; -} - -RC YCSBWorkload::init_schema(const char * schema_file) { - Workload::init_schema(schema_file); - the_table = tables["MAIN_TABLE"]; - the_index = indexes["MAIN_INDEX"]; - return RCOK; -} - -int -YCSBWorkload::key_to_part(uint64_t key) { - //uint64_t rows_per_part = g_synth_table_size / g_part_cnt; - //return key / rows_per_part; - return key % g_part_cnt; -} - -RC YCSBWorkload::init_table() { - RC rc; - uint64_t total_row = 0; - while (true) { - for (UInt32 part_id = 0; part_id < g_part_cnt; part_id ++) { - if (total_row > g_synth_table_size) - goto ins_done; - // Assumes striping of partitions to nodes - if(g_part_cnt % g_node_cnt != g_node_id) { - total_row++; - continue; - } - row_t * new_row = NULL; - uint64_t row_id; - rc = the_table->get_new_row(new_row, part_id, row_id); - // insertion of last row may fail after the table_size - // is updated. So never access the last record in a table - assert(rc == RCOK); -// uint64_t value = rand(); - uint64_t primary_key = total_row; - new_row->set_primary_key(primary_key); - new_row->set_value(0, &primary_key); - Catalog * schema = the_table->get_schema(); - for (UInt32 fid = 0; fid < schema->get_field_cnt(); fid ++) { - int field_size = schema->get_field_size(fid); - char value[field_size]; - for (int i = 0; i < field_size; i++) - value[i] = (char)rand() % (1<<8) ; - new_row->set_value(fid, value); - } - itemid_t * m_item = - (itemid_t *) mem_allocator.alloc( sizeof(itemid_t)); - assert(m_item != NULL); - m_item->type = DT_row; - m_item->location = new_row; - m_item->valid = true; - uint64_t idx_key = primary_key; - rc = the_index->index_insert(idx_key, m_item, part_id); - assert(rc == RCOK); - total_row ++; - } - } -ins_done: - printf("[YCSB] Table \"MAIN_TABLE\" initialized.\n"); - return RCOK; - -} - -// init table in parallel -void YCSBWorkload::init_table_parallel() { - enable_thread_mem_pool = true; - pthread_t * p_thds = new pthread_t[g_init_parallelism - 1]; - for (UInt32 i = 0; i < g_init_parallelism - 1; i++) { - pthread_create(&p_thds[i], NULL, threadInitTable, this); - } - threadInitTable(this); - - for (uint32_t i = 0; i < g_init_parallelism - 1; i++) { - int rc = pthread_join(p_thds[i], NULL); - //printf("thread %d complete\n", i); - if (rc) { - printf("ERROR; return code from pthread_join() is %d\n", rc); - exit(-1); - } - } - enable_thread_mem_pool = false; -} - -void * YCSBWorkload::init_table_slice() { - UInt32 tid = ATOM_FETCH_ADD(next_tid, 1); - RC rc; - assert(g_synth_table_size % g_init_parallelism == 0); - assert(tid < g_init_parallelism); - uint64_t key_cnt = 0; - while ((UInt32)ATOM_FETCH_ADD(next_tid, 0) < g_init_parallelism) {} - assert((UInt32)ATOM_FETCH_ADD(next_tid, 0) == g_init_parallelism); - uint64_t slice_size = g_synth_table_size / g_init_parallelism; - for (uint64_t key = slice_size * tid; - key < slice_size * (tid + 1); - //key ++ - ) { - if(GET_NODE_ID(key_to_part(key)) != g_node_id) { - ++key; - continue; - } - - ++key_cnt; - if(key_cnt % 500000 == 0) { - printf("Thd %d inserted %ld keys %f\n",tid,key_cnt,simulation->seconds_from_start(get_sys_clock())); - } -// printf("tid=%d. key=%ld\n", tid, key); - row_t * new_row = NULL; - uint64_t row_id; - int part_id = key_to_part(key); // % g_part_cnt; - rc = the_table->get_new_row(new_row, part_id, row_id); - assert(rc == RCOK); -// uint64_t value = rand(); - uint64_t primary_key = key; - new_row->set_primary_key(primary_key); -#if SIM_FULL_ROW - new_row->set_value(0, &primary_key,sizeof(uint64_t)); - - Catalog * schema = the_table->get_schema(); - for (UInt32 fid = 0; fid < schema->get_field_cnt(); fid ++) { -// int field_size = schema->get_field_size(fid); -// char value[field_size]; -// for (int i = 0; i < field_size; i++) -// value[i] = (char)rand() % (1<<8) ; - char value[6] = "hello"; - new_row->set_value(fid, value,sizeof(value)); - } -#endif - - itemid_t * m_item = - (itemid_t *) mem_allocator.alloc( sizeof(itemid_t)); - assert(m_item != NULL); - m_item->type = DT_row; - m_item->location = new_row; - m_item->valid = true; - uint64_t idx_key = primary_key; - - rc = the_index->index_insert(idx_key, m_item, part_id); - assert(rc == RCOK); - key += g_part_cnt; - } - printf("Thd %d inserted %ld keys\n",tid,key_cnt); - return NULL; -} - -RC YCSBWorkload::get_txn_man(TxnManager *& txn_manager){ - DEBUG_M("YCSBWorkload::get_txn_man YCSBTxnManager alloc\n"); - txn_manager = (YCSBTxnManager *) - mem_allocator.align_alloc( sizeof(YCSBTxnManager)); - new(txn_manager) YCSBTxnManager(); - //txn_manager->init(this); - return RCOK; -} - diff --git a/contrib/deneva/client/client_main.cpp b/contrib/deneva/client/client_main.cpp deleted file mode 100644 index 75a2da50..00000000 --- a/contrib/deneva/client/client_main.cpp +++ /dev/null @@ -1,245 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "global.h" -#include "ycsb.h" -#include "tpcc.h" -#include "pps.h" -#include "da.h" -#include "thread.h" -#include "io_thread.h" -#include "client_thread.h" -#include "client_query.h" -#include "transport.h" -#include "client_txn.h" -#include "msg_queue.h" -#include "work_queue.h" -//#include - -void * f(void *); -void * g(void *); -void * worker(void *); -void * nn_worker(void *); -void * send_worker(void *); -void network_test(); -void network_test_recv(); -void * run_thread(void *); - -ClientThread * client_thds; -InputThread * input_thds; -OutputThread * output_thds; - -// defined in parser.cpp -void parser(int argc, char * argv[]); - -int main(int argc, char *argv[]) { - printf("Running client...\n\n"); - // 0. initialize global data structure - parser(argc, argv); - assert(g_node_id >= g_node_cnt); - //assert(g_client_node_cnt <= g_node_cnt); - - uint64_t seed = get_sys_clock(); - srand(seed); - printf("Random seed: %ld\n",seed); - - - int64_t starttime; - int64_t endtime; - starttime = get_server_clock(); - // per-partition malloc - printf("Initializing stats... "); - fflush(stdout); - stats.init(g_total_client_thread_cnt); - printf("Done\n"); - printf("Initializing transport manager... "); - fflush(stdout); - tport_man.init(); - printf("Done\n"); - printf("Initializing client manager... "); - Workload * m_wl; - switch (WORKLOAD) { - case YCSB : - m_wl = new YCSBWorkload; break; - case TPCC : - m_wl = new TPCCWorkload; break; - case PPS : - m_wl = new PPSWorkload; break; - case DA : - m_wl = new DAWorkload; break; - default: - assert(false); - } - m_wl->Workload::init(); - printf("workload initialized!\n"); - - printf("Initializing simulation... "); - fflush(stdout); - simulation = new SimManager; - simulation->init(); - printf("Done\n"); -#if NETWORK_TEST - tport_man.init(g_node_id,m_wl); - sleep(3); - if(g_node_id == 0) - network_test(); - else if(g_node_id == 1) - network_test_recv(); - - return 0; -#endif - - - fflush(stdout); - client_man.init(); - printf("Done\n"); - printf("Initializing work queue... "); - fflush(stdout); - work_queue.init(); - printf("Done\n"); - printf("Initializing msg pool... "); - fflush(stdout); - msg_pool.init(m_wl,g_inflight_max); - printf("Done\n"); - fflush(stdout); -/* - #if WORKLOAD==DA - g_client_rem_thread_cnt=1; - g_client_send_thread_cnt=1; - #endif -*/ - - // 2. spawn multiple threads - uint64_t thd_cnt = g_client_thread_cnt; - uint64_t cthd_cnt = thd_cnt; - uint64_t rthd_cnt = g_client_rem_thread_cnt; - uint64_t sthd_cnt = g_client_send_thread_cnt; - uint64_t all_thd_cnt = thd_cnt + rthd_cnt + sthd_cnt; - assert(all_thd_cnt == g_this_total_thread_cnt); - - pthread_t *p_thds = (pthread_t *)malloc(sizeof(pthread_t) * (all_thd_cnt)); - pthread_attr_t attr; - pthread_attr_init(&attr); - - client_thds = new ClientThread[cthd_cnt]; - input_thds = new InputThread[rthd_cnt]; - output_thds = new OutputThread[sthd_cnt]; - // query_queue should be the last one to be initialized!!! - // because it collects txn latency - printf("Initializing message queue... "); - msg_queue.init(); - printf("Done\n"); - printf("Initializing client query queue... "); - fflush(stdout); - client_query_queue.init(m_wl); - printf("Done\n"); - fflush(stdout); - -#if CREATE_TXN_FILE - return(0); -#endif - - endtime = get_server_clock(); - printf("Initialization Time = %ld\n", endtime - starttime); - fflush(stdout); - warmup_done = true; - pthread_barrier_init( &warmup_bar, NULL, all_thd_cnt); - - uint64_t cpu_cnt = 0; -#if SET_AFFINITY - cpu_set_t cpus; -#endif - // spawn and run txns again. - starttime = get_server_clock(); - simulation->run_starttime = starttime; - simulation->last_da_query_time = starttime; - uint64_t id = 0; - for (uint64_t i = 0; i < thd_cnt; i++) { -#if SET_AFFINITY - CPU_ZERO(&cpus); -#if TPORT_TYPE_IPC - CPU_SET(g_node_id * thd_cnt + cpu_cnt, &cpus); -#elif !SET_AFFINITY - CPU_SET(g_node_id * thd_cnt + cpu_cnt, &cpus); -#else - CPU_SET(cpu_cnt, &cpus); -#endif - cpu_cnt = (cpu_cnt + 1) % g_servers_per_client; - pthread_attr_setaffinity_np(&attr, sizeof(cpu_set_t), &cpus); -#endif - client_thds[i].init(id,g_node_id,m_wl); - pthread_create(&p_thds[id++], &attr, run_thread, (void *)&client_thds[i]); - } - - for (uint64_t j = 0; j < rthd_cnt ; j++) { - input_thds[j].init(id,g_node_id,m_wl); - pthread_create(&p_thds[id++], NULL, run_thread, (void *)&input_thds[j]); - } - - for (uint64_t i = 0; i < sthd_cnt; i++) { - output_thds[i].init(id,g_node_id,m_wl); - pthread_create(&p_thds[id++], NULL, run_thread, (void *)&output_thds[i]); - } - for (uint64_t i = 0; i < all_thd_cnt; i++) - pthread_join(p_thds[i], NULL); - - endtime = get_server_clock(); - - fflush(stdout); - printf("CLIENT PASS! SimTime = %ld\n", endtime - starttime); - if (STATS_ENABLE) stats.print_client(false); - fflush(stdout); - return 0; -} - -void * run_thread(void * id) { - Thread * thd = (Thread *) id; - thd->run(); - return NULL; -} - -void network_test() { -/* - ts_t start; - ts_t end; - double time; - int bytes; - for(int i=4; i < 257; i+=4) { - time = 0; - for(int j=0;j < 1000; j++) { - start = get_sys_clock(); - tport_man.simple_send_msg(i); - while((bytes = tport_man.simple_recv_msg()) == 0) {} - end = get_sys_clock(); - assert(bytes == i); - time += end-start; - } - time = time/1000; - printf("Network Bytes: %d, s: %f\n",i,time/BILLION); - fflush(stdout); - } -*/ -} - -void network_test_recv() { -/* - int bytes; - while(1) { - if( (bytes = tport_man.simple_recv_msg()) > 0) - tport_man.simple_send_msg(bytes); - } -*/ -} diff --git a/contrib/deneva/client/client_query.cpp b/contrib/deneva/client/client_query.cpp deleted file mode 100644 index 5ec16a77..00000000 --- a/contrib/deneva/client/client_query.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/* - Tencent is pleased to support the open source community by making 3TS available. - - Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - Tencent Modifications are Copyright (C) THL A29 Limited. - - Author: hongyaozhao@ruc.edu.cn - - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "client_query.h" -#include "mem_alloc.h" -#include "wl.h" -#include "table.h" -#include "ycsb_query.h" -#include "tpcc_query.h" -#include "pps_query.h" -#include "da_query.h" - -/*************************************************/ -// class Query_queue -/*************************************************/ - -typedef struct -{ - void* context; - int thd_id; -}FUNC_ARGS; - -void -Client_query_queue::init(Workload * h_wl) { - _wl = h_wl; - - -#if SERVER_GENERATE_QUERIES - if (ISCLIENT) return; - size = g_thread_cnt; -#else - size = g_servers_per_client; -#endif - query_cnt = new uint64_t * [size]; - for ( UInt32 id = 0; id < size; id ++) { - std::vector new_queries(g_max_txn_per_part+4,NULL); - queries.push_back(new_queries); - query_cnt[id] = (uint64_t*)mem_allocator.align_alloc(sizeof(uint64_t)); - } - next_tid = 0; -/* -#if WORKLOAD == DA - pthread_t * p_thds = new pthread_t[1]; - pthread_create(&p_thds[0], NULL, initQueriesHelper, this); - pthread_join(p_thds[0], NULL); -#else -*/ - - pthread_t * p_thds = new pthread_t[g_init_parallelism - 1]; - for (uint64_t i = 0; i < g_init_parallelism - 1; i++) { - FUNC_ARGS *arg=(FUNC_ARGS*)mem_allocator.align_alloc(sizeof(FUNC_ARGS)); - arg->context=this; - arg->thd_id=i; - pthread_create(&p_thds[i], NULL, initQueriesHelper, (void*)arg ); - } - FUNC_ARGS *arg=(FUNC_ARGS*)mem_allocator.align_alloc(sizeof(FUNC_ARGS)); - arg->context=this; - arg->thd_id=g_init_parallelism - 1; - #if WORKLOAD == DA - pthread_t p_thds_main; - pthread_create(&p_thds_main, NULL, initQueriesHelper, (void*)arg ); - pthread_detach(p_thds_main); - #else - initQueriesHelper(arg); - #endif - - for (uint32_t i = 0; i < g_init_parallelism - 1; i++) { - pthread_join(p_thds[i], NULL); - } -} - -void * -Client_query_queue::initQueriesHelper(void * args) { - ((Client_query_queue*)((FUNC_ARGS*)args)->context)->initQueriesParallel(((FUNC_ARGS*)args)->thd_id); - - return NULL; -} - -void -Client_query_queue::initQueriesParallel(uint64_t thd_id) { -#if WORKLOAD != DA - UInt32 tid = ATOM_FETCH_ADD(next_tid, 1); - uint64_t request_cnt; - request_cnt = g_max_txn_per_part + 4; - - uint32_t final_request; -#if CC_ALG == BOCC || CC_ALG == FOCC - if (tid == g_init_parallelism-1) { - final_request = request_cnt * g_servers_per_client; - } else { - final_request = request_cnt * g_servers_per_client / g_init_parallelism * (tid+1); - } -#else - if (tid == g_init_parallelism-1) { - final_request = request_cnt; - } else { - final_request = request_cnt / g_init_parallelism * (tid+1); - } -#endif -#endif -#if WORKLOAD == YCSB - YCSBQueryGenerator * gen = new YCSBQueryGenerator; - gen->init(); -#elif WORKLOAD == TPCC - TPCCQueryGenerator * gen = new TPCCQueryGenerator; -#elif WORKLOAD == PPS - PPSQueryGenerator * gen = new PPSQueryGenerator; -#elif WORKLOAD == DA - DAQueryGenerator * gen = new DAQueryGenerator; -#endif -#if SERVER_GENERATE_QUERIES - #if CC_ALG == BOCC || CC_ALG == FOCC - for (UInt32 query_id = request_cnt / g_init_parallelism * tid; query_id < final_request; query_id ++) { - queries[thread_id][query_id] = gen->create_query(_wl,g_node_id); - } - #else - for ( UInt32 thread_id = 0; thread_id < g_thread_cnt; thread_id ++) { - for (UInt32 query_id = request_cnt / g_init_parallelism * tid; query_id < final_request; - query_id++) { - queries[thread_id][query_id] = gen->create_query(_wl,g_node_id); - } - } - #endif -#elif WORKLOAD == DA - gen->create_query(_wl,thd_id); -#else -#if CC_ALG == BOCC || CC_ALG == FOCC - for (UInt32 query_id = request_cnt / g_init_parallelism * tid; query_id < final_request; query_id ++) { - queries[0][query_id] = gen->create_query(_wl,g_server_start_node); - } -#else - for ( UInt32 server_id = 0; server_id < g_servers_per_client; server_id ++) { - for (UInt32 query_id = request_cnt / g_init_parallelism * tid; query_id < final_request; - query_id++) { - queries[server_id][query_id] = gen->create_query(_wl,server_id+g_server_start_node); - } - } -#endif -#endif -} - -bool Client_query_queue::done() { return false; } - -BaseQuery * -Client_query_queue::get_next_query(uint64_t server_id,uint64_t thread_id) { -#if WORKLOAD == DA - BaseQuery * query; - query=da_gen_qry_queue.pop_data(); - //while(!da_query_queue.pop(query)); - return query; -#else - assert(server_id < size); - uint64_t query_id = __sync_fetch_and_add(query_cnt[server_id], 1); - if(query_id > g_max_txn_per_part) { - __sync_bool_compare_and_swap(query_cnt[server_id],query_id+1,0); - query_id = __sync_fetch_and_add(query_cnt[server_id], 1); - } - BaseQuery * query = queries[server_id][query_id]; - return query; -#endif -} diff --git a/contrib/deneva/client/client_query.h b/contrib/deneva/client/client_query.h deleted file mode 100644 index 7771f6ea..00000000 --- a/contrib/deneva/client/client_query.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _CLIENT_QUERY_H_ -#define _CLIENT_QUERY_H_ - -#include "global.h" -#include "helper.h" -#include "query.h" - -class Workload; -class YCSBQuery; -class YCSBClientQuery; -class TPCCQuery; -class tpcc_client_query; - -// We assume a separate task queue for each thread in order to avoid -// contention in a centralized query queue. In reality, more sophisticated -// queue model might be implemented. -class Client_query_queue { -public: - void init(Workload * h_wl); - bool done(); - BaseQuery * get_next_query(uint64_t server_id,uint64_t thread_id); - void initQueriesParallel(uint64_t thd_id); - static void * initQueriesHelper(void * context); - -private: - Workload * _wl; - uint64_t size; - std::vector> queries; - uint64_t ** query_cnt; - volatile uint64_t next_tid; -}; - -#endif diff --git a/contrib/deneva/client/client_txn.cpp b/contrib/deneva/client/client_txn.cpp deleted file mode 100644 index a1bb19bf..00000000 --- a/contrib/deneva/client/client_txn.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "client_txn.h" -#include "mem_alloc.h" - -void Inflight_entry::init() { - num_inflight_txns = 0; - sem_init(&mutex, 0, 1); -} - -int32_t Inflight_entry::inc_inflight() { - int32_t result; - sem_wait(&mutex); - if (num_inflight_txns < g_inflight_max) { - // if (num_inflight_txns < 1) { - result = ++num_inflight_txns; - } else { - result = -1; - } - sem_post(&mutex); - return result; -} - -int32_t Inflight_entry::dec_inflight() { - int32_t result; - sem_wait(&mutex); - if(num_inflight_txns > 0) { - result = --num_inflight_txns; - } - //assert(num_inflight_txns >= 0); - sem_post(&mutex); - return result; -} - -int32_t Inflight_entry::get_inflight() { - int32_t result; - sem_wait(&mutex); - result = num_inflight_txns; - sem_post(&mutex); - return result; -} - -void Client_txn::init() { - //inflight_txns = new Inflight_entry * [g_node_cnt]; - inflight_txns = new Inflight_entry * [g_servers_per_client]; - //for (uint32_t i = 0; i < g_node_cnt; ++i) { - for (uint32_t i = 0; i < g_servers_per_client; ++i) { - inflight_txns[i] = (Inflight_entry *)mem_allocator.alloc(sizeof(Inflight_entry)); - inflight_txns[i]->init(); - } -} - -int32_t Client_txn::inc_inflight(uint32_t node_id) { - assert(node_id < g_servers_per_client); - return inflight_txns[node_id]->inc_inflight(); -} - -int32_t Client_txn::dec_inflight(uint32_t node_id) { - assert(node_id < g_servers_per_client); - return inflight_txns[node_id]->dec_inflight(); -} - -int32_t Client_txn::get_inflight(uint32_t node_id) { - assert(node_id < g_servers_per_client); - return inflight_txns[node_id]->get_inflight(); -} diff --git a/contrib/deneva/client/client_txn.h b/contrib/deneva/client/client_txn.h deleted file mode 100644 index 52ecde61..00000000 --- a/contrib/deneva/client/client_txn.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _CLIENT_TXN_H_ -#define _CLIENT_TXN_H_ - -#include "global.h" -#include "semaphore.h" - -class Inflight_entry { -public: - void init(); - int32_t inc_inflight(); - int32_t dec_inflight(); - int32_t get_inflight(); -private: - volatile int32_t num_inflight_txns; - sem_t mutex; -}; - -class Client_txn { -public: - void init(); - int32_t inc_inflight(uint32_t node_id); - int32_t dec_inflight(uint32_t node_id); - int32_t get_inflight(uint32_t node_id); -private: - Inflight_entry ** inflight_txns; -}; - -#endif diff --git a/contrib/deneva/concurrency_control/bocc.cpp b/contrib/deneva/concurrency_control/bocc.cpp deleted file mode 100644 index 552c4749..00000000 --- a/contrib/deneva/concurrency_control/bocc.cpp +++ /dev/null @@ -1,179 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@ruc.edu.cn - * - */ - -#include "global.h" -#if CC_ALG == BOCC -#include "helper.h" -#include "txn.h" -#include "bocc.h" -#include "manager.h" -#include "mem_alloc.h" -#include "row_occ.h" - - -b_set_ent::b_set_ent() { - set_size = 0; - txn = NULL; - rows = NULL; - next = NULL; -} - -void Bocc::init() { - sem_init(&_semaphore, 0, 1); - occ_cs::init(); - tnc = 0; - his_len = 0; - lock_all = false; -} - -RC Bocc::validate(TxnManager * txn) { - RC rc; - uint64_t starttime = get_sys_clock(); - rc = central_validate(txn); - INC_STATS(txn->get_thd_id(), occ_validate_time, get_sys_clock() - starttime); - return rc; -} - -void Bocc::finish(RC rc, TxnManager * txn) { - central_finish(rc, txn); -} - -RC Bocc::central_validate(TxnManager * txn) { - RC rc; - uint64_t starttime = get_sys_clock(); - uint64_t total_starttime = starttime; - uint64_t start_tn = txn->get_start_timestamp(); - uint64_t finish_tn; - - bool valid = true; - // OptCC is centralized. No need to do per partition malloc. - b_set_ent * wset; - b_set_ent * rset; - get_rw_set(txn, rset, wset); - - b_set_ent * his; - - int stop __attribute__((unused)); - - DEBUG("Start Validation %ld: start_ts %lu his_len %ld\n",txn->get_txn_id(),start_tn, his_len); - sem_wait(&_semaphore); - INC_STATS(txn->get_thd_id(),occ_cs_wait_time,get_sys_clock() - starttime); - starttime = get_sys_clock(); - assert(!g_ts_batch_alloc); - - finish_tn = glob_manager.get_ts(txn->get_thd_id()); - - his = history; - - INC_STATS(txn->get_thd_id(),occ_cs_time,get_sys_clock() - starttime); - - starttime = get_sys_clock(); - uint64_t checked = 0; - uint64_t hist_checked = 0; - stop = 0; - if (finish_tn > start_tn) { - while (his && his->tn > finish_tn) { - his = his->next; - } - while (his && his->tn > start_tn) { - ++hist_checked; - ++checked; - valid = test_valid(his, rset); -#if WORKLOAD == TPCC - if (valid) { - valid = test_valid(his, wset); - } -#endif - if (!valid) { - INC_STATS(txn->get_thd_id(),occ_hist_validate_fail_time,get_sys_clock() - starttime); - goto final; - } - his = his->next; - } - } - - INC_STATS(txn->get_thd_id(),occ_hist_validate_time,get_sys_clock() - starttime); - - starttime = get_sys_clock(); -final: - mem_allocator.free(rset->rows, sizeof(row_t *) * rset->set_size); - mem_allocator.free(rset, sizeof(b_set_ent)); - - if (valid) { - rc = RCOK; - INC_STATS(txn->get_thd_id(),occ_check_cnt,checked); - } else { - INC_STATS(txn->get_thd_id(),occ_abort_check_cnt,checked); - rc = Abort; - // Optimization: If this is aborting, remove from active set now - } - sem_post(&_semaphore); - DEBUG("End Validation %ld: hist# %ld\n",txn->get_txn_id(),hist_checked); - INC_STATS(txn->get_thd_id(),occ_validate_time,get_sys_clock() - total_starttime); - return rc; -} - -void Bocc::central_finish(RC rc, TxnManager * txn) { - b_set_ent * wset; - b_set_ent * rset; - get_rw_set(txn, rset, wset); - bool readonly = (wset->set_size == 0); - if (!readonly) { - sem_wait(&_semaphore); - // only update active & tnc for non-readonly transactions - uint64_t starttime = get_sys_clock(); - if (rc == RCOK) { - // remove the assert for performance - wset->tn = glob_manager.get_ts(txn->get_thd_id()); - STACK_PUSH(history, wset); - DEBUG("occ insert history"); - his_len ++; - } - INC_STATS(txn->get_thd_id(),occ_finish_time,get_sys_clock() - starttime); - sem_post(&_semaphore); - } -} - -RC Bocc::get_rw_set(TxnManager * txn, b_set_ent * &rset, b_set_ent *& wset) { - wset = (b_set_ent*) mem_allocator.alloc(sizeof(b_set_ent)); - rset = (b_set_ent*) mem_allocator.alloc(sizeof(b_set_ent)); - wset->set_size = txn->get_write_set_size(); - rset->set_size = txn->get_read_set_size(); - wset->rows = (row_t **) mem_allocator.alloc(sizeof(row_t *) * wset->set_size); - rset->rows = (row_t **) mem_allocator.alloc(sizeof(row_t *) * rset->set_size); - wset->txn = txn; - rset->txn = txn; - - UInt32 n = 0, m = 0; - for (uint64_t i = 0; i < wset->set_size + rset->set_size; i++) { - if (txn->get_access_type(i) == WR) { - wset->rows[n ++] = txn->get_access_original_row(i); - } else { - rset->rows[m ++] = txn->get_access_original_row(i); - } - } - - assert(n == wset->set_size); - assert(m == rset->set_size); - return RCOK; -} - -bool Bocc::test_valid(b_set_ent * set1, b_set_ent * set2) { - for (UInt32 i = 0; i < set1->set_size; i++) { - for (UInt32 j = 0; j < set2->set_size; j++) { - if (set1->rows[i] == set2->rows[j]) { - return false; - } - } - } - return true; -} - -#endif diff --git a/contrib/deneva/concurrency_control/bocc.h b/contrib/deneva/concurrency_control/bocc.h deleted file mode 100644 index 3fb7df70..00000000 --- a/contrib/deneva/concurrency_control/bocc.h +++ /dev/null @@ -1,61 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@ruc.edu.cn - * - */ - -#ifndef _BOCC_H_ -#define _BOCC_H_ - -#include "row.h" -#include "semaphore.h" -#include "occ_critical_section.h" - -// For simplicity, the txn hisotry for OCC is oganized as follows: -// 1. history is never deleted. -// 2. hisotry forms a single directional list. -// history head -> hist_1 -> hist_2 -> hist_3 -> ... -> hist_n -// The head is always the latest and the tail the youngest. -// When history is traversed, always go from head -> tail order. - -class TxnManager; - -class b_set_ent{ -public: - b_set_ent(); - UInt64 tn; - TxnManager * txn; - UInt32 set_size; - row_t ** rows; //[MAX_WRITE_SET]; - b_set_ent * next; -}; - -class Bocc : public occ_cs { -public: - void init(); - RC validate(TxnManager * txn); - void finish(RC rc, TxnManager * txn); - volatile bool lock_all; - uint64_t lock_txn_id; -private: - // serial validation in the original OCC paper. - RC central_validate(TxnManager * txn); - - void central_finish(RC rc, TxnManager * txn); - bool test_valid(b_set_ent * set1, b_set_ent * set2); - RC get_rw_set(TxnManager * txni, b_set_ent * &rset, b_set_ent *& wset); - - // "history" stores write set of transactions with tn >= smallest running tn - b_set_ent * history; - uint64_t his_len; - - volatile uint64_t tnc; // transaction number counter - pthread_mutex_t latch; - sem_t _semaphore; -}; - -#endif diff --git a/contrib/deneva/concurrency_control/focc.cpp b/contrib/deneva/concurrency_control/focc.cpp deleted file mode 100644 index 5574b81b..00000000 --- a/contrib/deneva/concurrency_control/focc.cpp +++ /dev/null @@ -1,234 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@ruc.edu.cn - * - */ - -#include "global.h" -#if CC_ALG == FOCC -#include "helper.h" -#include "txn.h" -#include "focc.h" -#include "manager.h" -#include "mem_alloc.h" -#include "row_occ.h" - - -f_set_ent::f_set_ent() { - set_size = 0; - txn = NULL; - rows = NULL; - next = NULL; -} - -void Focc::init() { - sem_init(&_semaphore, 0, 1); - occ_cs::init(); - tnc = 0; - active_len = 0; - active = NULL; - lock_all = false; -} - -RC Focc::validate(TxnManager * txn) { - RC rc; - uint64_t starttime = get_sys_clock(); - rc = central_validate(txn); - INC_STATS(txn->get_thd_id(),occ_validate_time,get_sys_clock() - starttime); - return rc; -} - -void Focc::finish(RC rc, TxnManager * txn) { - central_finish(rc,txn); -} - -void Focc::active_storage(access_t type, TxnManager * txn, Access * access) { - f_set_ent * act = active; - f_set_ent * wset; - f_set_ent * rset; - get_rw_set(txn, rset, wset); - if (rset->set_size == 0) { - return; - } - sem_wait(&_semaphore); - while (act != NULL && act->txn != txn) { - act = act->next; - } - if (act == NULL) { - active_len ++; - STACK_PUSH(active, rset); - } else { - act = rset; - } - sem_post(&_semaphore); - DEBUG("FOCC active_storage %ld: active size %lu\n",txn->get_txn_id(),active_len); -} - -RC Focc::central_validate(TxnManager * txn) { - RC rc; - uint64_t starttime = get_sys_clock(); - uint64_t total_starttime = starttime; - uint64_t start_tn = txn->get_start_timestamp(); - - bool valid = true; - // OptCC is centralized. No need to do per partition malloc. - f_set_ent * wset; - f_set_ent * rset; - get_rw_set(txn, rset, wset); - bool readonly = (wset->set_size == 0); - f_set_ent * ent; - uint64_t checked = 0; - uint64_t active_checked = 0; - int stop __attribute__((unused)); - - DEBUG("Start Validation %ld: start_ts %lu, active size %lu\n",txn->get_txn_id(),start_tn,active_len); - sem_wait(&_semaphore); - INC_STATS(txn->get_thd_id(),occ_cs_wait_time,get_sys_clock() - starttime); - starttime = get_sys_clock(); - - ent = active; - // In order to prevent cross between other read sets and the current transaction write set during - // verification, the write set is first locked. - if (!readonly) { - for (uint64_t i = 0; i < wset->set_size; i++) { - row_t * row = wset->rows[i]; - if (!row->manager->try_lock(txn->get_txn_id())) { - rc = Abort; - } - } - if (rc == Abort) { - for (uint64_t i = 0; i < wset->set_size; i++) { - row_t * row = wset->rows[i]; - row->manager->release_lock(txn->get_txn_id()); - } - } - } - stop = 1; - if (!readonly) { - for (ent = active; ent != NULL; ent = ent->next) { - f_set_ent * ract = ent; - ++checked; - ++active_checked; - valid = test_valid(ract, wset); - if (valid) { - ++checked; - ++active_checked; - } - if (!valid) { - INC_STATS(txn->get_thd_id(),occ_act_validate_fail_time,get_sys_clock() - starttime); - goto final; - } - } - } - INC_STATS(txn->get_thd_id(),occ_act_validate_time,get_sys_clock() - starttime); - starttime = get_sys_clock(); -final: - mem_allocator.free(rset->rows, sizeof(row_t *) * rset->set_size); - mem_allocator.free(rset, sizeof(f_set_ent)); - - if (valid) { - rc = RCOK; - INC_STATS(txn->get_thd_id(),occ_check_cnt,checked); - } else { - INC_STATS(txn->get_thd_id(),occ_abort_check_cnt,checked); - rc = Abort; - // Optimization: If this is aborting, remove from active set now - f_set_ent * act = active; - f_set_ent * prev = NULL; - while (act != NULL && act->txn != txn) { - prev = act; - act = act->next; - } - if (act != NULL && act->txn == txn) { - if (prev != NULL) { - prev->next = act->next; - } else { - active = act->next; - } - active_len --; - } - } - sem_post(&_semaphore); - DEBUG("End Validation %ld: active# %ld\n",txn->get_txn_id(),active_checked); - INC_STATS(txn->get_thd_id(),occ_validate_time,get_sys_clock() - total_starttime); - return rc; -} - -void Focc::central_finish(RC rc, TxnManager * txn) { - f_set_ent * wset; - f_set_ent * rset; - get_rw_set(txn, rset, wset); - - // only update active & tnc for non-readonly transactions - uint64_t starttime = get_sys_clock(); - f_set_ent * act = active; - f_set_ent * prev = NULL; - sem_wait(&_semaphore); - while (act != NULL && act->txn != txn) { - prev = act; - act = act->next; - } - if (act == NULL) { - sem_post(&_semaphore); - return; - } - assert(act->txn == txn); - if (prev != NULL) { - prev->next = act->next; - } else { - active = act->next; - } - active_len --; - - for (uint64_t i = 0; i < wset->set_size; i++) { - row_t * row = wset->rows[i]; - row->manager->release_lock(txn->get_txn_id()); - } - - sem_post(&_semaphore); - INC_STATS(txn->get_thd_id(),occ_finish_time,get_sys_clock() - starttime); - -} - -RC Focc::get_rw_set(TxnManager * txn, f_set_ent * &rset, f_set_ent *& wset) { - wset = (f_set_ent*) mem_allocator.alloc(sizeof(f_set_ent)); - rset = (f_set_ent*) mem_allocator.alloc(sizeof(f_set_ent)); - wset->set_size = txn->get_write_set_size(); - rset->set_size = txn->get_read_set_size(); - wset->rows = (row_t **) mem_allocator.alloc(sizeof(row_t *) * wset->set_size); - rset->rows = (row_t **) mem_allocator.alloc(sizeof(row_t *) * rset->set_size); - wset->txn = txn; - rset->txn = txn; - - UInt32 n = 0, m = 0; - for (uint64_t i = 0; i < wset->set_size + rset->set_size; i++) { - if (txn->get_access_type(i) == WR) { - wset->rows[n ++] = txn->get_access_original_row(i); - } else { - rset->rows[m ++] = txn->get_access_original_row(i); - } - } - - assert(n == wset->set_size); - assert(m == rset->set_size); - return RCOK; -} - -bool Focc::test_valid(f_set_ent * set1, f_set_ent * set2) { - for (UInt32 i = 0; i < set1->set_size; i++) { - for (UInt32 j = 0; j < set2->set_size; j++) { - if (set1->txn == set2->txn) - continue; - if (set1->rows[i] == set2->rows[j]) { - return false; - } - } - } - return true; -} - -#endif \ No newline at end of file diff --git a/contrib/deneva/concurrency_control/focc.h b/contrib/deneva/concurrency_control/focc.h deleted file mode 100644 index 0ac130e1..00000000 --- a/contrib/deneva/concurrency_control/focc.h +++ /dev/null @@ -1,69 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@ruc.edu.cn - * - */ - -#ifndef _FOCC_H_ -#define _FOCC_H_ - -#include "row.h" -#include "semaphore.h" -#include "occ_critical_section.h" - - -// For simplicity, the txn hisotry for OCC is oganized as follows: -// 1. history is never deleted. -// 2. hisotry forms a single directional list. -// history head -> hist_1 -> hist_2 -> hist_3 -> ... -> hist_n -// The head is always the latest and the tail the youngest. -// When history is traversed, always go from head -> tail order. - -class TxnManager; - -class f_set_ent{ -public: - f_set_ent(); - UInt64 tn; - TxnManager * txn; - UInt32 set_size; - row_t ** rows; //[MAX_WRITE_SET]; - f_set_ent * next; -}; - -class Focc : public occ_cs { -public: - void init(); - RC validate(TxnManager * txn); - void finish(RC rc, TxnManager * txn); - void active_storage(access_t type, TxnManager * txn, Access * access); - volatile bool lock_all; - uint64_t lock_txn_id; -private: - // serial validation in the original OCC paper. - RC central_validate(TxnManager * txn); - - void central_finish(RC rc, TxnManager * txn); - bool test_valid(f_set_ent * set1, f_set_ent * set2); - RC get_rw_set(TxnManager * txni, f_set_ent * &rset, f_set_ent *& wset); - - // "history" stores write set of transactions with tn >= smallest running tn - - f_set_ent * active; - uint64_t active_len; - volatile uint64_t tnc; // transaction number counter - pthread_mutex_t latch; - sem_t _semaphore; - - sem_t _active_semaphore; - // Global verification lock of FOCC - LockEntry * owners; - LockEntry * waiters_head; - LockEntry * waiters_tail; -}; - -#endif diff --git a/contrib/deneva/concurrency_control/hash.cpp b/contrib/deneva/concurrency_control/hash.cpp deleted file mode 100644 index 76c357d5..00000000 --- a/contrib/deneva/concurrency_control/hash.cpp +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. -// This source code is licensed under both the GPLv2 (found in the -// COPYING file in the root directory) and Apache 2.0 License -// (found in the LICENSE.Apache file in the root directory). - -#include "hash.h" - -int hash_any(register const unsigned char *k, register int keylen) -{ - register uint32_t a, b, c, len; - - /* Set up the internal state */ - len = keylen; - a = b = c = 0x9e3779b9 + len + 3923095; - - /* If the source pointer is word-aligned, we use word-wide fetches */ - if (((uintptr_t) k & UINT32_ALIGN_MASK) == 0) - { - /* Code path for aligned source data */ - register const uint32_t *ka = (const uint32_t *) k; - - /* handle most of the key */ - while (len >= 12) - { - a += ka[0]; - b += ka[1]; - c += ka[2]; - mix(a, b, c); - ka += 3; - len -= 12; - } - - /* handle the last 11 bytes */ - k = (const unsigned char *) ka; - switch (len) - { - case 11: - c += ((uint32_t) k[10] << 24); - /* fall through */ - case 10: - c += ((uint32_t) k[9] << 16); - /* fall through */ - case 9: - c += ((uint32_t) k[8] << 8); - /* the lowest byte of c is reserved for the length */ - /* fall through */ - case 8: - b += ka[1]; - a += ka[0]; - break; - case 7: - b += ((uint32_t) k[6] << 16); - /* fall through */ - case 6: - b += ((uint32_t) k[5] << 8); - /* fall through */ - case 5: - b += k[4]; - /* fall through */ - case 4: - a += ka[0]; - break; - case 3: - a += ((uint32_t) k[2] << 16); - /* fall through */ - case 2: - a += ((uint32_t) k[1] << 8); - /* fall through */ - case 1: - a += k[0]; - /* case 0: nothing left to add */ - } - } - else - { - /* Code path for non-aligned source data */ - - /* handle most of the key */ - while (len >= 12) - { - a += (k[0] + ((uint32_t) k[1] << 8) + ((uint32_t) k[2] << 16) + ((uint32_t) k[3] << 24)); - b += (k[4] + ((uint32_t) k[5] << 8) + ((uint32_t) k[6] << 16) + ((uint32_t) k[7] << 24)); - c += (k[8] + ((uint32_t) k[9] << 8) + ((uint32_t) k[10] << 16) + ((uint32_t) k[11] << 24)); - mix(a, b, c); - k += 12; - len -= 12; - } - - /* handle the last 11 bytes */ - switch (len) /* all the case statements fall through */ - { - case 11: - c += ((uint32_t) k[10] << 24); - case 10: - c += ((uint32_t) k[9] << 16); - case 9: - c += ((uint32_t) k[8] << 8); - /* the lowest byte of c is reserved for the length */ - case 8: - b += ((uint32_t) k[7] << 24); - case 7: - b += ((uint32_t) k[6] << 16); - case 6: - b += ((uint32_t) k[5] << 8); - case 5: - b += k[4]; - case 4: - a += ((uint32_t) k[3] << 24); - case 3: - a += ((uint32_t) k[2] << 16); - case 2: - a += ((uint32_t) k[1] << 8); - case 1: - a += k[0]; - /* case 0: nothing left to add */ - } - } - - final(a, b, c); - /* report the result */ - return c; -} diff --git a/contrib/deneva/concurrency_control/hash.h b/contrib/deneva/concurrency_control/hash.h deleted file mode 100644 index 494682fb..00000000 --- a/contrib/deneva/concurrency_control/hash.h +++ /dev/null @@ -1,37 +0,0 @@ - -#pragma once - -#ifndef KEY_RANGE_HASH -#define KEY_RANGE_HASH - -#include -#include -#include -#include - -#define UINT32_ALIGN_MASK (sizeof(uint32_t) - 1) -#define rot(x,k) (((x)<<(k)) | ((x)>>(32-(k)))) -#define mix(a,b,c) \ -{ \ - a -= c; a ^= rot(c, 4); c += b; \ - b -= a; b ^= rot(a, 6); a += c; \ - c -= b; c ^= rot(b, 8); b += a; \ - a -= c; a ^= rot(c,16); c += b; \ - b -= a; b ^= rot(a,19); a += c; \ - c -= b; c ^= rot(b, 4); b += a; \ -} - -#define final(a,b,c) \ -{ \ - c ^= b; c -= rot(b,14); \ - a ^= c; a -= rot(c,11); \ - b ^= a; b -= rot(a,25); \ - c ^= b; c -= rot(b,16); \ - a ^= c; a -= rot(c, 4); \ - b ^= a; b -= rot(a,14); \ - c ^= b; c -= rot(b,24); \ -} - -int hash_any(register const unsigned char *k, register int keylen); - -#endif diff --git a/contrib/deneva/concurrency_control/maat.cpp b/contrib/deneva/concurrency_control/maat.cpp deleted file mode 100644 index 0d2104c1..00000000 --- a/contrib/deneva/concurrency_control/maat.cpp +++ /dev/null @@ -1,319 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "global.h" -#include "helper.h" -#include "txn.h" -#include "maat.h" -#include "manager.h" -#include "mem_alloc.h" -#include "row_maat.h" - -void Maat::init() { sem_init(&_semaphore, 0, 1); } - -RC Maat::validate(TxnManager * txn) { - uint64_t start_time = get_sys_clock(); - uint64_t timespan; - sem_wait(&_semaphore); - - timespan = get_sys_clock() - start_time; - txn->txn_stats.cc_block_time += timespan; - txn->txn_stats.cc_block_time_short += timespan; - INC_STATS(txn->get_thd_id(),maat_cs_wait_time,timespan); - start_time = get_sys_clock(); - RC rc = RCOK; - uint64_t lower = time_table.get_lower(txn->get_thd_id(),txn->get_txn_id()); - uint64_t upper = time_table.get_upper(txn->get_thd_id(),txn->get_txn_id()); - DEBUG("MAAT Validate Start %ld: [%lu,%lu]\n",txn->get_txn_id(),lower,upper); - std::set after; - std::set before; - // lower bound of txn greater than write timestamp - if(lower <= txn->greatest_write_timestamp) { - lower = txn->greatest_write_timestamp + 1; - INC_STATS(txn->get_thd_id(),maat_case1_cnt,1); - } - // lower bound of uncommitted writes greater than upper bound of txn - for(auto it = txn->uncommitted_writes->begin(); it != txn->uncommitted_writes->end();it++) { - uint64_t it_lower = time_table.get_lower(txn->get_thd_id(),*it); - if(upper >= it_lower) { - MAATState state = time_table.get_state(txn->get_thd_id(),*it); - if(state == MAAT_VALIDATED || state == MAAT_COMMITTED) { - INC_STATS(txn->get_thd_id(),maat_case2_cnt,1); - if(it_lower > 0) { - upper = it_lower - 1; - } else { - upper = it_lower; - } - } - if(state == MAAT_RUNNING) { - after.insert(*it); - } - } - } - // lower bound of txn greater than read timestamp - if(lower <= txn->greatest_read_timestamp) { - lower = txn->greatest_read_timestamp + 1; - INC_STATS(txn->get_thd_id(),maat_case3_cnt,1); - } - // upper bound of uncommitted reads less than lower bound of txn - for(auto it = txn->uncommitted_reads->begin(); it != txn->uncommitted_reads->end();it++) { - uint64_t it_upper = time_table.get_upper(txn->get_thd_id(),*it); - if(lower <= it_upper) { - MAATState state = time_table.get_state(txn->get_thd_id(),*it); - if(state == MAAT_VALIDATED || state == MAAT_COMMITTED) { - INC_STATS(txn->get_thd_id(),maat_case4_cnt,1); - if(it_upper < UINT64_MAX) { - lower = it_upper + 1; - } else { - lower = it_upper; - } - } - if(state == MAAT_RUNNING) { - before.insert(*it); - } - } - } - // upper bound of uncommitted write writes less than lower bound of txn - for(auto it = txn->uncommitted_writes_y->begin(); it != txn->uncommitted_writes_y->end();it++) { - MAATState state = time_table.get_state(txn->get_thd_id(),*it); - uint64_t it_upper = time_table.get_upper(txn->get_thd_id(),*it); - if(state == MAAT_ABORTED) { - continue; - } - if(state == MAAT_VALIDATED || state == MAAT_COMMITTED) { - if(lower <= it_upper) { - INC_STATS(txn->get_thd_id(),maat_case5_cnt,1); - if(it_upper < UINT64_MAX) { - lower = it_upper + 1; - } else { - lower = it_upper; - } - } - } - if(state == MAAT_RUNNING) { - after.insert(*it); - } - } - if(lower >= upper) { - // Abort - time_table.set_state(txn->get_thd_id(),txn->get_txn_id(),MAAT_ABORTED); - rc = Abort; - } else { - // Validated - time_table.set_state(txn->get_thd_id(),txn->get_txn_id(),MAAT_VALIDATED); - rc = RCOK; - - for(auto it = before.begin(); it != before.end();it++) { - uint64_t it_upper = time_table.get_upper(txn->get_thd_id(),*it); - if(it_upper > lower && it_upper < upper-1) { - lower = it_upper + 1; - } - } - for(auto it = before.begin(); it != before.end();it++) { - uint64_t it_upper = time_table.get_upper(txn->get_thd_id(),*it); - if(it_upper >= lower) { - if(lower > 0) { - time_table.set_upper(txn->get_thd_id(),*it,lower-1); - } else { - time_table.set_upper(txn->get_thd_id(),*it,lower); - } - } - } - for(auto it = after.begin(); it != after.end();it++) { - uint64_t it_lower = time_table.get_lower(txn->get_thd_id(),*it); - uint64_t it_upper = time_table.get_upper(txn->get_thd_id(),*it); - if(it_upper != UINT64_MAX && it_upper > lower + 2 && it_upper < upper ) { - upper = it_upper - 2; - } - if((it_lower < upper && it_lower > lower+1)) { - upper = it_lower - 1; - } - } - // set all upper and lower bounds to meet inequality - for(auto it = after.begin(); it != after.end();it++) { - uint64_t it_lower = time_table.get_lower(txn->get_thd_id(),*it); - if(it_lower <= upper) { - if(upper < UINT64_MAX) { - time_table.set_lower(txn->get_thd_id(),*it,upper+1); - } else { - time_table.set_lower(txn->get_thd_id(),*it,upper); - } - } - } - - assert(lower < upper); - INC_STATS(txn->get_thd_id(),maat_range,upper-lower); - INC_STATS(txn->get_thd_id(),maat_commit_cnt,1); - } - time_table.set_lower(txn->get_thd_id(),txn->get_txn_id(),lower); - time_table.set_upper(txn->get_thd_id(),txn->get_txn_id(),upper); - INC_STATS(txn->get_thd_id(),maat_validate_cnt,1); - timespan = get_sys_clock() - start_time; - INC_STATS(txn->get_thd_id(),maat_validate_time,timespan); - txn->txn_stats.cc_time += timespan; - txn->txn_stats.cc_time_short += timespan; - DEBUG("MAAT Validate End %ld: %d [%lu,%lu]\n",txn->get_txn_id(),rc==RCOK,lower,upper); - sem_post(&_semaphore); - return rc; - -} - -RC Maat::find_bound(TxnManager * txn) { - RC rc = RCOK; - uint64_t lower = time_table.get_lower(txn->get_thd_id(),txn->get_txn_id()); - uint64_t upper = time_table.get_upper(txn->get_thd_id(),txn->get_txn_id()); - if(lower >= upper) { - time_table.set_state(txn->get_thd_id(),txn->get_txn_id(),MAAT_VALIDATED); - rc = Abort; - } else { - time_table.set_state(txn->get_thd_id(),txn->get_txn_id(),MAAT_COMMITTED); - // TODO: can commit_time be selected in a smarter way? - txn->commit_timestamp = lower; - } - DEBUG("MAAT Bound %ld: %d [%lu,%lu] %lu\n", txn->get_txn_id(), rc, lower, upper, - txn->commit_timestamp); - return rc; -} - -void TimeTable::init() { - //table_size = g_inflight_max * g_node_cnt * 2 + 1; - table_size = g_inflight_max + 1; - DEBUG_M("TimeTable::init table alloc\n"); - table = (TimeTableNode*) mem_allocator.alloc(sizeof(TimeTableNode) * table_size); - for(uint64_t i = 0; i < table_size;i++) { - table[i].init(); - } -} - -uint64_t TimeTable::hash(uint64_t key) { return key % table_size; } - -TimeTableEntry* TimeTable::find(uint64_t key) { - TimeTableEntry * entry = table[hash(key)].head; - while(entry) { - if (entry->key == key) break; - entry = entry->next; - } - return entry; - -} - -void TimeTable::init(uint64_t thd_id, uint64_t key) { - uint64_t idx = hash(key); - uint64_t mtx_wait_starttime = get_sys_clock(); - pthread_mutex_lock(&table[idx].mtx); - INC_STATS(thd_id,mtx[34],get_sys_clock() - mtx_wait_starttime); - TimeTableEntry* entry = find(key); - if(!entry) { - DEBUG_M("TimeTable::init entry alloc\n"); - entry = (TimeTableEntry*) mem_allocator.alloc(sizeof(TimeTableEntry)); - entry->init(key); - LIST_PUT_TAIL(table[idx].head,table[idx].tail,entry); - } - pthread_mutex_unlock(&table[idx].mtx); -} - -void TimeTable::release(uint64_t thd_id, uint64_t key) { - uint64_t idx = hash(key); - uint64_t mtx_wait_starttime = get_sys_clock(); - pthread_mutex_lock(&table[idx].mtx); - INC_STATS(thd_id,mtx[35],get_sys_clock() - mtx_wait_starttime); - TimeTableEntry* entry = find(key); - if(entry) { - LIST_REMOVE_HT(entry,table[idx].head,table[idx].tail); - DEBUG_M("TimeTable::release entry free\n"); - mem_allocator.free(entry,sizeof(TimeTableEntry)); - } - pthread_mutex_unlock(&table[idx].mtx); -} - -uint64_t TimeTable::get_lower(uint64_t thd_id, uint64_t key) { - uint64_t idx = hash(key); - uint64_t value = 0; - uint64_t mtx_wait_starttime = get_sys_clock(); - pthread_mutex_lock(&table[idx].mtx); - INC_STATS(thd_id,mtx[36],get_sys_clock() - mtx_wait_starttime); - TimeTableEntry* entry = find(key); - if(entry) { - value = entry->lower; - } - pthread_mutex_unlock(&table[idx].mtx); - return value; -} - -uint64_t TimeTable::get_upper(uint64_t thd_id, uint64_t key) { - uint64_t idx = hash(key); - uint64_t value = UINT64_MAX; - uint64_t mtx_wait_starttime = get_sys_clock(); - pthread_mutex_lock(&table[idx].mtx); - INC_STATS(thd_id,mtx[37],get_sys_clock() - mtx_wait_starttime); - TimeTableEntry* entry = find(key); - if(entry) { - value = entry->upper; - } - pthread_mutex_unlock(&table[idx].mtx); - return value; -} - - -void TimeTable::set_lower(uint64_t thd_id, uint64_t key, uint64_t value) { - uint64_t idx = hash(key); - uint64_t mtx_wait_starttime = get_sys_clock(); - pthread_mutex_lock(&table[idx].mtx); - INC_STATS(thd_id,mtx[38],get_sys_clock() - mtx_wait_starttime); - TimeTableEntry* entry = find(key); - if(entry) { - entry->lower = value; - } - pthread_mutex_unlock(&table[idx].mtx); -} - -void TimeTable::set_upper(uint64_t thd_id, uint64_t key, uint64_t value) { - uint64_t idx = hash(key); - uint64_t mtx_wait_starttime = get_sys_clock(); - pthread_mutex_lock(&table[idx].mtx); - INC_STATS(thd_id,mtx[39],get_sys_clock() - mtx_wait_starttime); - TimeTableEntry* entry = find(key); - if(entry) { - entry->upper = value; - } - pthread_mutex_unlock(&table[idx].mtx); -} - -MAATState TimeTable::get_state(uint64_t thd_id, uint64_t key) { - uint64_t idx = hash(key); - MAATState state = MAAT_ABORTED; - uint64_t mtx_wait_starttime = get_sys_clock(); - pthread_mutex_lock(&table[idx].mtx); - INC_STATS(thd_id,mtx[40],get_sys_clock() - mtx_wait_starttime); - TimeTableEntry* entry = find(key); - if(entry) { - state = entry->state; - } - pthread_mutex_unlock(&table[idx].mtx); - return state; -} - -void TimeTable::set_state(uint64_t thd_id, uint64_t key, MAATState value) { - uint64_t idx = hash(key); - uint64_t mtx_wait_starttime = get_sys_clock(); - pthread_mutex_lock(&table[idx].mtx); - INC_STATS(thd_id,mtx[41],get_sys_clock() - mtx_wait_starttime); - TimeTableEntry* entry = find(key); - if(entry) { - entry->state = value; - } - pthread_mutex_unlock(&table[idx].mtx); -} diff --git a/contrib/deneva/concurrency_control/maat.h b/contrib/deneva/concurrency_control/maat.h deleted file mode 100644 index ac52d0b0..00000000 --- a/contrib/deneva/concurrency_control/maat.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _MAAT_H_ -#define _MAAT_H_ - -#include "row.h" -#include "semaphore.h" - -class TxnManager; - -enum MAATState { - MAAT_RUNNING = 0, - MAAT_VALIDATED, - MAAT_COMMITTED, - MAAT_ABORTED -}; - -class Maat { -public: - void init(); - RC validate(TxnManager * txn); - RC find_bound(TxnManager * txn); -private: - sem_t _semaphore; -}; - -struct TimeTableEntry{ - uint64_t lower; - uint64_t upper; - uint64_t key; - MAATState state; - TimeTableEntry * next; - TimeTableEntry * prev; - void init(uint64_t key) { - lower = 0; - upper = UINT64_MAX; - this->key = key; - state = MAAT_RUNNING; - next = NULL; - prev = NULL; - } -}; - -struct TimeTableNode { - TimeTableEntry * head; - TimeTableEntry * tail; - pthread_mutex_t mtx; - void init() { - head = NULL; - tail = NULL; - pthread_mutex_init(&mtx,NULL); - } -}; - -class TimeTable { -public: - void init(); - void init(uint64_t thd_id, uint64_t key); - void release(uint64_t thd_id, uint64_t key); - uint64_t get_lower(uint64_t thd_id, uint64_t key); - uint64_t get_upper(uint64_t thd_id, uint64_t key); - void set_lower(uint64_t thd_id, uint64_t key, uint64_t value); - void set_upper(uint64_t thd_id, uint64_t key, uint64_t value); - MAATState get_state(uint64_t thd_id, uint64_t key); - void set_state(uint64_t thd_id, uint64_t key, MAATState value); -private: - // hash table - uint64_t hash(uint64_t key); - uint64_t table_size; - TimeTableNode* table; - TimeTableEntry* find(uint64_t key); - - TimeTableEntry * find_entry(uint64_t id); - - sem_t _semaphore; -}; - -#endif diff --git a/contrib/deneva/concurrency_control/occ.cpp b/contrib/deneva/concurrency_control/occ.cpp deleted file mode 100644 index 9e35b332..00000000 --- a/contrib/deneva/concurrency_control/occ.cpp +++ /dev/null @@ -1,314 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "occ.h" - -#include "global.h" -#include "helper.h" -#include "manager.h" -#include "mem_alloc.h" -#include "row_occ.h" -#include "txn.h" - -set_ent::set_ent() { - set_size = 0; - txn = NULL; - rows = NULL; - next = NULL; -} - -void OptCC::init() { - sem_init(&_semaphore, 0, 1); - tnc = 0; - his_len = 0; - active_len = 0; - active = NULL; - lock_all = false; -} - -RC OptCC::validate(TxnManager * txn) { - RC rc; - uint64_t starttime = get_sys_clock(); -#if PER_ROW_VALID - rc = per_row_validate(txn); -#else - rc = central_validate(txn); -#endif - INC_STATS(txn->get_thd_id(),occ_validate_time,get_sys_clock() - starttime); - return rc; -} - -void OptCC::finish(RC rc, TxnManager * txn) { -#if PER_ROW_VALID - per_row_finish(rc,txn); -#else - central_finish(rc,txn); -#endif -} - -RC OptCC::per_row_validate(TxnManager *txn) { - RC rc = RCOK; -#if CC_ALG == OCC - // sort all rows accessed in primary key order. - for (uint64_t i = txn->get_access_cnt() - 1; i > 0; i--) { - for (uint64_t j = 0; j < i; j ++) { - int tabcmp = strcmp(txn->get_access_original_row(j)->get_table_name(), - txn->get_access_original_row(j+1)->get_table_name()); - if (tabcmp > 0 || - (tabcmp == 0 && txn->get_access_original_row(j)->get_primary_key() > - txn->get_access_original_row(j + 1)->get_primary_key())) { - txn->swap_accesses(j,j+1); - } - } - } -#if DEBUG_ASSERT - for (uint64_t i = txn->get_access_cnt() - 1; i > 0; i--) { - int tabcmp = strcmp(txn->get_access_original_row(i-1)->get_table_name(), - txn->get_access_original_row(i)->get_table_name()); - assert(tabcmp < 0 || tabcmp == 0 && txn->get_access_original_row(i)->get_primary_key() > - txn->get_access_original_row(i-1)->get_primary_key()); - } -#endif - // lock all rows in the readset and writeset. - // Validate each access - bool ok = true; - int lock_cnt = 0; - for (uint64_t i = 0; i < txn->get_access_cnt() && ok; i++) { - lock_cnt ++; - txn->get_access_original_row(i)->manager->latch(); - ok = txn->get_access_original_row(i)->manager->validate( txn->get_start_timestamp() ); - } - rc = ok ? RCOK : Abort; -#endif - return rc; -} - -RC OptCC::central_validate(TxnManager * txn) { - RC rc; - uint64_t starttime = get_sys_clock(); - uint64_t total_starttime = starttime; - uint64_t start_tn = txn->get_start_timestamp(); - uint64_t finish_tn; - //set_ent ** finish_active; - //set_ent * finish_active[f_active_len]; - uint64_t f_active_len; - bool valid = true; - // OptCC is centralized. No need to do per partition malloc. - set_ent * wset; - set_ent * rset; - get_rw_set(txn, rset, wset); - bool readonly = (wset->set_size == 0); - set_ent * his; - set_ent * ent; - int n = 0; - int stop __attribute__((unused)); - - //pthread_mutex_lock( &latch ); - sem_wait(&_semaphore); - INC_STATS(txn->get_thd_id(),occ_cs_wait_time,get_sys_clock() - starttime); - starttime = get_sys_clock(); - //finish_tn = tnc; - assert(!g_ts_batch_alloc); - finish_tn = glob_manager.get_ts(txn->get_thd_id()); - ent = active; - f_active_len = active_len; - set_ent * finish_active[f_active_len]; - //finish_active = (set_ent**) mem_allocator.alloc(sizeof(set_ent *) * f_active_len); - while (ent != NULL) { - finish_active[n++] = ent; - ent = ent->next; - } - if ( !readonly ) { - active_len ++; - STACK_PUSH(active, wset); - } - his = history; - //pthread_mutex_unlock( &latch ); - DEBUG("Start Validation %ld: start_ts %ld, finish_ts %ld, active size %ld\n", txn->get_txn_id(), - start_tn, finish_tn, f_active_len); - sem_post(&_semaphore); - INC_STATS(txn->get_thd_id(),occ_cs_time,get_sys_clock() - starttime); - starttime = get_sys_clock(); - starttime = get_sys_clock(); - - uint64_t checked = 0; - uint64_t active_checked = 0; - uint64_t hist_checked = 0; - stop = 0; - if (finish_tn > start_tn) { - while (his && his->tn > finish_tn) his = his->next; - while (his && his->tn > start_tn) { - ++hist_checked; - ++checked; - valid = test_valid(his, rset); -#if WORKLOAD == TPCC - if (valid) - valid = test_valid(his, wset); -#endif - if (!valid) { - INC_STATS(txn->get_thd_id(),occ_hist_validate_fail_time,get_sys_clock() - starttime); - goto final; - } - his = his->next; - } - } - - INC_STATS(txn->get_thd_id(),occ_hist_validate_time,get_sys_clock() - starttime); - starttime = get_sys_clock(); - stop = 1; - for (UInt32 i = 0; i < f_active_len; i++) { - set_ent * wact = finish_active[i]; - ++checked; - ++active_checked; - valid = test_valid(wact, rset); - if (valid) { - ++checked; - ++active_checked; - valid = test_valid(wact, wset); - } - if (!valid) { - INC_STATS(txn->get_thd_id(),occ_act_validate_fail_time,get_sys_clock() - starttime); - goto final; - } - } - INC_STATS(txn->get_thd_id(),occ_act_validate_time,get_sys_clock() - starttime); - starttime = get_sys_clock(); -final: - /* - if (valid) - txn->cleanup(RCOK); - */ - mem_allocator.free(rset->rows, sizeof(row_t *) * rset->set_size); - mem_allocator.free(rset, sizeof(set_ent)); - //mem_allocator.free(finish_active, sizeof(set_ent*)* f_active_len); - - - if (valid) { - rc = RCOK; - INC_STATS(txn->get_thd_id(),occ_check_cnt,checked); - } else { - //txn->cleanup(Abort); - INC_STATS(txn->get_thd_id(),occ_abort_check_cnt,checked); - rc = Abort; - // Optimization: If this is aborting, remove from active set now - sem_wait(&_semaphore); - set_ent * act = active; - set_ent * prev = NULL; - while (act != NULL && act->txn != txn) { - prev = act; - act = act->next; - } - if(act != NULL && act->txn == txn) { - if (prev != NULL) prev->next = act->next; - else active = act->next; - active_len --; - } - sem_post(&_semaphore); - } - DEBUG("End Validation %ld: active# %ld, hist# %ld\n", txn->get_txn_id(), active_checked, - hist_checked); - INC_STATS(txn->get_thd_id(),occ_validate_time,get_sys_clock() - total_starttime); - return rc; -} - -void OptCC::per_row_finish(RC rc, TxnManager * txn) { - if(rc == RCOK) { - // advance the global timestamp and get the end_ts - txn->set_end_timestamp(glob_manager.get_ts( txn->get_thd_id() )); - } -} - -void OptCC::central_finish(RC rc, TxnManager * txn) { - set_ent * wset; - set_ent * rset; - get_rw_set(txn, rset, wset); - bool readonly = (wset->set_size == 0); - - if (!readonly) { - // only update active & tnc for non-readonly transactions - uint64_t starttime = get_sys_clock(); - // pthread_mutex_lock( &latch ); - sem_wait(&_semaphore); - set_ent * act = active; - set_ent * prev = NULL; - while (act != NULL && act->txn != txn) { - prev = act; - act = act->next; - } - if(act == NULL) { - assert(rc == Abort); - //pthread_mutex_unlock( &latch ); - sem_post(&_semaphore); - return; - } - assert(act->txn == txn); - if (prev != NULL) - prev->next = act->next; - else - active = act->next; - active_len --; - if (rc == RCOK) { - // remove the assert for performance - /* - if (history) - assert(history->tn == tnc); - */ - // tnc ++; - wset->tn = glob_manager.get_ts(txn->get_thd_id()); - STACK_PUSH(history, wset); - DEBUG("occ insert history"); - his_len ++; - //mem_allocator.free(wset->rows, sizeof(row_t *) * wset->set_size); - //mem_allocator.free(wset, sizeof(set_ent)); - } - // pthread_mutex_unlock( &latch ); - sem_post(&_semaphore); - INC_STATS(txn->get_thd_id(),occ_finish_time,get_sys_clock() - starttime); - } -} - -RC OptCC::get_rw_set(TxnManager * txn, set_ent * &rset, set_ent *& wset) { - wset = (set_ent*) mem_allocator.alloc(sizeof(set_ent)); - rset = (set_ent*) mem_allocator.alloc(sizeof(set_ent)); - wset->set_size = txn->get_write_set_size(); - rset->set_size = txn->get_read_set_size(); - wset->rows = (row_t **) mem_allocator.alloc(sizeof(row_t *) * wset->set_size); - rset->rows = (row_t **) mem_allocator.alloc(sizeof(row_t *) * rset->set_size); - wset->txn = txn; - rset->txn = txn; - - UInt32 n = 0, m = 0; - for (uint64_t i = 0; i < wset->set_size + rset->set_size; i++) { - if (txn->get_access_type(i) == WR) - wset->rows[n ++] = txn->get_access_original_row(i); - else - rset->rows[m ++] = txn->get_access_original_row(i); - } - - assert(n == wset->set_size); - assert(m == rset->set_size); - return RCOK; -} - -bool OptCC::test_valid(set_ent * set1, set_ent * set2) { - for (UInt32 i = 0; i < set1->set_size; i++) - for (UInt32 j = 0; j < set2->set_size; j++) { - if (set1->rows[i] == set2->rows[j]) { - return false; - } - } - return true; -} diff --git a/contrib/deneva/concurrency_control/occ.h b/contrib/deneva/concurrency_control/occ.h deleted file mode 100644 index 0534c702..00000000 --- a/contrib/deneva/concurrency_control/occ.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _OCC_H_ -#define _OCC_H_ - -#include "row.h" -#include "semaphore.h" - -// For simplicity, the txn hisotry for OCC is oganized as follows: -// 1. history is never deleted. -// 2. hisotry forms a single directional list. -// history head -> hist_1 -> hist_2 -> hist_3 -> ... -> hist_n -// The head is always the latest and the tail the youngest. -// When history is traversed, always go from head -> tail order. - -class TxnManager; - -class set_ent{ -public: - set_ent(); - UInt64 tn; - TxnManager * txn; - UInt32 set_size; - row_t ** rows; //[MAX_WRITE_SET]; - set_ent * next; -}; - -class OptCC { -public: - void init(); - RC validate(TxnManager * txn); - void finish(RC rc, TxnManager * txn); - volatile bool lock_all; - uint64_t lock_txn_id; - -private: - // per row validation similar to Hekaton. - RC per_row_validate(TxnManager * txn); - - // parallel validation in the original OCC paper. - RC central_validate(TxnManager * txn); - void per_row_finish(RC rc, TxnManager * txn); - void central_finish(RC rc, TxnManager * txn); - bool test_valid(set_ent * set1, set_ent * set2); - RC get_rw_set(TxnManager * txni, set_ent * &rset, set_ent *& wset); - - // "history" stores write set of transactions with tn >= smallest running tn - set_ent * history; - set_ent * active; - uint64_t his_len; - uint64_t active_len; - volatile uint64_t tnc; // transaction number counter - pthread_mutex_t latch; - sem_t _semaphore; -}; - -#endif diff --git a/contrib/deneva/concurrency_control/occ_critical_section.cpp b/contrib/deneva/concurrency_control/occ_critical_section.cpp deleted file mode 100644 index 3403cc73..00000000 --- a/contrib/deneva/concurrency_control/occ_critical_section.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@ruc.edu.cn - * - */ -#include "global.h" -#include "helper.h" -#include "txn.h" -#include "occ_critical_section.h" - -void occ_cs::init() { - sem_init(&cs_semaphore, 0, 1); -} - -RC occ_cs::start_critical_section(TxnManager * txn) { - RC rc = RCOK; - sem_wait(&cs_semaphore); - LockEntry *entry = (LockEntry *)mem_allocator.alloc(sizeof(LockEntry)); - entry->txn = txn; - if (owners == NULL) { - STACK_PUSH(owners, entry); - DEBUG("OCC go into critical section %ld\n",txn->get_txn_id()); - goto scs; - } else if (owners->txn == txn) { - DEBUG("OCC wait end and go into critical section %ld\n",txn->get_txn_id()); - } else { - LIST_PUT_TAIL(waiters_head, waiters_tail, entry); - DEBUG("OCC wait for go into critical section %ld\n",txn->get_txn_id()); - rc = WAIT; - } -scs: - sem_post(&cs_semaphore); - return rc; -} - -RC occ_cs::end_critical_section(TxnManager * txn) { - RC rc = RCOK; - DEBUG("OCC want to go out from critical section %ld\n",txn->get_txn_id()); - sem_wait(&cs_semaphore); - // go out from the critical section; - if (owners->txn != txn) { - sem_post(&cs_semaphore); - return rc; - } - mem_allocator.free(owners, sizeof(LockEntry)); - owners = NULL; - DEBUG("OCC go out from critical section %ld\n",txn->get_txn_id()); - LockEntry * entry; - if (waiters_head) { - LIST_GET_HEAD(waiters_head, waiters_tail, entry); - STACK_PUSH(owners, entry); - - txn_table.restart_txn(txn->get_thd_id(), entry->txn->get_txn_id(), - entry->txn->get_batch_id()); - } - sem_post(&cs_semaphore); - return rc; -} - -bool occ_cs::check_critical_section() { - sem_wait(&cs_semaphore); - bool exist = owners == NULL; - sem_post(&cs_semaphore); - return exist; -} - -void occ_cs::set_remote_critical_section(TxnManager * txn) { - sem_wait(&cs_semaphore); - LockEntry *entry = (LockEntry *)mem_allocator.alloc(sizeof(LockEntry)); - entry->txn = txn; - if (owners == NULL) { - STACK_PUSH(owners, entry); - DEBUG("OCC remote set critical section %ld\n",txn->get_txn_id()); - } else if (owners->txn == txn) { - DEBUG("OCC remote has set critical section %ld\n",txn->get_txn_id()); - } - sem_post(&cs_semaphore); -} - -void occ_cs::unset_remote_critical_section(TxnManager * txn) { - sem_wait(&cs_semaphore); - mem_allocator.free(owners, sizeof(LockEntry)); - owners = NULL; - sem_post(&cs_semaphore); -} \ No newline at end of file diff --git a/contrib/deneva/concurrency_control/occ_critical_section.h b/contrib/deneva/concurrency_control/occ_critical_section.h deleted file mode 100644 index 70e4621f..00000000 --- a/contrib/deneva/concurrency_control/occ_critical_section.h +++ /dev/null @@ -1,58 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@ruc.edu.cn - * - */ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@ruc.edu.cn - * - */ - -#ifndef _OCC_CS_H_ -#define _OCC_CS_H_ - -#include "row.h" -#include "semaphore.h" - - -// For simplicity, the txn hisotry for OCC is oganized as follows: -// 1. history is never deleted. -// 2. hisotry forms a single directional list. -// history head -> hist_1 -> hist_2 -> hist_3 -> ... -> hist_n -// The head is always the latest and the tail the youngest. -// When history is traversed, always go from head -> tail order. - -class TxnManager; - -struct LockEntry { - TxnManager * txn; - LockEntry * next; - LockEntry * prev; -}; - -class occ_cs { -public: - void init(); - RC start_critical_section(TxnManager * txn); - RC end_critical_section(TxnManager * txn); - bool check_critical_section(); - void set_remote_critical_section(TxnManager * txn); - void unset_remote_critical_section(TxnManager * txn); -private: - sem_t cs_semaphore; - // Global verification lock of OCC - LockEntry * owners; - LockEntry * waiters_head; - LockEntry * waiters_tail; -}; - -#endif diff --git a/contrib/deneva/concurrency_control/row_lock.cpp b/contrib/deneva/concurrency_control/row_lock.cpp deleted file mode 100644 index 6d9ddf9d..00000000 --- a/contrib/deneva/concurrency_control/row_lock.cpp +++ /dev/null @@ -1,397 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "helper.h" -#include "manager.h" -#include "mem_alloc.h" -#include "row.h" -#include "txn.h" -#include "row_lock.h" - -void Row_lock::init(row_t * row) { - _row = row; - owners_size = 1;//1031; - owners = NULL; - owners = (LockEntry**) mem_allocator.alloc(sizeof(LockEntry*)*owners_size); - for (uint64_t i = 0; i < owners_size; i++) owners[i] = NULL; - waiters_head = NULL; - waiters_tail = NULL; - owner_cnt = 0; - waiter_cnt = 0; - max_owner_ts = 0; - - latch = new pthread_mutex_t; - pthread_mutex_init(latch, NULL); - - lock_type = LOCK_NONE; - blatch = false; - own_starttime = 0; - -} - -RC Row_lock::lock_get(lock_t type, TxnManager * txn) { - uint64_t *txnids = NULL; - int txncnt = 0; - return lock_get(type, txn, txnids, txncnt); -} - -RC Row_lock::lock_get(lock_t type, TxnManager * txn, uint64_t* &txnids, int &txncnt) { - assert (CC_ALG == NO_WAIT || CC_ALG == WAIT_DIE || CC_ALG == CALVIN); - RC rc; - uint64_t starttime = get_sys_clock(); - uint64_t lock_get_start_time = starttime; - if (g_central_man) { - glob_manager.lock_row(_row); - } else { - uint64_t mtx_wait_starttime = get_sys_clock(); - pthread_mutex_lock( latch ); - INC_STATS(txn->get_thd_id(),mtx[17],get_sys_clock() - mtx_wait_starttime); - } - INC_STATS(txn->get_thd_id(), trans_access_lock_wait_time, get_sys_clock() - lock_get_start_time); - if(owner_cnt > 0) { - INC_STATS(txn->get_thd_id(),twopl_already_owned_cnt,1); - } - bool conflict = conflict_lock(lock_type, type); -#if TWOPL_LITE - conflict = owner_cnt > 0; -#endif - if (CC_ALG == WAIT_DIE && !conflict) { - if (waiters_head && txn->get_timestamp() < waiters_head->txn->get_timestamp()) { - conflict = true; - } - } - if (CC_ALG == CALVIN && !conflict) { - if (waiters_head) conflict = true; - } - - if (conflict) { - //printf("conflict! rid%ld txnid%ld ",_row->get_primary_key(),txn->get_txn_id()); - // Cannot be added to the owner list. - if (CC_ALG == NO_WAIT) { - rc = Abort; - DEBUG("abort %ld,%ld %ld %lx\n", txn->get_txn_id(), txn->get_batch_id(), - _row->get_primary_key(), (uint64_t)_row); - //printf("abort %ld %ld %lx\n",txn->get_txn_id(),_row->get_primary_key(),(uint64_t)_row); - goto final; - } else if (CC_ALG == WAIT_DIE) { - /////////////////////////////////////////////////////////// - // - T is the txn currently running - // IF T.ts > min ts of owners - // T can wait - // ELSE - // T should abort - ////////////////////////////////////////////////////////// - - //bool canwait = txn->get_timestamp() > max_owner_ts; - bool canwait = true; - LockEntry * en; - for(uint64_t i = 0; i < owners_size; i++) { - en = owners[i]; - while (en != NULL) { - assert(txn->get_txn_id() != en->txn->get_txn_id()); - assert(txn->get_timestamp() != en->txn->get_timestamp()); - if (txn->get_timestamp() > en->txn->get_timestamp()) { - // printf("abort %ld %ld -- %ld -- - // %f\n",txn->get_txn_id(),en->txn->get_txn_id(),_row->get_primary_key(),(float)(txn->get_timestamp() - // - en->txn->get_timestamp()) / BILLION); - INC_STATS(txn->get_thd_id(), twopl_diff_time, - (txn->get_timestamp() - en->txn->get_timestamp())); - canwait = false; - break; - } - en = en->next; - } - if (!canwait) break; - } - if (canwait) { - // insert txn to the right position - // the waiter list is always in timestamp order - LockEntry * entry = get_entry(); - entry->start_ts = get_sys_clock(); - entry->txn = txn; - entry->type = type; - entry->start_ts = get_sys_clock(); - entry->txn = txn; - entry->type = type; - LockEntry * en; - //txn->lock_ready = false; - ATOM_CAS(txn->lock_ready,1,0); - txn->incr_lr(); - en = waiters_head; - while (en != NULL && txn->get_timestamp() < en->txn->get_timestamp()) { - en = en->next; - } - if (en) { - LIST_INSERT_BEFORE(en, entry,waiters_head); - } else { - LIST_PUT_TAIL(waiters_head, waiters_tail, entry); - } - - waiter_cnt ++; - DEBUG("lk_wait (%ld,%ld): owners %d, own type %d, req type %d, key %ld %lx\n", - txn->get_txn_id(), txn->get_batch_id(), owner_cnt, lock_type, type, - _row->get_primary_key(), (uint64_t)_row); - //txn->twopl_wait_start = get_sys_clock(); - rc = WAIT; - //txn->wait_starttime = get_sys_clock(); - } else { - DEBUG("abort (%ld,%ld): owners %d, own type %d, req type %d, key %ld %lx\n", - txn->get_txn_id(), txn->get_batch_id(), owner_cnt, lock_type, type, - _row->get_primary_key(), (uint64_t)_row); - rc = Abort; - } - } else if (CC_ALG == CALVIN){ - LockEntry * entry = get_entry(); - entry->start_ts = get_sys_clock(); - entry->txn = txn; - entry->type = type; - DEBUG("lk_wait (%ld,%ld): owners %d, own type %d, req type %d, key %ld %lx\n", - txn->get_txn_id(), txn->get_batch_id(), owner_cnt, lock_type, type, - _row->get_primary_key(), (uint64_t)_row); - LIST_PUT_TAIL(waiters_head, waiters_tail, entry); - waiter_cnt ++; - /* - if (txn->twopl_wait_start == 0) { - txn->twopl_wait_start = get_sys_clock(); - } - */ - //txn->lock_ready = false; - ATOM_CAS(txn->lock_ready,true,false); - txn->incr_lr(); - rc = WAIT; - //txn->wait_starttime = get_sys_clock(); - } - } else { - DEBUG("1lock (%ld,%ld): owners %d, own type %d, req type %d, key %ld %lx\n", txn->get_txn_id(), - txn->get_batch_id(), owner_cnt, lock_type, type, _row->get_primary_key(), (uint64_t)_row); -#if DEBUG_TIMELINE - printf("LOCK %ld %ld\n",entry->txn->get_txn_id(),entry->start_ts); -#endif -#if CC_ALG != NO_WAIT - LockEntry * entry = get_entry(); - entry->type = type; - entry->start_ts = get_sys_clock(); - entry->txn = txn; - STACK_PUSH(owners[hash(txn->get_txn_id())], entry); -#endif - if(owner_cnt > 0) { - assert(type == LOCK_SH); - INC_STATS(txn->get_thd_id(),twopl_sh_bypass_cnt,1); - } - if(txn->get_timestamp() > max_owner_ts) { - max_owner_ts = txn->get_timestamp(); - } - owner_cnt ++; - if(lock_type == LOCK_NONE) { - own_starttime = get_sys_clock(); - } - lock_type = type; - rc = RCOK; - - } -final: - uint64_t curr_time = get_sys_clock(); - uint64_t timespan = curr_time - starttime; - if (rc == WAIT && txn->twopl_wait_start == 0) { - txn->twopl_wait_start = curr_time; - } - txn->txn_stats.cc_time += timespan; - txn->txn_stats.cc_time_short += timespan; - INC_STATS(txn->get_thd_id(),twopl_getlock_time,timespan); - INC_STATS(txn->get_thd_id(),twopl_getlock_cnt,1); - - if (g_central_man) - glob_manager.release_row(_row); - else - pthread_mutex_unlock( latch ); - - - return rc; -} - - -RC Row_lock::lock_release(TxnManager * txn) { - -#if CC_ALG == CALVIN - if (txn->isRecon()) { - return RCOK; - } -#endif - uint64_t starttime = get_sys_clock(); - if (g_central_man) glob_manager.lock_row(_row); - else { - uint64_t mtx_wait_starttime = get_sys_clock(); - pthread_mutex_lock( latch ); - INC_STATS(txn->get_thd_id(),mtx[18],get_sys_clock() - mtx_wait_starttime); - } - - DEBUG("unlock (%ld,%ld): owners %d, own type %d, key %ld %lx\n", txn->get_txn_id(), - txn->get_batch_id(), owner_cnt, lock_type, _row->get_primary_key(), (uint64_t)_row); - - // If CC is NO_WAIT or WAIT_DIE, txn should own this lock - // What about Calvin? -#if CC_ALG == NO_WAIT - assert(owner_cnt > 0); - owner_cnt--; - if (owner_cnt == 0) { - INC_STATS(txn->get_thd_id(),twopl_owned_cnt,1); - uint64_t endtime = get_sys_clock(); - INC_STATS(txn->get_thd_id(),twopl_owned_time,endtime - own_starttime); - if(lock_type == LOCK_SH) { - INC_STATS(txn->get_thd_id(),twopl_sh_owned_time,endtime - own_starttime); - INC_STATS(txn->get_thd_id(),twopl_sh_owned_cnt,1); - } else { - INC_STATS(txn->get_thd_id(),twopl_ex_owned_time,endtime - own_starttime); - INC_STATS(txn->get_thd_id(),twopl_ex_owned_cnt,1); - } - lock_type = LOCK_NONE; - } - -#else - - // Try to find the entry in the owners - LockEntry * en = owners[hash(txn->get_txn_id())]; - LockEntry * prev = NULL; - - while (en != NULL && en->txn != txn) { - prev = en; - en = en->next; - } - - if (en) { // find the entry in the owner list - if (prev) prev->next = en->next; - else owners[hash(txn->get_txn_id())] = en->next; - return_entry(en); - owner_cnt --; - if (owner_cnt == 0) { - INC_STATS(txn->get_thd_id(),twopl_owned_cnt,1); - uint64_t endtime = get_sys_clock(); - INC_STATS(txn->get_thd_id(),twopl_owned_time,endtime - own_starttime); - if(lock_type == LOCK_SH) { - INC_STATS(txn->get_thd_id(),twopl_sh_owned_time,endtime - own_starttime); - INC_STATS(txn->get_thd_id(),twopl_sh_owned_cnt,1); - } else { - INC_STATS(txn->get_thd_id(),twopl_ex_owned_time,endtime - own_starttime); - INC_STATS(txn->get_thd_id(),twopl_ex_owned_cnt,1); - } - lock_type = LOCK_NONE; - } - - } else { - assert(false); - en = waiters_head; - while (en != NULL && en->txn != txn) en = en->next; - ASSERT(en); - - LIST_REMOVE(en); - if (en == waiters_head) waiters_head = en->next; - if (en == waiters_tail) waiters_tail = en->prev; - return_entry(en); - waiter_cnt --; - } -#endif - - if (owner_cnt == 0) ASSERT(lock_type == LOCK_NONE); -#if DEBUG_ASSERT && CC_ALG == WAIT_DIE - for (en = waiters_head; en != NULL && en->next != NULL; en = en->next) - assert(en->next->txn->get_timestamp() < en->txn->get_timestamp()); - for (en = waiters_head; en != NULL && en->next != NULL; en = en->next) - assert(en->txn->get_txn_id() !=txn->get_txn_id()); -#endif - - LockEntry * entry; - // If any waiter can join the owners, just do it! - while (waiters_head && !conflict_lock(lock_type, waiters_head->type)) { - LIST_GET_HEAD(waiters_head, waiters_tail, entry); -#if DEBUG_TIMELINE - printf("LOCK %ld %ld\n",entry->txn->get_txn_id(),get_sys_clock()); -#endif - DEBUG("2lock (%ld,%ld): owners %d, own type %d, req type %d, key %ld %lx\n", - entry->txn->get_txn_id(), entry->txn->get_batch_id(), owner_cnt, lock_type, entry->type, - _row->get_primary_key(), (uint64_t)_row); - uint64_t timespan = get_sys_clock() - entry->txn->twopl_wait_start; - entry->txn->twopl_wait_start = 0; -#if CC_ALG != CALVIN - entry->txn->txn_stats.cc_block_time += timespan; - entry->txn->txn_stats.cc_block_time_short += timespan; -#endif - INC_STATS(txn->get_thd_id(),twopl_wait_time,timespan); - -#if CC_ALG != NO_WAIT - STACK_PUSH(owners[hash(entry->txn->get_txn_id())], entry); -#endif - owner_cnt ++; - waiter_cnt --; - if(entry->txn->get_timestamp() > max_owner_ts) { - max_owner_ts = entry->txn->get_timestamp(); - } - ASSERT(entry->txn->lock_ready == false); - //if(entry->txn->decr_lr() == 0 && entry->txn->locking_done) { - if(entry->txn->decr_lr() == 0) { - if(ATOM_CAS(entry->txn->lock_ready,false,true)) { -#if CC_ALG == CALVIN - entry->txn->txn_stats.cc_block_time += timespan; - entry->txn->txn_stats.cc_block_time_short += timespan; -#endif - txn_table.restart_txn(txn->get_thd_id(), entry->txn->get_txn_id(), - entry->txn->get_batch_id()); - } - } - if(lock_type == LOCK_NONE) { - own_starttime = get_sys_clock(); - } - lock_type = entry->type; -#if CC_AlG == NO_WAIT - return_entry(entry); -#endif - } - - uint64_t timespan = get_sys_clock() - starttime; - txn->txn_stats.cc_time += timespan; - txn->txn_stats.cc_time_short += timespan; - INC_STATS(txn->get_thd_id(),twopl_release_time,timespan); - INC_STATS(txn->get_thd_id(),twopl_release_cnt,1); - - if (g_central_man) - glob_manager.release_row(_row); - else - pthread_mutex_unlock( latch ); - - - return RCOK; -} - -bool Row_lock::conflict_lock(lock_t l1, lock_t l2) { - if (l1 == LOCK_NONE || l2 == LOCK_NONE) - return false; - else if (l1 == LOCK_EX || l2 == LOCK_EX) - return true; - else - return false; -} - -LockEntry * Row_lock::get_entry() { - LockEntry *entry = (LockEntry *)mem_allocator.alloc(sizeof(LockEntry)); - entry->type = LOCK_NONE; - entry->txn = NULL; - //DEBUG_M("row_lock::get_entry alloc %lx\n",(uint64_t)entry); - return entry; -} -void Row_lock::return_entry(LockEntry * entry) { - //DEBUG_M("row_lock::return_entry free %lx\n",(uint64_t)entry); - mem_allocator.free(entry, sizeof(LockEntry)); -} - diff --git a/contrib/deneva/concurrency_control/row_lock.h b/contrib/deneva/concurrency_control/row_lock.h deleted file mode 100644 index 5879b9fb..00000000 --- a/contrib/deneva/concurrency_control/row_lock.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef ROW_LOCK_H -#define ROW_LOCK_H - -struct LockEntry { - lock_t type; - ts_t start_ts; - TxnManager * txn; - LockEntry * next; - LockEntry * prev; -}; - -class Row_lock { -public: - void init(row_t * row); - // [DL_DETECT] txnids are the txn_ids that current txn is waiting for. - RC lock_get(lock_t type, TxnManager * txn); - RC lock_get(lock_t type, TxnManager * txn, uint64_t* &txnids, int &txncnt); - RC lock_release(TxnManager * txn); - -private: - pthread_mutex_t * latch; - bool blatch; - - bool conflict_lock(lock_t l1, lock_t l2); - LockEntry * get_entry(); - void return_entry(LockEntry * entry); - row_t * _row; - uint64_t hash(uint64_t id) { - return id % owners_size; - }; - lock_t lock_type; - UInt32 owner_cnt; - UInt32 waiter_cnt; - - // owners is a hash table - // waiters is a double linked list - // [waiters] head is the oldest txn, tail is the youngest txn. - // So new txns are inserted into the tail. - LockEntry ** owners; - uint64_t owners_size; - LockEntry * waiters_head; - LockEntry * waiters_tail; - uint64_t max_owner_ts; - uint64_t own_starttime; -}; - -#endif diff --git a/contrib/deneva/concurrency_control/row_maat.cpp b/contrib/deneva/concurrency_control/row_maat.cpp deleted file mode 100644 index 178553ef..00000000 --- a/contrib/deneva/concurrency_control/row_maat.cpp +++ /dev/null @@ -1,316 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "row.h" -#include "txn.h" -#include "row_maat.h" -#include "mem_alloc.h" -#include "manager.h" -#include "helper.h" -#include "maat.h" - -void Row_maat::init(row_t * row) { - _row = row; - - timestamp_last_read = 0; - timestamp_last_write = 0; - maat_avail = true; - uncommitted_writes = new std::set(); - uncommitted_reads = new std::set(); - assert(uncommitted_writes->begin() == uncommitted_writes->end()); - assert(uncommitted_writes->size() == 0); - -} - -RC Row_maat::access(access_t type, TxnManager * txn) { - uint64_t starttime = get_sys_clock(); -#if WORKLOAD == TPCC - read_and_prewrite(txn); -#else - if (type == RD) read(txn); - if (type == WR) prewrite(txn); -#endif - uint64_t timespan = get_sys_clock() - starttime; - txn->txn_stats.cc_time += timespan; - txn->txn_stats.cc_time_short += timespan; - return RCOK; -} - -RC Row_maat::read_and_prewrite(TxnManager * txn) { - assert (CC_ALG == MAAT); - RC rc = RCOK; - - uint64_t mtx_wait_starttime = get_sys_clock(); - while (!ATOM_CAS(maat_avail, true, false)) { - } - INC_STATS(txn->get_thd_id(),mtx[30],get_sys_clock() - mtx_wait_starttime); - INC_STATS(txn->get_thd_id(), trans_access_lock_wait_time, get_sys_clock() - mtx_wait_starttime); - DEBUG("READ + PREWRITE %ld -- %ld: lw %ld\n", txn->get_txn_id(), _row->get_primary_key(), - timestamp_last_write); - - // Copy uncommitted writes - for(auto it = uncommitted_writes->begin(); it != uncommitted_writes->end(); it++) { - uint64_t txn_id = *it; - txn->uncommitted_writes->insert(txn_id); - txn->uncommitted_writes_y->insert(txn_id); - DEBUG(" UW %ld -- %ld: %ld\n",txn->get_txn_id(),_row->get_primary_key(),txn_id); - } - - // Copy uncommitted reads - for(auto it = uncommitted_reads->begin(); it != uncommitted_reads->end(); it++) { - uint64_t txn_id = *it; - txn->uncommitted_reads->insert(txn_id); - DEBUG(" UR %ld -- %ld: %ld\n",txn->get_txn_id(),_row->get_primary_key(),txn_id); - } - - // Copy read timestamp - if(txn->greatest_read_timestamp < timestamp_last_read) - txn->greatest_read_timestamp = timestamp_last_read; - - - // Copy write timestamp - if(txn->greatest_write_timestamp < timestamp_last_write) - txn->greatest_write_timestamp = timestamp_last_write; - - //Add to uncommitted reads (soft lock) - uncommitted_reads->insert(txn->get_txn_id()); - - //Add to uncommitted writes (soft lock) - uncommitted_writes->insert(txn->get_txn_id()); - - ATOM_CAS(maat_avail,false,true); - - return rc; -} - -RC Row_maat::read(TxnManager * txn) { - assert (CC_ALG == MAAT); - RC rc = RCOK; - - uint64_t mtx_wait_starttime = get_sys_clock(); - while (!ATOM_CAS(maat_avail, true, false)) { - } - INC_STATS(txn->get_thd_id(),mtx[30],get_sys_clock() - mtx_wait_starttime); - INC_STATS(txn->get_thd_id(), trans_access_lock_wait_time, get_sys_clock() - mtx_wait_starttime); - DEBUG("READ %ld -- %ld: lw %ld\n", txn->get_txn_id(), _row->get_primary_key(), - timestamp_last_write); - - // Copy uncommitted writes - for(auto it = uncommitted_writes->begin(); it != uncommitted_writes->end(); it++) { - uint64_t txn_id = *it; - txn->uncommitted_writes->insert(txn_id); - DEBUG(" UW %ld -- %ld: %ld\n",txn->get_txn_id(),_row->get_primary_key(),txn_id); - } - - // Copy write timestamp - if(txn->greatest_write_timestamp < timestamp_last_write) - txn->greatest_write_timestamp = timestamp_last_write; - - //Add to uncommitted reads (soft lock) - uncommitted_reads->insert(txn->get_txn_id()); - - ATOM_CAS(maat_avail,false,true); - - return rc; -} - -RC Row_maat::prewrite(TxnManager * txn) { - assert (CC_ALG == MAAT); - RC rc = RCOK; - - uint64_t mtx_wait_starttime = get_sys_clock(); - while (!ATOM_CAS(maat_avail, true, false)) { - } - INC_STATS(txn->get_thd_id(),mtx[31],get_sys_clock() - mtx_wait_starttime); - INC_STATS(txn->get_thd_id(), trans_access_lock_wait_time, get_sys_clock() - mtx_wait_starttime); - DEBUG("PREWRITE %ld -- %ld: lw %ld, lr %ld\n", txn->get_txn_id(), _row->get_primary_key(), - timestamp_last_write, timestamp_last_read); - - // Copy uncommitted reads - for(auto it = uncommitted_reads->begin(); it != uncommitted_reads->end(); it++) { - uint64_t txn_id = *it; - txn->uncommitted_reads->insert(txn_id); - DEBUG(" UR %ld -- %ld: %ld\n",txn->get_txn_id(),_row->get_primary_key(),txn_id); - } - - // Copy uncommitted writes - for(auto it = uncommitted_writes->begin(); it != uncommitted_writes->end(); it++) { - uint64_t txn_id = *it; - txn->uncommitted_writes_y->insert(txn_id); - DEBUG(" UW %ld -- %ld: %ld\n",txn->get_txn_id(),_row->get_primary_key(),txn_id); - } - - // Copy read timestamp - if(txn->greatest_read_timestamp < timestamp_last_read) - txn->greatest_read_timestamp = timestamp_last_read; - - // Copy write timestamp - if(txn->greatest_write_timestamp < timestamp_last_write) - txn->greatest_write_timestamp = timestamp_last_write; - - //Add to uncommitted writes (soft lock) - uncommitted_writes->insert(txn->get_txn_id()); - - ATOM_CAS(maat_avail,false,true); - - return rc; -} - -RC Row_maat::abort(access_t type, TxnManager * txn) { - uint64_t mtx_wait_starttime = get_sys_clock(); - while (!ATOM_CAS(maat_avail, true, false)) { - } - INC_STATS(txn->get_thd_id(),mtx[32],get_sys_clock() - mtx_wait_starttime); - DEBUG("Maat Abort %ld: %d -- %ld\n",txn->get_txn_id(),type,_row->get_primary_key()); -#if WORKLOAD == TPCC - uncommitted_reads->erase(txn->get_txn_id()); - uncommitted_writes->erase(txn->get_txn_id()); -#else - if(type == RD) { - uncommitted_reads->erase(txn->get_txn_id()); - } - - if(type == WR) { - uncommitted_writes->erase(txn->get_txn_id()); - } -#endif - - ATOM_CAS(maat_avail,false,true); - return Abort; -} - -RC Row_maat::commit(access_t type, TxnManager * txn, row_t * data) { - uint64_t mtx_wait_starttime = get_sys_clock(); - while (!ATOM_CAS(maat_avail, true, false)) { - } - INC_STATS(txn->get_thd_id(),mtx[33],get_sys_clock() - mtx_wait_starttime); - DEBUG("Maat Commit %ld: %d,%lu -- %ld\n", txn->get_txn_id(), type, txn->get_commit_timestamp(), - _row->get_primary_key()); - -#if WORKLOAD == TPCC - if(txn->get_commit_timestamp() > timestamp_last_read) timestamp_last_read = txn->get_commit_timestamp(); - uncommitted_reads->erase(txn->get_txn_id()); - if(txn->get_commit_timestamp() > timestamp_last_write) timestamp_last_write = txn->get_commit_timestamp(); - uncommitted_writes->erase(txn->get_txn_id()); - // Apply write to DB - write(data); - - uint64_t txn_commit_ts = txn->get_commit_timestamp(); - // Forward validation - // Check uncommitted writes against this txn's - for(auto it = uncommitted_writes->begin(); it != uncommitted_writes->end();it++) { - if(txn->uncommitted_writes->count(*it) == 0) { - // apply timestamps - // these write txns need to come AFTER this txn - uint64_t it_lower = time_table.get_lower(txn->get_thd_id(),*it); - if(it_lower <= txn_commit_ts) { - time_table.set_lower(txn->get_thd_id(),*it,txn_commit_ts+1); - DEBUG("MAAT forward val set lower %ld: %lu\n",*it,txn_commit_ts+1); - } - } - } - - uint64_t lower = time_table.get_lower(txn->get_thd_id(),txn->get_txn_id()); - for(auto it = uncommitted_writes->begin(); it != uncommitted_writes->end();it++) { - if(txn->uncommitted_writes_y->count(*it) == 0) { - // apply timestamps - // these write txns need to come BEFORE this txn - uint64_t it_upper = time_table.get_upper(txn->get_thd_id(),*it); - if(it_upper >= txn_commit_ts) { - time_table.set_upper(txn->get_thd_id(),*it,txn_commit_ts-1); - DEBUG("MAAT forward val set upper %ld: %lu\n",*it,txn_commit_ts-1); - } - } - } - - for(auto it = uncommitted_reads->begin(); it != uncommitted_reads->end();it++) { - if(txn->uncommitted_reads->count(*it) == 0) { - // apply timestamps - // these write txns need to come BEFORE this txn - uint64_t it_upper = time_table.get_upper(txn->get_thd_id(),*it); - if(it_upper >= lower) { - time_table.set_upper(txn->get_thd_id(),*it,lower-1); - DEBUG("MAAT forward val set upper %ld: %lu\n",*it,lower-1); - } - } - } - -#else - uint64_t txn_commit_ts = txn->get_commit_timestamp(); - if(type == RD) { - if (txn_commit_ts > timestamp_last_read) timestamp_last_read = txn_commit_ts; - uncommitted_reads->erase(txn->get_txn_id()); - - // Forward validation - // Check uncommitted writes against this txn's - for(auto it = uncommitted_writes->begin(); it != uncommitted_writes->end();it++) { - if(txn->uncommitted_writes->count(*it) == 0) { - // apply timestamps - // these write txns need to come AFTER this txn - uint64_t it_lower = time_table.get_lower(txn->get_thd_id(),*it); - if(it_lower <= txn_commit_ts) { - time_table.set_lower(txn->get_thd_id(),*it,txn_commit_ts+1); - DEBUG("MAAT forward val set lower %ld: %lu\n",*it,txn_commit_ts+1); - } - } - } - - } - /* -#if WORKLOAD == TPCC - if(txn_commit_ts > timestamp_last_read) - timestamp_last_read = txn_commit_ts; -#endif -*/ - - if(type == WR) { - if (txn_commit_ts > timestamp_last_write) timestamp_last_write = txn_commit_ts; - uncommitted_writes->erase(txn->get_txn_id()); - // Apply write to DB - write(data); - uint64_t lower = time_table.get_lower(txn->get_thd_id(),txn->get_txn_id()); - for(auto it = uncommitted_writes->begin(); it != uncommitted_writes->end();it++) { - if(txn->uncommitted_writes_y->count(*it) == 0) { - // apply timestamps - // these write txns need to come BEFORE this txn - uint64_t it_upper = time_table.get_upper(txn->get_thd_id(),*it); - if(it_upper >= txn_commit_ts) { - time_table.set_upper(txn->get_thd_id(),*it,txn_commit_ts-1); - DEBUG("MAAT forward val set upper %ld: %lu\n",*it,txn_commit_ts-1); - } - } - } - - for(auto it = uncommitted_reads->begin(); it != uncommitted_reads->end();it++) { - if(txn->uncommitted_reads->count(*it) == 0) { - // apply timestamps - // these write txns need to come BEFORE this txn - uint64_t it_upper = time_table.get_upper(txn->get_thd_id(),*it); - if(it_upper >= lower) { - time_table.set_upper(txn->get_thd_id(),*it,lower-1); - DEBUG("MAAT forward val set upper %ld: %lu\n",*it,lower-1); - } - } - } - - } -#endif - - ATOM_CAS(maat_avail,false,true); - return RCOK; -} - -void Row_maat::write(row_t* data) { _row->copy(data); } diff --git a/contrib/deneva/concurrency_control/row_maat.h b/contrib/deneva/concurrency_control/row_maat.h deleted file mode 100644 index af9ab0b0..00000000 --- a/contrib/deneva/concurrency_control/row_maat.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef ROW_MAAT_H -#define ROW_MAAT_H - -class Row_maat { -public: - void init(row_t * row); - RC access(access_t type, TxnManager * txn); - RC read_and_prewrite(TxnManager * txn); - RC read(TxnManager * txn); - RC prewrite(TxnManager * txn); - RC abort(access_t type, TxnManager * txn); - RC commit(access_t type, TxnManager * txn, row_t * data); - void write(row_t * data); - -private: - volatile bool maat_avail; - - row_t * _row; - - std::set * uncommitted_reads; - std::set * uncommitted_writes; - uint64_t timestamp_last_read; - uint64_t timestamp_last_write; -}; - -#endif diff --git a/contrib/deneva/concurrency_control/row_mvcc.cpp b/contrib/deneva/concurrency_control/row_mvcc.cpp deleted file mode 100644 index c35cfeef..00000000 --- a/contrib/deneva/concurrency_control/row_mvcc.cpp +++ /dev/null @@ -1,380 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -//#include "mvcc.h" -#include "txn.h" -#include "row.h" -#include "manager.h" -#include "row_mvcc.h" -#include "mem_alloc.h" - -void Row_mvcc::init(row_t * row) { - _row = row; - readreq_mvcc = NULL; - prereq_mvcc = NULL; - readhis = NULL; - writehis = NULL; - readhistail = NULL; - writehistail = NULL; - blatch = false; - latch = (pthread_mutex_t *)mem_allocator.alloc(sizeof(pthread_mutex_t)); - pthread_mutex_init(latch, NULL); - whis_len = 0; - rhis_len = 0; - rreq_len = 0; - preq_len = 0; -} - -row_t * Row_mvcc::clear_history(TsType type, ts_t ts) { - MVHisEntry ** queue; - MVHisEntry ** tail; - switch (type) { - case R_REQ: - queue = &readhis; - tail = &readhistail; - break; - case W_REQ: - queue = &writehis; - tail = &writehistail; - break; - default: - assert(false); - } - MVHisEntry * his = *tail; - MVHisEntry * prev = NULL; - row_t * row = NULL; - while (his && his->prev && his->prev->ts < ts) { - prev = his->prev; - assert(prev->ts >= his->ts); - if (row != NULL) { - row->free_row(); - mem_allocator.free(row, sizeof(row_t)); - } - row = his->row; - his->row = NULL; - return_his_entry(his); - his = prev; - if (type == R_REQ) { - rhis_len--; - } else { - whis_len--; - } - } - *tail = his; - if (*tail) { - (*tail)->next = NULL; - } - if (his == NULL) { - *queue = NULL; - } - return row; -} - -MVReqEntry * Row_mvcc::get_req_entry() { - return (MVReqEntry *) mem_allocator.alloc(sizeof(MVReqEntry)); -} - -void Row_mvcc::return_req_entry(MVReqEntry * entry) { - mem_allocator.free(entry, sizeof(MVReqEntry)); -} - -MVHisEntry * Row_mvcc::get_his_entry() { - return (MVHisEntry *) mem_allocator.alloc(sizeof(MVHisEntry)); -} - -void Row_mvcc::return_his_entry(MVHisEntry * entry) { - if (entry->row != NULL) { - entry->row->free_row(); - mem_allocator.free(entry->row, sizeof(row_t)); - } - mem_allocator.free(entry, sizeof(MVHisEntry)); -} - -void Row_mvcc::buffer_req(TsType type, TxnManager *txn) { - MVReqEntry * req_entry = get_req_entry(); - assert(req_entry != NULL); - req_entry->txn = txn; - req_entry->ts = txn->get_timestamp(); - req_entry->starttime = get_sys_clock(); - if (type == R_REQ) { - rreq_len ++; - STACK_PUSH(readreq_mvcc, req_entry); - } else if (type == P_REQ) { - preq_len ++; - STACK_PUSH(prereq_mvcc, req_entry); - } -} - -// for type == R_REQ -// debuffer all non-conflicting requests -// for type == P_REQ -// debuffer the request with matching txn. -MVReqEntry * Row_mvcc::debuffer_req( TsType type, TxnManager * txn) { - MVReqEntry ** queue; - MVReqEntry * return_queue = NULL; - switch (type) { - case R_REQ: - queue = &readreq_mvcc; - break; - case P_REQ: - queue = &prereq_mvcc; - break; - default: - assert(false); - } - - MVReqEntry * req = *queue; - MVReqEntry * prev_req = NULL; - if (txn != NULL) { - assert(type == P_REQ); - while (req != NULL && req->txn != txn) { - prev_req = req; - req = req->next; - } - assert(req != NULL); - if (prev_req != NULL) - prev_req->next = req->next; - else { - assert( req == *queue ); - *queue = req->next; - } - preq_len --; - req->next = return_queue; - return_queue = req; - } else { - assert(type == R_REQ); - // should return all non-conflicting read requests - // The following code makes the assumption that each write op - // must read the row first. i.e., there is no write-only operation. - uint64_t min_pts = UINT64_MAX; - //uint64_t min_pts = (1UL << 32); - for (MVReqEntry * preq = prereq_mvcc; preq != NULL; preq = preq->next) - if (preq->ts < min_pts) min_pts = preq->ts; - while (req != NULL) { - if (req->ts <= min_pts) { - if (prev_req == NULL) { - assert(req == *queue); - *queue = (*queue)->next; - } else prev_req->next = req->next; - rreq_len --; - req->next = return_queue; - return_queue = req; - req = (prev_req == NULL)? *queue : prev_req->next; - } else { - prev_req = req; - req = req->next; - } - } - } - - return return_queue; -} - -void Row_mvcc::insert_history(ts_t ts, row_t *row) { - MVHisEntry * new_entry = get_his_entry(); - new_entry->ts = ts; - new_entry->row = row; - if (row != NULL) - whis_len ++; - else - rhis_len++; - MVHisEntry **queue = (row == NULL) ? &(readhis) : &(writehis); - MVHisEntry **tail = (row == NULL) ? &(readhistail) : &(writehistail); - MVHisEntry * his = *queue; - while (his != NULL && ts < his->ts) { - his = his->next; - } - - if (his) { - LIST_INSERT_BEFORE(his, new_entry,(*queue)); - //if (his == *queue) - // *queue = new_entry; - } else LIST_PUT_TAIL((*queue), (*tail), new_entry); -} - -bool Row_mvcc::conflict(TsType type, ts_t ts) { - // find the unique prewrite-read couple (prewrite before read) - // if no such couple found, no conflict. - // else - // if exists writehis between them, NO conflict!!!! - // else, CONFLICT!!! - ts_t rts; - ts_t pts; - if (type == R_REQ) { - rts = ts; - pts = 0; - MVReqEntry * req = prereq_mvcc; - while (req != NULL) { - if (req->ts < ts && req->ts > pts) { - pts = req->ts; - } - req = req->next; - } - if (pts == 0) // no such couple exists - return false; - } else if (type == P_REQ) { - rts = 0; - pts = ts; - MVHisEntry * his = readhis; - while (his != NULL) { - if (his->ts > ts) { - rts = his->ts; - } else - break; - his = his->next; - } - if (rts == 0) // no couple exists - return false; - assert(rts > pts); - } - MVHisEntry * whis = writehis; - while (whis != NULL && whis->ts > pts) { - if (whis->ts < rts) return false; - whis = whis->next; - } - return true; -} - -RC Row_mvcc::access(TxnManager * txn, TsType type, row_t * row) { - RC rc = RCOK; - ts_t ts = txn->get_timestamp(); - uint64_t starttime = get_sys_clock(); - - if (g_central_man) { - glob_manager.lock_row(_row); - } else { - pthread_mutex_lock(latch); - } - INC_STATS(txn->get_thd_id(), trans_access_lock_wait_time, get_sys_clock() - starttime); - uint64_t acesstime = get_sys_clock(); - if (type == R_REQ) { - // figure out if ts is in interval(prewrite(x)) - bool conf = conflict(type, ts); - if ( conf && rreq_len < g_max_read_req) { - rc = WAIT; - DEBUG("buf R_REQ %ld %ld\n",txn->get_txn_id(),_row->get_primary_key()); - buffer_req(R_REQ, txn); - txn->ts_ready = false; - } else if (conf) { - rc = Abort; - printf("\nshould never happen. rreq_len=%ld", rreq_len); - } else { - // return results immediately. - rc = RCOK; - MVHisEntry * whis = writehis; - while (whis != NULL && whis->ts > ts) whis = whis->next; - row_t *ret = (whis == NULL) ? _row : whis->row; - txn->cur_row = ret; - insert_history(ts, NULL); - assert(strstr(_row->get_table_name(), ret->get_table_name())); - } - } else if (type == P_REQ) { - if (conflict(type, ts)) { - rc = Abort; - } else if (preq_len < g_max_pre_req) { - DEBUG("buf P_REQ %ld %ld\n",txn->get_txn_id(),_row->get_primary_key()); - buffer_req(P_REQ, txn); - rc = RCOK; - } else { - rc = Abort; - } - } else if (type == W_REQ) { - rc = RCOK; - // the corresponding prewrite request is debuffered. - insert_history(ts, row); - DEBUG("debuf %ld %ld\n",txn->get_txn_id(),_row->get_primary_key()); - MVReqEntry * req = debuffer_req(P_REQ, txn); - assert(req != NULL); - return_req_entry(req); - update_buffer(txn); - } else if (type == XP_REQ) { - DEBUG("debuf %ld %ld\n",txn->get_txn_id(),_row->get_primary_key()); - MVReqEntry * req = debuffer_req(P_REQ, txn); - assert (req != NULL); - return_req_entry(req); - update_buffer(txn); - } else { - assert(false); - } - INC_STATS(txn->get_thd_id(), trans_mvcc_access, get_sys_clock() - acesstime); - if (rc == RCOK) { - uint64_t clear_his_starttime = get_sys_clock(); - if (whis_len > g_his_recycle_len || rhis_len > g_his_recycle_len) { - ts_t t_th = glob_manager.get_min_ts(txn->get_thd_id()); - if (readhistail && readhistail->ts < t_th) { - clear_history(R_REQ, t_th); - } - // Here is a tricky bug. The oldest transaction might be - // reading an even older version whose timestamp < t_th. - // But we cannot recycle that version because it is still being used. - // So the HACK here is to make sure that the first version older than - // t_th not be recycled. - if (whis_len > 1 && writehistail->prev->ts < t_th) { - row_t * latest_row = clear_history(W_REQ, t_th); - if (latest_row != NULL) { - assert(_row != latest_row); - _row->copy(latest_row); - } - } - } - uint64_t clear_his_timespan = get_sys_clock() - clear_his_starttime; - INC_STATS(txn->get_thd_id(), trans_mvcc_clear_history, clear_his_timespan); - } - - uint64_t timespan = get_sys_clock() - starttime; - txn->txn_stats.cc_time += timespan; - txn->txn_stats.cc_time_short += timespan; - - if (g_central_man) { - glob_manager.release_row(_row); - } else { - pthread_mutex_unlock(latch); - } - - return rc; -} - -void Row_mvcc::update_buffer(TxnManager * txn) { - MVReqEntry * ready_read = debuffer_req(R_REQ, NULL); - MVReqEntry * req = ready_read; - MVReqEntry * tofree = NULL; - - while (req != NULL) { - // find the version for the request - MVHisEntry * whis = writehis; - while (whis != NULL && whis->ts > req->ts) { - whis = whis->next; - } - row_t *row = (whis == NULL) ? _row : whis->row; - req->txn->cur_row = row; - insert_history(req->ts, NULL); - assert(row->get_data() != NULL); - assert(row->get_table() != NULL); - assert(row->get_schema() == _row->get_schema()); - - req->txn->ts_ready = true; - #if WORKLOAD!=DA //DA do not need restart - uint64_t timespan = get_sys_clock() - req->starttime; - req->txn->txn_stats.cc_block_time += timespan; - req->txn->txn_stats.cc_block_time_short += timespan; - txn_table.restart_txn(txn->get_thd_id(),req->txn->get_txn_id(),0); - #endif - tofree = req; - req = req->next; - // free ready_read - return_req_entry(tofree); - } -} diff --git a/contrib/deneva/concurrency_control/row_mvcc.h b/contrib/deneva/concurrency_control/row_mvcc.h deleted file mode 100644 index 2175ff03..00000000 --- a/contrib/deneva/concurrency_control/row_mvcc.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef ROW_MVCC_H -#define ROW_MVCC_H - -class table_t; -class Catalog; -class TxnManager; - -struct MVReqEntry { - TxnManager * txn; - ts_t ts; - ts_t starttime; - MVReqEntry * next; -}; - -struct MVHisEntry { - ts_t ts; - // only for write history. The value needs to be stored. -// char * data; - row_t * row; - MVHisEntry * next; - MVHisEntry * prev; -}; - - - -class Row_mvcc { -public: - void init(row_t * row); - RC access(TxnManager * txn, TsType type, row_t * row); -private: - pthread_mutex_t * latch; - bool blatch; - - row_t * _row; - MVReqEntry * get_req_entry(); - void return_req_entry(MVReqEntry * entry); - MVHisEntry * get_his_entry(); - void return_his_entry(MVHisEntry * entry); - - bool conflict(TsType type, ts_t ts); - void buffer_req(TsType type, TxnManager * txn); - MVReqEntry * debuffer_req( TsType type, TxnManager * txn = NULL); - void update_buffer(TxnManager * txn); - void insert_history( ts_t ts, row_t * row); - - row_t * clear_history(TsType type, ts_t ts); - - MVReqEntry * readreq_mvcc; - MVReqEntry * prereq_mvcc; - MVHisEntry * readhis; - MVHisEntry * writehis; - MVHisEntry * readhistail; - MVHisEntry * writehistail; - uint64_t whis_len; - uint64_t rhis_len; - uint64_t rreq_len; - uint64_t preq_len; -}; - -#endif diff --git a/contrib/deneva/concurrency_control/row_null.cpp b/contrib/deneva/concurrency_control/row_null.cpp deleted file mode 100644 index 0e4e075d..00000000 --- a/contrib/deneva/concurrency_control/row_null.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@ruc.edu.cn - * - */ - -#include "row_null.h" - -#include "helper.h" -#include "manager.h" -#include "mem_alloc.h" -#include "txn.h" - -void Row_null::init(row_t* row) { - _row = row; - blatch = false; - latch = (pthread_mutex_t*)mem_allocator.alloc(sizeof(pthread_mutex_t)); - pthread_mutex_init(latch, NULL); -} - -RC Row_null::access(TsType type, TxnManager* txn, row_t* row, uint64_t& version) { - uint64_t starttime = get_sys_clock(); - RC rc = RCOK; - // rc = read_and_write(type, txn, row, version); - row = this->_row; - uint64_t timespan = get_sys_clock() - starttime; - txn->txn_stats.cc_time += timespan; - txn->txn_stats.cc_time_short += timespan; - return rc; -} - -RC Row_null::abort(access_t type, TxnManager* txn) { - return Abort; -} - -RC Row_null::commit(access_t type, TxnManager* txn, row_t* data, uint64_t& version) { - return RCOK; -} diff --git a/contrib/deneva/concurrency_control/row_null.h b/contrib/deneva/concurrency_control/row_null.h deleted file mode 100644 index 115657aa..00000000 --- a/contrib/deneva/concurrency_control/row_null.h +++ /dev/null @@ -1,32 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@ruc.edu.cn - * - */ - -#ifndef ROW_NULL_H -#define ROW_NULL_H -#include "../storage/row.h" -class table_t; -class Catalog; -class TxnManager; - -class Row_null { -public: - void init(row_t* row); - RC access(TsType type, TxnManager* txn, row_t* row, uint64_t& version); - RC abort(access_t type, TxnManager* txn); - RC commit(access_t type, TxnManager* txn, row_t* data, uint64_t& version); - -private: - row_t* _row; - - pthread_mutex_t* latch; - bool blatch; -}; - -#endif diff --git a/contrib/deneva/concurrency_control/row_occ.cpp b/contrib/deneva/concurrency_control/row_occ.cpp deleted file mode 100644 index ed496d12..00000000 --- a/contrib/deneva/concurrency_control/row_occ.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "txn.h" -#include "row.h" -#include "row_occ.h" -#include "mem_alloc.h" - -void Row_occ::init(row_t *row) { - _row = row; - _latch = (pthread_mutex_t *)mem_allocator.alloc(sizeof(pthread_mutex_t)); - pthread_mutex_init(_latch, NULL); - sem_init(&_semaphore, 0, 1); - wts = 0; - lock_tid = 0; - blatch = false; -} - -RC Row_occ::access(TxnManager *txn, TsType type) { - RC rc = RCOK; - //pthread_mutex_lock( _latch ); - uint64_t starttime = get_sys_clock(); - sem_wait(&_semaphore); - INC_STATS(txn->get_thd_id(), trans_access_lock_wait_time, get_sys_clock() - starttime); - if (type == R_REQ) { -#if CC_ALG == FOCC - if (lock_tid != 0 && lock_tid != txn->get_txn_id()) { - rc = Abort; - } else if (txn->get_start_timestamp() < wts) { -#else - if (txn->get_start_timestamp() < wts) { -#endif - INC_STATS(txn->get_thd_id(),occ_ts_abort_cnt,1); - rc = Abort; - } else { - txn->cur_row->copy(_row); - rc = RCOK; - } - } else assert(false); - // pthread_mutex_unlock( _latch ); - sem_post(&_semaphore); - return rc; -} - -void Row_occ::latch() { - //pthread_mutex_lock( _latch ); - sem_wait(&_semaphore); -} - -bool Row_occ::validate(uint64_t ts) { - if (ts < wts) - return false; - else - return true; -} - -void Row_occ::write(row_t *data, uint64_t ts) { - _row->copy(data); - if (PER_ROW_VALID) { - assert(ts > wts); - wts = ts; - } -} - -void Row_occ::release() { - //pthread_mutex_unlock( _latch ); - sem_post(&_semaphore); -} - -/* --------------- only used for focc -----------------------*/ - -bool Row_occ::try_lock(uint64_t tid) { - bool success = true; - sem_wait(&_semaphore); - if (lock_tid == 0 || lock_tid == tid) { - lock_tid = tid; - } else success = false; - sem_post(&_semaphore); - return success; -} - -void Row_occ::release_lock(uint64_t tid) { - sem_wait(&_semaphore); - if (lock_tid == tid) { - lock_tid = 0; - } - sem_post(&_semaphore); -} - -uint64_t Row_occ::check_lock() { - sem_wait(&_semaphore); - uint64_t tid = lock_tid; - sem_post(&_semaphore); - return tid; -} - -/* --------------- only used for focc -----------------------*/ diff --git a/contrib/deneva/concurrency_control/row_occ.h b/contrib/deneva/concurrency_control/row_occ.h deleted file mode 100644 index b4549244..00000000 --- a/contrib/deneva/concurrency_control/row_occ.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef ROW_OCC_H -#define ROW_OCC_H -#include "semaphore.h" - -class table_t; -class Catalog; -class TxnManager; -struct TsReqEntry; - -class Row_occ { -public: - void init(row_t * row); - RC access(TxnManager * txn, TsType type); - void latch(); - // ts is the start_ts of the validating txn - bool validate(uint64_t ts); - void write(row_t * data, uint64_t ts); - void release(); - - /* --------------- only used for focc -----------------------*/ - bool try_lock(uint64_t tid); - void release_lock(uint64_t tid); - uint64_t check_lock(); - /* --------------- only used for focc -----------------------*/ -private: - pthread_mutex_t * _latch; - sem_t _semaphore; - bool blatch; - - row_t * _row; - // the last update time - ts_t wts; - - /* --------------- only used for focc -----------------------*/ - uint64_t lock_tid; - /* --------------- only used for focc -----------------------*/ -}; - -#endif diff --git a/contrib/deneva/concurrency_control/row_silo.cpp b/contrib/deneva/concurrency_control/row_silo.cpp deleted file mode 100644 index f1ac6e26..00000000 --- a/contrib/deneva/concurrency_control/row_silo.cpp +++ /dev/null @@ -1,157 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: zhanhaozhao@ruc.edu.cn - * - */ - -#include "txn.h" -#include "row.h" -#include "row_silo.h" -#include "mem_alloc.h" - -#if CC_ALG==SILO - -void -Row_silo::init(row_t * row) -{ - _row = row; -#if ATOMIC_WORD - _tid_word = 0; -#else - _latch = (pthread_mutex_t *) _mm_malloc(sizeof(pthread_mutex_t), 64); - pthread_mutex_init( _latch, NULL ); - _tid = 0; -#endif -} - -RC -Row_silo::access(TxnManager * txn, TsType type, row_t * local_row) { - - if (type == R_REQ) { - DEBUG("READ %ld -- %ld, table name: %s \n",txn->get_txn_id(),_row->get_primary_key(),_row->get_table_name()); - } else if (type == P_REQ) { - DEBUG("WRITE %ld -- %ld \n",txn->get_txn_id(),_row->get_primary_key()); - } - -#if ATOMIC_WORD - uint64_t v = 0; - uint64_t v2 = 1; - - while (v2 != v) { - v = _tid_word; - while (v & LOCK_BIT) { - PAUSE_SILO - v = _tid_word; - } - local_row->copy(_row); - COMPILER_BARRIER - v2 = _tid_word; - } - txn->last_tid = v & (~LOCK_BIT); -#else - if (!try_lock()) - { - return Abort; - // break; - } - DEBUG("silo %ld read lock row %ld \n", txn->get_txn_id(), _row->get_primary_key()); - local_row->copy(_row); - txn->last_tid = _tid; - release(); - DEBUG("silo %ld read release row %ld \n", txn->get_txn_id(), _row->get_primary_key()); -#endif - return RCOK; -} - -bool -Row_silo::validate(ts_t tid, bool in_write_set) { -#if ATOMIC_WORD - uint64_t v = _tid_word; - if (in_write_set) - return tid == (v & (~LOCK_BIT)); - - if (v & LOCK_BIT) - return false; - else if (tid != (v & (~LOCK_BIT))) - return false; - else - return true; -#else - if (in_write_set) - return tid == _tid; - if (!try_lock()) - return false; - - DEBUG("silo %ld validate lock row %ld \n", tid, _row->get_primary_key()); - bool valid = (tid == _tid); - release(); - DEBUG("silo %ld validate release row %ld \n", tid, _row->get_primary_key()); - return valid; -#endif -} - -void -Row_silo::write(row_t * data, uint64_t tid) { - _row->copy(data); -#if ATOMIC_WORD - uint64_t v = _tid_word; - if (tid > (v & (~LOCK_BIT)) && (v & LOCK_BIT)) - _tid_word = (tid | LOCK_BIT); -#else - _tid = tid; -#endif -} - -void -Row_silo::lock() { -#if ATOMIC_WORD - uint64_t v = _tid_word; - while ((v & LOCK_BIT) || !__sync_bool_compare_and_swap(&_tid_word, v, v | LOCK_BIT)) { - PAUSE_SILO - v = _tid_word; - } -#else - pthread_mutex_lock( _latch ); -#endif -} - -void -Row_silo::release() { -#if ATOMIC_WORD - assert(_tid_word & LOCK_BIT); - _tid_word = _tid_word & (~LOCK_BIT); -#else - pthread_mutex_unlock( _latch ); -#endif -} - -bool -Row_silo::try_lock() -{ -#if ATOMIC_WORD - uint64_t v = _tid_word; - if (v & LOCK_BIT) // already locked - return false; - return __sync_bool_compare_and_swap(&_tid_word, v, (v | LOCK_BIT)); -#else - return pthread_mutex_trylock( _latch ) != EBUSY; - -#endif -} - -uint64_t -Row_silo::get_tid() -{ -#if ATOMIC_WORD - assert(ATOMIC_WORD); - return _tid_word & (~LOCK_BIT); -#else - return _tid; -#endif -} - -#endif diff --git a/contrib/deneva/concurrency_control/row_silo.h b/contrib/deneva/concurrency_control/row_silo.h deleted file mode 100644 index 4dfeb5be..00000000 --- a/contrib/deneva/concurrency_control/row_silo.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: zhanhaozhao@ruc.edu.cn - * - */ - -#pragma once - -class table_t; -class Catalog; -class txn_man; -struct TsReqEntry; - -#if CC_ALG==SILO -#define LOCK_BIT (1UL << 63) - -class Row_silo { -public: - void init(row_t * row); - RC access(TxnManager * txn, TsType type, row_t * local_row); - - bool validate(ts_t tid, bool in_write_set); - void write(row_t * data, uint64_t tid); - - void lock(); - void release(); - bool try_lock(); - uint64_t get_tid(); -#if ATOMIC_WORD - void assert_lock() {assert(_tid_word & LOCK_BIT); } -#else - void assert_lock() { } -#endif - -private: -#if ATOMIC_WORD - volatile uint64_t _tid_word; -#else - pthread_mutex_t * _latch; - ts_t _tid; -#endif - row_t * _row; -}; - -#endif diff --git a/contrib/deneva/concurrency_control/row_ssi.cpp b/contrib/deneva/concurrency_control/row_ssi.cpp deleted file mode 100644 index de71c42d..00000000 --- a/contrib/deneva/concurrency_control/row_ssi.cpp +++ /dev/null @@ -1,428 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@tencent.com - * - */ - -#include "txn.h" -#include "row.h" -#include "manager.h" -#include "ssi.h" -#include "row_ssi.h" -#include "mem_alloc.h" - -void Row_ssi::init(row_t * row) { - _row = row; - si_read_lock = NULL; - write_lock = NULL; - - prereq_mvcc = NULL; - readhis = NULL; - writehis = NULL; - readhistail = NULL; - writehistail = NULL; - blatch = false; - latch = (pthread_mutex_t *) mem_allocator.alloc(sizeof(pthread_mutex_t)); - pthread_mutex_init(latch, NULL); - whis_len = 0; - rhis_len = 0; - - preq_len = 0; -} - -row_t * Row_ssi::clear_history(TsType type, ts_t ts) { - SSIHisEntry ** queue; - SSIHisEntry ** tail; - switch (type) { - case R_REQ: - queue = &readhis; - tail = &readhistail; - break; - case W_REQ: - queue = &writehis; - tail = &writehistail; - break; - default: - assert(false); - } - SSIHisEntry * his = *tail; - SSIHisEntry * prev = NULL; - row_t * row = NULL; - while (his && his->prev && his->prev->ts < ts) { - prev = his->prev; - assert(prev->ts >= his->ts); - if (row != NULL) { - row->free_row(); - mem_allocator.free(row, sizeof(row_t)); - } - row = his->row; - his->row = NULL; - return_his_entry(his); - his = prev; - if (type == R_REQ) rhis_len --; - else whis_len --; - } - *tail = his; - if (*tail) (*tail)->next = NULL; - if (his == NULL) *queue = NULL; - return row; -} - -SSIReqEntry * Row_ssi::get_req_entry() { - return (SSIReqEntry *) mem_allocator.alloc(sizeof(SSIReqEntry)); -} - -void Row_ssi::return_req_entry(SSIReqEntry * entry) { - mem_allocator.free(entry, sizeof(SSIReqEntry)); -} - -SSIHisEntry * Row_ssi::get_his_entry() { - return (SSIHisEntry *) mem_allocator.alloc(sizeof(SSIHisEntry)); -} - -void Row_ssi::return_his_entry(SSIHisEntry * entry) { - if (entry->row != NULL) { - entry->row->free_row(); - mem_allocator.free(entry->row, sizeof(row_t)); - } - mem_allocator.free(entry, sizeof(SSIHisEntry)); -} - -void Row_ssi::buffer_req(TsType type, TxnManager * txn) -{ - SSIReqEntry * req_entry = get_req_entry(); - assert(req_entry != NULL); - req_entry->txn = txn; - req_entry->ts = txn->get_start_timestamp(); - req_entry->starttime = get_sys_clock(); - if (type == P_REQ) { - preq_len ++; - STACK_PUSH(prereq_mvcc, req_entry); - } -} - -// for type == R_REQ -// debuffer all non-conflicting requests -// for type == P_REQ -// debuffer the request with matching txn. -SSIReqEntry * Row_ssi::debuffer_req( TsType type, TxnManager * txn) { - SSIReqEntry ** queue = &prereq_mvcc; - SSIReqEntry * return_queue = NULL; - - SSIReqEntry * req = *queue; - SSIReqEntry * prev_req = NULL; - if (txn != NULL) { - assert(type == P_REQ); - while (req != NULL && req->txn != txn) { - prev_req = req; - req = req->next; - } - assert(req != NULL); - if (prev_req != NULL) - prev_req->next = req->next; - else { - assert( req == *queue ); - *queue = req->next; - } - preq_len --; - req->next = return_queue; - return_queue = req; - } - return return_queue; -} - -void Row_ssi::insert_history(ts_t ts, TxnManager * txn, row_t * row) -{ - SSIHisEntry * new_entry = get_his_entry(); - new_entry->ts = ts; - new_entry->txn = txn->get_txn_id(); - new_entry->row = row; - if (row != NULL) { - whis_len ++; - } else { - rhis_len ++; - } - SSIHisEntry ** queue = (row == NULL)? - &(readhis) : &(writehis); - SSIHisEntry ** tail = (row == NULL)? - &(readhistail) : &(writehistail); - SSIHisEntry * his = *queue; - while (his != NULL && ts < his->ts) { - his = his->next; - } - - if (his) { - LIST_INSERT_BEFORE(his, new_entry,(*queue)); - } else - LIST_PUT_TAIL((*queue), (*tail), new_entry); -} - -SSILockEntry * Row_ssi::get_entry() { - SSILockEntry * entry = (SSILockEntry *) - mem_allocator.alloc(sizeof(SSILockEntry)); - entry->type = LOCK_NONE; - entry->txn = 0; - - return entry; -} - -void Row_ssi::get_lock(lock_t type, TxnManager * txn) { - SSILockEntry * entry = get_entry(); - entry->type = type; - entry->start_ts = get_sys_clock(); - entry->txn = txn->get_txn_id(); - if (type == LOCK_SH) - STACK_PUSH(si_read_lock, entry); - if (type == LOCK_EX) - STACK_PUSH(write_lock, entry); - if (type == LOCK_COM) - commit_lock = txn->get_txn_id(); -} - -void Row_ssi::release_lock(lock_t type, TxnManager * txn) { - if (type == LOCK_SH) { - SSILockEntry * read = si_read_lock; - SSILockEntry * pre_read = NULL; - while (read != NULL) { - if (read->txn == txn->get_txn_id()) { - assert(read != NULL); - if (pre_read != NULL) - pre_read->next = read->next; - else { - assert( read == si_read_lock ); - si_read_lock = read->next; - } - read->next = NULL; - } - pre_read = read; - read = read->next; - } - } - if (type == LOCK_EX) { - SSILockEntry * write = write_lock; - SSILockEntry * pre_write = NULL; - while (write != NULL) { - if (write->txn == txn->get_txn_id()) { - assert(write != NULL); - if (pre_write != NULL) - pre_write->next = write->next; - else { - assert( write == write_lock ); - write_lock = write->next; - } - write->next = NULL; - } - pre_write = write; - write = write->next; - } - } - if (type == LOCK_COM) { - if (commit_lock == txn->get_txn_id()) commit_lock = 0; - } -} - -RC Row_ssi::access(TxnManager * txn, TsType type, row_t * row) { - RC rc = RCOK; - ts_t ts = txn->get_commit_timestamp(); - ts_t start_ts = txn->get_start_timestamp(); - uint64_t starttime = get_sys_clock(); - txnid_t txnid = txn->get_txn_id(); - if (g_central_man) { - glob_manager.lock_row(_row); - } else { - pthread_mutex_lock(latch); - } - INC_STATS(txn->get_thd_id(), trans_access_lock_wait_time, get_sys_clock() - starttime); - if (type == R_REQ) { - // Add the si-read lock - get_lock(LOCK_SH, txn); - // Traverse the whole write lock - SSILockEntry * write = write_lock; - while (write != NULL) { - if (write->txn == txnid) { - write = write->next; - continue; - } - inout_table.set_inConflict(txn->get_thd_id(), write->txn, txnid); - inout_table.set_outConflict(txn->get_thd_id(), txnid, write->txn); - DEBUG("ssi read the write_lock in %ld out %ld\n",write->txn, txnid); - write = write->next; - } - // Read the row - rc = RCOK; - SSIHisEntry * whis = writehis; - while (whis != NULL && whis->ts > start_ts) { - whis = whis->next; - } - row_t * ret = (whis == NULL) ? _row : whis->row; - txn->cur_row = ret; - assert(strstr(_row->get_table_name(), ret->get_table_name())); - // Iterate over a version that is newer than the one you are currently reading. - whis = writehis; - while (whis != NULL && whis->ts > start_ts) { - whis = whis->next; - } - // Check to see if two RW dependencies exist. - // Add RW dependencies - whis = writehis; - while (whis != NULL && whis->ts > start_ts) { - bool out = inout_table.get_outConflict(txn->get_thd_id(),whis->txn); - if (out) { //! Abort - rc = Abort; - DEBUG("ssi txn %ld read the write_commit in %ld abort, whis_ts %ld current_start_ts %ld\n",txnid, whis->txn, inout_table.get_commit_ts(txn->get_thd_id(), whis->txn), start_ts); - goto end; - } - inout_table.set_inConflict(txn->get_thd_id(), whis->txn, txnid); - inout_table.set_outConflict(txn->get_thd_id(), txnid, whis->txn); - DEBUG("ssi read the write_commit in %ld out %ld\n",whis->txn, txnid); - whis = whis->next; - } - } else if (type == P_REQ) { - // Add the write lock - get_lock(LOCK_EX, txn); - // Traverse the whole read his - SSILockEntry * si_read = si_read_lock; - while (si_read != NULL) { - if (si_read->txn == txnid) { - si_read = si_read->next; - continue; - } - if (inout_table.get_state(txn->get_thd_id(), si_read->txn) == SSI_COMMITTED && - inout_table.get_commit_ts(txn->get_thd_id(), si_read->txn) > start_ts) { - bool in = inout_table.get_inConflict(txn->get_thd_id(), si_read->txn); - if (in) { //! Abort - rc = Abort; - DEBUG("ssi txn %ld write the read_commit in %ld abort, rhis_ts %ld current_start_ts %ld\n",txnid, si_read->txn, inout_table.get_commit_ts(txn->get_thd_id(), si_read->txn), start_ts); - goto end; - } - } - si_read = si_read->next; - } - // Traverse the whole read lock - si_read = si_read_lock; - while (si_read != NULL) { - if (si_read->txn == txnid) { - si_read = si_read->next; - continue; - } - if (inout_table.get_state(txn->get_thd_id(), si_read->txn) == SSI_ABORTED) { - si_read = si_read->next; - continue; - } - if (inout_table.get_state(txn->get_thd_id(), si_read->txn) == SSI_COMMITTED && - inout_table.get_commit_ts(txn->get_thd_id(), si_read->txn) <= start_ts) { - si_read = si_read->next; - continue; - } - inout_table.set_outConflict(txn->get_thd_id(), si_read->txn, txnid); - inout_table.set_inConflict(txn->get_thd_id(), txnid, si_read->txn); - DEBUG("ssi write the si_read_lock out %ld in %ld\n", si_read->txn, txnid); - si_read = si_read->next; - } - - if (preq_len < g_max_pre_req){ - DEBUG("buf P_REQ %ld %ld\n",txn->get_txn_id(),_row->get_primary_key()); - buffer_req(P_REQ, txn); - rc = RCOK; - } else { - rc = Abort; - } - } else if (type == W_REQ) { - rc = RCOK; - release_lock(LOCK_EX, txn); - release_lock(LOCK_COM, txn); - //TODO: here need to consider whether need to release the si-read lock. - // release_lock(LOCK_SH, txn); - - // the corresponding prewrite request is debuffered. - insert_history(ts, txn, row); - DEBUG("debuf %ld %ld\n",txn->get_txn_id(),_row->get_primary_key()); - SSIReqEntry * req = debuffer_req(P_REQ, txn); - assert(req != NULL); - return_req_entry(req); - } else if (type == XP_REQ) { - release_lock(LOCK_EX, txn); - release_lock(LOCK_COM, txn); - //TODO: here need to consider whether need to release the si-read lock. - release_lock(LOCK_SH, txn); - - DEBUG("debuf %ld %ld\n",txn->get_txn_id(),_row->get_primary_key()); - SSIReqEntry * req = debuffer_req(P_REQ, txn); - assert (req != NULL); - return_req_entry(req); - } else { - assert(false); - } - - if (rc == RCOK) { - if (whis_len > g_his_recycle_len || rhis_len > g_his_recycle_len) { - ts_t t_th = glob_manager.get_min_ts(txn->get_thd_id()); - if (readhistail && readhistail->ts < t_th) { - clear_history(R_REQ, t_th); - } - // Here is a tricky bug. The oldest transaction might be - // reading an even older version whose timestamp < t_th. - // But we cannot recycle that version because it is still being used. - // So the HACK here is to make sure that the first version older than - // t_th not be recycled. - if (whis_len > 1 && writehistail->prev->ts < t_th) { - row_t * latest_row = clear_history(W_REQ, t_th); - if (latest_row != NULL) { - assert(_row != latest_row); - _row->copy(latest_row); - } - } - } - } -end: - uint64_t timespan = get_sys_clock() - starttime; - txn->txn_stats.cc_time += timespan; - txn->txn_stats.cc_time_short += timespan; - - if (g_central_man) { - glob_manager.release_row(_row); - } else { - pthread_mutex_unlock(latch); - } - - return rc; -} - -RC Row_ssi::validate_last_commit(TxnManager * txn) { - RC rc = RCOK; - SSIHisEntry * whis = writehis; - ts_t start_ts = txn->get_start_timestamp(); - if (g_central_man) { - glob_manager.lock_row(_row); - } else { - pthread_mutex_lock(latch); - } - // INC_STATS(txn->get_thd_id(), trans_access_lock_wait_time, get_sys_clock() - starttime); - - if (commit_lock != 0 && commit_lock != txn->get_txn_id()) { - DEBUG("si last commit lock %ld, %ld\n",commit_lock, txn->get_txn_id()); - rc = Abort; - goto last_commit_end; - } - get_lock(LOCK_COM, txn); - // Iterate over a version that is newer than the one you are currently reading. - while (whis != NULL && whis->ts < start_ts) { - whis = whis->next; - } - if (whis != NULL) { - DEBUG("si last commit whis %ld, %ld, %ld\n",whis->ts, start_ts, txn->get_txn_id()); - release_lock(LOCK_COM, txn); - rc = Abort; - } -last_commit_end: - if (g_central_man) { - glob_manager.release_row(_row); - } else { - pthread_mutex_unlock(latch); - } - return rc; -} diff --git a/contrib/deneva/concurrency_control/row_ssi.h b/contrib/deneva/concurrency_control/row_ssi.h deleted file mode 100644 index b8a64c99..00000000 --- a/contrib/deneva/concurrency_control/row_ssi.h +++ /dev/null @@ -1,90 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@tencent.com - * - */ - -#ifndef ROW_SSI_H -#define ROW_SSI_H - -class table_t; -class Catalog; -class TxnManager; - -struct SSIReqEntry { - TxnManager * txn; - ts_t ts; - ts_t starttime; - SSIReqEntry * next; -}; - -struct SSIHisEntry { - // TxnManager * txn; - txnid_t txn; - ts_t ts; - // only for write history. The value needs to be stored. -// char * data; - row_t * row; - SSIHisEntry * next; - SSIHisEntry * prev; -}; - -struct SSILockEntry { - lock_t type; - ts_t start_ts; - // TxnManager * txn; - txnid_t txn; - SSILockEntry * next; - SSILockEntry * prev; -}; - -class Row_ssi { -public: - void init(row_t * row); - RC access(TxnManager * txn, TsType type, row_t * row); - RC validate_last_commit(TxnManager * txn); -private: - pthread_mutex_t * latch; - - SSILockEntry * si_read_lock; - SSILockEntry * write_lock; - - txnid_t commit_lock; - - bool blatch; - - row_t * _row; - void get_lock(lock_t type, TxnManager * txn); - void release_lock(lock_t type, TxnManager * txn); - - void insert_history(ts_t ts, TxnManager * txn, row_t * row); - - SSIReqEntry * get_req_entry(); - void return_req_entry(SSIReqEntry * entry); - SSIHisEntry * get_his_entry(); - void return_his_entry(SSIHisEntry * entry); - - bool conflict(TsType type, ts_t ts); - void buffer_req(TsType type, TxnManager * txn); - SSIReqEntry * debuffer_req( TsType type, TxnManager * txn = NULL); - - - SSILockEntry * get_entry(); - row_t * clear_history(TsType type, ts_t ts); - - SSIReqEntry * prereq_mvcc; - SSIHisEntry * readhis; - SSIHisEntry * writehis; - SSIHisEntry * readhistail; - SSIHisEntry * writehistail; - - uint64_t whis_len; - uint64_t rhis_len; - uint64_t preq_len; -}; - -#endif diff --git a/contrib/deneva/concurrency_control/row_sundial.cpp b/contrib/deneva/concurrency_control/row_sundial.cpp deleted file mode 100644 index ba9f1935..00000000 --- a/contrib/deneva/concurrency_control/row_sundial.cpp +++ /dev/null @@ -1,461 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@ruc.edu.cn - * - */ - -#include "row.h" -#include "txn.h" -#include "row_sundial.h" -#include "mem_alloc.h" -#include "manager.h" -#include "helper.h" -#include "sundial.h" -#if CC_ALG == SUNDIAL - -#if OCC_LOCK_TYPE == WAIT_DIE || OCC_WAW_LOCK -bool -Row_sundial::CompareWait::operator() (TxnManager * en1, TxnManager * en2) const -{ - return en1->get_priority() < en2->get_priority(); -} -#endif - -Row_sundial::Row_sundial(row_t * row) { - _row = row; - _latch = new pthread_mutex_t; - _blatch = false; - pthread_mutex_init( _latch, NULL ); - _wts = 0; - _rts = 0; - _ts_lock = false; - _num_remote_reads = 0; - -#if OCC_LOCK_TYPE == WAIT_DIE || OCC_WAW_LOCK - _max_num_waits = g_max_num_waits; - _lock_owner = NULL; -#endif -#if SUNDIAL_MV - _hist_wts = 0; -#endif - - _deleted = false; - _delete_timestamp = 0; -} - -void Row_sundial::init(row_t * row) { - _row = row; - _latch = new pthread_mutex_t; - _blatch = false; - pthread_mutex_init( _latch, NULL ); - _wts = 0; - _rts = 0; - _ts_lock = false; - _num_remote_reads = 0; - -#if OCC_LOCK_TYPE == WAIT_DIE || OCC_WAW_LOCK - _max_num_waits = g_max_num_waits; - _lock_owner = NULL; -#endif -#if SUNDIAL_MV - _hist_wts = 0; -#endif - - _deleted = false; - _delete_timestamp = 0; -} - -void -Row_sundial::latch() -{ - pthread_mutex_lock( _latch ); -} - -void -Row_sundial::unlatch() -{ - pthread_mutex_unlock( _latch ); -} - -RC -Row_sundial::access(access_t type, TxnManager * txn, row_t *& row, - uint64_t &wts, uint64_t &rts) { - uint64_t starttime = get_sys_clock(); - RC rc = RCOK; - if(type == RD || !OCC_WAW_LOCK) - rc = read(txn, wts, rts, true); - else if(type == WR) - rc = write(txn, wts, rts); - - uint64_t timespan = get_sys_clock() - starttime; - txn->txn_stats.cc_time += timespan; - txn->txn_stats.cc_time_short += timespan; - return rc; -} - -RC -Row_sundial::read(TxnManager * txn, - uint64_t &wts, uint64_t &rts, bool latch, bool remote) -{ - uint64_t starttime = get_sys_clock(); - if (latch) - this->latch(); - INC_STATS(txn->get_thd_id(), trans_access_lock_wait_time, get_sys_clock() - starttime); - wts = _wts; - rts = _rts; - - if (latch) - this->unlatch(); - return RCOK; -} - -RC -Row_sundial::write(TxnManager * txn, uint64_t &wts, uint64_t &rts, bool latch) -{ - RC rc = RCOK; - assert(OCC_WAW_LOCK); -#if OCC_LOCK_TYPE == NO_WAIT - if (_ts_lock) - return Abort; -#endif - uint64_t starttime = get_sys_clock(); - if (latch) - pthread_mutex_lock( _latch ); - INC_STATS(txn->get_thd_id(), trans_access_lock_wait_time, get_sys_clock() - starttime); - if (!_ts_lock) { - _ts_lock = true; - _lock_owner = txn; - } else if (_lock_owner != txn) { -#if OCC_LOCK_TYPE == NO_WAIT - rc = Abort; -#else - assert(OCC_LOCK_TYPE == WAIT_DIE); - if (_waiting_set.size() < _max_num_waits && - txn->get_priority() < _lock_owner->get_priority()) - { - _waiting_set.insert(txn); - rc = WAIT; - } else { - rc = Abort; - DEBUG("sundial abort 158 %ld,%lu -- %ld\n",txn->get_txn_id(),txn->_min_commit_ts,_row->get_primary_key()); - } -#endif - } - if (rc == RCOK) { - wts = _wts; - rts = _rts; - } - if (latch) - pthread_mutex_unlock( _latch ); - return rc; -} - -RC -Row_sundial::abort(access_t type, TxnManager * txn) { - return Abort; -} - -RC -Row_sundial::commit(access_t type, TxnManager * txn, row_t * data) { - uint64_t mtx_wait_starttime = get_sys_clock(); - - INC_STATS(txn->get_thd_id(),mtx[33],get_sys_clock() - mtx_wait_starttime); - DEBUG("sundial Commit %ld: %d,%lu -- %ld\n",txn->get_txn_id(),type,txn->_min_commit_ts,_row->get_primary_key()); - - uint64_t wts = txn->_min_commit_ts; - latch(); - if (_deleted) - assert(wts < _delete_timestamp); - _wts = wts; - _rts = wts; - _row->copy(data); - unlatch(); - - return RCOK; -} - -RC -Row_sundial::try_lock(TxnManager * txn) -{ -#if LOCK_ALL_DEBUG - printf("Trying to lock read set for txn_id %ld\n", txn_id); -#endif - RC rc = RCOK; - pthread_mutex_lock( _latch ); - assert(!OCC_WAW_LOCK); -#if OCC_LOCK_TYPE == NO_WAIT - if (!_ts_lock) { - _ts_lock = true; - rc = RCOK; - } else rc = Abort; -#elif OCC_LOCK_TYPE == WAIT_DIE - if (!_ts_lock) { - _ts_lock = true; - assert(_lock_owner == NULL); - _lock_owner = txn; - rc = RCOK; - } else { - if (txn->get_txn_id() == _lock_owner->get_txn_id()) - cout << "Error " << txn->get_txn_id() << " " << _lock_owner->get_txn_id() << endl; - // txn has higher priority, should wait. - if (_waiting_set.size() >= _max_num_waits){ - rc = Abort; - DEBUG("sundial abort 230 %ld,%lu -- %ld\n",txn->get_txn_id(),txn->_min_commit_ts,_row->get_primary_key()); - } else if (txn->get_priority() < _lock_owner->get_priority()) { - _waiting_set.insert(txn); - rc = WAIT; - } else { - rc = Abort; - DEBUG("sundial abort 236 %ld,%lu -- %ld\n",txn->get_txn_id(),txn->_min_commit_ts,_row->get_primary_key()); - } - } -#endif - pthread_mutex_unlock( _latch ); - return rc; -} - -bool -Row_sundial::try_renew(ts_t wts, ts_t rts, ts_t &new_rts) -{ - if (wts != _wts) { - if(_wts < rts) { - // report error - } - - if(_wts == rts + 1) { - // The latest version is right behind our version. - // report error - } - else { - // The latest version is right behind our version. - // report error - } - return false; - } - latch(); - if (_deleted) { - bool success = (wts == _wts && rts < _delete_timestamp); - unlatch(); - return success; - } - assert(!_deleted); - if (_ts_lock) { - // TODO. even if _ts_lock == true (meaning someone may write to the tuple soon) - // should check the lower bound of upcoming wts. Maybe we can still renew the current rts without - // hurting the upcoming write. - unlatch(); - return false; - } - - if (wts != _wts) { - if(_wts < rts) { - } - - if(_wts == rts + 1) { - // The latest version is right behind our version. - } - else { - // The latest version is right behind our version. - } - unlatch(); - return false; - } - new_rts = _rts; - if (rts > _rts) { - _rts = rts; - new_rts = rts; - } - unlatch(); - return true; -} - -void -Row_sundial::release(TxnManager * txn, RC rc) -{ - pthread_mutex_lock( _latch ); -#if !OCC_WAW_LOCK -#if OCC_LOCK_TYPE == NO_WAIT - _ts_lock = false; -#elif OCC_LOCK_TYPE == WAIT_DIE - if (rc == RCOK) - assert(_ts_lock && txn == _lock_owner); - if (txn == _lock_owner) { - if (_waiting_set.size() > 0) { - // TODO. should measure how often each case happens - if (rc == Abort) { - TxnManager * next = *_waiting_set.rbegin(); - set::iterator last = _waiting_set.end(); - last --; - _waiting_set.erase( last ); - _lock_owner = next; - next->set_txn_ready(RCOK); - } else { // rc == COMMIT - for (std::set::iterator it = _waiting_set.begin(); - it != _waiting_set.end(); it ++) { - (*it)->set_txn_ready(Abort); - } - _waiting_set.clear(); - _ts_lock = false; - _lock_owner = NULL; - } - } else { - _ts_lock = false; - _lock_owner = NULL; - } - } else { - assert(rc == Abort); - // the txn may not be in _waiting_set. - _waiting_set.erase(txn); - } - #endif -#else // OCC_WAW_LOCK - assert(OCC_WAW_LOCK); - if (txn != _lock_owner) { - _waiting_set.erase( txn ); - pthread_mutex_unlock( _latch ); - return; - } - - assert(_ts_lock); -#if OCC_LOCK_TYPE == NO_WAIT - _ts_lock = false; -#elif OCC_LOCK_TYPE == WAIT_DIE - if (_waiting_set.size() > 0) { - set::iterator last = _waiting_set.end(); - last --; - - TxnManager * next = *last; - _waiting_set.erase( last ); - _lock_owner = next; - next->_lock_acquire_time = get_sys_clock(); - if (rc == Abort) { - next->_lock_acquire_time_abort = get_sys_clock(); - next->_lock_acquire_time_commit = 0; - } else { - next->_lock_acquire_time_commit = get_sys_clock(); - next->_lock_acquire_time_abort = 0; - } - // COMPILER_BARRIER - sundial_man.set_txn_ready(RCOK, next); - } else { - _ts_lock = false; - _lock_owner = NULL; - } - #endif -#endif - pthread_mutex_unlock( _latch ); -} - -void -Row_sundial::get_ts(uint64_t &wts, uint64_t &rts) -{ - pthread_mutex_lock( _latch ); - wts = _wts; - rts = _rts; - pthread_mutex_unlock( _latch ); -} - -bool -Row_sundial::renew(ts_t wts, ts_t rts, ts_t &new_rts) // Renew without lock checking -{ -#if LOCK_ALL_BEFORE_COMMIT -#if ATOMIC_WORD - uint64_t v = _ts_word; - uint64_t lock_mask = (WRITE_PERMISSION_LOCK)? WRITE_BIT : LOCK_BIT; - if ((v & WTS_MASK) == wts && ((v & RTS_MASK) >> WTS_LEN) >= rts - wts) - return true; - if (v & lock_mask) - return false; - #if SUNDIAL_MV - COMPILER_BARRIER - uint64_t hist_wts = _hist_wts; - if (wts != (v & WTS_MASK)) { - if (wts == hist_wts && rts < (v & WTS_MASK)) { - return true; - } else { - return false; - } - } - #else - if (wts != (v & WTS_MASK)) - return false; - #endif - - ts_t delta_rts = rts - wts; - if (delta_rts < ((v & RTS_MASK) >> WTS_LEN)) // the rts has already been extended. - return true; - bool rebase = false; - if (delta_rts >= (1 << RTS_LEN)) { - rebase = true; - uint64_t delta = (delta_rts & ~((1 << RTS_LEN) - 1)); - delta_rts &= ((1 << RTS_LEN) - 1); - wts += delta; - } - uint64_t v2 = 0; - v2 |= wts; - v2 |= (delta_rts << WTS_LEN); - while (true) { - uint64_t pre_v = __sync_val_compare_and_swap(&_ts_word, v, v2); - if (pre_v == v) - return true; - v = pre_v; - if (rebase || (v & lock_mask) || (wts != (v & WTS_MASK))) - return false; - else if (rts < ((v & RTS_MASK) >> WTS_LEN)) - return true; - } - assert(false); - return false; -#else -#if SUNDIAL_MV - if (wts < _hist_wts) - return false; -#else - if (wts != _wts){ - if (_wts > rts + 1) - INC_INT_STATS(int_possibMVCC, 1); - return false; - } -#endif - pthread_mutex_lock( _latch ); - - if (wts != _wts) { -#if SUNDIAL_MV - if (wts == _hist_wts && rts < _wts) { - pthread_mutex_unlock( _latch ); - return true; - } -#endif - if (_wts > rts + 1) - INC_INT_STATS(int_possibMVCC, 1); - pthread_mutex_unlock( _latch ); - return false; - } - new_rts = _rts; - if (rts > _rts) { - _rts = rts; - new_rts = rts; - } -#if ENABLE_LOCAL_CACHING - if (_row) { - #if RO_LEASE - uint64_t max_rts = _row->get_table()->get_max_rts(); - if (max_rts > _rts) - new_rts = _rts = max_rts; - #endif - } -#endif - - pthread_mutex_unlock( _latch ); - return true; -#endif -#else - assert(false); // Should not be called if LOCK_ALL_BEFORE_COMMIT is false. -#endif -} - -#endif diff --git a/contrib/deneva/concurrency_control/row_sundial.h b/contrib/deneva/concurrency_control/row_sundial.h deleted file mode 100644 index eb02f3b3..00000000 --- a/contrib/deneva/concurrency_control/row_sundial.h +++ /dev/null @@ -1,114 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@ruc.edu.cn - * - */ - -#pragma once - -#include "global.h" -#ifndef ROW_SUNDIAL_H -#define ROW_SUNDIAL_H - -#if CC_ALG == SUNDIAL -#if WRITE_PERMISSION_LOCK - -#define LOCK_BIT (1UL << 63) -#define WRITE_BIT (1UL << 62) -#define RTS_LEN (15) -#define WTS_LEN (62 - RTS_LEN) -#define WTS_MASK ((1UL << WTS_LEN) - 1) -#define RTS_MASK (((1UL << RTS_LEN) - 1) << WTS_LEN) - -#else - -#define LOCK_BIT (1UL << 63) - -#endif - -class TxnManager; - -class Row_sundial { -public: - - Row_sundial() : Row_sundial(NULL) {}; - Row_sundial(row_t * row); - void init(row_t * row); - RC access(access_t type, TxnManager * txn, row_t *& row, - uint64_t &wts, uint64_t &rts); - RC read(TxnManager * txn, uint64_t &wts, uint64_t &rts, bool latch = true, bool remote = false); - RC write(TxnManager * txn, uint64_t &wts, uint64_t &rts, bool latch = true); - - void latch(); - void unlatch(); - - RC commit(access_t type, TxnManager * txn, row_t * data); - RC abort(access_t type, TxnManager * txn); - - void lock(); - bool try_lock(); - RC try_lock(TxnManager * txn); - void release(TxnManager * txn, RC rc); - - - - void update_ts(uint64_t cts); - - - bool try_renew(ts_t wts, ts_t rts, ts_t &new_rts); - bool renew(ts_t wts, ts_t rts, ts_t &new_rts); - - - void get_last_ts(ts_t & last_rts, ts_t & last_wts); - - ts_t get_last_rts(); - ts_t get_last_wts(); - - uint64_t get_wts() {return _wts;} - uint64_t get_rts() {return _rts;} - void get_ts(uint64_t &wts, uint64_t &rts); - void set_ts(uint64_t wts, uint64_t rts); - - TxnManager * _lock_owner; -#if OCC_LOCK_TYPE == WAIT_DIE || OCC_WAW_LOCK - - struct CompareWait { - bool operator() (TxnManager * en1, TxnManager * en2) const; - }; - std::set _waiting_set; - uint32_t _max_num_waits; -#endif - - - bool is_deleted() { return _deleted; } - void delete_row(uint64_t del_ts); - enum State { - SHARED, - EXCLUSIVE - }; - State _state; - uint32_t _owner; // host node ID - - row_t * _row; - - uint64_t _wts; // last write timestamp - uint64_t _rts; // end lease timestamp - - pthread_mutex_t * _latch; // to guarantee read/write consistency - bool _blatch; // to guarantee read/write consistency - bool _ts_lock; // wts/rts cannot be changed if _ts_lock is true. - - bool _deleted; - uint64_t _delete_timestamp; - - // for locality predictor - uint32_t _num_remote_reads; // should cache a local copy if this number is too large. -}; - - -#endif -#endif \ No newline at end of file diff --git a/contrib/deneva/concurrency_control/row_ts.cpp b/contrib/deneva/concurrency_control/row_ts.cpp deleted file mode 100644 index dc350df0..00000000 --- a/contrib/deneva/concurrency_control/row_ts.cpp +++ /dev/null @@ -1,325 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -//#include "timestamp.h" -#include "txn.h" -#include "row.h" -#include "row_ts.h" -#include "mem_alloc.h" -#include "manager.h" -#include "stdint.h" - -void Row_ts::init(row_t * row) { - _row = row; - wts = 0; - rts = 0; - min_wts = UINT64_MAX; - min_rts = UINT64_MAX; - min_pts = UINT64_MAX; - readreq = NULL; - writereq = NULL; - prereq = NULL; - preq_len = 0; - latch = (pthread_mutex_t *)mem_allocator.alloc(sizeof(pthread_mutex_t)); - pthread_mutex_init( latch, NULL ); - blatch = false; -} - -TsReqEntry * Row_ts::get_req_entry() { - return (TsReqEntry *) mem_allocator.alloc(sizeof(TsReqEntry)); -} - -void Row_ts::return_req_entry(TsReqEntry * entry) { - if (entry->row != NULL) { - entry->row->free_row(); - mem_allocator.free(entry->row, sizeof(row_t)); - } - mem_allocator.free(entry, sizeof(TsReqEntry)); -} - -void Row_ts::return_req_list(TsReqEntry * list) { - TsReqEntry * req = list; - TsReqEntry * prev = NULL; - while (req != NULL) { - prev = req; - req = req->next; - return_req_entry(prev); - } -} - -void Row_ts::buffer_req(TsType type, TxnManager *txn, row_t *row) { - TsReqEntry * req_entry = get_req_entry(); - assert(req_entry != NULL); - req_entry->txn = txn; - req_entry->row = row; - req_entry->ts = txn->get_timestamp(); - req_entry->starttime = get_sys_clock(); - if (type == R_REQ) { - req_entry->next = readreq; - readreq = req_entry; - if (req_entry->ts < min_rts) min_rts = req_entry->ts; - } else if (type == W_REQ) { - assert(row != NULL); - req_entry->next = writereq; - writereq = req_entry; - if (req_entry->ts < min_wts) min_wts = req_entry->ts; - } else if (type == P_REQ) { - preq_len ++; - req_entry->next = prereq; - prereq = req_entry; - if (req_entry->ts < min_pts) min_pts = req_entry->ts; - } -} - -TsReqEntry * Row_ts::debuffer_req(TsType type, TxnManager * txn) { - return debuffer_req(type, txn, UINT64_MAX); -} - -TsReqEntry *Row_ts::debuffer_req(TsType type, ts_t ts) { return debuffer_req(type, NULL, ts); } - -TsReqEntry * Row_ts::debuffer_req( TsType type, TxnManager * txn, ts_t ts ) { - TsReqEntry ** queue; - TsReqEntry * return_queue = NULL; - switch (type) { - case R_REQ: - queue = &readreq; - break; - case P_REQ: - queue = &prereq; - break; - case W_REQ: - queue = &writereq; - break; - default: - assert(false); - } - - TsReqEntry * req = *queue; - TsReqEntry * prev_req = NULL; - if (txn != NULL) { - while (req != NULL && req->txn != txn) { - prev_req = req; - req = req->next; - } - assert(req != NULL); - if (prev_req != NULL) - prev_req->next = req->next; - else { - assert( req == *queue ); - *queue = req->next; - } - preq_len --; - req->next = return_queue; - return_queue = req; - } else { - while (req != NULL) { - if (req->ts <= ts) { - if (prev_req == NULL) { - assert(req == *queue); - *queue = (*queue)->next; - } else { - prev_req->next = req->next; - } - req->next = return_queue; - return_queue = req; - req = (prev_req == NULL)? *queue : prev_req->next; - } else { - prev_req = req; - req = req->next; - } - } - } - return return_queue; -} - -ts_t Row_ts::cal_min(TsType type) { - // update the min_pts - TsReqEntry * queue; - switch (type) { - case R_REQ: - queue = readreq; - break; - case P_REQ: - queue = prereq; - break; - case W_REQ: - queue = writereq; - break; - default: - assert(false); - } - ts_t new_min_pts = UINT64_MAX; - TsReqEntry * req = queue; - while (req != NULL) { - if (req->ts < new_min_pts) new_min_pts = req->ts; - req = req->next; - } - return new_min_pts; -} - -RC Row_ts::access(TxnManager * txn, TsType type, row_t * row) { - RC rc; - uint64_t starttime = get_sys_clock(); - ts_t ts = txn->get_timestamp(); - if (g_central_man) - glob_manager.lock_row(_row); - else - pthread_mutex_lock( latch ); - INC_STATS(txn->get_thd_id(), trans_access_lock_wait_time, get_sys_clock() - starttime); - if (type == R_REQ) { - if (ts < wts) { // read would occur before most recent write - rc = Abort; - } else if (ts > min_pts) { // read would occur after one of the prereqs already queued - // insert the req into the read request queue - buffer_req(R_REQ, txn, NULL); - txn->ts_ready = false; - rc = WAIT; - } else { // read is ok - // return the value. - txn->cur_row->copy(_row); - if (rts < ts) rts = ts; - rc = RCOK; - } - } else if (type == P_REQ) { - if (ts < rts) { // pre-write would occur before most recent read - rc = Abort; - } else { -#if TS_TWR - buffer_req(P_REQ, txn, NULL); - rc = RCOK; -#else - if (ts < wts) { //pre-write would occur before most recent write - rc = Abort; - } else { // pre-write is ok - //printf("Buffer P_REQ %ld\n",txn->txn_id); - buffer_req(P_REQ, txn, NULL); - rc = RCOK; - } -#endif - } - } else if (type == W_REQ) { - // write requests are always accepted. - rc = RCOK; -#if TS_TWR - // according to TWR, this write is already stale, ignore. - if (ts < wts) { - TsReqEntry * req = debuffer_req(P_REQ, txn); - assert(req != NULL); - update_buffer(txn->get_thd_id()); - return_req_entry(req); - row->free_row(); - mem_allocator.free(row, sizeof(row_t)); - goto final; - } -#else - if (ts > min_pts) { // write should happen after older writes are processed - buffer_req(W_REQ, txn, row); - goto final; - } -#endif - if (ts > min_rts) { // write should happen after older reads are processed - row = txn->cur_row; - buffer_req(W_REQ, txn, row); - goto final; - } else { // write is ok; - // the write is output. - _row->copy(row); - if (wts < ts) wts = ts; - // debuffer the P_REQ - TsReqEntry * req = debuffer_req(P_REQ, txn); - assert(req != NULL); - update_buffer(txn->get_thd_id()); - return_req_entry(req); - // the "row" is freed after hard copy to "_row" - row->free_row(); - mem_allocator.free(row, sizeof(row_t)); - } - } else if (type == XP_REQ) { - TsReqEntry * req = debuffer_req(P_REQ, txn); - assert (req != NULL); - update_buffer(txn->get_thd_id()); - return_req_entry(req); - } else assert(false); - -final: - uint64_t timespan = get_sys_clock() - starttime; - txn->txn_stats.cc_time += timespan; - txn->txn_stats.cc_time_short += timespan; - if (g_central_man) - glob_manager.release_row(_row); - else - pthread_mutex_unlock( latch ); - return rc; -} - -void Row_ts::update_buffer(uint64_t thd_id) { - - while (true) { - ts_t new_min_pts = cal_min(P_REQ); - assert(new_min_pts >= min_pts); - if (new_min_pts > min_pts) - min_pts = new_min_pts; - else - break; // min_pts is not updated. - // debuffer readreq. ready_read can be a list - TsReqEntry * ready_read = debuffer_req(R_REQ, min_pts); - if (ready_read == NULL) break; - // for each debuffered readreq, perform read. - TsReqEntry * req = ready_read; - while (req != NULL) { - req->txn->cur_row->copy(_row); - if (rts < req->ts) { - rts = req->ts; - } - req->txn->ts_ready = true; - uint64_t timespan = get_sys_clock() - req->starttime; - req->txn->txn_stats.cc_block_time += timespan; - req->txn->txn_stats.cc_block_time_short += timespan; - #if WORKLOAD!=DA - txn_table.restart_txn(thd_id,req->txn->get_txn_id(),0); - #endif - req = req->next; - } - // return all the req_entry back to freelist - return_req_list(ready_read); - // re-calculate min_rts - ts_t new_min_rts = cal_min(R_REQ); - if (new_min_rts > min_rts) - min_rts = new_min_rts; - else - break; - // debuffer writereq - TsReqEntry * ready_write = debuffer_req(W_REQ, min_rts); - if (ready_write == NULL) break; - ts_t young_ts = UINT64_MAX; - TsReqEntry * young_req = NULL; - req = ready_write; - while (req != NULL) { - TsReqEntry * tmp_req = debuffer_req(P_REQ, req->txn); - assert(tmp_req != NULL); - return_req_entry(tmp_req); - if (req->ts < young_ts) { - young_ts = req->ts; - young_req = req; - } //else loser = req; - req = req->next; - } - // perform write. - _row->copy(young_req->row); - if (wts < young_req->ts) wts = young_req->ts; - return_req_list(ready_write); - } -} diff --git a/contrib/deneva/concurrency_control/row_ts.h b/contrib/deneva/concurrency_control/row_ts.h deleted file mode 100644 index 30bd827c..00000000 --- a/contrib/deneva/concurrency_control/row_ts.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef ROW_TS_H -#define ROW_TS_H - -class table_t; -class Catalog; -class TxnManager; -struct TsReqEntry { - TxnManager * txn; - // for write requests, need to have a copy of the data to write. - row_t * row; - itemid_t * item; - ts_t ts; - uint64_t starttime; - TsReqEntry * next; -}; - -class Row_ts { -public: - void init(row_t * row); - RC access(TxnManager * txn, TsType type, row_t * row); - -private: - pthread_mutex_t * latch; - bool blatch; - - void buffer_req(TsType type, TxnManager * txn, row_t * row); - TsReqEntry * debuffer_req(TsType type, TxnManager * txn); - TsReqEntry * debuffer_req(TsType type, ts_t ts); - TsReqEntry * debuffer_req(TsType type, TxnManager * txn, ts_t ts); - void update_buffer(uint64_t thd_id); - ts_t cal_min(TsType type); - TsReqEntry * get_req_entry(); - void return_req_entry(TsReqEntry * entry); - void return_req_list(TsReqEntry * list); - - row_t * _row; - ts_t wts; - ts_t rts; - ts_t min_wts; - ts_t min_rts; - ts_t min_pts; - - TsReqEntry * readreq; - TsReqEntry * writereq; - TsReqEntry * prereq; - uint64_t preq_len; -}; - -#endif diff --git a/contrib/deneva/concurrency_control/row_wsi.cpp b/contrib/deneva/concurrency_control/row_wsi.cpp deleted file mode 100644 index 4aa00b96..00000000 --- a/contrib/deneva/concurrency_control/row_wsi.cpp +++ /dev/null @@ -1,253 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@ruc.edu.cn - * - */ - -#include "txn.h" -#include "row.h" -#include "helper.h" -#include "manager.h" -#include "row_wsi.h" -#include "mem_alloc.h" - -void Row_wsi::init(row_t * row) { - _row = row; - - prereq_mvcc = NULL; - readhis = NULL; - writehis = NULL; - readhistail = NULL; - writehistail = NULL; - blatch = false; - latch = (pthread_mutex_t *) mem_allocator.alloc(sizeof(pthread_mutex_t)); - pthread_mutex_init(latch, NULL); - whis_len = 0; - rhis_len = 0; - lastCommit = 0; - preq_len = 0; -} - -void -Row_wsi::update_last_commit(uint64_t ts) { - if (lastCommit < ts) lastCommit = ts; -} - -row_t * Row_wsi::clear_history(TsType type, ts_t ts) { - WSIHisEntry ** queue; - WSIHisEntry ** tail; - switch (type) { - case R_REQ: - queue = &readhis; - tail = &readhistail; - break; - case W_REQ: - queue = &writehis; - tail = &writehistail; - break; - default: - assert(false); - } - WSIHisEntry * his = *tail; - WSIHisEntry * prev = NULL; - row_t * row = NULL; - while (his && his->prev && his->prev->ts < ts) { - prev = his->prev; - assert(prev->ts >= his->ts); - if (row != NULL) { - row->free_row(); - mem_allocator.free(row, sizeof(row_t)); - } - row = his->row; - his->row = NULL; - return_his_entry(his); - his = prev; - if (type == R_REQ) { - rhis_len --; - } else { - whis_len --; - } - } - *tail = his; - if (*tail) { - (*tail)->next = NULL; - } - if (his == NULL) { - *queue = NULL; - } - return row; -} - -WSIReqEntry * Row_wsi::get_req_entry() { - return (WSIReqEntry *) mem_allocator.alloc(sizeof(WSIReqEntry)); -} - -void Row_wsi::return_req_entry(WSIReqEntry * entry) { - mem_allocator.free(entry, sizeof(WSIReqEntry)); -} - -WSIHisEntry * Row_wsi::get_his_entry() { - return (WSIHisEntry *) mem_allocator.alloc(sizeof(WSIHisEntry)); -} - -void Row_wsi::return_his_entry(WSIHisEntry * entry) { - if (entry->row != NULL) { - entry->row->free_row(); - mem_allocator.free(entry->row, sizeof(row_t)); - } - mem_allocator.free(entry, sizeof(WSIHisEntry)); -} - -void Row_wsi::buffer_req(TsType type, TxnManager * txn) -{ - WSIReqEntry * req_entry = get_req_entry(); - assert(req_entry != NULL); - req_entry->txn = txn; - req_entry->ts = txn->get_start_timestamp(); - req_entry->starttime = get_sys_clock(); - if (type == P_REQ) { - preq_len ++; - STACK_PUSH(prereq_mvcc, req_entry); - } -} - -// for type == R_REQ -// debuffer all non-conflicting requests -// for type == P_REQ -// debuffer the request with matching txn. -WSIReqEntry * Row_wsi::debuffer_req( TsType type, TxnManager * txn) { - WSIReqEntry ** queue = &prereq_mvcc; - WSIReqEntry * return_queue = NULL; - - WSIReqEntry * req = *queue; - WSIReqEntry * prev_req = NULL; - if (txn != NULL) { - assert(type == P_REQ); - while (req != NULL && req->txn != txn) { - prev_req = req; - req = req->next; - } - assert(req != NULL); - if (prev_req != NULL) { - prev_req->next = req->next; - } else { - assert( req == *queue ); - *queue = req->next; - } - preq_len --; - req->next = return_queue; - return_queue = req; - } - return return_queue; -} - -void Row_wsi::insert_history(ts_t ts, TxnManager * txn, row_t * row) -{ - WSIHisEntry * new_entry = get_his_entry(); - new_entry->ts = ts; - // new_entry->txnid = txn->get_txn_id(); - new_entry->row = row; - if (row != NULL) { - whis_len ++; - } else { - rhis_len ++; - } - WSIHisEntry ** queue = (row == NULL) ? &(readhis) : &(writehis); - WSIHisEntry ** tail = (row == NULL) ? &(readhistail) : &(writehistail); - WSIHisEntry * his = *queue; - while (his != NULL && ts < his->ts) { - his = his->next; - } - - if (his) { - LIST_INSERT_BEFORE(his, new_entry,(*queue)); - } else - LIST_PUT_TAIL((*queue), (*tail), new_entry); -} - -RC Row_wsi::access(TxnManager * txn, TsType type, row_t * row) { - RC rc = RCOK; - ts_t ts = txn->get_commit_timestamp(); - ts_t start_ts = txn->get_start_timestamp(); - uint64_t starttime = get_sys_clock(); - - if (g_central_man) { - glob_manager.lock_row(_row); - } else { - pthread_mutex_lock(latch); - } - INC_STATS(txn->get_thd_id(), trans_access_lock_wait_time, get_sys_clock() - starttime); - if (type == R_REQ) { - // Read the row - rc = RCOK; - WSIHisEntry * whis = writehis; - while (whis != NULL && whis->ts > start_ts) { - whis = whis->next; - } - row_t * ret = (whis == NULL) ? _row : whis->row; - txn->cur_row = ret; - insert_history(start_ts, txn, NULL); - assert(strstr(_row->get_table_name(), ret->get_table_name())); - } else if (type == P_REQ) { - if (preq_len < g_max_pre_req){ - DEBUG("buf P_REQ %ld %ld\n",txn->get_txn_id(),_row->get_primary_key()); - buffer_req(P_REQ, txn); - rc = RCOK; - } else { - rc = Abort; - } - } else if (type == W_REQ) { - rc = RCOK; - // the corresponding prewrite request is debuffered. - insert_history(ts, txn, row); - DEBUG("debuf %ld %ld\n",txn->get_txn_id(),_row->get_primary_key()); - WSIReqEntry * req = debuffer_req(P_REQ, txn); - assert(req != NULL); - return_req_entry(req); - } else if (type == XP_REQ) { - DEBUG("debuf %ld %ld\n",txn->get_txn_id(),_row->get_primary_key()); - WSIReqEntry * req = debuffer_req(P_REQ, txn); - assert (req != NULL); - return_req_entry(req); - } else { - assert(false); - } - - if (rc == RCOK) { - if (whis_len > g_his_recycle_len || rhis_len > g_his_recycle_len) { - ts_t t_th = glob_manager.get_min_ts(txn->get_thd_id()); - if (readhistail && readhistail->ts < t_th) { - clear_history(R_REQ, t_th); - } - // Here is a tricky bug. The oldest transaction might be - // reading an even older version whose timestamp < t_th. - // But we cannot recycle that version because it is still being used. - // So the HACK here is to make sure that the first version older than - // t_th not be recycled. - if (whis_len > 1 && - writehistail->prev->ts < t_th) { - row_t * latest_row = clear_history(W_REQ, t_th); - if (latest_row != NULL) { - assert(_row != latest_row); - _row->copy(latest_row); - } - } - } - } - - uint64_t timespan = get_sys_clock() - starttime; - txn->txn_stats.cc_time += timespan; - txn->txn_stats.cc_time_short += timespan; - - if (g_central_man) { - glob_manager.release_row(_row); - } else { - pthread_mutex_unlock( latch ); - } - - return rc; -} diff --git a/contrib/deneva/concurrency_control/row_wsi.h b/contrib/deneva/concurrency_control/row_wsi.h deleted file mode 100644 index 464077fd..00000000 --- a/contrib/deneva/concurrency_control/row_wsi.h +++ /dev/null @@ -1,77 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@ruc.edu.cn - * - */ - -#ifndef ROW_WSI_H -#define ROW_WSI_H - -class table_t; -class Catalog; -class TxnManager; -struct TsReqEntry; - -struct WSIReqEntry { - TxnManager * txn; - ts_t ts; - ts_t starttime; - WSIReqEntry * next; -}; - -struct WSIHisEntry { - // TxnManager * txn; - ts_t ts; - // only for write history. The value needs to be stored. -// char * data; - row_t * row; - WSIHisEntry * next; - WSIHisEntry * prev; -}; - -class Row_wsi { -public: - void init(row_t * row); - RC access(TxnManager * txn, TsType type, row_t * row); - void update_last_commit(uint64_t ts); - - uint64_t get_last_commit() { return lastCommit; } -private: - pthread_mutex_t * latch; - bool blatch; - - row_t * _row; - void get_lock(lock_t type, TxnManager * txn); - void release_lock(lock_t type, TxnManager * txn); - - void insert_history(ts_t ts, TxnManager * txn, row_t * row); - - WSIReqEntry * get_req_entry(); - void return_req_entry(WSIReqEntry * entry); - WSIHisEntry * get_his_entry(); - void return_his_entry(WSIHisEntry * entry); - - bool conflict(TsType type, ts_t ts); - void buffer_req(TsType type, TxnManager * txn); - WSIReqEntry * debuffer_req( TsType type, TxnManager * txn = NULL); - - row_t * clear_history(TsType type, ts_t ts); - - WSIReqEntry * prereq_mvcc; - WSIHisEntry * readhis; - WSIHisEntry * writehis; - WSIHisEntry * readhistail; - WSIHisEntry * writehistail; - - uint64_t whis_len; - uint64_t rhis_len; - uint64_t preq_len; - - uint64_t lastCommit; -}; - -#endif diff --git a/contrib/deneva/concurrency_control/silo.cpp b/contrib/deneva/concurrency_control/silo.cpp deleted file mode 100644 index ba2dbb94..00000000 --- a/contrib/deneva/concurrency_control/silo.cpp +++ /dev/null @@ -1,175 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: zhanhaozhao@ruc.edu.cn - * - */ - -#include "txn.h" -#include "row.h" -#include "row_silo.h" - -#if CC_ALG == SILO - -RC -TxnManager::validate_silo() -{ - RC rc = RCOK; - // lock write tuples in the primary key order. - uint64_t wr_cnt = txn->write_cnt; - // write_set = (int *) mem_allocator.alloc(sizeof(int) * wr_cnt); - int cur_wr_idx = 0; - int read_set[txn->row_cnt - txn->write_cnt]; - int cur_rd_idx = 0; - for (uint64_t rid = 0; rid < txn->row_cnt; rid ++) { - if (txn->accesses[rid]->type == WR) - write_set[cur_wr_idx ++] = rid; - else - read_set[cur_rd_idx ++] = rid; - } - - // bubble sort the write_set, in primary key order - if (wr_cnt > 1) - { - for (uint64_t i = wr_cnt - 1; i >= 1; i--) { - for (uint64_t j = 0; j < i; j++) { - if (txn->accesses[ write_set[j] ]->orig_row->get_primary_key() > - txn->accesses[ write_set[j + 1] ]->orig_row->get_primary_key()) - { - int tmp = write_set[j]; - write_set[j] = write_set[j+1]; - write_set[j+1] = tmp; - } - } - } - } - - num_locks = 0; - ts_t max_tid = 0; - bool done = false; - if (_pre_abort) { - for (uint64_t i = 0; i < wr_cnt; i++) { - row_t * row = txn->accesses[ write_set[i] ]->orig_row; - if (row->manager->get_tid() != txn->accesses[write_set[i]]->tid) { - rc = Abort; - return rc; - } - } - for (uint64_t i = 0; i < txn->row_cnt - wr_cnt; i ++) { - Access * access = txn->accesses[ read_set[i] ]; - if (access->orig_row->manager->get_tid() != txn->accesses[read_set[i]]->tid) { - rc = Abort; - return rc; - } - } - } - - // lock all rows in the write set. - if (_validation_no_wait) { - while (!done) { - num_locks = 0; - for (uint64_t i = 0; i < wr_cnt; i++) { - row_t * row = txn->accesses[ write_set[i] ]->orig_row; - if (!row->manager->try_lock()) - { - break; - } - DEBUG("silo %ld write lock row %ld \n", this->get_txn_id(), row->get_primary_key()); - row->manager->assert_lock(); - num_locks ++; - if (row->manager->get_tid() != txn->accesses[write_set[i]]->tid) - { - rc = Abort; - return rc; - } - } - if (num_locks == wr_cnt) { - DEBUG("TRY LOCK true %ld\n", get_txn_id()); - done = true; - } else { - rc = Abort; - return rc; - } - } - } else { - for (uint64_t i = 0; i < wr_cnt; i++) { - row_t * row = txn->accesses[ write_set[i] ]->orig_row; - row->manager->lock(); - DEBUG("silo %ld write lock row %ld \n", this->get_txn_id(), row->get_primary_key()); - num_locks++; - if (row->manager->get_tid() != txn->accesses[write_set[i]]->tid) { - rc = Abort; - return rc; - } - } - } - - COMPILER_BARRIER - - // validate rows in the read set - // for repeatable_read, no need to validate the read set. - for (uint64_t i = 0; i < txn->row_cnt - wr_cnt; i ++) { - Access * access = txn->accesses[ read_set[i] ]; - bool success = access->orig_row->manager->validate(access->tid, false); - if (!success) { - rc = Abort; - return rc; - } - if (access->tid > max_tid) - max_tid = access->tid; - } - // validate rows in the write set - for (uint64_t i = 0; i < wr_cnt; i++) { - Access * access = txn->accesses[ write_set[i] ]; - bool success = access->orig_row->manager->validate(access->tid, true); - if (!success) { - rc = Abort; - return rc; - } - if (access->tid > max_tid) - max_tid = access->tid; - } - - this->max_tid = max_tid; - - return rc; -} - -RC -TxnManager::finish(RC rc) -{ - if (rc == Abort) { - if (this->num_locks > get_access_cnt()) - return rc; - for (uint64_t i = 0; i < this->num_locks; i++) { - txn->accesses[ write_set[i] ]->orig_row->manager->release(); - DEBUG("silo %ld abort release row %ld \n", this->get_txn_id(), txn->accesses[ write_set[i] ]->orig_row->get_primary_key()); - } - } else { - - for (uint64_t i = 0; i < txn->write_cnt; i++) { - Access * access = txn->accesses[ write_set[i] ]; - access->orig_row->manager->write( - access->data, this->commit_timestamp ); - txn->accesses[ write_set[i] ]->orig_row->manager->release(); - DEBUG("silo %ld commit release row %ld \n", this->get_txn_id(), txn->accesses[ write_set[i] ]->orig_row->get_primary_key()); - } - } - num_locks = 0; - memset(write_set, 0, 100); - - return rc; -} - -RC -TxnManager::find_tid_silo(ts_t max_tid) -{ - if (max_tid > _cur_tid) - _cur_tid = max_tid; - return RCOK; -} - -#endif diff --git a/contrib/deneva/concurrency_control/ssi.cpp b/contrib/deneva/concurrency_control/ssi.cpp deleted file mode 100644 index fba16f7e..00000000 --- a/contrib/deneva/concurrency_control/ssi.cpp +++ /dev/null @@ -1,303 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@tencent.com - * - */ -#include "global.h" -#include "helper.h" -#include "txn.h" -#include "ssi.h" -#include "manager.h" -#include "mem_alloc.h" -#include "row_ssi.h" -#if CC_ALG == SSI - -void ssi::init() { - sem_init(&_semaphore, 0, 1); -} - -RC ssi::validate(TxnManager * txn) { - uint64_t start_time = get_sys_clock(); - uint64_t timespan; - sem_wait(&_semaphore); - - timespan = get_sys_clock() - start_time; - txn->txn_stats.cc_block_time += timespan; - txn->txn_stats.cc_block_time_short += timespan; - - start_time = get_sys_clock(); - RC rc = RCOK; - - DEBUG("SSI Validate Start %ld\n",txn->get_txn_id()); - std::set after; - std::set before; - if (inout_table.get_inConflict(txn->get_thd_id(), txn->get_txn_id()) && - inout_table.get_outConflict(txn->get_thd_id(), txn->get_txn_id())) - { - DEBUG("ssi Validate abort, %ld\n",txn->get_txn_id()); - rc = Abort; - } else { - DEBUG("ssi Validate ok %ld\n",txn->get_txn_id()); - rc = RCOK; - } - ssi_set_ent *rset, *wset; - get_rw_set(txn, rset, wset); - // si validate - - for (UInt32 i = 0; i < wset->set_size; i++) { - if (wset->rows[i]->manager->validate_last_commit(txn) == Abort) { - DEBUG("si Validate abort, %ld\n",txn->get_txn_id()); - rc = Abort; - } - } - - if (rc != Abort) DEBUG("si Validate ok, %ld\n",txn->get_txn_id()); - txn->txn_stats.cc_time += timespan; - txn->txn_stats.cc_time_short += timespan; - DEBUG("SSI Validate End %ld: %d\n",txn->get_txn_id(),rc==RCOK); - sem_post(&_semaphore); - return rc; -} - -void ssi::gene_finish_ts(TxnManager * txn) { - txn->set_commit_timestamp(glob_manager.get_ts(txn->get_thd_id())); -} - -RC ssi::get_rw_set(TxnManager * txn, ssi_set_ent * &rset, ssi_set_ent *& wset) { - wset = (ssi_set_ent*) mem_allocator.alloc(sizeof(ssi_set_ent)); - rset = (ssi_set_ent*) mem_allocator.alloc(sizeof(ssi_set_ent)); - wset->set_size = txn->get_write_set_size(); - rset->set_size = txn->get_read_set_size(); - wset->rows = (row_t **) mem_allocator.alloc(sizeof(row_t *) * wset->set_size); - rset->rows = (row_t **) mem_allocator.alloc(sizeof(row_t *) * rset->set_size); - wset->txn = txn; - rset->txn = txn; - - UInt32 n = 0, m = 0; - for (uint64_t i = 0; i < wset->set_size + rset->set_size; i++) { - if (txn->get_access_type(i) == WR) { - wset->rows[n ++] = txn->get_access_original_row(i); - } else { - rset->rows[m ++] = txn->get_access_original_row(i); - } - } - - assert(n == wset->set_size); - assert(m == rset->set_size); - return RCOK; -} -#endif - -void InOutTable::init() { - table_size = g_inflight_max + 1; - pthread_mutex_init(&mtx,NULL); - DEBUG_M("InOutTable::init table alloc\n"); - table = (InOutTableNode*) mem_allocator.alloc(sizeof(InOutTableNode) * table_size); - for(uint64_t i = 0; i < table_size;i++) { - table[i].init(); - } -} - -uint64_t InOutTable::hash(uint64_t key) { - return key % table_size; -} - -InOutTableEntry* InOutTable::find(uint64_t key) { - InOutTableEntry * entry = table[hash(key)].head; - while(entry) { - if (entry->key == key) { - break; - } - entry = entry->next; - } - return entry; -} - -void InOutTable::init(uint64_t thd_id, uint64_t key) { - uint64_t idx = hash(key); - uint64_t mtx_wait_starttime = get_sys_clock(); - pthread_mutex_lock(&table[idx].mtx); - INC_STATS(thd_id, mtx[34],get_sys_clock() - mtx_wait_starttime); - InOutTableEntry* entry = find(key); - if (!entry) { - DEBUG_M("InOutTable::init entry alloc\n"); - entry = (InOutTableEntry*) mem_allocator.alloc(sizeof(InOutTableEntry)); - entry->init(key); - LIST_PUT_TAIL(table[idx].head,table[idx].tail,entry); - } - pthread_mutex_unlock(&table[idx].mtx); -} - -void InOutTable::release(uint64_t thd_id, uint64_t key) { - uint64_t idx = hash(key); - uint64_t mtx_wait_starttime = get_sys_clock(); - pthread_mutex_lock(&table[idx].mtx); - INC_STATS(thd_id, mtx[35],get_sys_clock() - mtx_wait_starttime); - InOutTableEntry* entry = find(key); - if (entry) { - LIST_REMOVE_HT(entry,table[idx].head,table[idx].tail); - DEBUG_M("InOutTable::release entry free\n"); - mem_allocator.free(entry,sizeof(InOutTableEntry)); - } - pthread_mutex_unlock(&table[idx].mtx); -} - -bool InOutTable::get_inConflict(uint64_t thd_id, uint64_t key) { - uint64_t idx = hash(key); - bool value = 0; - uint64_t mtx_wait_starttime = get_sys_clock(); - pthread_mutex_lock(&table[idx].mtx); - INC_STATS(thd_id,mtx[36],get_sys_clock() - mtx_wait_starttime); - InOutTableEntry* entry = find(key); - if(entry) { - value = !entry->inConflict.empty(); - } - pthread_mutex_unlock(&table[idx].mtx); - return value; -} - -bool InOutTable::get_outConflict(uint64_t thd_id, uint64_t key) { - uint64_t idx = hash(key); - bool value = UINT64_MAX; - uint64_t mtx_wait_starttime = get_sys_clock(); - pthread_mutex_lock(&table[idx].mtx); - INC_STATS(thd_id,mtx[37],get_sys_clock() - mtx_wait_starttime); - InOutTableEntry* entry = find(key); - if(entry) { - value = !entry->outConflict.empty(); - } - pthread_mutex_unlock(&table[idx].mtx); - return value; -} - - -void InOutTable::set_inConflict(uint64_t thd_id, uint64_t key, uint64_t value) { - uint64_t idx = hash(key); - uint64_t mtx_wait_starttime = get_sys_clock(); - pthread_mutex_lock(&table[idx].mtx); - INC_STATS(thd_id,mtx[38],get_sys_clock() - mtx_wait_starttime); - InOutTableEntry* entry = find(key); - if(entry) { - entry->inConflict.insert(value); - } - pthread_mutex_unlock(&table[idx].mtx); -} - -void InOutTable::set_outConflict(uint64_t thd_id, uint64_t key, uint64_t value) { - uint64_t idx = hash(key); - uint64_t mtx_wait_starttime = get_sys_clock(); - pthread_mutex_lock(&table[idx].mtx); - INC_STATS(thd_id,mtx[39],get_sys_clock() - mtx_wait_starttime); - InOutTableEntry* entry = find(key); - if(entry) { - entry->outConflict.insert(value); - } - pthread_mutex_unlock(&table[idx].mtx); -} - -void InOutTable::down_inConflict(uint64_t thd_id, uint64_t key, uint64_t value) { - uint64_t idx = hash(key); - uint64_t v_idx = hash(value); - if (idx != v_idx) - pthread_mutex_lock(&table[idx].mtx); - InOutTableEntry* entry = find(key); - if(entry) { - entry->inConflict.erase(value); - } - if (idx != v_idx) - pthread_mutex_unlock(&table[idx].mtx); -} - -void InOutTable::down_outConflict(uint64_t thd_id, uint64_t key, uint64_t value) { - uint64_t idx = hash(key); - uint64_t v_idx = hash(value); - if (idx != v_idx) - pthread_mutex_lock(&table[idx].mtx); - InOutTableEntry* entry = find(key); - if(entry) { - entry->outConflict.erase(value); - } - if (idx != v_idx) - pthread_mutex_unlock(&table[idx].mtx); -} - -void InOutTable::clear_Conflict(uint64_t thd_id, uint64_t key) { - uint64_t idx = hash(key); - uint64_t mtx_wait_starttime = get_sys_clock(); - pthread_mutex_lock(&mtx); - pthread_mutex_lock(&table[idx].mtx); - INC_STATS(thd_id,mtx[38],get_sys_clock() - mtx_wait_starttime); - InOutTableEntry* entry = find(key); - if(entry) { - set::iterator iter = entry->inConflict.begin(); - while (iter != entry->inConflict.end()) - { - down_outConflict(thd_id, *iter, key); - iter++; - } - iter = entry->outConflict.begin(); - while (iter != entry->outConflict.end()) - { - down_inConflict(thd_id, *iter, key); - iter++; - } - } - pthread_mutex_unlock(&table[idx].mtx); - pthread_mutex_unlock(&mtx); -} - -SSIState InOutTable::get_state(uint64_t thd_id, uint64_t key) { - uint64_t idx = hash(key); - SSIState value = SSI_RUNNING; - uint64_t mtx_wait_starttime = get_sys_clock(); - pthread_mutex_lock(&table[idx].mtx); - INC_STATS(thd_id,mtx[37],get_sys_clock() - mtx_wait_starttime); - InOutTableEntry* entry = find(key); - if(entry) { - value = entry->state; - } - pthread_mutex_unlock(&table[idx].mtx); - return value; -} - -void InOutTable::set_state(uint64_t thd_id, uint64_t key, SSIState value) { - uint64_t idx = hash(key); - uint64_t mtx_wait_starttime = get_sys_clock(); - pthread_mutex_lock(&table[idx].mtx); - INC_STATS(thd_id,mtx[39],get_sys_clock() - mtx_wait_starttime); - InOutTableEntry* entry = find(key); - if(entry) { - entry->state = value; - } - pthread_mutex_unlock(&table[idx].mtx); -} - -uint64_t InOutTable::get_commit_ts(uint64_t thd_id, uint64_t key) { - uint64_t idx = hash(key); - uint64_t value = SSI_RUNNING; - uint64_t mtx_wait_starttime = get_sys_clock(); - pthread_mutex_lock(&table[idx].mtx); - INC_STATS(thd_id,mtx[37],get_sys_clock() - mtx_wait_starttime); - InOutTableEntry* entry = find(key); - if(entry) { - value = entry->commit_ts; - } - pthread_mutex_unlock(&table[idx].mtx); - return value; -} - -void InOutTable::set_commit_ts(uint64_t thd_id, uint64_t key, uint64_t value) { - uint64_t idx = hash(key); - uint64_t mtx_wait_starttime = get_sys_clock(); - pthread_mutex_lock(&table[idx].mtx); - INC_STATS(thd_id,mtx[39],get_sys_clock() - mtx_wait_starttime); - InOutTableEntry* entry = find(key); - if(entry) { - entry->commit_ts = value; - } - pthread_mutex_unlock(&table[idx].mtx); -} diff --git a/contrib/deneva/concurrency_control/ssi.h b/contrib/deneva/concurrency_control/ssi.h deleted file mode 100644 index 7c2f56f0..00000000 --- a/contrib/deneva/concurrency_control/ssi.h +++ /dev/null @@ -1,99 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@tencent.com - * - */ - -#ifndef _SSI_H_ -#define _SSI_H_ - -#include "row.h" -#include "semaphore.h" - -class TxnManager; -enum SSIState { SSI_RUNNING=0,SSI_COMMITTED,SSI_ABORTED}; -struct InOutTableEntry{ - std::set inConflict; - std::set outConflict; - SSIState state; - uint64_t commit_ts; - uint64_t key; - - InOutTableEntry * next; - InOutTableEntry * prev; - void init(uint64_t key) { - this->key = key; - state = SSI_RUNNING; - commit_ts = 0; - next = NULL; - prev = NULL; - } -}; - -struct InOutTableNode { - InOutTableEntry * head; - InOutTableEntry * tail; - pthread_mutex_t mtx; - void init() { - head = NULL; - tail = NULL; - pthread_mutex_init(&mtx,NULL); - } -}; - -class InOutTable { -public: - void init(); - void init(uint64_t thd_id, uint64_t key); - void release(uint64_t thd_id, uint64_t key); - bool get_inConflict(uint64_t thd_id, uint64_t key); - bool get_outConflict(uint64_t thd_id, uint64_t key); - void set_inConflict(uint64_t thd_id, uint64_t key, uint64_t value); - void down_inConflict(uint64_t thd_id, uint64_t key, uint64_t value); - - void set_outConflict(uint64_t thd_id, uint64_t key, uint64_t value); - void down_outConflict(uint64_t thd_id, uint64_t key, uint64_t value); - - void clear_Conflict(uint64_t thd_id, uint64_t key); - - SSIState get_state(uint64_t thd_id, uint64_t key); - void set_state(uint64_t thd_id, uint64_t key, SSIState value); - uint64_t get_commit_ts(uint64_t thd_id, uint64_t key); - void set_commit_ts(uint64_t thd_id, uint64_t key, uint64_t value); - - private: - // hash table - uint64_t hash(uint64_t key); - uint64_t table_size; - InOutTableNode* table; - InOutTableEntry* find(uint64_t key); - pthread_mutex_t mtx; - InOutTableEntry * find_entry(uint64_t id); - sem_t _semaphore; -}; - -class ssi_set_ent{ -public: - ssi_set_ent(); - UInt64 tn; - TxnManager * txn; - UInt32 set_size; - row_t ** rows; //[MAX_WRITE_SET]; - ssi_set_ent * next; -}; - -class ssi { -public: - void init(); - RC validate(TxnManager * txn); - void gene_finish_ts(TxnManager * txn); - RC get_rw_set(TxnManager * txn, ssi_set_ent * &rset, ssi_set_ent *& wset); -private: - sem_t _semaphore; -}; - -#endif diff --git a/contrib/deneva/concurrency_control/sundial.cpp b/contrib/deneva/concurrency_control/sundial.cpp deleted file mode 100644 index 3189ef96..00000000 --- a/contrib/deneva/concurrency_control/sundial.cpp +++ /dev/null @@ -1,258 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@ruc.edu.cn - * - */ -#include "global.h" -#if CC_ALG == SUNDIAL -#include "config.h" -#include "helper.h" -#include "txn.h" -#include "row.h" -#include "sundial.h" -#include "manager.h" -#include "mem_alloc.h" -#include "row_sundial.h" -bool Sundial::_pre_abort = PRE_ABORT; - -RC Sundial::get_rw_set(TxnManager * txn, sundial_set_ent * &rset, sundial_set_ent *& wset) { - wset = (sundial_set_ent*) mem_allocator.alloc(sizeof(sundial_set_ent)); - rset = (sundial_set_ent*) mem_allocator.alloc(sizeof(sundial_set_ent)); - wset->set_size = txn->get_write_set_size(); - rset->set_size = txn->get_read_set_size(); - wset->rows = (row_t **) mem_allocator.alloc(sizeof(row_t *) * wset->set_size); - rset->rows = (row_t **) mem_allocator.alloc(sizeof(row_t *) * rset->set_size); - wset->access = (Access **) mem_allocator.alloc(sizeof(Access *) * wset->set_size); - rset->access = (Access **) mem_allocator.alloc(sizeof(Access *) * rset->set_size); - wset->txn = txn; - rset->txn = txn; - - UInt32 n = 0, m = 0; - for (uint64_t i = 0; i < wset->set_size + rset->set_size; i++) { - if (txn->get_access_type(i) == WR){ - wset->access[n] = txn->txn->accesses[i]; - wset->rows[n] = txn->get_access_original_row(i); - n++; - } - else { - rset->access[m] = txn->txn->accesses[i]; - rset->rows[m] = txn->get_access_original_row(i); - m++; - } - } - assert(n == wset->set_size); - assert(m == rset->set_size); - - return RCOK; -} - -void Sundial::init() { - return ; -} - -RC Sundial::validate(TxnManager * txn) -{ - if (txn->_is_sub_txn) - return validate_part(txn); - else - return validate_coor(txn); -} - -RC Sundial::validate_coor(TxnManager * txn) -{ - RC rc = RCOK; - // split _access_set into read_set and write_set - sundial_set_ent * wset; - sundial_set_ent * rset; - get_rw_set(txn, rset, wset); - // 1. lock the local write set - // 2. compute commit ts - // 3. validate local txn - - // [Compute the commit timestamp] - compute_commit_ts(txn); - -#if OCC_WAW_LOCK - if (ISOLATION_LEVEL == SERIALIZABLE) - rc = validate_read_set(rset, txn, txn->_min_commit_ts); -#else - if (rc == RCOK) { - rc = lock_write_set(wset, txn); - if (rc == Abort) { - } - } - if (rc != Abort) { - RC rc2 = RCOK; - // if any rts has been updated, update _min_commit_ts. - compute_commit_ts(txn); - // at this point, _min_commit_ts is the final min_commit_ts for the prepare phase. . - if (ISOLATION_LEVEL == SERIALIZABLE) { - rc2 = validate_read_set(rset, txn, txn->_min_commit_ts); - if (rc2 == Abort) { - rc = rc2; - } - } - } -#endif - if (rc == Abort) { - unlock_write_set(rc, wset, txn); - } - return rc; -} - -RC Sundial::validate_part(TxnManager * txn) -{ - RC rc = RCOK; - // split _access_set into read_set and write_set - sundial_set_ent * wset; - sundial_set_ent * rset; - get_rw_set(txn, rset, wset); - // 1. lock the local write set - // 2. compute commit ts - // 3. validate local txn - -#if OCC_WAW_LOCK - if (ISOLATION_LEVEL == SERIALIZABLE) - rc = validate_read_set(rset, txn, txn->_min_commit_ts); -#else - if (rc == RCOK) { - rc = lock_write_set(wset, txn); - if (rc == Abort) { - } - } - if (rc != Abort) { - if (validate_write_set(wset, txn, txn->_min_commit_ts) == Abort) - rc = Abort; - } - if (rc != Abort) { - if (validate_read_set(rset, txn, txn->_min_commit_ts) == Abort) { - rc = Abort; - } - } -#endif - if (rc == Abort) { - unlock_write_set(rc, wset, txn); - return rc; - } else { - } - - return rc; -} - -void Sundial::compute_commit_ts(TxnManager * txn) -{ - uint64_t size = txn->get_write_set_size(); - size += txn->get_read_set_size(); - for (uint64_t i = 0; i < size; i++) { - if (txn->get_access_type(i) == WR){ - txn->_min_commit_ts = txn->txn->accesses[i]->orig_rts + 1 > txn->_min_commit_ts ? txn->txn->accesses[i]->orig_rts + 1 : txn->_min_commit_ts; - } - else { - txn->_min_commit_ts = txn->txn->accesses[i]->orig_wts > txn->_min_commit_ts ? txn->txn->accesses[i]->orig_wts : txn->_min_commit_ts; - } - } - - -} - -RC -Sundial::validate_read_set(sundial_set_ent * rset, TxnManager * txn, uint64_t commit_ts) -{ - - // validate the read set. - for (UInt32 i = 0; i < rset->set_size; i++) { - if (rset->access[i]->orig_rts >= commit_ts) { - continue; - } - row_t * cur_rrow = rset->rows[i]; - if (!cur_rrow->manager->try_renew(rset->access[i]->orig_wts, commit_ts, rset->access[i]->orig_rts)) - { - return Abort; - } - } - - return RCOK; -} - -RC -Sundial::lock_write_set(sundial_set_ent * wset, TxnManager * txn) -{ - assert(!OCC_WAW_LOCK); - RC rc = RCOK; - txn->_num_lock_waits = 0; - - for (UInt32 i = 0; i < wset->set_size; i++) { - row_t * cur_wrow = wset->rows[i]; - rc = cur_wrow->manager->try_lock(txn); - if (rc == WAIT || rc == RCOK) - wset->access[i]->locked = true; - if (rc == WAIT) - ATOM_ADD_FETCH(txn->_num_lock_waits, 1); - wset->access[i]->orig_rts = cur_wrow->manager->get_rts(); - if (wset->access[i]->orig_wts != cur_wrow->manager->get_wts()) { - rc = Abort; - } - if (rc == Abort) - return Abort; - } - if (rc == Abort) - return Abort; - else if (txn->_num_lock_waits > 0) - return WAIT; - return rc; -} - -void -Sundial::cleanup(RC rc, TxnManager * txn) -{ - sundial_set_ent * wset; - sundial_set_ent * rset; - get_rw_set(txn, rset, wset); - unlock_write_set(rc, wset, txn); -} - -void -Sundial::unlock_write_set(RC rc, sundial_set_ent * wset, TxnManager * txn) -{ - for (UInt32 i = 0; i < wset->set_size; i++) { - if (wset->access[i]->locked) { - row_t * cur_wrow = wset->rows[i]; - cur_wrow->manager->release(txn, rc); - wset->access[i]->locked = false; - } - } -} - -RC -Sundial::validate_write_set(sundial_set_ent * wset, TxnManager * txn, uint64_t commit_ts) -{ - for (UInt32 i = 0; i < wset->set_size; i++) { - if (txn->_min_commit_ts <= wset->access[i]->orig_rts){ - return Abort; - } - } - return RCOK; -} - -bool -Sundial::is_txn_ready(TxnManager * txn) -{ - return txn->_num_lock_waits == 0; -} - -void -Sundial::set_txn_ready(RC rc, TxnManager * txn) -{ - // this function can be called by multiple threads concurrently - if (rc == RCOK) - ATOM_SUB_FETCH(txn->_num_lock_waits, 1); - else { - txn->_signal_abort = true; - } -} - -#endif \ No newline at end of file diff --git a/contrib/deneva/concurrency_control/sundial.h b/contrib/deneva/concurrency_control/sundial.h deleted file mode 100644 index dcc2377d..00000000 --- a/contrib/deneva/concurrency_control/sundial.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@ruc.edu.cn - * - */ - -#ifndef _SUNDIAL_H_ -#define _SUNDIAL_H_ - -#include "row.h" -#include "semaphore.h" - - -class TxnManager; - -class sundial_set_ent{ -public: - sundial_set_ent(); - UInt64 tn; - TxnManager * txn; - UInt32 set_size; - row_t ** rows; //[MAX_WRITE_SET]; - Access** access; - sundial_set_ent * next; -}; - -class Sundial { -public: - void init(); - RC validate(TxnManager * txn); - void cleanup(RC rc, TxnManager * txn); - void set_txn_ready(RC rc, TxnManager * txn); - bool is_txn_ready(TxnManager * txn); - static bool _pre_abort; -private: - RC get_rw_set(TxnManager * txni, sundial_set_ent * &rset, sundial_set_ent *& wset); - RC validate_coor(TxnManager * txn); - RC validate_part(TxnManager * txn); - RC validate_write_set(sundial_set_ent * wset, TxnManager * txn, uint64_t commit_ts); - RC validate_read_set(sundial_set_ent * rset, TxnManager * txn, uint64_t commit_ts); - RC lock_write_set(sundial_set_ent * wset, TxnManager * txn); - void unlock_write_set(RC rc, sundial_set_ent * wset, TxnManager * txn); - void compute_commit_ts(TxnManager * txn); - // sem_t _semaphore; -}; - -#endif diff --git a/contrib/deneva/concurrency_control/wsi.cpp b/contrib/deneva/concurrency_control/wsi.cpp deleted file mode 100644 index 6d5f92b0..00000000 --- a/contrib/deneva/concurrency_control/wsi.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@ruc.edu.cn - * - */ -#include "global.h" -#if CC_ALG == WSI -#include "helper.h" -#include "txn.h" -#include "wsi.h" -#include "manager.h" -#include "mem_alloc.h" -#include "row_wsi.h" - - -wsi_set_ent::wsi_set_ent() { - set_size = 0; - txn = NULL; - rows = NULL; - next = NULL; -} - -void wsi::init() { - sem_init(&_semaphore, 0, 1); -} - -RC wsi::validate(TxnManager * txn) { - RC rc; - rc = central_validate(txn); - return rc; -} - -RC wsi::central_validate(TxnManager * txn) { - RC rc; - uint64_t start_tn = txn->get_start_timestamp(); - bool valid = true; - - wsi_set_ent * wset; - wsi_set_ent * rset; - get_rw_set(txn, rset, wset); - bool readonly = (wset->set_size == 0); - - int stop __attribute__((unused)); - uint64_t checked = 0; - sem_wait(&_semaphore); - - if (!readonly) { - for (UInt32 i = 0; i < rset->set_size; i++) { - checked++; - if (rset->rows[i]->manager->get_last_commit() > start_tn) { - rc = Abort; - } - } - } - sem_post(&_semaphore); - mem_allocator.free(rset->rows, sizeof(row_t *) * rset->set_size); - mem_allocator.free(rset, sizeof(wsi_set_ent)); - - if (valid) { - rc = RCOK; - } else { - rc = Abort; - } - DEBUG("End Validation %ld\n",txn->get_txn_id()); - return rc; -} - -void wsi::finish(RC rc, TxnManager * txn) { - central_finish(rc,txn); -} - -void wsi::central_finish(RC rc, TxnManager * txn) { - wsi_set_ent * wset; - wsi_set_ent * rset; - get_rw_set(txn, rset, wset); - - for (UInt32 i = 0; i < rset->set_size; i++) { - rset->rows[i]->manager->update_last_commit(txn->get_commit_timestamp()); - } -} - -void wsi::gene_finish_ts(TxnManager * txn) { - txn->set_commit_timestamp(glob_manager.get_ts(txn->get_thd_id())); -} - -RC wsi::get_rw_set(TxnManager * txn, wsi_set_ent * &rset, wsi_set_ent *& wset) { - wset = (wsi_set_ent*) mem_allocator.alloc(sizeof(wsi_set_ent)); - rset = (wsi_set_ent*) mem_allocator.alloc(sizeof(wsi_set_ent)); - wset->set_size = txn->get_write_set_size(); - rset->set_size = txn->get_read_set_size(); - wset->rows = (row_t **) mem_allocator.alloc(sizeof(row_t *) * wset->set_size); - rset->rows = (row_t **) mem_allocator.alloc(sizeof(row_t *) * rset->set_size); - wset->txn = txn; - rset->txn = txn; - - UInt32 n = 0, m = 0; - for (uint64_t i = 0; i < wset->set_size + rset->set_size; i++) { - if (txn->get_access_type(i) == WR) { - wset->rows[n ++] = txn->get_access_original_row(i); - } else { - rset->rows[m ++] = txn->get_access_original_row(i); - } - } - - assert(n == wset->set_size); - assert(m == rset->set_size); - return RCOK; -} -#endif \ No newline at end of file diff --git a/contrib/deneva/concurrency_control/wsi.h b/contrib/deneva/concurrency_control/wsi.h deleted file mode 100644 index a236545c..00000000 --- a/contrib/deneva/concurrency_control/wsi.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@ruc.edu.cn - * - */ - -#ifndef _WSI_H_ -#define _WSI_H_ - -#include "row.h" -#include "semaphore.h" - -// For simplicity, the txn hisotry for OCC is oganized as follows: -// 1. history is never deleted. -// 2. hisotry forms a single directional list. -// history head -> hist_1 -> hist_2 -> hist_3 -> ... -> hist_n -// The head is always the latest and the tail the youngest. -// When history is traversed, always go from head -> tail order. - -class TxnManager; - -class wsi_set_ent{ -public: - wsi_set_ent(); - UInt64 tn; - TxnManager * txn; - UInt32 set_size; - row_t ** rows; //[MAX_WRITE_SET]; - wsi_set_ent * next; -}; - -class wsi { -public: - void init(); - RC validate(TxnManager * txn); - void gene_finish_ts(TxnManager * txn); - void finish(RC rc, TxnManager * txn); -private: - // parallel validation in the original OCC paper. - RC central_validate(TxnManager * txn); - RC get_rw_set(TxnManager * txni, wsi_set_ent * &rset, wsi_set_ent *& wset); - void central_finish(RC rc, TxnManager * txn); - pthread_mutex_t latch; - sem_t _semaphore; -}; - -#endif diff --git a/contrib/deneva/config-debug.h b/contrib/deneva/config-debug.h deleted file mode 100644 index f9cdbf3d..00000000 --- a/contrib/deneva/config-debug.h +++ /dev/null @@ -1,366 +0,0 @@ -#ifndef _CONFIG_H_ - -#define _CONFIG_H_ - -/***********************************************/ -// Simulation + Hardware -/***********************************************/ -#define NODE_CNT 1 -#define THREAD_CNT 4 -#define REM_THREAD_CNT THREAD_CNT -#define SEND_THREAD_CNT THREAD_CNT -#define CORE_CNT 2 -// PART_CNT should be at least NODE_CNT -#define PART_CNT NODE_CNT -#define CLIENT_NODE_CNT NODE_CNT -#define CLIENT_THREAD_CNT 4 -#define CLIENT_REM_THREAD_CNT 2 -#define CLIENT_SEND_THREAD_CNT 2 -#define CLIENT_RUNTIME false - -#define LOAD_METHOD LOAD_MAX -#define LOAD_PER_SERVER 100 - -// Replication -#define REPLICA_CNT 0 -// AA (Active-Active), AP (Active-Passive) -#define REPL_TYPE AP - -// each transaction only accesses only 1 virtual partition. But the lock/ts manager and index are -// not aware of such partitioning. VIRTUAL_PART_CNT describes the request distribution and is only -// used to generate queries. For HSTORE, VIRTUAL_PART_CNT should be the same as PART_CNT. -#define VIRTUAL_PART_CNT PART_CNT -#define PAGE_SIZE 4096 -#define CL_SIZE 64 -#define CPU_FREQ 2.6 -// enable hardware migration. -#define HW_MIGRATE false - -// # of transactions to run for warmup -#define WARMUP 0 -// YCSB or TPCC or PPS -#define WORKLOAD YCSB -// print the transaction latency distribution -#define PRT_LAT_DISTR false -#define STATS_ENABLE true -#define TIME_ENABLE true //STATS_ENABLE - -#define FIN_BY_TIME true -#define MAX_TXN_IN_FLIGHT 10000 - -#define SERVER_GENERATE_QUERIES false - -/***********************************************/ -// Memory System -/***********************************************/ -// Three different memory allocation methods are supported. -// 1. default libc malloc -// 2. per-thread malloc. each thread has a private local memory -// pool -// 3. per-partition malloc. each partition has its own memory pool -// which is mapped to a unique tile on the chip. -#define MEM_ALLIGN 8 - -// [THREAD_ALLOC] -#define THREAD_ALLOC false -#define THREAD_ARENA_SIZE (1UL << 22) -#define MEM_PAD true - -// [PART_ALLOC] -#define PART_ALLOC false -#define MEM_SIZE (1UL << 30) -#define NO_FREE false - -/***********************************************/ -// Message Passing -/***********************************************/ -#define TPORT_TYPE tcp -#define TPORT_PORT 7000 -#define SET_AFFINITY true -#define TPORT_TYPE tcp -#define TPORT_PORT 7000 -#define SET_AFFINITY true - -#define MAX_TPORT_NAME 128 -#define MSG_SIZE 128 // in bytes -#define HEADER_SIZE sizeof(uint32_t)*2 // in bits -#define MSG_TIMEOUT 5000000000UL // in ns -#define NETWORK_TEST false -#define NETWORK_DELAY_TEST false -#define NETWORK_DELAY 0UL - -#define MAX_QUEUE_LEN NODE_CNT * 2 - -#define PRIORITY_WORK_QUEUE false -#define PRIORITY PRIORITY_ACTIVE -#define MSG_SIZE_MAX 4096 -#define MSG_TIME_LIMIT 0 - -/***********************************************/ -// Concurrency Control -/***********************************************/ -// WAIT_DIE, NO_WAIT, TIMESTAMP, MVCC, CALVIN, MAAT, SUNDIAL, SILO, BOCC, FOCC, SSI, WSI -#define CC_ALG MAAT -#define ISOLATION_LEVEL SERIALIZABLE -#define YCSB_ABORT_MODE false - -// all transactions acquire tuples according to the primary key order. -#define KEY_ORDER false -// transaction roll back changes after abort -#define ROLL_BACK true -// per-row lock/ts management or central lock/ts management -#define CENTRAL_MAN false -#define BUCKET_CNT 31 -#define ABORT_PENALTY 10 * 1000000UL // in ns. -#define ABORT_PENALTY_MAX 5 * 100 * 1000000UL // in ns. -#define BACKOFF true -// [ INDEX ] -#define ENABLE_LATCH false -#define CENTRAL_INDEX false -#define CENTRAL_MANAGER false -#define INDEX_STRUCT IDX_HASH -#define BTREE_ORDER 16 - -// [TIMESTAMP] -#define TS_TWR false -#define TS_ALLOC TS_CLOCK -#define TS_BATCH_ALLOC false -#define TS_BATCH_NUM 1 -// [MVCC] -// when read/write history is longer than HIS_RECYCLE_LEN -// the history should be recycled. -#define HIS_RECYCLE_LEN 10 -#define MAX_PRE_REQ MAX_TXN_IN_FLIGHT * NODE_CNT//1024 -#define MAX_READ_REQ MAX_TXN_IN_FLIGHT * NODE_CNT//1024 -#define MIN_TS_INTVL 10 * 1000000UL // 10ms -// [OCC] -#define MAX_WRITE_SET 10 -#define PER_ROW_VALID false -// [VLL] -#define TXN_QUEUE_SIZE_LIMIT THREAD_CNT -// [CALVIN] -#define SEQ_THREAD_CNT 4 - -/***********************************************/ -// Logging -/***********************************************/ -#define LOG_COMMAND false -#define LOG_REDO false -#define LOGGING false -#define LOG_BUF_MAX 10 -#define LOG_BUF_TIMEOUT 10 * 1000000UL // 10ms - -/***********************************************/ -// Benchmark -/***********************************************/ -// max number of rows touched per transaction -#define MAX_ROW_PER_TXN 64 -#define QUERY_INTVL 1UL -#define MAX_TXN_PER_PART 500000 -#define FIRST_PART_LOCAL true -#define MAX_TUPLE_SIZE 1024 // in bytes -#define GEN_BY_MPR false -// ==== [YCSB] ==== -// SKEW_METHOD: -// ZIPF: use ZIPF_THETA distribution -// HOT: use ACCESS_PERC of the accesses go to DATA_PERC of the data -#define SKEW_METHOD ZIPF -#define DATA_PERC 100 -#define ACCESS_PERC 0.03 -#define INIT_PARALLELISM 8 -#define SYNTH_TABLE_SIZE 33554432 -#define ZIPF_THETA 0.8 -#define TXN_WRITE_PERC 0.5 -#define TUP_WRITE_PERC 0.5 -#define SCAN_PERC 0 -#define SCAN_LEN 20 -#define PART_PER_TXN 2 -#define PERC_MULTI_PART MPR -#define REQ_PER_QUERY 10 -#define FIELD_PER_TUPLE 10 -#define CREATE_TXN_FILE false -#define STRICT_PPT 0 -// ==== [TPCC] ==== -// For large warehouse count, the tables do not fit in memory -// small tpcc schemas shrink the table size. -#define TPCC_SMALL false -#define MAX_ITEMS_SMALL 10000 -#define CUST_PER_DIST_SMALL 2000 -#define MAX_ITEMS_NORM 100000 -#define CUST_PER_DIST_NORM 3000 -#define MAX_ITEMS_PER_TXN 15 -// Some of the transactions read the data but never use them. -// If TPCC_ACCESS_ALL == fales, then these parts of the transactions -// are not modeled. -#define TPCC_ACCESS_ALL false -#define WH_UPDATE true -#define NUM_WH PART_CNT -// % of transactions that access multiple partitions -#define MPR 1.0 -#define MPIR 0.01 -#define MPR_NEWORDER 20 // In % -enum TPCCTable { - TPCC_WAREHOUSE, - TPCC_DISTRICT, - TPCC_CUSTOMER, - TPCC_HISTORY, - TPCC_NEWORDER, - TPCC_ORDER, - TPCC_ORDERLINE, - TPCC_ITEM, - TPCC_STOCK -}; -enum TPCCTxnType { - TPCC_ALL, - TPCC_PAYMENT, - TPCC_NEW_ORDER, - TPCC_ORDER_STATUS, - TPCC_DELIVERY, - TPCC_STOCK_LEVEL -}; -extern TPCCTxnType g_tpcc_txn_type; - -//#define TXN_TYPE TPCC_ALL -#define PERC_PAYMENT 0.0 -#define FIRSTNAME_MINLEN 8 -#define FIRSTNAME_LEN 16 -#define LASTNAME_LEN 16 - -#define DIST_PER_WH 10 - -// PPS (Product-Part-Supplier) -#define MAX_PPS_PARTS_PER 10 -#define MAX_PPS_PART_KEY 10000 -#define MAX_PPS_PRODUCT_KEY 1000 -#define MAX_PPS_SUPPLIER_KEY 1000 -#define MAX_PPS_PART_PER_PRODUCT 10 -#define MAX_PPS_PART_PER_SUPPLIER 10 -#define MAX_PPS_PART_PER_PRODUCT_KEY 10 -#define MAX_PPS_PART_PER_SUPPLIER_KEY 10 - -#define PERC_PPS_GETPART 0.00 -#define PERC_PPS_GETSUPPLIER 0.00 -#define PERC_PPS_GETPRODUCT 0.0 -#define PERC_PPS_GETPARTBYSUPPLIER 0.0 -#define PERC_PPS_GETPARTBYPRODUCT 0.2 -#define PERC_PPS_ORDERPRODUCT 0.6 -#define PERC_PPS_UPDATEPRODUCTPART 0.2 -#define PERC_PPS_UPDATEPART 0.0 - -enum PPSTxnType { - PPS_ALL = 0, - PPS_GETPART, - PPS_GETSUPPLIER, - PPS_GETPRODUCT, - PPS_GETPARTBYSUPPLIER, - PPS_GETPARTBYPRODUCT, - PPS_ORDERPRODUCT, - PPS_UPDATEPRODUCTPART, - PPS_UPDATEPART -}; - -/***********************************************/ -// DEBUG info -/***********************************************/ -#define WL_VERB true -#define IDX_VERB false -#define VERB_ALLOC true - -#define DEBUG_LOCK false -#define DEBUG_TIMESTAMP false -#define DEBUG_SYNTH false -#define DEBUG_ASSERT false -#define DEBUG_DISTR true -#define DEBUG_ALLOC false -#define DEBUG_RACE false -#define DEBUG_TIMELINE false -#define DEBUG_BREAKDOWN false -#define DEBUG_LATENCY false - -/***********************************************/ -// MODES -/***********************************************/ -// QRY Only do query operations, no 2PC -// TWOPC Only do 2PC, no query work -// SIMPLE Immediately send OK back to client -// NOCC Don't do CC -// NORMAL normal operation -#define MODE NORMAL_MODE - - -/***********************************************/ -// Constant -/***********************************************/ -// INDEX_STRUCT -#define IDX_HASH 1 -#define IDX_BTREE 2 -// WORKLOAD -#define YCSB 1 -#define TPCC 2 -#define PPS 3 -#define TEST 4 -// Concurrency Control Algorithm -#define NO_WAIT 1 -#define WAIT_DIE 2 -#define DL_DETECT 3 -#define TIMESTAMP 4 -#define MVCC 5 -#define HSTORE 6 -#define HSTORE_SPEC 7 -#define OCC 8 -#define VLL 9 -#define CALVIN 10 -#define MAAT 11 -#define WDL 12 - -// TIMESTAMP allocation method. -#define TS_MUTEX 1 -#define TS_CAS 2 -#define TS_HW 3 -#define TS_CLOCK 4 -// MODES -// NORMAL < NOCC < QRY_ONLY < SETUP < SIMPLE -#define NORMAL_MODE 1 -#define NOCC_MODE 2 -#define QRY_ONLY_MODE 3 -#define SETUP_MODE 4 -#define SIMPLE_MODE 5 -// SKEW METHODS -#define ZIPF 1 -#define HOT 2 -// PRIORITY WORK QUEUE -#define PRIORITY_FCFS 1 -#define PRIORITY_ACTIVE 2 -#define PRIORITY_HOME 3 -// Replication -#define AA 1 -#define AP 2 -// Load -#define LOAD_MAX 1 -#define LOAD_RATE 2 -// Transport -#define TCP 1 -#define IPC 2 -// Isolation levels -#define SERIALIZABLE 1 -#define READ_COMMITTED 2 -#define READ_UNCOMMITTED 3 -#define NOLOCK 4 - -// Stats and timeout -#define BILLION 1000000000UL // in ns => 1 second -#define MILLION 1000000UL // in ns => 1 second -#define STAT_ARR_SIZE 1024 -#define PROG_TIMER 10 * BILLION // in s -#define BATCH_TIMER 0 -#define SEQ_BATCH_TIMER 5 * 1 * MILLION // ~5ms -- same as CALVIN paper -#define DONE_TIMER 1 * 60 * BILLION // ~1 minutes -#define WARMUP_TIMER 1 * 10 * BILLION // ~1 minutes - -#define SEED 0 -#define SHMEM_ENV false -#define ENVIRONMENT_EC2 false - -#endif - - diff --git a/contrib/deneva/config-std.h b/contrib/deneva/config-std.h deleted file mode 100644 index f52fbecf..00000000 --- a/contrib/deneva/config-std.h +++ /dev/null @@ -1,209 +0,0 @@ -#ifndef _CONFIG_H_ -#define _CONFIG_H_ - -/***********************************************/ -// Simulation + Hardware -/***********************************************/ -#define THREAD_CNT 4 -#define PART_CNT 1 //CORE_CNT -// each transaction only accesses only 1 virtual partition. But the lock/ts manager and index are -// not aware of such partitioning. VIRTUAL_PART_CNT describes the request distribution and is only -// used to generate queries. For HSTORE, VIRTUAL_PART_CNT should be the same as PART_CNT. -#define VIRTUAL_PART_CNT 1 -#define PAGE_SIZE 4096 -#define CL_SIZE 64 -#define CPU_FREQ 2.6 -// enable hardware migration. -#define HW_MIGRATE false - -// # of transactions to run for warmup -#define WARMUP 0 -// YCSB or TPCC -#define WORKLOAD YCSB -// print the transaction latency distribution -#define PRT_LAT_DISTR false -#define STATS_ENABLE true -#define TIME_ENABLE true //STATS_ENABLE - -/***********************************************/ -// Memory System -/***********************************************/ -// Three different memory allocation methods are supported. -// 1. default libc malloc -// 2. per-thread malloc. each thread has a private local memory -// pool -// 3. per-partition malloc. each partition has its own memory pool -// which is mapped to a unique tile on the chip. -#define MEM_ALLIGN 8 - -// [THREAD_ALLOC] -#define THREAD_ALLOC true -#define THREAD_ARENA_SIZE (1UL << 22) -#define MEM_PAD true - -// [PART_ALLOC] -#define PART_ALLOC false -#define MEM_SIZE (1UL << 30) -#define NO_FREE false - -/***********************************************/ -// Concurrency Control -/***********************************************/ -// WAIT_DIE, NO_WAIT, DL_DETECT, TIMESTAMP, MVCC, HSTORE, OCC, VLL, SUNDIAL, SILO, BOCC, FOCC, SSI, WSI -#define CC_ALG DL_DETECT - -// all transactions acquire tuples according to the primary key order. -#define KEY_ORDER false -// transaction roll back changes after abort -#define ROLL_BACK true -// per-row lock/ts management or central lock/ts management -#define CENTRAL_MAN false -#define BUCKET_CNT 31 -#define ABORT_PENALTY 1000000UL // in ns. -// [ INDEX ] -#define ENABLE_LATCH false -#define CENTRAL_INDEX false -#define CENTRAL_MANAGER false -#define INDEX_STRUCT IDX_HASH -#define BTREE_ORDER 16 - -// [DL_DETECT] -#define DL_LOOP_DETECT 100000 // 100 us -#define DL_LOOP_TRIAL 1000 // 1 us -#define NO_DL KEY_ORDER -#define TIMEOUT 100000000000 -// [TIMESTAMP] -#define TS_TWR false -#define TS_ALLOC TS_CAS -#define TS_BATCH_ALLOC false -#define TS_BATCH_NUM 1 -// [MVCC] -// when read/write history is longer than HIS_RECYCLE_LEN -// the history should be recycled. -#define HIS_RECYCLE_LEN 10 -#define MAX_PRE_REQ 1024 -#define MAX_READ_REQ 1024 -#define MIN_TS_INTVL 10000000 //10 ms -// [OCC] -#define MAX_WRITE_SET 10 -#define PER_ROW_VALID true -// [HSTORE] -// when set to true, hstore will not access the global timestamp. -// This is fine for single partition transactions. -#define HSTORE_LOCAL_TS false -// [VLL] -#define TXN_QUEUE_SIZE_LIMIT THREAD_CNT - -/***********************************************/ -// Logging -/***********************************************/ -#define LOG_COMMAND false -#define LOG_REDO false - -/***********************************************/ -// Benchmark -/***********************************************/ -// max number of rows touched per transaction -#define MAX_ROW_PER_TXN 64 -#define QUERY_INTVL 1UL -#define MAX_TXN_PER_PART 100 -#define FIRST_PART_LOCAL true -#define MAX_TUPLE_SIZE 1024 // in bytes -// ==== [YCSB] ==== -#define INIT_PARALLELISM 16 -#define SYNTH_TABLE_SIZE (THREAD_CNT*1024) -#define ZIPF_THETA 0 -#define READ_PERC 0.5 -#define WRITE_PERC 0.5 -#define SCAN_PERC 0 -#define SCAN_LEN 20 -#define PART_PER_TXN 1 -#define PERC_MULTI_PART 1 -#define REQ_PER_QUERY 16 -#define FIELD_PER_TUPLE 10 -// ==== [TPCC] ==== -// For large warehouse count, the tables do not fit in memory -// small tpcc schemas shrink the table size. -#define TPCC_SMALL true -// Some of the transactions read the data but never use them. -// If TPCC_ACCESS_ALL == fales, then these parts of the transactions -// are not modeled. -#define TPCC_ACCESS_ALL false -#define WH_UPDATE true -#define NUM_WH 4 -// -enum TPCCTxnType { - TPCC_ALL, - TPCC_PAYMENT, - TPCC_NEW_ORDER, - TPCC_ORDER_STATUS, - TPCC_DELIVERY, - TPCC_STOCK_LEVEL -}; -extern TPCCTxnType g_tpcc_txn_type; - -//#define TXN_TYPE TPCC_ALL -#define PERC_PAYMENT 0.5 -#define FIRSTNAME_MINLEN 8 -#define FIRSTNAME_LEN 16 -#define LASTNAME_LEN 16 - -#define DIST_PER_WARE 10 - -/***********************************************/ -// TODO centralized CC management. -/***********************************************/ -#define MAX_LOCK_CNT (20 * THREAD_CNT) -#define TSTAB_SIZE 50 * THREAD_CNT -#define TSTAB_FREE TSTAB_SIZE -#define TSREQ_FREE 4 * TSTAB_FREE -#define MVHIS_FREE 4 * TSTAB_FREE -#define SPIN false - -/***********************************************/ -// Test cases -/***********************************************/ -#define TEST_ALL true -enum TestCases { - READ_WRITE, - CONFLICT -}; -extern TestCases g_test_case; -/***********************************************/ -// DEBUG info -/***********************************************/ -#define WL_VERB true -#define IDX_VERB false -#define VERB_ALLOC true - -#define DEBUG_LOCK false -#define DEBUG_TIMESTAMP false -#define DEBUG_SYNTH false -#define DEBUG_ASSERT false - -/***********************************************/ -// Constant -/***********************************************/ -// INDEX_STRUCT -#define IDX_HASH 1 -#define IDX_BTREE 2 -// WORKLOAD -#define YCSB 1 -#define TPCC 2 -#define TEST 3 -// Concurrency Control Algorithm -#define NO_WAIT 1 -#define WAIT_DIE 2 -#define DL_DETECT 3 -#define TIMESTAMP 4 -#define MVCC 5 -#define HSTORE 6 -#define OCC 7 -#define VLL 8 -// TIMESTAMP allocation method. -#define TS_MUTEX 1 -#define TS_CAS 2 -#define TS_HW 3 -#define TS_CLOCK 4 - -#endif diff --git a/contrib/deneva/config.cpp b/contrib/deneva/config.cpp deleted file mode 100644 index 664d125d..00000000 --- a/contrib/deneva/config.cpp +++ /dev/null @@ -1,3 +0,0 @@ -#include "config.h" - -TPCCTxnType g_tpcc_txn_type = TPCC_ALL; diff --git a/contrib/deneva/config.h b/contrib/deneva/config.h deleted file mode 100644 index 33b19e36..00000000 --- a/contrib/deneva/config.h +++ /dev/null @@ -1,441 +0,0 @@ -#ifndef _CONFIG_H_ - -#define _CONFIG_H_ - -/***sundial****/ -/* -#define WRITE_PERMISSION_LOCK false -#define MULTI_VERSION false -#define ENABLE_LOCAL_CACHING false -#define OCC_LOCK_TYPE WAIT_DIE -#define SUNDIAL_MV false -#define OCC_WAW_LOCK true -#define RO_LEASE false -#define ATOMIC_WORD false -#define TRACK_LAST false -#define UPDATE_TABLE_TS true -#define WRITE_PERMISSION_LOCK false -#define LOCK_ALL_BEFORE_COMMIT false -#define LOCK_ALL_DEBUG false -#define PAUSE __asm__ ( "pause;" ); -#define COMPILER_BARRIER asm volatile("" ::: "memory"); -*/ - -/***********************************************/ -// DA Trans Creator -/***********************************************/ -//which creator to use -#define CREATOR_USE_T false - -//TraversalActionSequenceCreator -#define TRANS_CNT 2 -#define ITEM_CNT 4 -#define SUBTASK_NUM 1 -#define SUBTASK_ID 0 -#define MAX_DML 4 -#define WITH_ABORT false -#define TAIL_DTL false -#define SAVE_HISTROY_WITH_EMPTY_OPT false -#define DYNAMIC_SEQ_LEN false - -//InputActionSequenceCreator -#define INPUT_FILE_PATH "./input.txt" - -// ! Parameters used to locate distributed performance bottlenecks. -#define SECOND 100 // Set the queue monitoring time. -// #define LESS_DIS // Reduce the number of yCSB remote data to 1 -// #define NEW_WORK_QUEUE // The workQueue data structure has been modified to perform 10,000 better than the original implementation. -// #define NO_2PC // Removing 2PC, of course, would be problematic in distributed transactions. -// #define FAKE_PROCESS // Io_thread returns as soon as it gets the request from the remote. Avoid waiting in the WORK_queue. -// #define NO_REMOTE // remove all remote txn -#define TXN_QUEUE_PERCENT 0.9 // The proportion of the transaction to take from txn_queue firstly. -// ! end of these parameters - -/***********************************************/ -// Simulation + Hardware -/***********************************************/ -#define NODE_CNT 2 -#define THREAD_CNT 4 //trans_num -#define REM_THREAD_CNT 2 -#define SEND_THREAD_CNT 2 -#define CORE_CNT 2 -// PART_CNT should be at least NODE_CNT -#define PART_CNT NODE_CNT -#define CLIENT_NODE_CNT NODE_CNT -#define CLIENT_THREAD_CNT 1 -#define CLIENT_REM_THREAD_CNT 1 -#define CLIENT_SEND_THREAD_CNT 1 -#define CLIENT_RUNTIME false - -#define LOAD_METHOD LOAD_MAX -#define LOAD_PER_SERVER 100 - -// Replication -#define REPLICA_CNT 0 -// AA (Active-Active), AP (Active-Passive) -#define REPL_TYPE AP - -// each transaction only accesses only 1 virtual partition. But the lock/ts manager and index are -// not aware of such partitioning. VIRTUAL_PART_CNT describes the request distribution and is only -// used to generate queries. For HSTORE, VIRTUAL_PART_CNT should be the same as PART_CNT. -#define VIRTUAL_PART_CNT PART_CNT -#define PAGE_SIZE 4096 -#define CL_SIZE 64 -#define CPU_FREQ 2.6 -// enable hardware migration. -#define HW_MIGRATE false - -// # of transactions to run for warmup -#define WARMUP 0 -// YCSB or TPCC or PPS or DA -#define WORKLOAD YCSB -// print the transaction latency distribution -#define PRT_LAT_DISTR false -#define STATS_ENABLE true -#define TIME_ENABLE true //STATS_ENABLE - -#define FIN_BY_TIME true -#define MAX_TXN_IN_FLIGHT 1800000 - -#define SERVER_GENERATE_QUERIES false - -/***********************************************/ -// Memory System -/***********************************************/ -// Three different memory allocation methods are supported. -// 1. default libc malloc -// 2. per-thread malloc. each thread has a private local memory -// pool -// 3. per-partition malloc. each partition has its own memory pool -// which is mapped to a unique tile on the chip. -#define MEM_ALLIGN 8 - -// [THREAD_ALLOC] -#define THREAD_ALLOC false -#define THREAD_ARENA_SIZE (1UL << 22) -#define MEM_PAD true - -// [PART_ALLOC] -#define PART_ALLOC false -#define MEM_SIZE (1UL << 30) -#define NO_FREE false - -/***********************************************/ -// Message Passing -/***********************************************/ -#define TPORT_TYPE tcp -#define TPORT_PORT 7000 -#define SET_AFFINITY true - -#define MAX_TPORT_NAME 128 -#define MSG_SIZE 128 // in bytes -#define HEADER_SIZE sizeof(uint32_t)*2 // in bits -#define MSG_TIMEOUT 5000000000UL // in ns -#define NETWORK_TEST false -#define NETWORK_DELAY_TEST false -#define NETWORK_DELAY 0UL - -#define MAX_QUEUE_LEN NODE_CNT * 2 - -#define PRIORITY_WORK_QUEUE false -#define PRIORITY PRIORITY_ACTIVE -#define MSG_SIZE_MAX 4096 -#define MSG_TIME_LIMIT 0 - -/***********************************************/ -// Concurrency Control -/***********************************************/ - -// WAIT_DIE, NO_WAIT, TIMESTAMP, MVCC, CALVIN, MAAT, SUNDIAL, SILO, BOCC, FOCC, SSI, WSI -#define ISOLATION_LEVEL SERIALIZABLE -#define CC_ALG BOCC -#define YCSB_ABORT_MODE false -#define QUEUE_CAPACITY_NEW 1000000 -// all transactions acquire tuples according to the primary key order. -#define KEY_ORDER false -// transaction roll back changes after abort -#define ROLL_BACK true -// per-row lock/ts management or central lock/ts management -#define CENTRAL_MAN false -#define BUCKET_CNT 31 -#define ABORT_PENALTY 10 * 1000000UL // in ns. -#define ABORT_PENALTY_MAX 5 * 100 * 1000000UL // in ns. -#define BACKOFF true -// [ INDEX ] -#define ENABLE_LATCH false -#define CENTRAL_INDEX false -#define CENTRAL_MANAGER false -#define INDEX_STRUCT IDX_HASH -#define BTREE_ORDER 16 - -// [TIMESTAMP] -#define TS_TWR false -#define TS_ALLOC TS_CLOCK -#define TS_BATCH_ALLOC false -#define TS_BATCH_NUM 1 -// [MVCC] -// when read/write history is longer than HIS_RECYCLE_LEN -// the history should be recycled. -#define HIS_RECYCLE_LEN 10 -#define MAX_PRE_REQ MAX_TXN_IN_FLIGHT * NODE_CNT//1024 -#define MAX_READ_REQ MAX_TXN_IN_FLIGHT * NODE_CNT//1024 -#define MIN_TS_INTVL 10 * 1000000UL // 10ms -// [OCC] -#define MAX_WRITE_SET 10 -#define PER_ROW_VALID false -// [VLL] -#define TXN_QUEUE_SIZE_LIMIT THREAD_CNT -// [CALVIN] -#define SEQ_THREAD_CNT 4 -// [SUNDIAL] -#define MAX_NUM_WAITS 4 -#define PRE_ABORT true -#define OCC_LOCK_TYPE WAIT_DIE -#define OCC_WAW_LOCK true -// [SILO] -#define VALIDATION_LOCK "no-wait" // no-wait or waiting -#define PRE_ABORT2 "true" -#define ATOMIC_WORD false -/***********************************************/ -// Logging -/***********************************************/ -#define LOG_COMMAND false -#define LOG_REDO false -#define LOGGING false -#define LOG_BUF_MAX 10 -#define LOG_BUF_TIMEOUT 10 * 1000000UL // 10ms - -/***********************************************/ -// Benchmark -/***********************************************/ -// max number of rows touched per transaction -#define MAX_ROW_PER_TXN 64 -#define QUERY_INTVL 1UL -#define MAX_TXN_PER_PART 500000 -#define FIRST_PART_LOCAL true -#define MAX_TUPLE_SIZE 1024 // in bytes -#define GEN_BY_MPR false -// ==== [YCSB] ==== -// SKEW_METHOD: -// ZIPF: use ZIPF_THETA distribution -// HOT: use ACCESS_PERC of the accesses go to DATA_PERC of the data -#define SKEW_METHOD ZIPF -#define DATA_PERC 100 -#define ACCESS_PERC 0.03 -#define INIT_PARALLELISM 8 -#define SYNTH_TABLE_SIZE 16777216 -#define ZIPF_THETA 0.3 -#define TXN_WRITE_PERC 0.0 -#define TUP_WRITE_PERC 0.0 -#define SCAN_PERC 0 -#define SCAN_LEN 20 -#define PART_PER_TXN 2 -#define PERC_MULTI_PART MPR -#define REQ_PER_QUERY 10 -#define FIELD_PER_TUPLE 10 -#define CREATE_TXN_FILE false -#define STRICT_PPT 0 -// ==== [TPCC] ==== -// For large warehouse count, the tables do not fit in memory -// small tpcc schemas shrink the table size. -#define TPCC_SMALL false -#define MAX_ITEMS_SMALL 10000 -#define CUST_PER_DIST_SMALL 2000 -#define MAX_ITEMS_NORM 100000 -#define CUST_PER_DIST_NORM 3000 -#define MAX_ITEMS_PER_TXN 15 -// Some of the transactions read the data but never use them. -// If TPCC_ACCESS_ALL == fales, then these parts of the transactions -// are not modeled. -#define TPCC_ACCESS_ALL false -#define WH_UPDATE true -#define NUM_WH PART_CNT -// % of transactions that access multiple partitions -#define MPR 1.0 -#define MPIR 0.01 -#define MPR_NEWORDER 20 // In % -enum TPCCTable { - TPCC_WAREHOUSE, - TPCC_DISTRICT, - TPCC_CUSTOMER, - TPCC_HISTORY, - TPCC_NEWORDER, - TPCC_ORDER, - TPCC_ORDERLINE, - TPCC_ITEM, - TPCC_STOCK -}; -enum TPCCTxnType { - TPCC_ALL, - TPCC_PAYMENT, - TPCC_NEW_ORDER, - TPCC_ORDER_STATUS, - TPCC_DELIVERY, - TPCC_STOCK_LEVEL -}; -enum DATxnType { - DA_READ, - DA_WRITE, - DA_COMMIT, - DA_ABORT, - DA_SCAN -}; -#define MAX_DA_TABLE_SIZE 10000 - - -extern TPCCTxnType g_tpcc_txn_type; -//#define TXN_TYPE TPCC_ALL -#define PERC_PAYMENT 0.0 -#define FIRSTNAME_MINLEN 8 -#define FIRSTNAME_LEN 16 -#define LASTNAME_LEN 16 - -#define DIST_PER_WH 10 - -// PPS (Product-Part-Supplier) -#define MAX_PPS_PARTS_PER 10 -#define MAX_PPS_PART_KEY 10000 -#define MAX_PPS_PRODUCT_KEY 1000 -#define MAX_PPS_SUPPLIER_KEY 1000 -#define MAX_PPS_PART_PER_PRODUCT 10 -#define MAX_PPS_PART_PER_SUPPLIER 10 -#define MAX_PPS_PART_PER_PRODUCT_KEY 10 -#define MAX_PPS_PART_PER_SUPPLIER_KEY 10 - -#define PERC_PPS_GETPART 0.00 -#define PERC_PPS_GETSUPPLIER 0.00 -#define PERC_PPS_GETPRODUCT 0.0 -#define PERC_PPS_GETPARTBYSUPPLIER 0.0 -#define PERC_PPS_GETPARTBYPRODUCT 0.2 -#define PERC_PPS_ORDERPRODUCT 0.6 -#define PERC_PPS_UPDATEPRODUCTPART 0.2 -#define PERC_PPS_UPDATEPART 0.0 - -enum PPSTxnType { - PPS_ALL = 0, - PPS_GETPART, - PPS_GETSUPPLIER, - PPS_GETPRODUCT, - PPS_GETPARTBYSUPPLIER, - PPS_GETPARTBYPRODUCT, - PPS_ORDERPRODUCT, - PPS_UPDATEPRODUCTPART, - PPS_UPDATEPART -}; - -/***********************************************/ -// DEBUG info -/***********************************************/ -#define WL_VERB true -#define IDX_VERB false -#define VERB_ALLOC true - -#define DEBUG_LOCK false -#define DEBUG_TIMESTAMP false -#define DEBUG_SYNTH false -#define DEBUG_ASSERT false -#define DEBUG_DISTR false -#define DEBUG_ALLOC false -#define DEBUG_RACE false -#define DEBUG_TIMELINE false -#define DEBUG_BREAKDOWN false -#define DEBUG_LATENCY false - -/***********************************************/ -// MODES -/***********************************************/ -// QRY Only do query operations, no 2PC -// TWOPC Only do 2PC, no query work -// SIMPLE Immediately send OK back to client -// NOCC Don't do CC -// NORMAL normal operation -#define MODE NORMAL_MODE - - -/***********************************************/ -// Constant -/***********************************************/ -// INDEX_STRUCT -#define IDX_HASH 1 -#define IDX_BTREE 2 -// WORKLOAD -#define YCSB 1 -#define TPCC 2 -#define PPS 3 -#define TEST 4 -#define DA 5 -// Concurrency Control Algorithm -#define NO_WAIT 1 -#define WAIT_DIE 2 -#define DL_DETECT 3 -#define TIMESTAMP 4 -#define MVCC 5 -#define HSTORE 6 -#define HSTORE_SPEC 7 -#define OCC 8 -#define VLL 9 -#define CALVIN 10 -#define MAAT 11 -#define WDL 12 - -#define SUNDIAL 14 -#define FOCC 15 -#define BOCC 16 -#define SSI 17 -#define WSI 18 -#define SILO 27 -#define CNULL 28 -// TIMESTAMP allocation method. -#define TS_MUTEX 1 -#define TS_CAS 2 -#define TS_HW 3 -#define TS_CLOCK 4 -#define LTS_CURL_CLOCK 5 -#define LTS_TCP_CLOCK 6 - -#define LTS_TCP_IP "10.77.110.147" -#define LTS_TCP_PORT 62389 -// MODES -// NORMAL < NOCC < QRY_ONLY < SETUP < SIMPLE -#define NORMAL_MODE 1 -#define NOCC_MODE 2 -#define QRY_ONLY_MODE 3 -#define SETUP_MODE 4 -#define SIMPLE_MODE 5 -// SKEW METHODS -#define ZIPF 1 -#define HOT 2 -// PRIORITY WORK QUEUE -#define PRIORITY_FCFS 1 -#define PRIORITY_ACTIVE 2 -#define PRIORITY_HOME 3 -// Replication -#define AA 1 -#define AP 2 -// Load -#define LOAD_MAX 1 -#define LOAD_RATE 2 -// Transport -#define TCP 1 -#define IPC 2 -// Isolation levels -#define SERIALIZABLE 1 -#define READ_COMMITTED 2 -#define READ_UNCOMMITTED 3 -#define NOLOCK 4 - -// Stats and timeout -#define BILLION 1000000000UL // in ns => 1 second -#define MILLION 1000000UL // in ns => 1 second -#define STAT_ARR_SIZE 1024 -#define PROG_TIMER 10 * BILLION // in s -#define BATCH_TIMER 0 -#define SEQ_BATCH_TIMER 5 * 1 * MILLION // ~5ms -- same as CALVIN paper -#define DONE_TIMER 1 * 60 * BILLION // ~1 minutes -#define WARMUP_TIMER 1 * 60 * BILLION // ~1 minutes - -#define SEED 0 -#define SHMEM_ENV false -#define ENVIRONMENT_EC2 false - -#endif diff --git a/contrib/deneva/ifconfig-debug.txt b/contrib/deneva/ifconfig-debug.txt deleted file mode 100644 index 0b44da3f..00000000 --- a/contrib/deneva/ifconfig-debug.txt +++ /dev/null @@ -1,2 +0,0 @@ -10.77.110.146 -10.77.110.146 diff --git a/contrib/deneva/jemalloc/jemalloc.h b/contrib/deneva/jemalloc/jemalloc.h deleted file mode 100644 index 76eae573..00000000 --- a/contrib/deneva/jemalloc/jemalloc.h +++ /dev/null @@ -1,367 +0,0 @@ -#ifndef JEMALLOC_H_ -#define JEMALLOC_H_ -#ifdef __cplusplus -extern "C" { -#endif - -/* Defined if __attribute__((...)) syntax is supported. */ -#define JEMALLOC_HAVE_ATTR - -/* Defined if alloc_size attribute is supported. */ -#define JEMALLOC_HAVE_ATTR_ALLOC_SIZE - -/* Defined if format(gnu_printf, ...) attribute is supported. */ -#define JEMALLOC_HAVE_ATTR_FORMAT_GNU_PRINTF - -/* Defined if format(printf, ...) attribute is supported. */ -#define JEMALLOC_HAVE_ATTR_FORMAT_PRINTF - -/* - * Define overrides for non-standard allocator-related functions if they are - * present on the system. - */ -#define JEMALLOC_OVERRIDE_MEMALIGN -#define JEMALLOC_OVERRIDE_VALLOC - -/* - * At least Linux omits the "const" in: - * - * size_t malloc_usable_size(const void *ptr); - * - * Match the operating system's prototype. - */ -#define JEMALLOC_USABLE_SIZE_CONST - -/* - * If defined, specify throw() for the public function prototypes when compiling - * with C++. The only justification for this is to match the prototypes that - * glibc defines. - */ -#define JEMALLOC_USE_CXX_THROW - -#ifdef _MSC_VER -# ifdef _WIN64 -# define LG_SIZEOF_PTR_WIN 3 -# else -# define LG_SIZEOF_PTR_WIN 2 -# endif -#endif - -/* sizeof(void *) == 2^LG_SIZEOF_PTR. */ -#define LG_SIZEOF_PTR 3 - -/* - * Name mangling for public symbols is controlled by --with-mangling and - * --with-jemalloc-prefix. With default settings the je_ prefix is stripped by - * these macro definitions. - */ -#ifndef JEMALLOC_NO_RENAME -# define je_malloc_conf malloc_conf -# define je_malloc_message malloc_message -# define je_malloc malloc -# define je_calloc calloc -# define je_posix_memalign posix_memalign -# define je_aligned_alloc aligned_alloc -# define je_realloc realloc -# define je_free free -# define je_mallocx mallocx -# define je_rallocx rallocx -# define je_xallocx xallocx -# define je_sallocx sallocx -# define je_dallocx dallocx -# define je_sdallocx sdallocx -# define je_nallocx nallocx -# define je_mallctl mallctl -# define je_mallctlnametomib mallctlnametomib -# define je_mallctlbymib mallctlbymib -# define je_malloc_stats_print malloc_stats_print -# define je_malloc_usable_size malloc_usable_size -# define je_memalign memalign -# define je_valloc valloc -#endif - -#include -#include -#include -#include -#include - -#define JEMALLOC_VERSION "0.0.0-0-g0000000000000000000000000000000000000000" -#define JEMALLOC_VERSION_MAJOR 0 -#define JEMALLOC_VERSION_MINOR 0 -#define JEMALLOC_VERSION_BUGFIX 0 -#define JEMALLOC_VERSION_NREV 0 -#define JEMALLOC_VERSION_GID "0000000000000000000000000000000000000000" - -# define MALLOCX_LG_ALIGN(la) ((int)(la)) -# if LG_SIZEOF_PTR == 2 -# define MALLOCX_ALIGN(a) ((int)(ffs((int)(a))-1)) -# else -# define MALLOCX_ALIGN(a) \ - ((int)(((size_t)(a) < (size_t)INT_MAX) ? ffs((int)(a)) - 1 \ - : ffs((int)(((size_t)(a)) >> 32)) + 31)) -# endif -# define MALLOCX_ZERO ((int)0x40) -/* - * Bias tcache index bits so that 0 encodes "automatic tcache management", and 1 - * encodes MALLOCX_TCACHE_NONE. - */ -# define MALLOCX_TCACHE(tc) ((int)(((tc)+2) << 8)) -# define MALLOCX_TCACHE_NONE MALLOCX_TCACHE(-1) -/* - * Bias arena index bits so that 0 encodes "use an automatically chosen arena". - */ -# define MALLOCX_ARENA(a) ((((int)(a))+1) << 20) - -#if defined(__cplusplus) && defined(JEMALLOC_USE_CXX_THROW) -# define JEMALLOC_CXX_THROW throw() -#else -# define JEMALLOC_CXX_THROW -#endif - -#if _MSC_VER -# define JEMALLOC_ATTR(s) -# define JEMALLOC_ALIGNED(s) __declspec(align(s)) -# define JEMALLOC_ALLOC_SIZE(s) -# define JEMALLOC_ALLOC_SIZE2(s1, s2) -# ifndef JEMALLOC_EXPORT -# ifdef DLLEXPORT -# define JEMALLOC_EXPORT __declspec(dllexport) -# else -# define JEMALLOC_EXPORT __declspec(dllimport) -# endif -# endif -# define JEMALLOC_FORMAT_PRINTF(s, i) -# define JEMALLOC_NOINLINE __declspec(noinline) -# ifdef __cplusplus -# define JEMALLOC_NOTHROW __declspec(nothrow) -# else -# define JEMALLOC_NOTHROW -# endif -# define JEMALLOC_SECTION(s) __declspec(allocate(s)) -# define JEMALLOC_RESTRICT_RETURN __declspec(restrict) -# if _MSC_VER >= 1900 && !defined(__EDG__) -# define JEMALLOC_ALLOCATOR __declspec(allocator) -# else -# define JEMALLOC_ALLOCATOR -# endif -#elif defined(JEMALLOC_HAVE_ATTR) -# define JEMALLOC_ATTR(s) __attribute__((s)) -# define JEMALLOC_ALIGNED(s) JEMALLOC_ATTR(aligned(s)) -# ifdef JEMALLOC_HAVE_ATTR_ALLOC_SIZE -# define JEMALLOC_ALLOC_SIZE(s) JEMALLOC_ATTR(alloc_size(s)) -# define JEMALLOC_ALLOC_SIZE2(s1, s2) JEMALLOC_ATTR(alloc_size(s1, s2)) -# else -# define JEMALLOC_ALLOC_SIZE(s) -# define JEMALLOC_ALLOC_SIZE2(s1, s2) -# endif -# ifndef JEMALLOC_EXPORT -# define JEMALLOC_EXPORT JEMALLOC_ATTR(visibility("default")) -# endif -# ifdef JEMALLOC_HAVE_ATTR_FORMAT_GNU_PRINTF -# define JEMALLOC_FORMAT_PRINTF(s, i) JEMALLOC_ATTR(format(gnu_printf, s, i)) -# elif defined(JEMALLOC_HAVE_ATTR_FORMAT_PRINTF) -# define JEMALLOC_FORMAT_PRINTF(s, i) JEMALLOC_ATTR(format(printf, s, i)) -# else -# define JEMALLOC_FORMAT_PRINTF(s, i) -# endif -# define JEMALLOC_NOINLINE JEMALLOC_ATTR(noinline) -# define JEMALLOC_NOTHROW JEMALLOC_ATTR(nothrow) -# define JEMALLOC_SECTION(s) JEMALLOC_ATTR(section(s)) -# define JEMALLOC_RESTRICT_RETURN -# define JEMALLOC_ALLOCATOR -#else -# define JEMALLOC_ATTR(s) -# define JEMALLOC_ALIGNED(s) -# define JEMALLOC_ALLOC_SIZE(s) -# define JEMALLOC_ALLOC_SIZE2(s1, s2) -# define JEMALLOC_EXPORT -# define JEMALLOC_FORMAT_PRINTF(s, i) -# define JEMALLOC_NOINLINE -# define JEMALLOC_NOTHROW -# define JEMALLOC_SECTION(s) -# define JEMALLOC_RESTRICT_RETURN -# define JEMALLOC_ALLOCATOR -#endif - -/* - * The je_ prefix on the following public symbol declarations is an artifact - * of namespace management, and should be omitted in application code unless - * JEMALLOC_NO_DEMANGLE is defined (see jemalloc_mangle.h). - */ -extern JEMALLOC_EXPORT const char *je_malloc_conf; -extern JEMALLOC_EXPORT void (*je_malloc_message)(void *cbopaque, const char *s); - -JEMALLOC_EXPORT JEMALLOC_ALLOCATOR JEMALLOC_RESTRICT_RETURN void JEMALLOC_NOTHROW *je_malloc( - size_t size) JEMALLOC_CXX_THROW JEMALLOC_ATTR(malloc) JEMALLOC_ALLOC_SIZE(1); -JEMALLOC_EXPORT JEMALLOC_ALLOCATOR JEMALLOC_RESTRICT_RETURN void JEMALLOC_NOTHROW *je_calloc( - size_t num, size_t size) JEMALLOC_CXX_THROW JEMALLOC_ATTR(malloc) JEMALLOC_ALLOC_SIZE2(1, 2); -JEMALLOC_EXPORT int JEMALLOC_NOTHROW - je_posix_memalign(void **memptr, size_t alignment, - size_t size) JEMALLOC_CXX_THROW JEMALLOC_ATTR(nonnull(1)); -JEMALLOC_EXPORT JEMALLOC_ALLOCATOR JEMALLOC_RESTRICT_RETURN void JEMALLOC_NOTHROW *je_aligned_alloc( - size_t alignment, size_t size) JEMALLOC_CXX_THROW JEMALLOC_ATTR(malloc) JEMALLOC_ALLOC_SIZE(2); -JEMALLOC_EXPORT JEMALLOC_ALLOCATOR JEMALLOC_RESTRICT_RETURN void JEMALLOC_NOTHROW *je_realloc( - void *ptr, size_t size) JEMALLOC_CXX_THROW JEMALLOC_ALLOC_SIZE(2); -JEMALLOC_EXPORT void JEMALLOC_NOTHROW je_free(void *ptr) JEMALLOC_CXX_THROW; - -JEMALLOC_EXPORT JEMALLOC_ALLOCATOR JEMALLOC_RESTRICT_RETURN void JEMALLOC_NOTHROW *je_mallocx( - size_t size, int flags) JEMALLOC_ATTR(malloc) JEMALLOC_ALLOC_SIZE(1); -JEMALLOC_EXPORT JEMALLOC_ALLOCATOR JEMALLOC_RESTRICT_RETURN void JEMALLOC_NOTHROW *je_rallocx( - void *ptr, size_t size, int flags) JEMALLOC_ALLOC_SIZE(2); -JEMALLOC_EXPORT size_t JEMALLOC_NOTHROW je_xallocx(void *ptr, size_t size, size_t extra, int flags); -JEMALLOC_EXPORT size_t JEMALLOC_NOTHROW je_sallocx(const void *ptr, int flags) JEMALLOC_ATTR(pure); -JEMALLOC_EXPORT void JEMALLOC_NOTHROW je_dallocx(void *ptr, int flags); -JEMALLOC_EXPORT void JEMALLOC_NOTHROW je_sdallocx(void *ptr, size_t size, int flags); -JEMALLOC_EXPORT size_t JEMALLOC_NOTHROW je_nallocx(size_t size, int flags) JEMALLOC_ATTR(pure); - -JEMALLOC_EXPORT int JEMALLOC_NOTHROW - je_mallctl(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen); -JEMALLOC_EXPORT int JEMALLOC_NOTHROW - je_mallctlnametomib(const char *name, size_t *mibp, size_t *miblenp); -JEMALLOC_EXPORT int JEMALLOC_NOTHROW je_mallctlbymib(const size_t *mib, size_t miblen, void *oldp, - size_t *oldlenp, void *newp, size_t newlen); -JEMALLOC_EXPORT void JEMALLOC_NOTHROW je_malloc_stats_print(void (*write_cb)(void *, const char *), - void *je_cbopaque, const char *opts); -JEMALLOC_EXPORT size_t JEMALLOC_NOTHROW - je_malloc_usable_size(JEMALLOC_USABLE_SIZE_CONST void *ptr) JEMALLOC_CXX_THROW; - -#ifdef JEMALLOC_OVERRIDE_MEMALIGN -JEMALLOC_EXPORT JEMALLOC_ALLOCATOR JEMALLOC_RESTRICT_RETURN void JEMALLOC_NOTHROW *je_memalign( - size_t alignment, size_t size) JEMALLOC_CXX_THROW JEMALLOC_ATTR(malloc); -#endif - -#ifdef JEMALLOC_OVERRIDE_VALLOC -JEMALLOC_EXPORT JEMALLOC_ALLOCATOR JEMALLOC_RESTRICT_RETURN void JEMALLOC_NOTHROW *je_valloc( - size_t size) JEMALLOC_CXX_THROW JEMALLOC_ATTR(malloc); -#endif - -/* - * void * - * chunk_alloc(void *new_addr, size_t size, size_t alignment, bool *zero, - * bool *commit, unsigned arena_ind); - */ -typedef void *(chunk_alloc_t)(void *, size_t, size_t, bool *, bool *, unsigned); - -/* - * bool - * chunk_dalloc(void *chunk, size_t size, bool committed, unsigned arena_ind); - */ -typedef bool (chunk_dalloc_t)(void *, size_t, bool, unsigned); - -/* - * bool - * chunk_commit(void *chunk, size_t size, size_t offset, size_t length, - * unsigned arena_ind); - */ -typedef bool (chunk_commit_t)(void *, size_t, size_t, size_t, unsigned); - -/* - * bool - * chunk_decommit(void *chunk, size_t size, size_t offset, size_t length, - * unsigned arena_ind); - */ -typedef bool (chunk_decommit_t)(void *, size_t, size_t, size_t, unsigned); - -/* - * bool - * chunk_purge(void *chunk, size_t size, size_t offset, size_t length, - * unsigned arena_ind); - */ -typedef bool (chunk_purge_t)(void *, size_t, size_t, size_t, unsigned); - -/* - * bool - * chunk_split(void *chunk, size_t size, size_t size_a, size_t size_b, - * bool committed, unsigned arena_ind); - */ -typedef bool (chunk_split_t)(void *, size_t, size_t, size_t, bool, unsigned); - -/* - * bool - * chunk_merge(void *chunk_a, size_t size_a, void *chunk_b, size_t size_b, - * bool committed, unsigned arena_ind); - */ -typedef bool (chunk_merge_t)(void *, size_t, void *, size_t, bool, unsigned); - -typedef struct { - chunk_alloc_t *alloc; - chunk_dalloc_t *dalloc; - chunk_commit_t *commit; - chunk_decommit_t *decommit; - chunk_purge_t *purge; - chunk_split_t *split; - chunk_merge_t *merge; -} chunk_hooks_t; - -/* - * By default application code must explicitly refer to mangled symbol names, - * so that it is possible to use jemalloc in conjunction with another allocator - * in the same application. Define JEMALLOC_MANGLE in order to cause automatic - * name mangling that matches the API prefixing that happened as a result of - * --with-mangling and/or --with-jemalloc-prefix configuration settings. - */ -#ifdef JEMALLOC_MANGLE -# ifndef JEMALLOC_NO_DEMANGLE -# define JEMALLOC_NO_DEMANGLE -# endif -# define malloc_conf je_malloc_conf -# define malloc_message je_malloc_message -# define malloc je_malloc -# define calloc je_calloc -# define posix_memalign je_posix_memalign -# define aligned_alloc je_aligned_alloc -# define realloc je_realloc -# define free je_free -# define mallocx je_mallocx -# define rallocx je_rallocx -# define xallocx je_xallocx -# define sallocx je_sallocx -# define dallocx je_dallocx -# define sdallocx je_sdallocx -# define nallocx je_nallocx -# define mallctl je_mallctl -# define mallctlnametomib je_mallctlnametomib -# define mallctlbymib je_mallctlbymib -# define malloc_stats_print je_malloc_stats_print -# define malloc_usable_size je_malloc_usable_size -# define memalign je_memalign -# define valloc je_valloc -#endif - -/* - * The je_* macros can be used as stable alternative names for the - * public jemalloc API if JEMALLOC_NO_DEMANGLE is defined. This is primarily - * meant for use in jemalloc itself, but it can be used by application code to - * provide isolation from the name mangling specified via --with-mangling - * and/or --with-jemalloc-prefix. - */ -#ifndef JEMALLOC_NO_DEMANGLE -# undef je_malloc_conf -# undef je_malloc_message -# undef je_malloc -# undef je_calloc -# undef je_posix_memalign -# undef je_aligned_alloc -# undef je_realloc -# undef je_free -# undef je_mallocx -# undef je_rallocx -# undef je_xallocx -# undef je_sallocx -# undef je_dallocx -# undef je_sdallocx -# undef je_nallocx -# undef je_mallctl -# undef je_mallctlnametomib -# undef je_mallctlbymib -# undef je_malloc_stats_print -# undef je_malloc_usable_size -# undef je_memalign -# undef je_valloc -#endif - -#ifdef __cplusplus -} -#endif -#endif /* JEMALLOC_H_ */ diff --git a/contrib/deneva/obj/deps b/contrib/deneva/obj/deps deleted file mode 100644 index c66b2a67..00000000 --- a/contrib/deneva/obj/deps +++ /dev/null @@ -1,654 +0,0 @@ -obj/config.o: config.cpp config.h -obj/da_wl.o: benchmarks/da_wl.cpp benchmarks/da.h config.h system/query.h \ - system/global.h statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/array.h system/mem_alloc.h storage/row.h system/txn.h \ - transport/message.h system/helper.h system/logger.h system/array.h \ - system/wl.h benchmarks/creator.h benchmarks/generic.h \ - benchmarks/da_const.h storage/index_btree.h storage/index_base.h \ - storage/index_hash.h system/mem_alloc.h storage/table.h system/thread.h -obj/pps_helper.o: benchmarks/pps_helper.cpp benchmarks/pps_helper.h \ - system/global.h config.h statistics/stats.h \ - statistics/../system/global.h statistics/stats_array.h system/pool.h \ - system/global.h system/helper.h system/concurrentqueue.h \ - system/txn_table.h system/logger.h system/sim_manager.h \ - benchmarks/da_block_queue.h system/helper.h benchmarks/tpcc_helper.h -obj/ycsb_query.o: benchmarks/ycsb_query.cpp system/query.h system/global.h \ - config.h statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/array.h system/mem_alloc.h benchmarks/ycsb_query.h \ - system/helper.h system/array.h system/mem_alloc.h system/wl.h \ - benchmarks/ycsb.h system/txn.h transport/message.h system/logger.h \ - storage/table.h transport/message.h -obj/tpcc_wl.o: benchmarks/tpcc_wl.cpp system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/global.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/helper.h \ - benchmarks/tpcc.h system/wl.h system/txn.h system/array.h \ - system/mem_alloc.h transport/message.h system/logger.h system/array.h \ - system/query.h storage/row.h system/thread.h storage/table.h \ - storage/index_hash.h storage/index_base.h storage/index_btree.h \ - benchmarks/tpcc_helper.h system/mem_alloc.h benchmarks/tpcc_const.h -obj/da_txn.o: benchmarks/da_txn.cpp config.h benchmarks/da.h system/query.h \ - system/global.h statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/array.h system/mem_alloc.h storage/row.h system/txn.h \ - transport/message.h system/helper.h system/logger.h system/array.h \ - system/wl.h benchmarks/creator.h benchmarks/generic.h \ - benchmarks/da_const.h benchmarks/da_query.h storage/index_btree.h \ - storage/index_base.h storage/index_hash.h transport/message.h \ - system/msg_queue.h system/lock_free_queue.h storage/table.h \ - system/thread.h transport/transport.h transport/nn.hpp -obj/ycsb_wl.o: benchmarks/ycsb_wl.cpp system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/global.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/helper.h \ - benchmarks/ycsb.h system/wl.h system/txn.h system/array.h \ - system/mem_alloc.h transport/message.h system/logger.h system/array.h \ - system/thread.h storage/table.h storage/row.h storage/index_hash.h \ - storage/index_base.h storage/index_btree.h storage/catalog.h \ - system/manager.h concurrency_control/row_lock.h \ - concurrency_control/row_ts.h concurrency_control/row_mvcc.h \ - system/mem_alloc.h system/query.h -obj/generic.o: benchmarks/generic.cpp benchmarks/generic.h -obj/tpcc_query.o: benchmarks/tpcc_query.cpp system/query.h system/global.h \ - config.h statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/array.h system/mem_alloc.h benchmarks/tpcc_query.h \ - system/helper.h benchmarks/tpcc.h system/wl.h system/txn.h \ - transport/message.h system/logger.h system/array.h storage/row.h \ - benchmarks/tpcc_helper.h system/mem_alloc.h storage/table.h \ - transport/message.h -obj/ycsb_txn.o: benchmarks/ycsb_txn.cpp system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/global.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/helper.h \ - benchmarks/ycsb.h system/wl.h system/txn.h system/array.h \ - system/mem_alloc.h transport/message.h system/logger.h system/array.h \ - benchmarks/ycsb_query.h system/query.h system/thread.h storage/table.h \ - storage/row.h storage/index_hash.h storage/index_base.h \ - storage/index_btree.h storage/catalog.h system/manager.h \ - concurrency_control/row_lock.h concurrency_control/row_ts.h \ - concurrency_control/row_mvcc.h system/mem_alloc.h system/msg_queue.h \ - system/lock_free_queue.h transport/message.h -obj/da_query_queue.o: benchmarks/da_query_queue.cpp -obj/tpcc_helper.o: benchmarks/tpcc_helper.cpp benchmarks/tpcc_helper.h \ - system/global.h config.h statistics/stats.h \ - statistics/../system/global.h statistics/stats_array.h system/pool.h \ - system/global.h system/helper.h system/concurrentqueue.h \ - system/txn_table.h system/logger.h system/sim_manager.h \ - benchmarks/da_block_queue.h system/helper.h -obj/pps_query.o: benchmarks/pps_query.cpp system/query.h system/global.h \ - config.h statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/array.h system/mem_alloc.h benchmarks/pps_query.h system/helper.h \ - benchmarks/pps.h system/wl.h system/txn.h transport/message.h \ - system/logger.h system/array.h storage/row.h benchmarks/pps_helper.h \ - benchmarks/tpcc_helper.h system/mem_alloc.h storage/table.h \ - transport/message.h -obj/tpcc_txn.o: benchmarks/tpcc_txn.cpp benchmarks/tpcc.h system/wl.h \ - system/global.h config.h statistics/stats.h \ - statistics/../system/global.h statistics/stats_array.h system/pool.h \ - system/helper.h system/concurrentqueue.h system/txn_table.h \ - system/logger.h system/sim_manager.h benchmarks/da_block_queue.h \ - system/global.h system/txn.h system/array.h system/mem_alloc.h \ - transport/message.h system/helper.h system/logger.h system/array.h \ - system/query.h storage/row.h benchmarks/tpcc_query.h \ - benchmarks/tpcc_helper.h system/thread.h storage/table.h \ - storage/index_hash.h storage/index_base.h storage/index_btree.h \ - benchmarks/tpcc_const.h transport/transport.h transport/nn.hpp \ - system/msg_queue.h system/lock_free_queue.h transport/message.h -obj/da_block_queue.o: benchmarks/da_block_queue.cpp \ - benchmarks/da_block_queue.h system/global.h config.h statistics/stats.h \ - statistics/../system/global.h statistics/stats_array.h system/pool.h \ - system/global.h system/helper.h system/concurrentqueue.h \ - system/txn_table.h system/logger.h system/sim_manager.h -obj/pps_wl.o: benchmarks/pps_wl.cpp system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/global.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/helper.h \ - benchmarks/pps.h system/wl.h system/txn.h system/array.h \ - system/mem_alloc.h transport/message.h system/logger.h system/array.h \ - system/query.h storage/row.h system/thread.h storage/table.h \ - storage/index_hash.h storage/index_base.h storage/index_btree.h \ - benchmarks/pps_helper.h benchmarks/tpcc_helper.h system/mem_alloc.h -obj/creator.o: benchmarks/creator.cpp benchmarks/creator.h \ - benchmarks/generic.h -obj/pps_txn.o: benchmarks/pps_txn.cpp benchmarks/pps.h system/wl.h \ - system/global.h config.h statistics/stats.h \ - statistics/../system/global.h statistics/stats_array.h system/pool.h \ - system/helper.h system/concurrentqueue.h system/txn_table.h \ - system/logger.h system/sim_manager.h benchmarks/da_block_queue.h \ - system/global.h system/txn.h system/array.h system/mem_alloc.h \ - transport/message.h system/helper.h system/logger.h system/array.h \ - system/query.h storage/row.h benchmarks/pps_query.h \ - benchmarks/pps_helper.h benchmarks/tpcc_helper.h system/thread.h \ - storage/table.h storage/index_hash.h storage/index_base.h \ - storage/index_btree.h transport/transport.h transport/nn.hpp \ - system/msg_queue.h system/lock_free_queue.h transport/message.h -obj/da_query.o: benchmarks/da_query.cpp system/query.h system/global.h \ - config.h statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/array.h system/mem_alloc.h benchmarks/da_query.h system/helper.h \ - benchmarks/da.h storage/row.h system/txn.h transport/message.h \ - system/logger.h system/array.h system/wl.h benchmarks/creator.h \ - benchmarks/generic.h system/mem_alloc.h storage/table.h \ - transport/message.h -obj/client_query.o: client/client_query.cpp client/client_query.h \ - system/global.h config.h statistics/stats.h \ - statistics/../system/global.h statistics/stats_array.h system/pool.h \ - system/global.h system/helper.h system/concurrentqueue.h \ - system/txn_table.h system/logger.h system/sim_manager.h \ - benchmarks/da_block_queue.h system/helper.h system/query.h \ - system/array.h system/mem_alloc.h system/mem_alloc.h system/wl.h \ - storage/table.h benchmarks/ycsb_query.h system/array.h \ - benchmarks/tpcc_query.h benchmarks/pps_query.h benchmarks/da_query.h \ - benchmarks/da.h storage/row.h system/txn.h transport/message.h \ - system/logger.h benchmarks/creator.h benchmarks/generic.h -obj/client_txn.o: client/client_txn.cpp client/client_txn.h system/global.h \ - config.h statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/global.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/mem_alloc.h -obj/wsi.o: concurrency_control/wsi.cpp system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/global.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/helper.h \ - system/txn.h system/array.h system/mem_alloc.h transport/message.h \ - system/logger.h system/array.h concurrency_control/wsi.h storage/row.h \ - system/manager.h system/mem_alloc.h concurrency_control/row_wsi.h -obj/row_null.o: concurrency_control/row_null.cpp \ - concurrency_control/row_null.h concurrency_control/../storage/row.h \ - system/global.h config.h statistics/stats.h \ - statistics/../system/global.h statistics/stats_array.h system/pool.h \ - system/global.h system/helper.h system/concurrentqueue.h \ - system/txn_table.h system/logger.h system/sim_manager.h \ - benchmarks/da_block_queue.h system/helper.h system/manager.h \ - system/mem_alloc.h system/txn.h system/array.h system/mem_alloc.h \ - transport/message.h system/logger.h system/array.h -obj/row_wsi.o: concurrency_control/row_wsi.cpp system/txn.h system/global.h \ - config.h statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/array.h system/mem_alloc.h transport/message.h system/helper.h \ - system/logger.h system/array.h storage/row.h system/manager.h \ - concurrency_control/row_wsi.h system/mem_alloc.h -obj/row_occ.o: concurrency_control/row_occ.cpp system/txn.h system/global.h \ - config.h statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/array.h system/mem_alloc.h transport/message.h system/helper.h \ - system/logger.h system/array.h storage/row.h \ - concurrency_control/row_occ.h system/mem_alloc.h -obj/occ.o: concurrency_control/occ.cpp concurrency_control/occ.h \ - storage/row.h system/global.h config.h statistics/stats.h \ - statistics/../system/global.h statistics/stats_array.h system/pool.h \ - system/global.h system/helper.h system/concurrentqueue.h \ - system/txn_table.h system/logger.h system/sim_manager.h \ - benchmarks/da_block_queue.h system/helper.h system/manager.h \ - system/mem_alloc.h concurrency_control/row_occ.h system/txn.h \ - system/array.h system/mem_alloc.h transport/message.h system/logger.h \ - system/array.h -obj/ssi.o: concurrency_control/ssi.cpp system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/global.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/helper.h \ - system/txn.h system/array.h system/mem_alloc.h transport/message.h \ - system/logger.h system/array.h concurrency_control/ssi.h storage/row.h \ - system/manager.h system/mem_alloc.h concurrency_control/row_ssi.h -obj/row_ts.o: concurrency_control/row_ts.cpp system/txn.h system/global.h \ - config.h statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/array.h system/mem_alloc.h transport/message.h system/helper.h \ - system/logger.h system/array.h storage/row.h \ - concurrency_control/row_ts.h system/mem_alloc.h system/manager.h -obj/bocc.o: concurrency_control/bocc.cpp system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/global.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/helper.h \ - system/txn.h system/array.h system/mem_alloc.h transport/message.h \ - system/logger.h system/array.h concurrency_control/bocc.h storage/row.h \ - system/manager.h system/mem_alloc.h concurrency_control/row_occ.h -obj/focc.o: concurrency_control/focc.cpp system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/global.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/helper.h \ - system/txn.h system/array.h system/mem_alloc.h transport/message.h \ - system/logger.h system/array.h concurrency_control/focc.h storage/row.h \ - system/manager.h system/mem_alloc.h concurrency_control/row_occ.h -obj/maat.o: concurrency_control/maat.cpp system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/global.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/helper.h \ - system/txn.h system/array.h system/mem_alloc.h transport/message.h \ - system/logger.h system/array.h concurrency_control/maat.h storage/row.h \ - system/manager.h system/mem_alloc.h concurrency_control/row_maat.h -obj/row_mvcc.o: concurrency_control/row_mvcc.cpp system/txn.h system/global.h \ - config.h statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/array.h system/mem_alloc.h transport/message.h system/helper.h \ - system/logger.h system/array.h storage/row.h system/manager.h \ - concurrency_control/row_mvcc.h system/mem_alloc.h -obj/silo.o: concurrency_control/silo.cpp system/txn.h system/global.h \ - config.h statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/array.h system/mem_alloc.h transport/message.h system/helper.h \ - system/logger.h system/array.h storage/row.h \ - concurrency_control/row_silo.h -obj/row_ssi.o: concurrency_control/row_ssi.cpp system/txn.h system/global.h \ - config.h statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/array.h system/mem_alloc.h transport/message.h system/helper.h \ - system/logger.h system/array.h storage/row.h system/manager.h \ - concurrency_control/ssi.h concurrency_control/row_ssi.h \ - system/mem_alloc.h -obj/row_lock.o: concurrency_control/row_lock.cpp system/helper.h \ - system/global.h config.h statistics/stats.h \ - statistics/../system/global.h statistics/stats_array.h system/pool.h \ - system/helper.h system/concurrentqueue.h system/txn_table.h \ - system/logger.h system/sim_manager.h benchmarks/da_block_queue.h \ - system/global.h system/manager.h system/mem_alloc.h storage/row.h \ - system/txn.h system/array.h system/mem_alloc.h transport/message.h \ - system/logger.h system/array.h concurrency_control/row_lock.h -obj/sundial.o: concurrency_control/sundial.cpp system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/global.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/helper.h \ - system/txn.h system/array.h system/mem_alloc.h transport/message.h \ - system/logger.h system/array.h storage/row.h \ - concurrency_control/sundial.h system/manager.h system/mem_alloc.h \ - concurrency_control/row_sundial.h -obj/row_maat.o: concurrency_control/row_maat.cpp storage/row.h \ - system/global.h config.h statistics/stats.h \ - statistics/../system/global.h statistics/stats_array.h system/pool.h \ - system/global.h system/helper.h system/concurrentqueue.h \ - system/txn_table.h system/logger.h system/sim_manager.h \ - benchmarks/da_block_queue.h system/txn.h system/array.h \ - system/mem_alloc.h transport/message.h system/helper.h system/logger.h \ - system/array.h concurrency_control/row_maat.h system/mem_alloc.h \ - system/manager.h concurrency_control/maat.h -obj/row_tictoc.o: concurrency_control/row_tictoc.cpp storage/row.h \ - system/global.h config.h statistics/stats.h \ - statistics/../system/global.h statistics/stats_array.h system/pool.h \ - system/global.h system/helper.h system/concurrentqueue.h \ - system/txn_table.h system/logger.h system/sim_manager.h \ - benchmarks/da_block_queue.h system/txn.h system/array.h \ - system/mem_alloc.h transport/message.h system/helper.h system/logger.h \ - system/array.h concurrency_control/row_sundial.h system/mem_alloc.h \ - system/manager.h concurrency_control/sundial.h -obj/row_silo.o: concurrency_control/row_silo.cpp system/txn.h system/global.h \ - config.h statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/array.h system/mem_alloc.h transport/message.h system/helper.h \ - system/logger.h system/array.h storage/row.h \ - concurrency_control/row_silo.h system/mem_alloc.h -obj/hash.o: concurrency_control/hash.cpp concurrency_control/hash.h -obj/catalog.o: storage/catalog.cpp storage/catalog.h system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/global.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/helper.h -obj/index_hash.o: storage/index_hash.cpp system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/global.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h storage/index_hash.h \ - system/helper.h storage/index_base.h system/mem_alloc.h storage/row.h -obj/index_btree.o: storage/index_btree.cpp system/mem_alloc.h system/global.h \ - config.h statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - storage/index_btree.h system/helper.h storage/index_base.h storage/row.h -obj/row.o: storage/row.cpp system/global.h config.h statistics/stats.h \ - statistics/../system/global.h statistics/stats_array.h system/pool.h \ - system/global.h system/helper.h system/concurrentqueue.h \ - system/txn_table.h system/logger.h system/sim_manager.h \ - benchmarks/da_block_queue.h storage/table.h storage/catalog.h \ - system/helper.h storage/row.h system/txn.h system/array.h \ - system/mem_alloc.h transport/message.h system/logger.h system/array.h \ - system/mem_alloc.h concurrency_control/row_lock.h \ - concurrency_control/row_maat.h concurrency_control/row_mvcc.h \ - concurrency_control/row_occ.h concurrency_control/row_ts.h \ - concurrency_control/row_sundial.h concurrency_control/row_ssi.h \ - concurrency_control/row_wsi.h concurrency_control/row_null.h \ - concurrency_control/../storage/row.h concurrency_control/row_silo.h \ - system/manager.h -obj/table.o: storage/table.cpp system/global.h config.h statistics/stats.h \ - statistics/../system/global.h statistics/stats_array.h system/pool.h \ - system/global.h system/helper.h system/concurrentqueue.h \ - system/txn_table.h system/logger.h system/sim_manager.h \ - benchmarks/da_block_queue.h system/helper.h storage/table.h \ - storage/catalog.h storage/row.h system/mem_alloc.h -obj/message.o: transport/message.cpp system/mem_alloc.h system/global.h \ - config.h statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/query.h system/array.h system/mem_alloc.h benchmarks/ycsb_query.h \ - system/helper.h system/array.h benchmarks/ycsb.h system/wl.h \ - system/txn.h transport/message.h system/logger.h benchmarks/tpcc_query.h \ - benchmarks/tpcc.h storage/row.h benchmarks/pps_query.h benchmarks/pps.h \ - transport/message.h concurrency_control/maat.h benchmarks/da.h \ - benchmarks/creator.h benchmarks/generic.h benchmarks/da_query.h \ - benchmarks/da.h concurrency_control/sundial.h -obj/msg_thread.o: transport/msg_thread.cpp transport/msg_thread.h \ - system/global.h config.h statistics/stats.h \ - statistics/../system/global.h statistics/stats_array.h system/pool.h \ - system/global.h system/helper.h system/concurrentqueue.h \ - system/txn_table.h system/logger.h system/sim_manager.h \ - benchmarks/da_block_queue.h system/helper.h transport/nn.hpp \ - system/msg_queue.h system/lock_free_queue.h transport/message.h \ - system/logger.h system/array.h system/mem_alloc.h system/mem_alloc.h \ - transport/transport.h system/query.h system/array.h \ - benchmarks/ycsb_query.h benchmarks/tpcc_query.h system/pool.h -obj/transport.o: transport/transport.cpp transport/transport.h \ - system/global.h config.h statistics/stats.h \ - statistics/../system/global.h statistics/stats_array.h system/pool.h \ - system/global.h system/helper.h system/concurrentqueue.h \ - system/txn_table.h system/logger.h system/sim_manager.h \ - benchmarks/da_block_queue.h transport/nn.hpp system/query.h \ - system/array.h system/mem_alloc.h system/manager.h transport/message.h \ - system/helper.h system/logger.h system/array.h benchmarks/tpcc_query.h -obj/io_thread.o: system/io_thread.cpp system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/manager.h system/thread.h system/io_thread.h transport/message.h \ - system/helper.h system/logger.h system/array.h system/global.h \ - system/helper.h system/mem_alloc.h system/query.h system/array.h \ - benchmarks/ycsb_query.h system/query.h benchmarks/tpcc_query.h \ - system/mem_alloc.h transport/transport.h transport/nn.hpp \ - transport/msg_thread.h system/msg_queue.h system/lock_free_queue.h \ - client/client_txn.h system/work_queue.h system/txn.h transport/message.h \ - benchmarks/ycsb.h system/wl.h system/txn.h -obj/manager.o: system/manager.cpp system/global.h config.h statistics/stats.h \ - statistics/../system/global.h statistics/stats_array.h system/pool.h \ - system/helper.h system/concurrentqueue.h system/txn_table.h \ - system/logger.h system/sim_manager.h benchmarks/da_block_queue.h \ - system/global.h system/manager.h storage/row.h system/txn.h \ - system/array.h system/mem_alloc.h transport/message.h system/helper.h \ - system/logger.h system/array.h system/http.h system/libtcpforcpp.h -obj/client_thread.o: system/client_thread.cpp system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/thread.h system/client_thread.h system/query.h system/array.h \ - system/mem_alloc.h benchmarks/ycsb_query.h system/helper.h \ - system/query.h system/array.h benchmarks/tpcc_query.h \ - client/client_query.h transport/transport.h transport/nn.hpp \ - client/client_txn.h transport/msg_thread.h system/msg_queue.h \ - system/lock_free_queue.h system/wl.h transport/message.h system/logger.h -obj/thread.o: system/thread.cpp system/thread.h system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/manager.h transport/message.h system/helper.h system/logger.h \ - system/array.h system/global.h system/helper.h system/mem_alloc.h \ - system/msg_queue.h system/lock_free_queue.h system/query.h \ - system/array.h system/txn.h transport/message.h system/wl.h -obj/global.o: system/global.cpp system/global.h config.h statistics/stats.h \ - statistics/../system/global.h statistics/stats_array.h system/pool.h \ - system/helper.h system/concurrentqueue.h system/txn_table.h \ - system/logger.h system/sim_manager.h benchmarks/da_block_queue.h \ - system/global.h system/mem_alloc.h system/manager.h system/query.h \ - system/array.h client/client_query.h system/helper.h system/query.h \ - concurrency_control/occ.h storage/row.h concurrency_control/bocc.h \ - concurrency_control/focc.h concurrency_control/ssi.h \ - concurrency_control/wsi.h transport/transport.h transport/nn.hpp \ - system/work_queue.h system/abort_queue.h client/client_txn.h \ - concurrency_control/maat.h system/msg_queue.h system/lock_free_queue.h \ - system/sequencer.h concurrency_control/sundial.h system/http.h \ - system/libtcpforcpp.h -obj/sim_manager.o: system/sim_manager.cpp system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h -obj/log_thread.o: system/log_thread.cpp system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/thread.h system/log_thread.h -obj/txn.o: system/txn.cpp system/helper.h system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/concurrentqueue.h \ - system/txn_table.h system/logger.h system/sim_manager.h \ - benchmarks/da_block_queue.h system/global.h system/txn.h system/array.h \ - system/mem_alloc.h transport/message.h system/helper.h system/logger.h \ - system/array.h storage/row.h system/wl.h system/query.h system/thread.h \ - concurrency_control/occ.h concurrency_control/focc.h \ - concurrency_control/bocc.h concurrency_control/row_occ.h storage/table.h \ - storage/catalog.h storage/index_btree.h storage/index_base.h \ - storage/index_hash.h concurrency_control/maat.h system/manager.h \ - transport/message.h system/msg_queue.h system/lock_free_queue.h \ - benchmarks/ycsb_query.h system/query.h benchmarks/tpcc_query.h \ - benchmarks/pps_query.h concurrency_control/sundial.h \ - concurrency_control/ssi.h concurrency_control/wsi.h -obj/msg_queue.o: system/msg_queue.cpp system/msg_queue.h system/global.h \ - config.h statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/lock_free_queue.h system/mem_alloc.h system/query.h \ - system/array.h transport/message.h system/helper.h system/logger.h \ - system/array.h -obj/pool.o: system/pool.cpp system/pool.h system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/txn_table.h system/helper.h \ - system/logger.h system/concurrentqueue.h system/sim_manager.h \ - benchmarks/da_block_queue.h system/global.h system/txn.h system/array.h \ - system/mem_alloc.h transport/message.h system/helper.h system/logger.h \ - system/array.h system/wl.h benchmarks/ycsb_query.h system/query.h \ - system/global.h system/helper.h system/array.h benchmarks/ycsb.h \ - system/wl.h system/txn.h benchmarks/tpcc_query.h benchmarks/pps_query.h \ - benchmarks/da.h storage/row.h benchmarks/creator.h benchmarks/generic.h \ - benchmarks/da_query.h benchmarks/da.h system/query.h system/msg_queue.h \ - system/lock_free_queue.h -obj/txn_table.o: system/txn_table.cpp system/txn_table.h system/global.h \ - config.h statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/logger.h system/sim_manager.h \ - benchmarks/da_block_queue.h system/global.h system/mem_alloc.h \ - transport/message.h system/helper.h system/logger.h system/array.h \ - system/global.h system/helper.h system/mem_alloc.h system/query.h \ - system/array.h storage/row.h benchmarks/tpcc.h system/wl.h system/txn.h \ - system/array.h transport/message.h system/query.h \ - benchmarks/tpcc_query.h system/txn.h system/work_queue.h \ - benchmarks/ycsb.h benchmarks/ycsb_query.h -obj/abort_queue.o: system/abort_queue.cpp system/mem_alloc.h system/global.h \ - config.h statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/abort_queue.h transport/message.h system/helper.h system/logger.h \ - system/array.h system/global.h system/helper.h system/mem_alloc.h \ - system/work_queue.h -obj/sequencer.o: system/sequencer.cpp system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/sequencer.h system/query.h system/array.h system/mem_alloc.h \ - benchmarks/ycsb_query.h system/helper.h system/query.h system/array.h \ - benchmarks/da_query.h benchmarks/da.h storage/row.h system/txn.h \ - system/global.h system/helper.h system/array.h transport/message.h \ - system/logger.h system/wl.h benchmarks/creator.h benchmarks/generic.h \ - benchmarks/tpcc_query.h benchmarks/pps_query.h transport/transport.h \ - transport/nn.hpp system/wl.h system/msg_queue.h system/lock_free_queue.h \ - transport/msg_thread.h system/work_queue.h transport/message.h -obj/ltsrpc.pb.o: system/ltsrpc.pb.cpp system/ltsrpc.pb.h -obj/abort_thread.o: system/abort_thread.cpp system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/thread.h system/abort_thread.h system/abort_queue.h -obj/helper.o: system/helper.cpp system/global.h config.h statistics/stats.h \ - statistics/../system/global.h statistics/stats_array.h system/pool.h \ - system/helper.h system/concurrentqueue.h system/txn_table.h \ - system/logger.h system/sim_manager.h benchmarks/da_block_queue.h \ - system/global.h system/mem_alloc.h -obj/http.o: system/http.cpp system/global.h config.h statistics/stats.h \ - statistics/../system/global.h statistics/stats_array.h system/pool.h \ - system/helper.h system/concurrentqueue.h system/txn_table.h \ - system/logger.h system/sim_manager.h benchmarks/da_block_queue.h \ - system/global.h system/manager.h system/http.h system/libtcpforcpp.h \ - system/mem_alloc.h -obj/wl.o: system/wl.cpp system/wl.h system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - storage/catalog.h system/helper.h storage/index_btree.h \ - storage/index_base.h storage/index_hash.h system/mem_alloc.h \ - storage/row.h storage/table.h -obj/work_queue.o: system/work_queue.cpp system/work_queue.h system/global.h \ - config.h statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/mem_alloc.h system/query.h system/array.h transport/message.h \ - system/helper.h system/logger.h system/array.h client/client_query.h \ - system/query.h -obj/logger.o: system/logger.cpp system/logger.h system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/sim_manager.h \ - benchmarks/da_block_queue.h system/global.h system/work_queue.h \ - transport/message.h system/helper.h system/logger.h system/array.h \ - system/global.h system/helper.h system/mem_alloc.h system/mem_alloc.h -obj/calvin_thread.o: system/calvin_thread.cpp system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/manager.h system/thread.h system/calvin_thread.h system/txn.h \ - system/array.h system/mem_alloc.h transport/message.h system/helper.h \ - system/logger.h system/array.h system/wl.h system/query.h \ - benchmarks/ycsb_query.h system/query.h benchmarks/tpcc_query.h \ - transport/transport.h transport/nn.hpp transport/msg_thread.h \ - system/msg_queue.h system/lock_free_queue.h system/sequencer.h \ - transport/message.h system/work_queue.h -obj/lock_free_queue.o: system/lock_free_queue.cpp system/helper.h \ - system/global.h config.h statistics/stats.h \ - statistics/../system/global.h statistics/stats_array.h system/pool.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/lock_free_queue.h -obj/worker_thread.o: system/worker_thread.cpp system/worker_thread.h \ - system/global.h config.h statistics/stats.h \ - statistics/../system/global.h statistics/stats_array.h system/pool.h \ - system/helper.h system/concurrentqueue.h system/txn_table.h \ - system/logger.h system/sim_manager.h benchmarks/da_block_queue.h \ - system/global.h system/thread.h system/abort_queue.h \ - concurrency_control/maat.h storage/row.h system/manager.h \ - transport/message.h system/helper.h system/logger.h system/array.h \ - system/global.h system/helper.h system/mem_alloc.h system/msg_queue.h \ - system/lock_free_queue.h transport/msg_thread.h transport/nn.hpp \ - system/query.h system/array.h benchmarks/tpcc_query.h system/query.h \ - system/txn.h transport/message.h system/wl.h system/work_queue.h \ - benchmarks/ycsb_query.h concurrency_control/sundial.h \ - concurrency_control/wsi.h concurrency_control/ssi.h \ - concurrency_control/focc.h concurrency_control/bocc.h -obj/parser.o: system/parser.cpp system/global.h config.h statistics/stats.h \ - statistics/../system/global.h statistics/stats_array.h system/pool.h \ - system/helper.h system/concurrentqueue.h system/txn_table.h \ - system/logger.h system/sim_manager.h benchmarks/da_block_queue.h \ - system/global.h -obj/libtcpforcpp.o: system/libtcpforcpp.cpp system/libtcpforcpp.h \ - system/manager.h system/helper.h system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/concurrentqueue.h \ - system/txn_table.h system/logger.h system/sim_manager.h \ - benchmarks/da_block_queue.h system/global.h system/ltsrpc.pb.h -obj/main.o: system/main.cpp system/abort_thread.h system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/thread.h system/calvin_thread.h client/client_query.h \ - system/helper.h system/query.h system/global.h system/helper.h \ - system/array.h system/mem_alloc.h system/io_thread.h transport/message.h \ - system/logger.h system/array.h system/log_thread.h \ - concurrency_control/maat.h storage/row.h system/manager.h \ - system/msg_queue.h system/lock_free_queue.h concurrency_control/occ.h \ - benchmarks/pps.h system/wl.h system/txn.h transport/message.h \ - system/query.h system/sequencer.h system/abort_queue.h benchmarks/tpcc.h \ - transport/transport.h transport/nn.hpp system/work_queue.h \ - system/worker_thread.h benchmarks/ycsb.h benchmarks/ycsb_query.h \ - benchmarks/da.h benchmarks/creator.h benchmarks/generic.h \ - concurrency_control/ssi.h concurrency_control/wsi.h \ - concurrency_control/focc.h concurrency_control/bocc.h \ - concurrency_control/sundial.h system/http.h system/libtcpforcpp.h -obj/hash.o: system/hash.cpp system/hash.h -obj/mem_alloc.o: system/mem_alloc.cpp system/mem_alloc.h system/global.h \ - config.h statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h -obj/query.o: system/query.cpp system/query.h system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/global.h \ - system/array.h system/mem_alloc.h system/wl.h storage/table.h \ - benchmarks/ycsb_query.h system/helper.h system/query.h system/array.h \ - benchmarks/tpcc_query.h benchmarks/pps_query.h benchmarks/da_query.h \ - benchmarks/da.h storage/row.h system/txn.h system/global.h \ - system/helper.h system/array.h transport/message.h system/logger.h \ - system/wl.h benchmarks/creator.h benchmarks/generic.h -obj/stats.o: statistics/stats.cpp statistics/stats.h \ - statistics/../system/global.h config.h statistics/stats.h \ - statistics/../system/pool.h statistics/../system/global.h \ - statistics/../system/helper.h statistics/../system/concurrentqueue.h \ - statistics/../system/txn_table.h statistics/../system/logger.h \ - statistics/../system/sim_manager.h benchmarks/da_block_queue.h \ - system/global.h statistics/stats_array.h client/client_txn.h \ - system/helper.h system/mem_alloc.h system/global.h system/work_queue.h \ - system/helper.h -obj/stats_array.o: statistics/stats_array.cpp system/global.h config.h \ - statistics/stats.h statistics/../system/global.h \ - statistics/stats_array.h system/pool.h system/global.h system/helper.h \ - system/concurrentqueue.h system/txn_table.h system/logger.h \ - system/sim_manager.h benchmarks/da_block_queue.h system/helper.h \ - statistics/stats.h system/mem_alloc.h client/client_txn.h \ - system/work_queue.h diff --git a/contrib/deneva/patch b/contrib/deneva/patch deleted file mode 100644 index d507b514..00000000 --- a/contrib/deneva/patch +++ /dev/null @@ -1,123 +0,0 @@ -diff --git a/Makefile b/Makefile -index 6526488..bfd3f1b 100644 ---- a/Makefile -+++ b/Makefile -@@ -1,19 +1,18 @@ - CC=g++ - CFLAGS=-Wall -g -gdwarf-3 -std=c++0x - #CFLAGS += -fsanitize=address -fno-omit-frame-pointer --JEMALLOC=./jemalloc-4.0.3 - NNMSG=./nanomsg-0.5-beta - - .SUFFIXES: .o .cpp .h - - SRC_DIRS = ./ ./benchmarks/ ./client/ ./concurrency_control/ ./storage/ ./transport/ ./system/ ./statistics/#./unit_tests/ --DEPS = -I. -I./benchmarks -I./client/ -I./concurrency_control -I./storage -I./transport -I./system -I./statistics -I$(JEMALLOC)/include #-I./unit_tests -+DEPS = -I. -I./benchmarks -I./client/ -I./concurrency_control -I./storage -I./transport -I./system -I./statistics #-I./unit_tests - - CFLAGS += $(DEPS) -D NOGRAPHITE=1 -Werror -Wno-sizeof-pointer-memaccess --LDFLAGS = -Wall -L. -L$(NNMSG) -L$(JEMALLOC)/lib -Wl,-rpath,$(JEMALLOC)/lib -pthread -gdwarf-3 -lrt -std=c++0x -+LDFLAGS = -Wall -L. -L$(NNMSG) -Wl,-rpath -pthread -gdwarf-3 -lrt -std=c++0x - #LDFLAGS = -Wall -L. -L$(NNMSG) -L$(JEMALLOC)/lib -Wl,-rpath,$(JEMALLOC)/lib -pthread -gdwarf-3 -lrt -std=c++11 - LDFLAGS += $(CFLAGS) --LIBS = -lnanomsg -lanl -ljemalloc -+LIBS = -lnanomsg -lanl - - DB_MAINS = ./client/client_main.cpp ./system/sequencer_main.cpp ./unit_tests/unit_main.cpp - CL_MAINS = ./system/main.cpp ./system/sequencer_main.cpp ./unit_tests/unit_main.cpp -@@ -41,10 +40,10 @@ deps:$(CPPS_DB) - -include obj/deps - - unit_test : $(OBJS_UNIT) --# $(CC) -static -o $@ $^ $(LDFLAGS) $(LIBS) -+# $(CC) -o $@ $^ $(LDFLAGS) $(LIBS) - $(CC) -o $@ $^ $(LDFLAGS) $(LIBS) - ./obj/%.o: transport/%.cpp --# $(CC) -static -c $(CFLAGS) $(INCLUDE) $(LIBS) -o $@ $< -+# $(CC) -c $(CFLAGS) $(INCLUDE) $(LIBS) -o $@ $< - $(CC) -c $(CFLAGS) $(INCLUDE) $(LIBS) -o $@ $< - ./obj/%.o: unit_tests/%.cpp - $(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< -@@ -63,10 +62,10 @@ unit_test : $(OBJS_UNIT) - - - rundb : $(OBJS_DB) -- $(CC) -static -o $@ $^ $(LDFLAGS) $(LIBS) -+ $(CC) -o $@ $^ $(LDFLAGS) $(LIBS) - # $(CC) -o $@ $^ $(LDFLAGS) $(LIBS) - ./obj/%.o: transport/%.cpp -- $(CC) -static -c $(CFLAGS) $(INCLUDE) $(LIBS) -o $@ $< -+ $(CC) -c $(CFLAGS) $(INCLUDE) $(LIBS) -o $@ $< - # $(CC) -c $(CFLAGS) $(INCLUDE) $(LIBS) -o $@ $< - #./deps/%.d: %.cpp - # $(CC) -MM -MT $*.o -MF $@ $(CFLAGS) $< -@@ -87,10 +86,10 @@ rundb : $(OBJS_DB) - - - runcl : $(OBJS_CL) -- $(CC) -static -o $@ $^ $(LDFLAGS) $(LIBS) -+ $(CC) -o $@ $^ $(LDFLAGS) $(LIBS) - # $(CC) -o $@ $^ $(LDFLAGS) $(LIBS) - ./obj/%.o: transport/%.cpp -- $(CC) -static -c $(CFLAGS) $(INCLUDE) $(LIBS) -o $@ $< -+ $(CC) -c $(CFLAGS) $(INCLUDE) $(LIBS) -o $@ $< - # $(CC) -c $(CFLAGS) $(INCLUDE) $(LIBS) -o $@ $< - #./deps/%.d: %.cpp - # $(CC) -MM -MT $*.o -MF $@ $(CFLAGS) $< -diff --git a/config.h b/config.h -index 3e3da75..6410412 100644 ---- a/config.h -+++ b/config.h -@@ -5,11 +5,11 @@ - /***********************************************/ - // Simulation + Hardware - /***********************************************/ --#define NODE_CNT 2 -+#define NODE_CNT 1 - #define THREAD_CNT 4 - #define REM_THREAD_CNT THREAD_CNT - #define SEND_THREAD_CNT THREAD_CNT --#define CORE_CNT 8 -+#define CORE_CNT 4 - // PART_CNT should be at least NODE_CNT - #define PART_CNT NODE_CNT - #define CLIENT_NODE_CNT NODE_CNT -diff --git a/system/mem_alloc.cpp b/system/mem_alloc.cpp -index 1a78f3f..8443303 100644 ---- a/system/mem_alloc.cpp -+++ b/system/mem_alloc.cpp -@@ -17,9 +17,9 @@ - #include "mem_alloc.h" - #include "helper.h" - #include "global.h" --#include "jemalloc/jemalloc.h" -+//#include "jemalloc/jemalloc.h" - --//#define N_MALLOC -+#define N_MALLOC - - void mem_alloc::free(void * ptr, uint64_t size) { - if (NO_FREE) {} -diff --git a/transport/transport.cpp b/transport/transport.cpp -index 83780c7..3d36323 100644 ---- a/transport/transport.cpp -+++ b/transport/transport.cpp -@@ -13,7 +13,8 @@ - See the License for the specific language governing permissions and - limitations under the License. - */ -- -+#include -+#include - #include "global.h" - #include "manager.h" - #include "transport.h" -@@ -40,6 +41,7 @@ void Transport::read_ifconfig(const char * ifaddr_file) { - printf("%ld: %s\n",cnt,ifaddr[cnt]); - cnt++; - } -+ printf("%lu %u\n", cnt, g_total_node_cnt); - assert(cnt == g_total_node_cnt); - } - - diff --git a/contrib/deneva/statistics/stats.cpp b/contrib/deneva/statistics/stats.cpp deleted file mode 100644 index 3ffa56fd..00000000 --- a/contrib/deneva/statistics/stats.cpp +++ /dev/null @@ -1,1539 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "stats.h" - -#include -#include -#include - -#include "client_txn.h" -#include "global.h" -#include "helper.h" -#include "mem_alloc.h" -#include "stats_array.h" -#include "work_queue.h" - -void Stats_thd::init(uint64_t thd_id) { - DEBUG_M("Stats_thd::init part_cnt alloc\n"); - part_cnt = (uint64_t*) mem_allocator.align_alloc(sizeof(uint64_t)*g_part_cnt); - DEBUG_M("Stats_thd::init part_acc alloc\n"); - part_acc = (uint64_t*) mem_allocator.align_alloc(sizeof(uint64_t)*g_part_cnt); - DEBUG_M("Stats_thd::init worker_process_cnt_by_type alloc\n"); - worker_process_cnt_by_type= (uint64_t *) mem_allocator.align_alloc(sizeof(uint64_t) * NO_MSG); - DEBUG_M("Stats_thd::init worker_process_time_by_type alloc\n"); - worker_process_time_by_type= (double *) mem_allocator.align_alloc(sizeof(double) * NO_MSG); - - DEBUG_M("Stats_thd::init work_queue_wq_cnt alloc\n"); - work_queue_wq_cnt= (uint64_t *) mem_allocator.align_alloc(sizeof(uint64_t) * SECOND); - DEBUG_M("Stats_thd::init work_queue_tx_cnt alloc\n"); - work_queue_tx_cnt= (uint64_t *) mem_allocator.align_alloc(sizeof(uint64_t) * SECOND); - - DEBUG_M("Stats_thd::init work_queue_ewq_cnt alloc\n"); - work_queue_ewq_cnt= (uint64_t *) mem_allocator.align_alloc(sizeof(uint64_t) * SECOND); - DEBUG_M("Stats_thd::init work_queue_dwq_cnt alloc\n"); - work_queue_dwq_cnt= (uint64_t *) mem_allocator.align_alloc(sizeof(uint64_t) * SECOND); - - DEBUG_M("Stats_thd::init work_queue_etx_cnt alloc\n"); - work_queue_etx_cnt= (uint64_t *) mem_allocator.align_alloc(sizeof(uint64_t) * SECOND); - DEBUG_M("Stats_thd::init work_queue_dtx_cnt alloc\n"); - work_queue_dtx_cnt= (uint64_t *) mem_allocator.align_alloc(sizeof(uint64_t) * SECOND); - - DEBUG_M("Stats_thd::init mtx alloc\n"); - mtx= (double *) mem_allocator.align_alloc(sizeof(double) * 40); - - //all_lat.init(g_max_txn_per_part,ArrIncr); - - client_client_latency.init(g_max_txn_per_part,ArrIncr); - last_start_commit_latency.init(g_max_txn_per_part,ArrIncr); - first_start_commit_latency.init(g_max_txn_per_part,ArrIncr); - start_abort_commit_latency.init(g_max_txn_per_part,ArrIncr); - - clear(); - -} - -void Stats_thd::clear() { - - total_runtime=0; - - // Execution - txn_cnt=0; - remote_txn_cnt=0; - local_txn_cnt=0; - local_txn_start_cnt=0; - total_txn_commit_cnt=0; - local_txn_commit_cnt=0; - remote_txn_commit_cnt=0; - total_txn_abort_cnt=0; - unique_txn_abort_cnt=0; - local_txn_abort_cnt=0; - remote_txn_abort_cnt=0; - txn_run_time=0; - multi_part_txn_cnt=0; - multi_part_txn_run_time=0; - single_part_txn_cnt=0; - single_part_txn_run_time=0; - txn_write_cnt=0; - record_write_cnt=0; - parts_touched=0; - - // Breakdown - ts_alloc_time=0; - abort_time=0; - txn_manager_time=0; - txn_index_time=0; - txn_validate_time=0; - txn_cleanup_time=0; - - trans_total_run_time=0; - trans_process_time=0; - trans_2pc_time=0; - trans_prepare_time=0; - trans_validate_time=0; - trans_finish_time=0; - trans_commit_time=0; - trans_abort_time=0; - - trans_access_lock_wait_time=0; - // trans mvcc - trans_mvcc_clear_history=0; - trans_mvcc_access=0; - - // Transaction stats - txn_total_process_time=0; - txn_process_time=0; - txn_total_local_wait_time=0; - txn_local_wait_time=0; - txn_total_remote_wait_time=0; - txn_remote_wait_time=0; - txn_total_twopc_time=0; - txn_twopc_time=0; - - // Client - txn_sent_cnt=0; - cl_send_intv=0; - - // Abort queue - abort_queue_enqueue_cnt=0; - abort_queue_dequeue_cnt=0; - abort_queue_enqueue_time=0; - abort_queue_dequeue_time=0; - abort_queue_penalty=0; - abort_queue_penalty_extra=0; - - // Work queue - work_queue_wait_time=0; - work_queue_cnt=0; - work_queue_enq_cnt=0; - work_queue_mtx_wait_time=0; - work_queue_new_cnt=0; - work_queue_new_wait_time=0; - work_queue_old_cnt=0; - work_queue_old_wait_time=0; - work_queue_enqueue_time=0; - work_queue_dequeue_time=0; - work_queue_conflict_cnt=0; - - // Worker thread - worker_idle_time=0; - worker_activate_txn_time=0; - worker_deactivate_txn_time=0; - worker_release_msg_time=0; - worker_process_time=0; - worker_process_cnt=0; - for(uint64_t i = 0; i < NO_MSG; i ++) { - worker_process_cnt_by_type[i]=0; - worker_process_time_by_type[i]=0; - } - - for(uint64_t i = 0; i < SECOND; i ++) { - work_queue_wq_cnt[i]=0; - work_queue_tx_cnt[i]=0; - work_queue_ewq_cnt[i]=0; - work_queue_dwq_cnt[i]=0; - work_queue_etx_cnt[i]=0; - work_queue_dtx_cnt[i]=0; - } - // IO - msg_queue_delay_time=0; - msg_queue_cnt=0; - msg_queue_enq_cnt=0; - msg_send_time=0; - msg_recv_time=0; - msg_recv_idle_time=0; - msg_batch_cnt=0; - msg_batch_size_msgs=0; - msg_batch_size_bytes=0; - msg_batch_size_bytes_to_server=0; - msg_batch_size_bytes_to_client=0; - msg_send_cnt=0; - msg_recv_cnt=0; - msg_unpack_time=0; - mbuf_send_intv_time=0; - msg_copy_output_time=0; - - // Concurrency control, general - cc_conflict_cnt=0; - txn_wait_cnt=0; - txn_conflict_cnt=0; - - // 2PL - twopl_already_owned_cnt=0; - twopl_owned_cnt=0; - twopl_sh_owned_cnt=0; - twopl_ex_owned_cnt=0; - twopl_sh_bypass_cnt=0; - twopl_owned_time=0; - twopl_sh_owned_time=0; - twopl_ex_owned_time=0; - twopl_diff_time=0; - twopl_wait_time=0; - twopl_getlock_cnt=0; - twopl_getlock_time=0; - twopl_release_cnt=0; - twopl_release_time=0; - - // Calvin - seq_txn_cnt=0; - seq_batch_cnt=0; - seq_full_batch_cnt=0; - seq_ack_time=0; - seq_batch_time=0; - seq_process_cnt=0; - seq_complete_cnt=0; - seq_process_time=0; - seq_prep_time=0; - seq_idle_time=0; - seq_queue_wait_time=0; - seq_queue_cnt=0; - seq_queue_enq_cnt=0; - seq_queue_enqueue_time=0; - seq_queue_dequeue_time=0; - sched_queue_wait_time=0; - sched_queue_cnt=0; - sched_queue_enq_cnt=0; - sched_queue_enqueue_time=0; - sched_queue_dequeue_time=0; - calvin_sched_time=0; - sched_idle_time=0; - sched_txn_table_time=0; - sched_epoch_cnt=0; - sched_epoch_diff=0; - - //OCC - occ_validate_time=0; - occ_cs_wait_time=0; - occ_cs_time=0; - occ_hist_validate_time=0; - occ_act_validate_time=0; - occ_hist_validate_fail_time=0; - occ_act_validate_fail_time=0; - occ_check_cnt=0; - occ_abort_check_cnt=0; - occ_ts_abort_cnt=0; - occ_finish_time=0; - - // WSI - wsi_validate_time=0; - wsi_cs_wait_time=0; - wsi_check_cnt=0; - wsi_abort_check_cnt=0; - - // MAAT - maat_validate_cnt=0; - maat_validate_time=0; - maat_cs_wait_time=0; - maat_case1_cnt=0; - maat_case2_cnt=0; - maat_case3_cnt=0; - maat_case4_cnt=0; - maat_case5_cnt=0; - maat_range=0; - maat_commit_cnt=0; - - // Logging - log_write_cnt=0; - log_write_time=0; - log_flush_cnt=0; - log_flush_time=0; - log_process_time=0; - - // Transaction Table - txn_table_new_cnt=0; - txn_table_get_cnt=0; - txn_table_release_cnt=0; - txn_table_cflt_cnt=0; - txn_table_cflt_size=0; - txn_table_get_time=0; - txn_table_release_time=0; - txn_table_min_ts_time=0; - - for(uint64_t i = 0; i < 40; i ++) { - mtx[i]=0; - } - - lat_work_queue_time=0; - lat_msg_queue_time=0; - lat_cc_block_time=0; - lat_cc_time=0; - lat_process_time=0; - lat_abort_time=0; - lat_network_time=0; - lat_other_time=0; - - lat_l_loc_work_queue_time=0; - lat_l_loc_msg_queue_time=0; - lat_l_loc_cc_block_time=0; - lat_l_loc_cc_time=0; - lat_l_loc_process_time=0; - lat_l_loc_abort_time=0; - - lat_short_work_queue_time=0; - lat_short_msg_queue_time=0; - lat_short_cc_block_time=0; - lat_short_cc_time=0; - lat_short_process_time=0; - lat_short_network_time=0; - lat_short_batch_time=0; - - lat_s_loc_work_queue_time=0; - lat_s_loc_msg_queue_time=0; - lat_s_loc_cc_block_time=0; - lat_s_loc_cc_time=0; - lat_s_loc_process_time=0; - - lat_l_rem_work_queue_time=0; - lat_l_rem_msg_queue_time=0; - lat_l_rem_cc_block_time=0; - lat_l_rem_cc_time=0; - lat_l_rem_process_time=0; - - lat_s_rem_work_queue_time=0; - lat_s_rem_msg_queue_time=0; - lat_s_rem_cc_block_time=0; - lat_s_rem_cc_time=0; - lat_s_rem_process_time=0; - - ano_2_trans_write_skew_1 = 0; - ano_2_trans_write_skew_2 = 0; - ano_3_trans_write_skew_1 = 0; - ano_3_trans_write_skew_2 = 0; - ano_2_trans_read_skew = 0; - ano_3_trans_read_skew_1 = 0; - ano_3_trans_read_skew_2 = 0; - ano_4_trans_read_skew = 0; - ano_unknown = 0; - - client_client_latency.clear(); - last_start_commit_latency.clear(); - first_start_commit_latency.clear(); - start_abort_commit_latency.clear(); -} - -void Stats_thd::print_client(FILE * outf, bool prog) { - double txn_run_avg_time = 0; - double tput = 0; - if (txn_cnt > 0) txn_run_avg_time = txn_run_time / txn_cnt; - if (total_runtime > 0) tput = txn_cnt / (total_runtime / BILLION); - fprintf(outf, - "total_runtime=%f" - ",tput=%f" - ",txn_cnt=%ld" - ",txn_sent_cnt=%ld" - ",txn_run_time=%f" - ",txn_run_avg_time=%f" - ",cl_send_intv=%f", - total_runtime / BILLION, tput, txn_cnt, txn_sent_cnt, txn_run_time / BILLION, - txn_run_avg_time / BILLION, cl_send_intv / BILLION); - // IO - double mbuf_send_intv_time_avg = 0; - double msg_unpack_time_avg = 0; - double msg_send_time_avg = 0; - double msg_recv_time_avg = 0; - double msg_batch_size_msgs_avg = 0; - double msg_batch_size_bytes_avg = 0; - double msg_queue_delay_time_avg = 0; - if (msg_queue_cnt > 0) msg_queue_delay_time_avg = msg_queue_delay_time / msg_queue_cnt; - if(msg_batch_cnt > 0) { - mbuf_send_intv_time_avg = mbuf_send_intv_time / msg_batch_cnt; - msg_batch_size_msgs_avg = msg_batch_size_msgs / msg_batch_cnt; - msg_batch_size_bytes_avg = msg_batch_size_bytes / msg_batch_cnt; - } - if(msg_recv_cnt > 0) { - msg_recv_time_avg = msg_recv_time / msg_recv_cnt; - msg_unpack_time_avg = msg_unpack_time / msg_recv_cnt; - } - if(msg_send_cnt > 0) { - msg_send_time_avg = msg_send_time / msg_send_cnt; - } - fprintf(outf, - ",msg_queue_delay_time=%f" - ",msg_queue_cnt=%ld" - ",msg_queue_enq_cnt=%ld" - ",msg_queue_delay_time_avg=%f" - ",msg_send_time=%f" - ",msg_send_time_avg=%f" - ",msg_recv_time=%f" - ",msg_recv_time_avg=%f" - ",msg_recv_idle_time=%f" - ",msg_batch_cnt=%ld" - ",msg_batch_size_msgs=%ld" - ",msg_batch_size_msgs_avg=%f" - ",msg_batch_size_bytes=%ld" - ",msg_batch_size_bytes_avg=%f" - ",msg_batch_size_bytes_to_server=%ld" - ",msg_batch_size_bytes_to_client=%ld" - ",msg_send_cnt=%ld" - ",msg_recv_cnt=%ld" - ",msg_unpack_time=%f" - ",msg_unpack_time_avg=%f" - ",mbuf_send_intv_time=%f" - ",mbuf_send_intv_time_avg=%f" - ",msg_copy_output_time=%f", - msg_queue_delay_time / BILLION, msg_queue_cnt, msg_queue_enq_cnt, - msg_queue_delay_time_avg / BILLION, msg_send_time / BILLION, msg_send_time_avg / BILLION, - msg_recv_time / BILLION, msg_recv_time_avg / BILLION, msg_recv_idle_time / BILLION, - msg_batch_cnt, msg_batch_size_msgs, msg_batch_size_msgs_avg, msg_batch_size_bytes, - msg_batch_size_bytes_avg, msg_batch_size_bytes_to_server, msg_batch_size_bytes_to_client, - msg_send_cnt, msg_recv_cnt, msg_unpack_time / BILLION, msg_unpack_time_avg / BILLION, - mbuf_send_intv_time / BILLION, mbuf_send_intv_time_avg / BILLION, - msg_copy_output_time / BILLION); - - if (!prog) { - client_client_latency.quicksort(0,client_client_latency.cnt-1); - fprintf(outf, - ",ccl0=%f" - ",ccl1=%f" - ",ccl10=%f" - ",ccl25=%f" - ",ccl50=%f" - ",ccl75=%f" - ",ccl90=%f" - ",ccl95=%f" - ",ccl96=%f" - ",ccl97=%f" - ",ccl98=%f" - ",ccl99=%f" - ",ccl100=%f", - (double)client_client_latency.get_idx(0) / BILLION, - (double)client_client_latency.get_percentile(1) / BILLION, - (double)client_client_latency.get_percentile(10) / BILLION, - (double)client_client_latency.get_percentile(25) / BILLION, - (double)client_client_latency.get_percentile(50) / BILLION, - (double)client_client_latency.get_percentile(75) / BILLION, - (double)client_client_latency.get_percentile(90) / BILLION, - (double)client_client_latency.get_percentile(95) / BILLION, - (double)client_client_latency.get_percentile(96) / BILLION, - (double)client_client_latency.get_percentile(97) / BILLION, - (double)client_client_latency.get_percentile(98) / BILLION, - (double)client_client_latency.get_percentile(99) / BILLION, - (double)client_client_latency.get_idx(client_client_latency.cnt - 1) / BILLION); - } - -} - -void Stats_thd::print(FILE * outf, bool prog) { - fprintf(outf, "total_runtime=%f", total_runtime / BILLION); - // Execution - double tput = 0; - double txn_run_avg_time = 0; - double multi_part_txn_avg_time = 0; - double single_part_txn_avg_time = 0; - double avg_parts_touched = 0; - if (total_runtime > 0) tput = txn_cnt / (total_runtime / BILLION); - if(txn_cnt > 0) { - txn_run_avg_time = txn_run_time / txn_cnt; - avg_parts_touched = ((double)parts_touched) / txn_cnt; - } - if(multi_part_txn_cnt > 0) - multi_part_txn_avg_time = multi_part_txn_run_time / multi_part_txn_cnt; - if(single_part_txn_cnt > 0) - single_part_txn_avg_time = single_part_txn_run_time / single_part_txn_cnt; - fprintf(outf, - ",tput=%f" - ",txn_cnt=%ld" - ",remote_txn_cnt=%ld" - ",local_txn_cnt=%ld" - ",local_txn_start_cnt=%ld" - ",total_txn_commit_cnt=%ld" - ",local_txn_commit_cnt=%ld" - ",remote_txn_commit_cnt=%ld" - ",total_txn_abort_cnt=%ld" - ",positive_txn_abort_cnt=%ld" - ",unique_txn_abort_cnt=%ld" - ",local_txn_abort_cnt=%ld" - ",remote_txn_abort_cnt=%ld" - ",txn_run_time=%f" - ",txn_run_avg_time=%f" - ",multi_part_txn_cnt=%ld" - ",multi_part_txn_run_time=%f" - ",multi_part_txn_avg_time=%f" - ",single_part_txn_cnt=%ld" - ",single_part_txn_run_time=%f" - ",single_part_txn_avg_time=%f" - ",txn_write_cnt=%ld" - ",record_write_cnt=%ld" - ",parts_touched=%ld" - ",avg_parts_touched=%f", - tput, txn_cnt, remote_txn_cnt, local_txn_cnt, local_txn_start_cnt, total_txn_commit_cnt, - local_txn_commit_cnt, remote_txn_commit_cnt, total_txn_abort_cnt,positive_txn_abort_cnt, unique_txn_abort_cnt, - local_txn_abort_cnt, remote_txn_abort_cnt, txn_run_time / BILLION, - txn_run_avg_time / BILLION, multi_part_txn_cnt, multi_part_txn_run_time / BILLION, - multi_part_txn_avg_time / BILLION, single_part_txn_cnt, - single_part_txn_run_time / BILLION, single_part_txn_avg_time / BILLION, txn_write_cnt, - record_write_cnt, parts_touched, avg_parts_touched); - - // Breakdown - fprintf(outf, - ",ts_alloc_time=%f" - ",abort_time=%f" - ",txn_manager_time=%f" - ",txn_index_time=%f" - ",txn_validate_time=%f" - ",txn_cleanup_time=%f", - ts_alloc_time / BILLION, abort_time / BILLION, txn_manager_time / BILLION, - txn_index_time / BILLION, txn_validate_time / BILLION, txn_cleanup_time / BILLION); - // trans - fprintf(outf, - ",trans_total_run_time=%f" - ",trans_process_time=%f" - ",trans_2pc_time=%f" - ",trans_prepare_time=%f" - ",trans_validate_time=%f" - ",trans_finish_time=%f" - ",trans_commit_time=%f" - ",trans_abort_time=%f" - ",trans_access_lock_wait_time=%f" - ",trans_mvcc_clear_history=%f" - ",trans_mvcc_access=%f", - trans_total_run_time / BILLION, trans_process_time / BILLION, trans_2pc_time / BILLION, - trans_prepare_time / BILLION, trans_validate_time / BILLION, trans_finish_time / BILLION, - trans_commit_time / BILLION, trans_abort_time / BILLION, trans_access_lock_wait_time / BILLION, - trans_mvcc_clear_history / BILLION, trans_mvcc_access / BILLION); - - - // Transaction stats - double txn_total_process_time_avg=0; - double txn_process_time_avg=0; - double txn_total_local_wait_time_avg=0; - double txn_local_wait_time_avg=0; - double txn_total_remote_wait_time_avg=0; - double txn_remote_wait_time_avg=0; - double txn_total_twopc_time_avg=0; - double txn_twopc_time_avg=0; - if(local_txn_commit_cnt > 0) { - txn_total_process_time_avg = txn_total_process_time / local_txn_commit_cnt; - txn_process_time_avg = txn_process_time / local_txn_commit_cnt; - txn_total_local_wait_time_avg = txn_total_local_wait_time / local_txn_commit_cnt; - txn_local_wait_time_avg = txn_local_wait_time / local_txn_commit_cnt; - txn_total_remote_wait_time_avg = txn_total_remote_wait_time / local_txn_commit_cnt; - txn_remote_wait_time_avg = txn_remote_wait_time / local_txn_commit_cnt; - txn_total_twopc_time_avg = txn_total_twopc_time / local_txn_commit_cnt; - txn_twopc_time_avg = txn_twopc_time / local_txn_commit_cnt; - } - fprintf(outf, - ",txn_total_process_time=%f" - ",txn_process_time=%f" - ",txn_total_local_wait_time=%f" - ",txn_local_wait_time=%f" - ",txn_total_remote_wait_time=%f" - ",txn_remote_wait_time=%f" - ",txn_total_twopc_time=%f" - ",txn_twopc_time=%f" - ",txn_total_process_time_avg=%f" - ",txn_process_time_avg=%f" - ",txn_total_local_wait_time_avg=%f" - ",txn_local_wait_time_avg=%f" - ",txn_total_remote_wait_time_avg=%f" - ",txn_remote_wait_time_avg=%f" - ",txn_total_twopc_time_avg=%f" - ",txn_twopc_time_avg=%f", - txn_total_process_time / BILLION, txn_process_time / BILLION, - txn_total_local_wait_time / BILLION, txn_local_wait_time / BILLION, - txn_total_remote_wait_time / BILLION, txn_remote_wait_time / BILLION, - txn_total_twopc_time / BILLION, txn_twopc_time / BILLION, - txn_total_process_time_avg / BILLION, txn_process_time_avg / BILLION, - txn_total_local_wait_time_avg / BILLION, txn_local_wait_time_avg / BILLION, - txn_total_remote_wait_time_avg / BILLION, txn_remote_wait_time_avg / BILLION, - txn_total_twopc_time_avg / BILLION, txn_twopc_time_avg / BILLION); - - // Abort queue - double abort_queue_penalty_avg = 0; - double abort_queue_penalty_extra_avg = 0; - if(abort_queue_enqueue_cnt > 0) - abort_queue_penalty_extra_avg = abort_queue_penalty_extra / abort_queue_enqueue_cnt; - if(abort_queue_dequeue_cnt > 0) - abort_queue_penalty_avg = abort_queue_penalty / abort_queue_enqueue_cnt; - fprintf(outf, - ",abort_queue_enqueue_cnt=%ld" - ",abort_queue_dequeue_cnt=%ld" - ",abort_queue_enqueue_time=%f" - ",abort_queue_dequeue_time=%f" - ",abort_queue_penalty=%f" - ",abort_queue_penalty_extra=%f" - ",abort_queue_penalty_avg=%f" - ",abort_queue_penalty_extra_avg=%f" - // Abort queue - , - abort_queue_enqueue_cnt, abort_queue_dequeue_cnt, abort_queue_enqueue_time / BILLION, - abort_queue_dequeue_time / BILLION, abort_queue_penalty / BILLION, - abort_queue_penalty_extra / BILLION, abort_queue_penalty_avg / BILLION, - abort_queue_penalty_extra_avg / BILLION); - - double work_queue_wait_avg_time = 0; - double work_queue_mtx_wait_avg = 0; - double work_queue_new_wait_avg_time = 0; - double work_queue_old_wait_avg_time = 0; - if(work_queue_cnt > 0) { - work_queue_wait_avg_time = work_queue_wait_time / work_queue_cnt; - work_queue_mtx_wait_avg = work_queue_mtx_wait_time / work_queue_cnt; - } - if(work_queue_new_cnt > 0) - work_queue_new_wait_avg_time = work_queue_new_wait_time / work_queue_new_cnt; - if(work_queue_old_cnt > 0) - work_queue_old_wait_avg_time = work_queue_old_wait_time / work_queue_old_cnt; - // Work queue - fprintf(outf, - ",work_queue_wait_time=%f" - ",work_queue_cnt=%ld" - ",work_queue_enq_cnt=%ld" - ",work_queue_wait_avg_time=%f" - ",work_queue_mtx_wait_time=%f" - ",work_queue_mtx_wait_avg=%f" - ",work_queue_new_cnt=%ld" - ",work_queue_new_wait_time=%f" - ",work_queue_new_wait_avg_time=%f" - ",work_queue_old_cnt=%ld" - ",work_queue_old_wait_time=%f" - ",work_queue_old_wait_avg_time=%f" - ",work_queue_enqueue_time=%f" - ",work_queue_dequeue_time=%f" - ",work_queue_conflict_cnt=%ld", - work_queue_wait_time / BILLION, work_queue_cnt, work_queue_enq_cnt, - work_queue_wait_avg_time / BILLION, work_queue_mtx_wait_time / BILLION, - work_queue_mtx_wait_avg / BILLION, work_queue_new_cnt, work_queue_new_wait_time / BILLION, - work_queue_new_wait_avg_time / BILLION, work_queue_old_cnt, - work_queue_old_wait_time / BILLION, work_queue_old_wait_avg_time / BILLION, - work_queue_enqueue_time / BILLION, work_queue_dequeue_time / BILLION, - work_queue_conflict_cnt); - - // Worker thread - double worker_process_avg_time = 0; - if (worker_process_cnt > 0) worker_process_avg_time = worker_process_time / worker_process_cnt; - fprintf(outf, - ",worker_idle_time=%f" - ",worker_activate_txn_time=%f" - ",worker_deactivate_txn_time=%f" - ",worker_release_msg_time=%f" - ",worker_process_time=%f" - ",worker_process_cnt=%ld" - ",worker_process_avg_time=%f", - worker_idle_time / BILLION, worker_activate_txn_time / BILLION, - worker_deactivate_txn_time / BILLION, worker_release_msg_time / BILLION, - worker_process_time / BILLION, worker_process_cnt, worker_process_avg_time / BILLION); - for(uint64_t i = 0; i < NO_MSG; i ++) { - fprintf(outf, - ",proc_cnt_type%ld=%ld" - ",proc_time_type%ld=%f", - i, worker_process_cnt_by_type[i], i, worker_process_time_by_type[i] / BILLION); - } - - for(uint64_t i = 0; i < SECOND; i ++) { - fprintf(outf, - ",work_queue_wq_cnt%ld=%ld" - ",work_queue_tx_cnt%ld=%ld" - ,i - ,work_queue_wq_cnt[i] - ,i - ,work_queue_tx_cnt[i] - ); - } - - for(uint64_t i = 0; i < SECOND; i ++) { - fprintf(outf, - ",work_queue_ewq_cnt%ld=%ld" - ",work_queue_dwq_cnt%ld=%ld" - ,i - ,work_queue_ewq_cnt[i] - ,i - ,work_queue_dwq_cnt[i] - ); - } - - for(uint64_t i = 0; i < SECOND; i ++) { - fprintf(outf, - ",work_queue_etx_cnt%ld=%ld" - ",work_queue_dtx_cnt%ld=%ld" - ,i - ,work_queue_etx_cnt[i] - ,i - ,work_queue_dtx_cnt[i] - ); - } - - // IO - double mbuf_send_intv_time_avg = 0; - double msg_unpack_time_avg = 0; - double msg_send_time_avg = 0; - double msg_recv_time_avg = 0; - double msg_batch_size_msgs_avg = 0; - double msg_batch_size_bytes_avg = 0; - double msg_queue_delay_time_avg = 0; - if (msg_queue_cnt > 0) msg_queue_delay_time_avg = msg_queue_delay_time / msg_queue_cnt; - if(msg_batch_cnt > 0) { - mbuf_send_intv_time_avg = mbuf_send_intv_time / msg_batch_cnt; - msg_batch_size_msgs_avg = msg_batch_size_msgs / msg_batch_cnt; - msg_batch_size_bytes_avg = msg_batch_size_bytes / msg_batch_cnt; - } - if(msg_recv_cnt > 0) { - msg_recv_time_avg = msg_recv_time / msg_recv_cnt; - msg_unpack_time_avg = msg_unpack_time / msg_recv_cnt; - } - if(msg_send_cnt > 0) { - msg_send_time_avg = msg_send_time / msg_send_cnt; - } - fprintf(outf, - ",msg_queue_delay_time=%f" - ",msg_queue_cnt=%ld" - ",msg_queue_enq_cnt=%ld" - ",msg_queue_delay_time_avg=%f" - ",msg_send_time=%f" - ",msg_send_time_avg=%f" - ",msg_recv_time=%f" - ",msg_recv_time_avg=%f" - ",msg_recv_idle_time=%f" - ",msg_batch_cnt=%ld" - ",msg_batch_size_msgs=%ld" - ",msg_batch_size_msgs_avg=%f" - ",msg_batch_size_bytes=%ld" - ",msg_batch_size_bytes_avg=%f" - ",msg_batch_size_bytes_to_server=%ld" - ",msg_batch_size_bytes_to_client=%ld" - ",msg_send_cnt=%ld" - ",msg_recv_cnt=%ld" - ",msg_unpack_time=%f" - ",msg_unpack_time_avg=%f" - ",mbuf_send_intv_time=%f" - ",mbuf_send_intv_time_avg=%f" - ",msg_copy_output_time=%f", - msg_queue_delay_time / BILLION, msg_queue_cnt, msg_queue_enq_cnt, - msg_queue_delay_time_avg / BILLION, msg_send_time / BILLION, msg_send_time_avg / BILLION, - msg_recv_time / BILLION, msg_recv_time_avg / BILLION, msg_recv_idle_time / BILLION, - msg_batch_cnt, msg_batch_size_msgs, msg_batch_size_msgs_avg, msg_batch_size_bytes, - msg_batch_size_bytes_avg, msg_batch_size_bytes_to_server, msg_batch_size_bytes_to_client, - msg_send_cnt, msg_recv_cnt, msg_unpack_time / BILLION, msg_unpack_time_avg / BILLION, - mbuf_send_intv_time / BILLION, mbuf_send_intv_time_avg / BILLION, - msg_copy_output_time / BILLION); - - // Concurrency control, general - fprintf(outf, - ",cc_conflict_cnt=%ld" - ",txn_wait_cnt=%ld" - ",txn_conflict_cnt=%ld", - cc_conflict_cnt, txn_wait_cnt, txn_conflict_cnt); - - // 2PL - double twopl_sh_owned_avg_time = 0; - if (twopl_sh_owned_cnt > 0) twopl_sh_owned_avg_time = twopl_sh_owned_time / twopl_sh_owned_cnt; - double twopl_ex_owned_avg_time = 0; - if (twopl_ex_owned_cnt > 0) twopl_ex_owned_avg_time = twopl_ex_owned_time / twopl_ex_owned_cnt; - fprintf(outf, - ",twopl_already_owned_cnt=%ld" - ",twopl_owned_cnt=%ld" - ",twopl_sh_owned_cnt=%ld" - ",twopl_ex_owned_cnt=%ld" - ",twopl_sh_bypass_cnt=%ld" - ",twopl_owned_time=%f" - ",twopl_sh_owned_time=%f" - ",twopl_ex_owned_time=%f" - ",twopl_sh_owned_avg_time=%f" - ",twopl_ex_owned_avg_time=%f" - ",twopl_diff_time=%f" - ",twopl_wait_time=%f" - ",twopl_getlock_cnt=%ld" - ",twopl_getlock_time=%f" - ",twopl_release_cnt=%ld" - ",twopl_release_time=%f", - twopl_already_owned_cnt, twopl_owned_cnt, twopl_sh_owned_cnt, twopl_ex_owned_cnt, - twopl_sh_bypass_cnt, twopl_owned_time / BILLION, twopl_sh_owned_time / BILLION, - twopl_ex_owned_time / BILLION, twopl_sh_owned_avg_time / BILLION, - twopl_ex_owned_avg_time / BILLION, twopl_diff_time / BILLION, twopl_wait_time / BILLION, - twopl_getlock_cnt, twopl_getlock_time / BILLION, twopl_release_cnt, - twopl_release_time / BILLION); - - // Calvin - double seq_queue_wait_avg_time = 0; - if (seq_queue_cnt > 0) seq_queue_wait_avg_time = seq_queue_wait_time / seq_queue_cnt; - double sched_queue_wait_avg_time = 0; - if (sched_queue_cnt > 0) sched_queue_wait_avg_time = sched_queue_wait_time / sched_queue_cnt; - fprintf(outf, - ",seq_txn_cnt=%ld" - ",seq_batch_cnt=%ld" - ",seq_full_batch_cnt=%ld" - ",seq_ack_time=%f" - ",seq_batch_time=%f" - ",seq_process_cnt=%ld" - ",seq_complete_cnt=%ld" - ",seq_process_time=%f" - ",seq_prep_time=%f" - ",seq_idle_time=%f" - ",seq_queue_wait_time=%f" - ",seq_queue_cnt=%ld" - ",seq_queue_enq_cnt=%ld" - ",seq_queue_wait_avg_time=%f" - ",seq_queue_enqueue_time=%f" - ",seq_queue_dequeue_time=%f" - ",sched_queue_wait_time=%f" - ",sched_queue_cnt=%ld" - ",sched_queue_enq_cnt=%ld" - ",sched_queue_wait_avg_time=%f" - ",sched_queue_enqueue_time=%f" - ",sched_queue_dequeue_time=%f" - ",calvin_sched_time=%f" - ",sched_idle_time=%f" - ",sched_txn_table_time=%f" - ",sched_epoch_cnt=%ld" - ",sched_epoch_diff=%f", - seq_txn_cnt, seq_batch_cnt, seq_full_batch_cnt, seq_ack_time / BILLION, - seq_batch_time / BILLION, seq_process_cnt, seq_complete_cnt, seq_process_time / BILLION, - seq_prep_time / BILLION, seq_idle_time / BILLION, seq_queue_wait_time / BILLION, - seq_queue_cnt, seq_queue_enq_cnt, seq_queue_wait_avg_time / BILLION, - seq_queue_enqueue_time / BILLION, seq_queue_dequeue_time / BILLION, - sched_queue_wait_time / BILLION, sched_queue_cnt, sched_queue_enq_cnt, - sched_queue_wait_avg_time / BILLION, sched_queue_enqueue_time / BILLION, - sched_queue_dequeue_time / BILLION, calvin_sched_time / BILLION, - sched_idle_time / BILLION, sched_txn_table_time / BILLION, sched_epoch_cnt, - sched_epoch_diff / BILLION); - - //OCC - fprintf(outf, - ",occ_validate_time=%f" - ",occ_cs_wait_time=%f" - ",occ_cs_time=%f" - ",occ_hist_validate_time=%f" - ",occ_act_validate_time=%f" - ",occ_hist_validate_fail_time=%f" - ",occ_act_validate_fail_time=%f" - ",occ_check_cnt=%ld" - ",occ_abort_check_cnt=%ld" - ",occ_ts_abort_cnt=%ld" - ",occ_finish_time=%f", - occ_validate_time / BILLION, occ_cs_wait_time / BILLION, occ_cs_time / BILLION, - occ_hist_validate_time / BILLION, occ_act_validate_time / BILLION, - occ_hist_validate_fail_time / BILLION, occ_act_validate_fail_time / BILLION, - occ_check_cnt, occ_abort_check_cnt, occ_ts_abort_cnt, occ_finish_time / BILLION); - - //MAAT - double maat_range_avg = 0; - double maat_validate_avg = 0; - double maat_cs_wait_avg = 0; - uint64_t maat_commit_avg = 0; - if (maat_commit_cnt > 0) maat_range_avg = maat_range / maat_commit_cnt; - if(maat_validate_cnt > 0) { - maat_validate_avg = maat_validate_time / maat_validate_cnt; - maat_cs_wait_avg = maat_cs_wait_time / maat_validate_cnt; - maat_commit_avg = maat_commit_cnt / maat_validate_cnt; - } - fprintf(outf, - ",maat_validate_cnt=%ld" - ",maat_validate_time=%f" - ",maat_validate_avg=%f" - ",maat_cs_wait_time=%f" - ",maat_cs_wait_avg=%f" - ",maat_case1_cnt=%ld" - ",maat_case2_cnt=%ld" - ",maat_case3_cnt=%ld" - ",maat_case4_cnt=%ld" - ",maat_case5_cnt=%ld" - ",maat_range=%f" - ",maat_commit_cnt=%ld" - ",maat_commit_avg=%ld" - ",maat_range_avg=%f", - maat_validate_cnt, maat_validate_time / BILLION, maat_validate_avg / BILLION, - maat_cs_wait_time / BILLION, maat_cs_wait_avg / BILLION, maat_case1_cnt, maat_case2_cnt, - maat_case3_cnt, maat_case4_cnt, maat_case5_cnt, maat_range / BILLION, maat_commit_cnt, - maat_commit_avg, maat_range_avg); - - - // Logging - double log_write_avg_time = 0; - if (log_write_cnt > 0) log_write_avg_time = log_write_time / log_write_cnt; - double log_flush_avg_time = 0; - if (log_flush_cnt > 0) log_flush_avg_time = log_flush_time / log_flush_cnt; - fprintf(outf, - ",log_write_cnt=%ld" - ",log_write_time=%f" - ",log_write_avg_time=%f" - ",log_flush_cnt=%ld" - ",log_flush_time=%f" - ",log_flush_avg_time=%f" - ",log_process_time=%f", - log_write_cnt, log_write_time / BILLION, log_write_avg_time / BILLION, log_flush_cnt, - log_flush_time / BILLION, log_flush_avg_time / BILLION, log_process_time / BILLION); - - // Transaction Table - double txn_table_get_avg_time = 0; - if (txn_table_get_cnt > 0) txn_table_get_avg_time = txn_table_get_time / txn_table_get_cnt; - double txn_table_release_avg_time = 0; - if(txn_table_release_cnt > 0) - txn_table_release_avg_time = txn_table_release_time / txn_table_release_cnt; - fprintf(outf, - ",txn_table_new_cnt=%ld" - ",txn_table_get_cnt=%ld" - ",txn_table_release_cnt=%ld" - ",txn_table_cflt_cnt=%ld" - ",txn_table_cflt_size=%ld" - ",txn_table_get_time=%f" - ",txn_table_release_time=%f" - ",txn_table_min_ts_time=%f" - ",txn_table_get_avg_time=%f" - ",txn_table_release_avg_time=%f" - // Transaction Table - , - txn_table_new_cnt, txn_table_get_cnt, txn_table_release_cnt, txn_table_cflt_cnt, - txn_table_cflt_size, txn_table_get_time / BILLION, txn_table_release_time / BILLION, - txn_table_min_ts_time / BILLION, txn_table_get_avg_time / BILLION, - txn_table_release_avg_time / BILLION); - - for(uint64_t i = 0; i < 40; i ++) { - fprintf(outf, ",mtx%ld=%f", i, mtx[i] / BILLION); - } - fprintf(outf, - ",lat_work_queue_time=%f" - ",lat_msg_queue_time=%f" - ",lat_cc_block_time=%f" - ",lat_cc_time=%f" - ",lat_process_time=%f" - ",lat_abort_time=%f" - ",lat_network_time=%f" - ",lat_other_time=%f" - - ",lat_l_loc_work_queue_time=%f" - ",lat_l_loc_msg_queue_time=%f" - ",lat_l_loc_cc_block_time=%f" - ",lat_l_loc_cc_time=%f" - ",lat_l_loc_process_time=%f" - ",lat_l_loc_abort_time=%f" - - ",lat_short_work_queue_time=%f" - ",lat_short_msg_queue_time=%f" - ",lat_short_cc_block_time=%f" - ",lat_short_cc_time=%f" - ",lat_short_process_time=%f" - ",lat_short_network_time=%f" - ",lat_short_batch_time=%f" - - ",lat_s_loc_work_queue_time=%f" - ",lat_s_loc_msg_queue_time=%f" - ",lat_s_loc_cc_block_time=%f" - ",lat_s_loc_cc_time=%f" - ",lat_s_loc_process_time=%f" - - ",lat_l_rem_work_queue_time=%f" - ",lat_l_rem_msg_queue_time=%f" - ",lat_l_rem_cc_block_time=%f" - ",lat_l_rem_cc_time=%f" - ",lat_l_rem_process_time=%f" - ",lat_s_rem_work_queue_time=%f" - ",lat_s_rem_msg_queue_time=%f" - ",lat_s_rem_cc_block_time=%f" - ",lat_s_rem_cc_time=%f" - ",lat_s_rem_process_time=%f", - lat_work_queue_time / BILLION, lat_msg_queue_time / BILLION, lat_cc_block_time / BILLION, - lat_cc_time / BILLION, lat_process_time / BILLION, lat_abort_time / BILLION, - lat_network_time / BILLION, lat_other_time / BILLION, lat_l_loc_work_queue_time / BILLION, - lat_l_loc_msg_queue_time / BILLION, lat_l_loc_cc_block_time / BILLION, - lat_l_loc_cc_time / BILLION, lat_l_loc_process_time / BILLION, - lat_l_loc_abort_time / BILLION, lat_short_work_queue_time / BILLION, - lat_short_msg_queue_time / BILLION, lat_short_cc_block_time / BILLION, - lat_short_cc_time / BILLION, lat_short_process_time / BILLION, - lat_short_network_time / BILLION, lat_short_batch_time / BILLION, - lat_s_loc_work_queue_time / BILLION, lat_s_loc_msg_queue_time / BILLION, - lat_s_loc_cc_block_time / BILLION, lat_s_loc_cc_time / BILLION, - lat_s_loc_process_time / BILLION, lat_l_rem_work_queue_time / BILLION, - lat_l_rem_msg_queue_time / BILLION, lat_l_rem_cc_block_time / BILLION, - lat_l_rem_cc_time / BILLION, lat_l_rem_process_time / BILLION, - lat_s_rem_work_queue_time / BILLION, lat_s_rem_msg_queue_time / BILLION, - lat_s_rem_cc_block_time / BILLION, lat_s_rem_cc_time / BILLION, - lat_s_rem_process_time / BILLION); - fprintf(outf, - ",ano_2_trans_write_skew_1=%ld" - ",ano_2_trans_write_skew_2=%ld" - ",ano_3_trans_write_skew_1=%ld" - ",ano_3_trans_write_skew_2=%ld" - ",ano_2_trans_read_skew=%ld" - ",ano_3_trans_read_skew_1=%ld" - ",ano_3_trans_read_skew_2=%ld" - ",ano_4_trans_read_skew=%ld" - ",ano_unknown=%ld", - ano_2_trans_write_skew_1, ano_2_trans_write_skew_2, ano_3_trans_write_skew_1, - ano_3_trans_write_skew_2, ano_2_trans_read_skew, ano_3_trans_read_skew_1, - ano_3_trans_read_skew_2, ano_4_trans_read_skew, ano_unknown); - - if (!prog) { - last_start_commit_latency.quicksort(0,last_start_commit_latency.cnt-1); - first_start_commit_latency.quicksort(0,first_start_commit_latency.cnt-1); - start_abort_commit_latency.quicksort(0,start_abort_commit_latency.cnt-1); - - fprintf( - outf, - ",fscl0=%f" - ",fscl1=%f" - ",fscl10=%f" - ",fscl25=%f" - ",fscl50=%f" - ",fscl75=%f" - ",fscl90=%f" - ",fscl95=%f" - ",fscl96=%f" - ",fscl97=%f" - ",fscl98=%f" - ",fscl99=%f" - ",fscl100=%f" - ",fscl_avg=%f" - ",fscl_cnt=%ld", - (double)first_start_commit_latency.get_idx(0) / BILLION, - (double)first_start_commit_latency.get_percentile(1) / BILLION, - (double)first_start_commit_latency.get_percentile(10) / BILLION, - (double)first_start_commit_latency.get_percentile(25) / BILLION, - (double)first_start_commit_latency.get_percentile(50) / BILLION, - (double)first_start_commit_latency.get_percentile(75) / BILLION, - (double)first_start_commit_latency.get_percentile(90) / BILLION, - (double)first_start_commit_latency.get_percentile(95) / BILLION, - (double)first_start_commit_latency.get_percentile(96) / BILLION, - (double)first_start_commit_latency.get_percentile(97) / BILLION, - (double)first_start_commit_latency.get_percentile(98) / BILLION, - (double)first_start_commit_latency.get_percentile(99) / BILLION, - (double)first_start_commit_latency.get_idx(first_start_commit_latency.cnt - 1) / BILLION, - (double)first_start_commit_latency.get_avg() / BILLION, first_start_commit_latency.cnt); - - fprintf(outf, - ",lscl0=%f" - ",lscl1=%f" - ",lscl10=%f" - ",lscl25=%f" - ",lscl50=%f" - ",lscl75=%f" - ",lscl90=%f" - ",lscl95=%f" - ",lscl96=%f" - ",lscl97=%f" - ",lscl98=%f" - ",lscl99=%f" - ",lscl100=%f" - ",lscl_avg=%f" - ",lscl_cnt=%ld", - (double)last_start_commit_latency.get_idx(0) / BILLION, - (double)last_start_commit_latency.get_percentile(1) / BILLION, - (double)last_start_commit_latency.get_percentile(10) / BILLION, - (double)last_start_commit_latency.get_percentile(25) / BILLION, - (double)last_start_commit_latency.get_percentile(50) / BILLION, - (double)last_start_commit_latency.get_percentile(75) / BILLION, - (double)last_start_commit_latency.get_percentile(90) / BILLION, - (double)last_start_commit_latency.get_percentile(95) / BILLION, - (double)last_start_commit_latency.get_percentile(96) / BILLION, - (double)last_start_commit_latency.get_percentile(97) / BILLION, - (double)last_start_commit_latency.get_percentile(98) / BILLION, - (double)last_start_commit_latency.get_percentile(99) / BILLION, - (double)last_start_commit_latency.get_idx(last_start_commit_latency.cnt - 1) / BILLION, - (double)last_start_commit_latency.get_avg() / BILLION, last_start_commit_latency.cnt); - - fprintf( - outf, - ",sacl0=%f" - ",sacl1=%f" - ",sacl10=%f" - ",sacl25=%f" - ",sacl50=%f" - ",sacl75=%f" - ",sacl90=%f" - ",sacl95=%f" - ",sacl96=%f" - ",sacl97=%f" - ",sacl98=%f" - ",sacl99=%f" - ",sacl100=%f" - ",sacl_avg=%f" - ",sacl_cnt=%ld", - (double)start_abort_commit_latency.get_idx(0) / BILLION, - (double)start_abort_commit_latency.get_percentile(1) / BILLION, - (double)start_abort_commit_latency.get_percentile(10) / BILLION, - (double)start_abort_commit_latency.get_percentile(25) / BILLION, - (double)start_abort_commit_latency.get_percentile(50) / BILLION, - (double)start_abort_commit_latency.get_percentile(75) / BILLION, - (double)start_abort_commit_latency.get_percentile(90) / BILLION, - (double)start_abort_commit_latency.get_percentile(95) / BILLION, - (double)start_abort_commit_latency.get_percentile(96) / BILLION, - (double)start_abort_commit_latency.get_percentile(97) / BILLION, - (double)start_abort_commit_latency.get_percentile(98) / BILLION, - (double)start_abort_commit_latency.get_percentile(99) / BILLION, - (double)start_abort_commit_latency.get_idx(start_abort_commit_latency.cnt - 1) / BILLION, - (double)start_abort_commit_latency.get_avg() / BILLION, start_abort_commit_latency.cnt); - } - -} - -void Stats_thd::combine(Stats_thd * stats) { - if (stats->total_runtime > total_runtime) total_runtime = stats->total_runtime; - - last_start_commit_latency.append(stats->first_start_commit_latency); - first_start_commit_latency.append(stats->first_start_commit_latency); - start_abort_commit_latency.append(stats->start_abort_commit_latency); - client_client_latency.append(stats->client_client_latency); - // Execution - txn_cnt+=stats->txn_cnt; - remote_txn_cnt+=stats->remote_txn_cnt; - local_txn_cnt+=stats->local_txn_cnt; - local_txn_start_cnt+=stats->local_txn_start_cnt; - total_txn_commit_cnt+=stats->total_txn_commit_cnt; - local_txn_commit_cnt+=stats->local_txn_commit_cnt; - remote_txn_commit_cnt+=stats->remote_txn_commit_cnt; - total_txn_abort_cnt+=stats->total_txn_abort_cnt; - positive_txn_abort_cnt += stats->positive_txn_abort_cnt; - unique_txn_abort_cnt+=stats->unique_txn_abort_cnt; - local_txn_abort_cnt+=stats->local_txn_abort_cnt; - remote_txn_abort_cnt+=stats->remote_txn_abort_cnt; - txn_run_time+=stats->txn_run_time; - multi_part_txn_cnt+=stats->multi_part_txn_cnt; - multi_part_txn_run_time+=stats->multi_part_txn_run_time; - single_part_txn_cnt+=stats->single_part_txn_cnt; - single_part_txn_run_time+=stats->single_part_txn_run_time; - txn_write_cnt+=stats->txn_write_cnt; - record_write_cnt+=stats->record_write_cnt; - parts_touched+=stats->parts_touched; - - // Breakdown - ts_alloc_time+=stats->ts_alloc_time; - abort_time+=stats->abort_time; - txn_manager_time+=stats->txn_manager_time; - txn_index_time+=stats->txn_index_time; - txn_validate_time+=stats->txn_validate_time; - txn_cleanup_time+=stats->txn_cleanup_time; - // trans - trans_total_run_time+=stats->trans_total_run_time; - trans_process_time+=stats->trans_process_time; - trans_2pc_time+=stats->trans_2pc_time; - trans_prepare_time+=stats->trans_prepare_time; - trans_validate_time+=stats->trans_validate_time; - trans_finish_time+=stats->trans_finish_time; - trans_commit_time+=stats->trans_commit_time; - trans_abort_time+=stats->trans_abort_time; - trans_access_lock_wait_time+=stats->trans_access_lock_wait_time; - // trans mvcc - trans_mvcc_clear_history+=stats->trans_mvcc_clear_history; - trans_mvcc_access+=stats->trans_mvcc_access; - // Transaction stats - txn_total_process_time+=stats->txn_total_process_time; - txn_process_time+=stats->txn_process_time; - txn_total_local_wait_time+=stats->txn_total_local_wait_time; - txn_local_wait_time+=stats->txn_local_wait_time; - txn_total_remote_wait_time+=stats->txn_total_remote_wait_time; - txn_remote_wait_time+=stats->txn_remote_wait_time; - txn_total_twopc_time+=stats->txn_total_twopc_time; - txn_twopc_time+=stats->txn_twopc_time; - - // Client - txn_sent_cnt+=stats->txn_sent_cnt; - cl_send_intv+=stats->cl_send_intv; - - // Abort queue - abort_queue_enqueue_cnt+=stats->abort_queue_enqueue_cnt; - abort_queue_dequeue_cnt+=stats->abort_queue_dequeue_cnt; - abort_queue_enqueue_time+=stats->abort_queue_enqueue_time; - abort_queue_dequeue_time+=stats->abort_queue_dequeue_time; - abort_queue_penalty+=stats->abort_queue_penalty; - abort_queue_penalty_extra+=stats->abort_queue_penalty_extra; - - // Work queue - work_queue_wait_time+=stats->work_queue_wait_time; - work_queue_cnt+=stats->work_queue_cnt; - work_queue_enq_cnt+=stats->work_queue_enq_cnt; - work_queue_mtx_wait_time+=stats->work_queue_mtx_wait_time; - work_queue_new_cnt+=stats->work_queue_new_cnt; - work_queue_new_wait_time+=stats->work_queue_new_wait_time; - work_queue_old_cnt+=stats->work_queue_old_cnt; - work_queue_old_wait_time+=stats->work_queue_old_wait_time; - work_queue_enqueue_time+=stats->work_queue_enqueue_time; - work_queue_dequeue_time+=stats->work_queue_dequeue_time; - work_queue_conflict_cnt+=stats->work_queue_conflict_cnt; - - // Worker thread - worker_idle_time+=stats->worker_idle_time; - worker_activate_txn_time+=stats->worker_activate_txn_time; - worker_deactivate_txn_time+=stats->worker_deactivate_txn_time; - worker_release_msg_time+=stats->worker_release_msg_time; - worker_process_time+=stats->worker_process_time; - worker_process_cnt+=stats->worker_process_cnt; - for(uint64_t i = 0; i < NO_MSG; i ++) { - worker_process_cnt_by_type[i]+=stats->worker_process_cnt_by_type[i]; - worker_process_time_by_type[i]+=stats->worker_process_time_by_type[i]; - } - for(uint64_t i = 0; i < SECOND; i ++) { - work_queue_wq_cnt[i]+=stats->work_queue_wq_cnt[i]; - work_queue_tx_cnt[i]+=stats->work_queue_tx_cnt[i]; - - work_queue_ewq_cnt[i]+=stats->work_queue_ewq_cnt[i]; - work_queue_dwq_cnt[i]+=stats->work_queue_dwq_cnt[i]; - work_queue_etx_cnt[i]+=stats->work_queue_etx_cnt[i]; - work_queue_dtx_cnt[i]+=stats->work_queue_dtx_cnt[i]; - } - // IO - msg_queue_delay_time+=stats->msg_queue_delay_time; - msg_queue_cnt+=stats->msg_queue_cnt; - msg_queue_enq_cnt+=stats->msg_queue_enq_cnt; - msg_send_time+=stats->msg_send_time; - msg_recv_time+=stats->msg_recv_time; - msg_recv_idle_time+=stats->msg_recv_idle_time; - msg_batch_cnt+=stats->msg_batch_cnt; - msg_batch_size_msgs+=stats->msg_batch_size_msgs; - msg_batch_size_bytes+=stats->msg_batch_size_bytes; - msg_batch_size_bytes_to_server+=stats->msg_batch_size_bytes_to_server; - msg_batch_size_bytes_to_client+=stats->msg_batch_size_bytes_to_client; - msg_send_cnt+=stats->msg_send_cnt; - msg_recv_cnt+=stats->msg_recv_cnt; - msg_unpack_time+=stats->msg_unpack_time; - mbuf_send_intv_time+=stats->mbuf_send_intv_time; - msg_copy_output_time+=stats->msg_copy_output_time; - - // Concurrency control, general - cc_conflict_cnt+=stats->cc_conflict_cnt; - txn_wait_cnt+=stats->txn_wait_cnt; - txn_conflict_cnt+=stats->txn_conflict_cnt; - - // 2PL - twopl_already_owned_cnt+=stats->twopl_already_owned_cnt; - twopl_owned_cnt+=stats->twopl_owned_cnt; - twopl_sh_owned_cnt+=stats->twopl_sh_owned_cnt; - twopl_ex_owned_cnt+=stats->twopl_ex_owned_cnt; - twopl_sh_bypass_cnt+=stats->twopl_sh_bypass_cnt; - twopl_owned_time+=stats->twopl_owned_time; - twopl_sh_owned_time+=stats->twopl_sh_owned_time; - twopl_ex_owned_time+=stats->twopl_ex_owned_time; - twopl_diff_time+=stats->twopl_diff_time; - twopl_wait_time+=stats->twopl_wait_time; - twopl_getlock_cnt+=stats->twopl_getlock_cnt; - twopl_release_cnt+=stats->twopl_release_cnt; - twopl_release_time+=stats->twopl_release_time; - twopl_getlock_time+=stats->twopl_getlock_time; - - // Calvin - seq_txn_cnt+=stats->seq_txn_cnt; - seq_batch_cnt+=stats->seq_batch_cnt; - seq_full_batch_cnt+=stats->seq_full_batch_cnt; - seq_ack_time+=stats->seq_ack_time; - seq_batch_time+=stats->seq_batch_time; - seq_process_cnt+=stats->seq_process_cnt; - seq_complete_cnt+=stats->seq_complete_cnt; - seq_process_time+=stats->seq_process_time; - seq_prep_time+=stats->seq_prep_time; - seq_idle_time+=stats->seq_idle_time; - seq_queue_wait_time+=stats->seq_queue_wait_time; - seq_queue_cnt+=stats->seq_queue_cnt; - seq_queue_enq_cnt+=stats->seq_queue_enq_cnt; - seq_queue_enqueue_time+=stats->seq_queue_enqueue_time; - seq_queue_dequeue_time+=stats->seq_queue_dequeue_time; - sched_queue_wait_time+=stats->sched_queue_wait_time; - sched_queue_cnt+=stats->sched_queue_cnt; - sched_queue_enq_cnt+=stats->sched_queue_enq_cnt; - sched_queue_enqueue_time+=stats->sched_queue_enqueue_time; - sched_queue_dequeue_time+=stats->sched_queue_dequeue_time; - calvin_sched_time+=stats->calvin_sched_time; - sched_idle_time+=stats->sched_idle_time; - sched_txn_table_time+=stats->sched_txn_table_time; - sched_epoch_cnt+=stats->sched_epoch_cnt; - sched_epoch_diff+=stats->sched_epoch_diff; - - //OCC - occ_validate_time+=stats->occ_validate_time; - occ_cs_wait_time+=stats->occ_cs_wait_time; - occ_cs_time+=stats->occ_cs_time; - occ_hist_validate_time+=stats->occ_hist_validate_time; - occ_act_validate_time+=stats->occ_act_validate_time; - occ_hist_validate_fail_time+=stats->occ_hist_validate_fail_time; - occ_act_validate_fail_time+=stats->occ_act_validate_fail_time; - occ_check_cnt+=stats->occ_check_cnt; - occ_abort_check_cnt+=stats->occ_abort_check_cnt; - occ_ts_abort_cnt+=stats->occ_ts_abort_cnt; - occ_finish_time+=stats->occ_finish_time; - - // MAAT - maat_validate_cnt+=stats->maat_validate_cnt; - maat_validate_time+=stats->maat_validate_time; - maat_cs_wait_time+=stats->maat_cs_wait_time; - maat_case1_cnt+=stats->maat_case1_cnt; - maat_case2_cnt+=stats->maat_case2_cnt; - maat_case3_cnt+=stats->maat_case3_cnt; - maat_case4_cnt+=stats->maat_case4_cnt; - maat_case5_cnt+=stats->maat_case5_cnt; - maat_range+=stats->maat_range; - maat_commit_cnt+=stats->maat_commit_cnt; - - // Logging - log_write_cnt+=stats->log_write_cnt; - log_write_time+=stats->log_write_time; - log_flush_cnt+=stats->log_flush_cnt; - log_flush_time+=stats->log_flush_time; - log_process_time+=stats->log_process_time; - - // Transaction Table - txn_table_new_cnt+=stats->txn_table_new_cnt; - txn_table_get_cnt+=stats->txn_table_get_cnt; - txn_table_release_cnt+=stats->txn_table_release_cnt; - txn_table_cflt_cnt+=stats->txn_table_cflt_cnt; - txn_table_cflt_size+=stats->txn_table_cflt_size; - txn_table_get_time+=stats->txn_table_get_time; - txn_table_release_time+=stats->txn_table_release_time; - txn_table_min_ts_time+=stats->txn_table_min_ts_time; - - for(uint64_t i = 0; i < 40; i ++) { - mtx[i]+=stats->mtx[i]; - } - - // Latency - - lat_work_queue_time+=stats->lat_work_queue_time; - lat_msg_queue_time+=stats->lat_msg_queue_time; - lat_cc_block_time+=stats->lat_cc_block_time; - lat_cc_time+=stats->lat_cc_time; - lat_process_time+=stats->lat_process_time; - lat_abort_time+=stats->lat_abort_time; - lat_network_time+=stats->lat_network_time; - lat_other_time+=stats->lat_other_time; - - lat_l_loc_work_queue_time+=stats->lat_l_loc_work_queue_time; - lat_l_loc_msg_queue_time+=stats->lat_l_loc_msg_queue_time; - lat_l_loc_cc_block_time+=stats->lat_l_loc_cc_block_time; - lat_l_loc_cc_time+=stats->lat_l_loc_cc_time; - lat_l_loc_process_time+=stats->lat_l_loc_process_time; - lat_l_loc_abort_time+=stats->lat_l_loc_abort_time; - - lat_short_work_queue_time+=stats->lat_short_work_queue_time; - lat_short_msg_queue_time+=stats->lat_short_msg_queue_time; - lat_short_cc_block_time+=stats->lat_short_cc_block_time; - lat_short_cc_time+=stats->lat_short_cc_time; - lat_short_process_time+=stats->lat_short_process_time; - lat_short_network_time+=stats->lat_short_network_time; - lat_short_batch_time+=stats->lat_short_batch_time; - - lat_s_loc_work_queue_time+=stats->lat_s_loc_work_queue_time; - lat_s_loc_msg_queue_time+=stats->lat_s_loc_msg_queue_time; - lat_s_loc_cc_block_time+=stats->lat_s_loc_cc_block_time; - lat_s_loc_cc_time+=stats->lat_s_loc_cc_time; - lat_s_loc_process_time+=stats->lat_s_loc_process_time; - - lat_l_rem_work_queue_time+=stats->lat_l_rem_work_queue_time; - lat_l_rem_msg_queue_time+=stats->lat_l_rem_msg_queue_time; - lat_l_rem_cc_block_time+=stats->lat_l_rem_cc_block_time; - lat_l_rem_cc_time+=stats->lat_l_rem_cc_time; - lat_l_rem_process_time+=stats->lat_l_rem_process_time; - - lat_s_rem_work_queue_time+=stats->lat_s_rem_work_queue_time; - lat_s_rem_msg_queue_time+=stats->lat_s_rem_msg_queue_time; - lat_s_rem_cc_block_time+=stats->lat_s_rem_cc_block_time; - lat_s_rem_cc_time+=stats->lat_s_rem_cc_time; - lat_s_rem_process_time+=stats->lat_s_rem_process_time; - - ano_2_trans_write_skew_1 += stats->ano_2_trans_write_skew_1; - ano_2_trans_write_skew_2 += stats->ano_2_trans_write_skew_2; - ano_3_trans_write_skew_1 += stats->ano_3_trans_write_skew_1; - ano_3_trans_write_skew_2 += stats->ano_3_trans_write_skew_2; - ano_2_trans_read_skew += stats->ano_2_trans_read_skew; - ano_3_trans_read_skew_1 += stats->ano_3_trans_read_skew_1; - ano_3_trans_read_skew_2 += stats->ano_3_trans_read_skew_2; - ano_4_trans_read_skew += stats->ano_4_trans_read_skew; - ano_unknown += stats->ano_unknown; -} - -void Stats::init(uint64_t thread_cnt) { - if (!STATS_ENABLE) return; - - thd_cnt = thread_cnt; - _stats = new Stats_thd * [thread_cnt]; - totals = new Stats_thd; - - for(uint64_t i = 0; i < thread_cnt; i++) { - _stats[i] = (Stats_thd *)mem_allocator.align_alloc(sizeof(Stats_thd)); - _stats[i]->init(i); - _stats[i]->clear(); - } - - totals->init(0); - totals->clear(); -} - -void Stats::clear(uint64_t tid) {} - -void Stats::print_client(bool prog) { - fflush(stdout); - if (!STATS_ENABLE) return; - - totals->clear(); - for (uint64_t i = 0; i < thd_cnt; i++) totals->combine(_stats[i]); - - FILE * outf; - if (output_file != NULL) - outf = fopen(output_file, "w"); - else - outf = stdout; - if(prog) - fprintf(outf, "[prog] "); - else - fprintf(outf, "[summary] "); - totals->print_client(outf,prog); - mem_util(outf); - cpu_util(outf); - - if(prog) { - fprintf(outf,"\n"); - //for (uint32_t k = 0; k < g_node_id; ++k) { - for (uint32_t k = 0; k < g_servers_per_client; ++k) { - printf("tif_node%u=%d, ", k, client_man.get_inflight(k)); - } - printf("\n"); - } else { - } - - if (output_file != NULL) { - fflush(outf); - fclose(outf); - } - fflush(stdout); -} - -void Stats::print(bool prog) { - fflush(stdout); - if (!STATS_ENABLE) return; - - totals->clear(); - for (uint64_t i = 0; i < thd_cnt; i++) totals->combine(_stats[i]); - FILE * outf; - if (output_file != NULL) - outf = fopen(output_file, "w"); - else - outf = stdout; - if(prog) - fprintf(outf, "[prog] "); - else - fprintf(outf, "[summary] "); - totals->print(outf,prog); - mem_util(outf); - cpu_util(outf); - - fprintf(outf,"\n"); - fflush(outf); - if(!prog) { - } - fprintf(outf,"\n"); - fflush(outf); - if (output_file != NULL) { - fclose(outf); - } -} - -uint64_t Stats::get_txn_cnts() { - if (!STATS_ENABLE || g_node_id >= g_node_cnt) return 0; - uint64_t limit = g_thread_cnt + g_rem_thread_cnt; - uint64_t total_txn_cnt = 0; - for (uint64_t tid = 0; tid < limit; tid ++) { - total_txn_cnt += _stats[tid]->txn_cnt; - } - - return total_txn_cnt; -} - -void Stats::print_lat_distr() { -#if PRT_LAT_DISTR - printf("\n[all_lat] "); - uint64_t limit = 0; - if(g_node_id < g_node_cnt) - limit = g_thread_cnt; - else - limit = g_client_thread_cnt; - for (UInt32 tid = 0; tid < limit; tid++) _stats[tid]->all_lat.print(stdout); -#endif -} - -void Stats::print_lat_distr(uint64_t min, uint64_t max) { -#if PRT_LAT_DISTR - printf("\n[all_lat] "); - _stats[0]->all_lat.print(stdout,min,max); -#endif -} - -void Stats::util_init() { - struct tms timeSample; - lastCPU = times(&timeSample); - lastSysCPU = timeSample.tms_stime; - lastUserCPU = timeSample.tms_utime; -} - -void Stats::print_util() {} - -int Stats::parseLine(char* line){ - int i = strlen(line); - while (*line < '0' || *line > '9') line++; - line[i-3] = '\0'; - i = atoi(line); - return i; -} - -void Stats::mem_util(FILE * outf) { - FILE* file = fopen("/proc/self/status", "r"); - int result = -1; - char line[128]; - -// Physical memory used by current process, in KB - while (fgets(line, 128, file) != NULL){ - if (strncmp(line, "VmRSS:", 6) == 0){ - result = parseLine(line); - fprintf(outf, ",phys_mem_usage=%d", result); - } - if (strncmp(line, "VmSize:", 7) == 0){ - result = parseLine(line); - fprintf(outf, ",virt_mem_usage=%d", result); - } - } - fclose(file); - -} - -void Stats::cpu_util(FILE * outf) { - clock_t now; - struct tms timeSample; - double percent; - - now = times(&timeSample); - if (now <= lastCPU || timeSample.tms_stime < lastSysCPU || timeSample.tms_utime < lastUserCPU) { - //Overflow detection. Just skip this value. - percent = -1.0; - } else { - percent = (timeSample.tms_stime - lastSysCPU) + (timeSample.tms_utime - lastUserCPU); - percent /= (now - lastCPU); - if(ISSERVER) { - percent /= (g_total_thread_cnt);//numProcessors; - } else if(ISCLIENT){ - percent /= (g_total_client_thread_cnt);//numProcessors; - } - percent *= 100; - } - fprintf(outf, ",cpu_ttl=%f", percent); - lastCPU = now; - lastSysCPU = timeSample.tms_stime; - lastUserCPU = timeSample.tms_utime; -} - - diff --git a/contrib/deneva/statistics/stats.h b/contrib/deneva/statistics/stats.h deleted file mode 100644 index 1e4d4c3e..00000000 --- a/contrib/deneva/statistics/stats.h +++ /dev/null @@ -1,366 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _STATS_H_ -#define _STATS_H_ -#include -#include -#include - -#include "../system/global.h" -#include "stats_array.h" -class StatValue { -public: - StatValue() : value(0) {} - void operator+=(double value) { this->value += value; } - void operator=(double value) { this->value = value; } - double get() {return value;} - -private: - double value; -}; - -class Stats_thd { -public: - void init(uint64_t thd_id); - void combine(Stats_thd * stats); - void print(FILE * outf, bool prog); - void print_client(FILE * outf, bool prog); - void clear(); - - char _pad2[CL_SIZE]; - - uint64_t* part_cnt; - uint64_t* part_acc; - - double total_runtime; - - uint64_t parts_touched; - - // Execution - uint64_t txn_cnt; - uint64_t remote_txn_cnt; - uint64_t local_txn_cnt; - uint64_t local_txn_start_cnt; - uint64_t total_txn_commit_cnt; - uint64_t local_txn_commit_cnt; - uint64_t remote_txn_commit_cnt; - uint64_t total_txn_abort_cnt; - uint64_t positive_txn_abort_cnt; - uint64_t unique_txn_abort_cnt; - uint64_t local_txn_abort_cnt; - uint64_t remote_txn_abort_cnt; - double txn_run_time; - uint64_t multi_part_txn_cnt; - double multi_part_txn_run_time; - uint64_t single_part_txn_cnt; - double single_part_txn_run_time; - uint64_t txn_write_cnt; - uint64_t record_write_cnt; - - // Transaction stats - double txn_total_process_time; - double txn_process_time; - double txn_total_local_wait_time; - double txn_local_wait_time; - double txn_total_remote_wait_time; - double txn_remote_wait_time; - double txn_total_twopc_time; - double txn_twopc_time; - - // Client - uint64_t txn_sent_cnt; - double cl_send_intv; - - // Breakdown - double ts_alloc_time; - double abort_time; - double txn_manager_time; - double txn_index_time; - double txn_validate_time; - double txn_cleanup_time; - // trans - double trans_total_run_time=0; - double trans_process_time=0; - double trans_2pc_time=0; - double trans_prepare_time=0; - double trans_validate_time=0; - double trans_finish_time=0; - double trans_commit_time=0; - double trans_abort_time=0; - - double trans_access_lock_wait_time=0; - // trans mvcc - double trans_mvcc_clear_history=0; - double trans_mvcc_access=0; - // Work queue - double work_queue_wait_time; - uint64_t work_queue_cnt; - uint64_t work_queue_enq_cnt; - double work_queue_mtx_wait_time; - uint64_t work_queue_new_cnt; - double work_queue_new_wait_time; - uint64_t work_queue_old_cnt; - double work_queue_old_wait_time; - double work_queue_enqueue_time; - double work_queue_dequeue_time; - uint64_t work_queue_conflict_cnt; - - // Abort queue - uint64_t abort_queue_enqueue_cnt; - uint64_t abort_queue_dequeue_cnt; - double abort_queue_enqueue_time; - double abort_queue_dequeue_time; - double abort_queue_penalty; - double abort_queue_penalty_extra; - - // Worker thread - double worker_idle_time; - double worker_activate_txn_time; - double worker_deactivate_txn_time; - double worker_release_msg_time; - double worker_process_time; - uint64_t worker_process_cnt; - uint64_t * worker_process_cnt_by_type; - double * worker_process_time_by_type; - uint64_t * work_queue_wq_cnt; - uint64_t * work_queue_tx_cnt; - - uint64_t * work_queue_ewq_cnt; - uint64_t * work_queue_dwq_cnt; - uint64_t * work_queue_etx_cnt; - uint64_t * work_queue_dtx_cnt; - // IO - double msg_queue_delay_time; - uint64_t msg_queue_cnt; - uint64_t msg_queue_enq_cnt; - double msg_send_time; - double msg_recv_time; - double msg_recv_idle_time; - uint64_t msg_batch_cnt; - uint64_t msg_batch_size_msgs; - uint64_t msg_batch_size_bytes; - uint64_t msg_batch_size_bytes_to_server; - uint64_t msg_batch_size_bytes_to_client; - uint64_t msg_send_cnt; - uint64_t msg_recv_cnt; - double msg_unpack_time; - double mbuf_send_intv_time; - double msg_copy_output_time; - - // Concurrency control, general - uint64_t cc_conflict_cnt; - uint64_t txn_wait_cnt; - uint64_t txn_conflict_cnt; - - // 2PL - uint64_t twopl_already_owned_cnt; - uint64_t twopl_owned_cnt; - uint64_t twopl_sh_owned_cnt; - uint64_t twopl_ex_owned_cnt; - uint64_t twopl_get_cnt; - uint64_t twopl_sh_bypass_cnt; - double twopl_owned_time; - double twopl_sh_owned_time; - double twopl_ex_owned_time; - double twopl_diff_time; - double twopl_wait_time; - uint64_t twopl_getlock_cnt; - uint64_t twopl_release_cnt; - double twopl_getlock_time; - double twopl_release_time; - - // Calvin - uint64_t seq_txn_cnt; - uint64_t seq_batch_cnt; - uint64_t seq_full_batch_cnt; - double seq_ack_time; - double seq_batch_time; - uint64_t seq_process_cnt; - uint64_t seq_complete_cnt; - double seq_process_time; - double seq_prep_time; - double seq_idle_time; - double seq_queue_wait_time; - uint64_t seq_queue_cnt; - uint64_t seq_queue_enq_cnt; - double seq_queue_enqueue_time; - double seq_queue_dequeue_time; - double sched_queue_wait_time; - uint64_t sched_queue_cnt; - uint64_t sched_queue_enq_cnt; - double sched_queue_enqueue_time; - double sched_queue_dequeue_time; - double calvin_sched_time; - double sched_idle_time; - double sched_txn_table_time; - uint64_t sched_epoch_cnt; - double sched_epoch_diff; - - // OCC - double occ_validate_time; - double occ_cs_wait_time; - double occ_cs_time; - double occ_hist_validate_time; - double occ_act_validate_time; - double occ_hist_validate_fail_time; - double occ_act_validate_fail_time; - uint64_t occ_check_cnt; - uint64_t occ_abort_check_cnt; - uint64_t occ_ts_abort_cnt; - double occ_finish_time; - - // WSI - double wsi_validate_time; - double wsi_cs_wait_time; - uint64_t wsi_check_cnt; - uint64_t wsi_abort_check_cnt; - - // MAAT - uint64_t maat_validate_cnt; - double maat_validate_time; - double maat_cs_wait_time; - uint64_t maat_case1_cnt; - uint64_t maat_case2_cnt; - uint64_t maat_case3_cnt; - uint64_t maat_case4_cnt; - uint64_t maat_case5_cnt; - double maat_range; - uint64_t maat_commit_cnt; - - // // SSI - // uint64_t ssi_validate_cnt; - // double ssi_validate_time; - // uint64_t ssi_commit_cnt; - - // Logging - uint64_t log_write_cnt; - double log_write_time; - uint64_t log_flush_cnt; - double log_flush_time; - double log_process_time; - - // Transaction Table - uint64_t txn_table_new_cnt; - uint64_t txn_table_get_cnt; - uint64_t txn_table_release_cnt; - uint64_t txn_table_cflt_cnt; - uint64_t txn_table_cflt_size; - double txn_table_get_time; - double txn_table_release_time; - double txn_table_min_ts_time; - - // Latency - StatsArr client_client_latency; - StatsArr first_start_commit_latency; - StatsArr last_start_commit_latency; - StatsArr start_abort_commit_latency; - - // stats accumulated - double lat_work_queue_time; - double lat_msg_queue_time; - double lat_cc_block_time; - double lat_cc_time; - double lat_process_time; - double lat_abort_time; - double lat_network_time; - double lat_other_time; - - // stats from committed local transactions from the first starttime of the transaction - double lat_l_loc_work_queue_time; - double lat_l_loc_msg_queue_time; - double lat_l_loc_cc_block_time; - double lat_l_loc_cc_time; - double lat_l_loc_process_time; - double lat_l_loc_abort_time; - - // stats from committed local transactions only from the most recent start time - double lat_s_loc_work_queue_time; - double lat_s_loc_msg_queue_time; - double lat_s_loc_cc_block_time; - double lat_s_loc_cc_time; - double lat_s_loc_process_time; - - // stats from message-managed latency - double lat_short_work_queue_time; - double lat_short_msg_queue_time; - double lat_short_cc_block_time; - double lat_short_cc_time; - double lat_short_process_time; - double lat_short_network_time; - double lat_short_batch_time; - - // stats from committed non-local transactions - double lat_l_rem_work_queue_time; - double lat_l_rem_msg_queue_time; - double lat_l_rem_cc_block_time; - double lat_l_rem_cc_time; - double lat_l_rem_process_time; - - // stats from aborted non-local transactions - double lat_s_rem_work_queue_time; - double lat_s_rem_msg_queue_time; - double lat_s_rem_cc_block_time; - double lat_s_rem_cc_time; - double lat_s_rem_process_time; - - // stats for anomaly - uint64_t ano_2_trans_write_skew_1; - uint64_t ano_2_trans_write_skew_2; - uint64_t ano_3_trans_write_skew_1; - uint64_t ano_3_trans_write_skew_2; - uint64_t ano_2_trans_read_skew; - uint64_t ano_3_trans_read_skew_1; - uint64_t ano_3_trans_read_skew_2; - uint64_t ano_4_trans_read_skew; - uint64_t ano_unknown; - - double * mtx; - - char _pad[CL_SIZE]; -}; - -class Stats { -public: - // PER THREAD statistics - Stats_thd ** _stats; - Stats_thd * totals; - - void init(uint64_t thread_cnt); - void clear(uint64_t tid); - //void add_lat(uint64_t thd_id, uint64_t latency); - void commit(uint64_t thd_id); - void abort(uint64_t thd_id); - void print_client(bool prog); - void print(bool prog); - void print_cnts(FILE * outf); - void print_lat_distr(); - void print_lat_distr(uint64_t min, uint64_t max); - void print_abort_distr(); - uint64_t get_txn_cnts(); - void util_init(); - void print_util(); - int parseLine(char* line); - void mem_util(FILE * outf); - void cpu_util(FILE * outf); - void print_prof(FILE * outf); - - clock_t lastCPU, lastSysCPU, lastUserCPU; -private: - uint64_t thd_cnt; -}; - -#endif diff --git a/contrib/deneva/statistics/stats_array.cpp b/contrib/deneva/statistics/stats_array.cpp deleted file mode 100644 index 4a54af23..00000000 --- a/contrib/deneva/statistics/stats_array.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "global.h" -#include "helper.h" -#include "stats.h" -#include "mem_alloc.h" -#include "client_txn.h" -#include "work_queue.h" -#include -#include -#include - -void StatsArr::quicksort(int low_idx, int high_idx) { - int low = low_idx; - int high = high_idx; - uint64_t pivot = arr[(low+high) / 2]; - uint64_t tmp; - - while(low < high) { - while (arr[low] < pivot) low++; - while (arr[high] > pivot) high--; - if(low <= high) { - tmp = arr[low]; - arr[low] = arr[high]; - arr[high] = tmp; - low++; - high--; - } - } - - if (low_idx < high) quicksort(low_idx, high); - if (low < high_idx) quicksort(low, high_idx); -} - -void StatsArr::init(uint64_t size,StatsArrType type) { - arr = (uint64_t *)mem_allocator.alloc(sizeof(uint64_t) * (size + 1)); - for(uint64_t i=0;isize = size+1; - this->type = type; - cnt = 0; - pthread_mutex_init(&mtx,NULL); -} - -void StatsArr::clear() { cnt = 0; } - -void StatsArr::resize() { - size = size * 2; - arr = (uint64_t *)mem_allocator.realloc(arr, sizeof(uint64_t) * size); - for(uint64_t i=size/2;i= size) { - ATOM_ADD(arr[size-1],1); - } else { - ATOM_ADD(arr[item],1); - } - ATOM_ADD(cnt,1); - } - pthread_mutex_unlock(&mtx); -} - -void StatsArr::append(StatsArr array) { - for(uint64_t i = 0; i < array.cnt; i++) { - insert(array.get_idx(i)); - } -} - -void StatsArr::print(FILE * f) { - if(type == ArrIncr) { - for (UInt32 i = 0; i < cnt; i ++) { - fprintf(f,"%ld,", arr[i]); - } - } else if (type == ArrInsert) { - for (UInt64 i = 0; i < size; i ++) { - if (arr[i] > 0) fprintf(f, "%ld=%ld,", i, arr[i]); - } - } -} - -void StatsArr::print(FILE * f,uint64_t min, uint64_t max) { - if(type == ArrIncr) { - for (UInt32 i = min * cnt / 100; i < max * cnt / 100; i ++) { - fprintf(f,"%ld,", arr[i]); - } - } -} - -uint64_t StatsArr::get_idx(uint64_t idx) { return arr[idx]; } - -uint64_t StatsArr::get_percentile(uint64_t ile) { return arr[ile * cnt / 100]; } - -uint64_t StatsArr::get_avg() { - uint64_t sum = 0; - for(uint64_t i = 0;i < cnt;i++) { - sum+=arr[i]; - } - if (cnt > 0) return sum / cnt; - return 0; -} diff --git a/contrib/deneva/statistics/stats_array.h b/contrib/deneva/statistics/stats_array.h deleted file mode 100644 index 2d7e831e..00000000 --- a/contrib/deneva/statistics/stats_array.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _STATS_ARR_H_ -#define _STATS_ARR_H_ - -enum StatsArrType { - ArrInsert, - ArrIncr -}; -class StatsArr { -public: - void init(uint64_t size,StatsArrType type); - void clear(); - void quicksort(int low_idx, int high_idx); - void resize(); - void insert(uint64_t item); - void append(StatsArr arr); - void print(FILE * f); - void print(FILE * f,uint64_t min, uint64_t max); - uint64_t get_idx(uint64_t idx); - uint64_t get_percentile(uint64_t ile); - uint64_t get_avg(); - - uint64_t * arr; - uint64_t size; - uint64_t cnt; - StatsArrType type; -private: - pthread_mutex_t mtx; -}; - -#endif diff --git a/contrib/deneva/storage/catalog.cpp b/contrib/deneva/storage/catalog.cpp deleted file mode 100644 index 6913f18d..00000000 --- a/contrib/deneva/storage/catalog.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "catalog.h" -#include "global.h" -#include "helper.h" - -void Catalog::init(const char* table_name, uint32_t table_id, int field_cnt) { - this->table_name = table_name; - this->table_id = table_id; - this->field_cnt = 0; - this->_columns = new Column [field_cnt]; - this->tuple_size = 0; -} - -void Catalog::add_col(char * col_name, uint64_t size, char * type) { - _columns[field_cnt].size = size; - strcpy(_columns[field_cnt].type, type); - strcpy(_columns[field_cnt].name, col_name); - _columns[field_cnt].id = field_cnt; - _columns[field_cnt].index = tuple_size; - tuple_size += size; - field_cnt ++; -} - -uint64_t Catalog::get_field_id(const char * name) { - UInt32 i; - for (i = 0; i < field_cnt; i++) { - if (strcmp(name, _columns[i].name) == 0) break; - } - assert (i < field_cnt); - return i; -} - -char* Catalog::get_field_type(uint64_t id) { return _columns[id].type; } - -char* Catalog::get_field_name(uint64_t id) { return _columns[id].name; } - -char* Catalog::get_field_type(char* name) { return get_field_type(get_field_id(name)); } - -uint64_t Catalog::get_field_index(char* name) { return get_field_index(get_field_id(name)); } - -void Catalog::print_schema() { - printf("\n[Catalog] %s\n", table_name); - for (UInt32 i = 0; i < field_cnt; i++) { - printf("\t%s\t%s\t%ld\n", get_field_name(i), get_field_type(i), get_field_size(i)); - } -} diff --git a/contrib/deneva/storage/catalog.h b/contrib/deneva/storage/catalog.h deleted file mode 100644 index e17b37d3..00000000 --- a/contrib/deneva/storage/catalog.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _CATALOG_H_ -#define _CATALOG_H_ - -#include -#include -#include "global.h" -#include "helper.h" - -class Column { -public: - Column() { - this->type = new char[80]; - this->name = new char[80]; - } - Column(uint64_t size, char *type, char *name, uint64_t id, uint64_t index) { - this->size = size; - this->id = id; - this->index = index; - this->type = new char[80]; - this->name = new char[80]; - strcpy(this->type, type); - strcpy(this->name, name); - }; - - UInt64 id; - UInt32 size; - UInt32 index; - char * type; - char * name; - char pad[CL_SIZE - sizeof(uint64_t)*3 - sizeof(char *)*2]; -}; - -class Catalog { -public: - // abandoned init function - // field_size is the size of each each field. - void init(const char * table_name, uint32_t table_id, int field_cnt); - void add_col(char * col_name, uint64_t size, char * type); - - UInt32 field_cnt; - const char * table_name; - uint32_t table_id; - - UInt32 get_tuple_size() { - return tuple_size; - }; - - uint64_t get_field_cnt() { - return field_cnt; - }; - uint64_t get_field_size(int id) { - return _columns[id].size; - }; - uint64_t get_field_index(int id) { - return _columns[id].index; - }; - char * get_field_type(uint64_t id); - char * get_field_name(uint64_t id); - uint64_t get_field_id(const char * name); - char * get_field_type(char * name); - uint64_t get_field_index(char * name); - - void print_schema(); - Column * _columns; - UInt32 tuple_size; -private: - char pad[CL_SIZE - sizeof(uint64_t)*2 - sizeof(int) - sizeof(char *)*2 - sizeof(uint32_t)]; -}; - -#endif diff --git a/contrib/deneva/storage/index_base.h b/contrib/deneva/storage/index_base.h deleted file mode 100644 index 2467199a..00000000 --- a/contrib/deneva/storage/index_base.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _INDEX_BASE_H_ -#define _INDEX_BASE_H_ - -#include "global.h" - -class table_t; - -class index_base { -public: - virtual RC init() { - return RCOK; - }; - - virtual RC init(uint64_t size) { - return RCOK; - }; - - virtual bool index_exist(idx_key_t key)=0; // check if the key exist. - - virtual RC index_insert(idx_key_t key, itemid_t *item, int part_id = -1) = 0; - - virtual RC index_insert_nonunique(idx_key_t key, itemid_t *item, int part_id = -1) = 0; - - virtual RC index_read(idx_key_t key, itemid_t *&item, int part_id = -1) = 0; - - virtual RC index_read(idx_key_t key, itemid_t *&item, int part_id = -1, int thd_id = 0) = 0; - - // TODO implement index_remove - virtual RC index_remove(idx_key_t key) { - return RCOK; - }; - - // the index in on "table". The key is the merged key of "fields" - table_t * table; -}; - -#endif diff --git a/contrib/deneva/storage/index_btree.cpp b/contrib/deneva/storage/index_btree.cpp deleted file mode 100644 index b4de38bc..00000000 --- a/contrib/deneva/storage/index_btree.cpp +++ /dev/null @@ -1,579 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "mem_alloc.h" -#include "index_btree.h" -#include "row.h" - -RC index_btree::init(uint64_t part_cnt) { - this->part_cnt = part_cnt; - order = BTREE_ORDER; - // these pointers can be mapped anywhere. They won't be changed - roots = (bt_node **) malloc(part_cnt * sizeof(bt_node *)); - // "cur_xxx_per_thd" is only for SCAN queries. - ARR_PTR(bt_node *, cur_leaf_per_thd, g_thread_cnt); - ARR_PTR(UInt32, cur_idx_per_thd, g_thread_cnt); - // the index tree of each partition musted be mapped to corresponding l2 slices - for (UInt32 part_id = 0; part_id < part_cnt; part_id ++) { - RC rc; - rc = make_lf(part_id, roots[part_id]); - assert (rc == RCOK); - } - return RCOK; -} - -RC index_btree::init(uint64_t part_cnt, table_t * table) { - this->table = table; - init(part_cnt); - return RCOK; -} - -bt_node * index_btree::find_root(uint64_t part_id) { - assert (part_id < part_cnt); - return roots[part_id]; -} - -bool index_btree::index_exist(idx_key_t key) { - assert(false); // part_id is not correct now. - glob_param params; - params.part_id = key_to_part(key) % part_cnt; - bt_node * leaf; - // does not matter which thread check existence - find_leaf(params, key, INDEX_NONE, leaf); - if (leaf == NULL) return false; - for (UInt32 i = 0; i < leaf->num_keys; i++) - if (leaf->keys[i] == key) { - // the record is found! - return true; - } - return false; -} - -RC index_btree::index_next(uint64_t thd_id, itemid_t * &item, bool samekey) { - int idx = *cur_idx_per_thd[thd_id]; - bt_node * leaf = *cur_leaf_per_thd[thd_id]; - idx_key_t cur_key = leaf->keys[idx] ; - - *cur_idx_per_thd[thd_id] += 1; - if (*cur_idx_per_thd[thd_id] >= leaf->num_keys) { - leaf = leaf->next; - *cur_leaf_per_thd[thd_id] = leaf; - *cur_idx_per_thd[thd_id] = 0; - } - if (leaf == NULL) - item = NULL; - else { - assert( leaf->is_leaf ); - if ( samekey && leaf->keys[ *cur_idx_per_thd[thd_id] ] != cur_key) - item = NULL; - else - item = (itemid_t *) leaf->pointers[ *cur_idx_per_thd[thd_id] ]; - } - return RCOK; -} - -RC index_btree::index_read(idx_key_t key, itemid_t *& item) { - assert(false); - return RCOK; -} - -RC index_btree::index_read(idx_key_t key, itemid_t *&item, int part_id) { - - return index_read(key, item, 0, part_id); -} - -RC index_btree::index_read(idx_key_t key, itemid_t *&item, uint64_t thd_id, int64_t part_id) { - RC rc = Abort; - glob_param params; - assert(part_id != -1); - params.part_id = part_id; - bt_node * leaf; - find_leaf(params, key, INDEX_READ, leaf); - if (leaf == NULL) M_ASSERT(false, "the leaf does not exist!"); - for (UInt32 i = 0; i < leaf->num_keys; i++) - if (leaf->keys[i] == key) { - item = (itemid_t *)leaf->pointers[i]; - release_latch(leaf); - (*cur_leaf_per_thd[thd_id]) = leaf; - *cur_idx_per_thd[thd_id] = i; - return RCOK; - } - // release the latch after reading the node - - printf("key = %ld\n", key); - M_ASSERT(false, "the key does not exist!"); - return rc; -} - -RC index_btree::index_insert(idx_key_t key, itemid_t * item, int part_id) { - glob_param params; - if (WORKLOAD == TPCC) assert(part_id != -1); - assert(part_id != -1); - params.part_id = part_id; - // create a tree if there does not exist one already - RC rc = RCOK; - bt_node * root = find_root(params.part_id); - assert(root != NULL); - int depth = 0; - // TODO tree depth < 100 - bt_node * ex_list[100]; - bt_node * leaf = NULL; - bt_node * last_ex = NULL; - rc = find_leaf(params, key, INDEX_INSERT, leaf, last_ex); - assert(rc == RCOK); - - bt_node * tmp_node = leaf; - if (last_ex != NULL) { - while (tmp_node != last_ex) { - ex_list[depth++] = tmp_node; - tmp_node = tmp_node->parent; - assert (depth < 100); - } - ex_list[depth ++] = last_ex; - } else - ex_list[depth++] = leaf; - // from this point, the required data structures are all latched, - // so the system should not abort anymore. - // insert into btree if the leaf is not full - if (leaf->num_keys < order - 1 || leaf_has_key(leaf, key) >= 0) { - rc = insert_into_leaf(params, leaf, key, item); - // only the leaf should be ex latched. - for (int i = 0; i < depth; i++) release_latch(ex_list[i]); - } else { // split the nodes when necessary - rc = split_lf_insert(params, leaf, key, item); - for (int i = 0; i < depth; i++) release_latch(ex_list[i]); - } - return rc; -} - -RC index_btree::make_lf(uint64_t part_id, bt_node *& node) { - RC rc = make_node(part_id, node); - if (rc != RCOK) return rc; - node->is_leaf = true; - return RCOK; -} - -RC index_btree::make_nl(uint64_t part_id, bt_node *& node) { - RC rc = make_node(part_id, node); - if (rc != RCOK) return rc; - node->is_leaf = false; - return RCOK; -} - -RC index_btree::make_node(uint64_t part_id, bt_node *& node) { - - bt_node * new_node = (bt_node *) mem_allocator.alloc(sizeof(bt_node)); - assert (new_node != NULL); - new_node->pointers = NULL; - new_node->keys = (idx_key_t *) mem_allocator.alloc((order - 1) * sizeof(idx_key_t)); - new_node->pointers = (void **) mem_allocator.alloc(order * sizeof(void *)); - assert (new_node->keys != NULL && new_node->pointers != NULL); - new_node->is_leaf = false; - new_node->num_keys = 0; - new_node->parent = NULL; - new_node->next = NULL; - new_node->latch = false; - new_node->latch_type = LATCH_NONE; - - node = new_node; - return RCOK; -} - -RC index_btree::start_new_tree(glob_param params, idx_key_t key, itemid_t * item) { - RC rc; - uint64_t part_id = params.part_id; - rc = make_lf(part_id, roots[part_id % part_cnt]); - if (rc != RCOK) return rc; - bt_node * root = roots[part_id % part_cnt]; - assert(root != NULL); - root->keys[0] = key; - root->pointers[0] = (void *)item; - root->parent = NULL; - root->num_keys++; - return RCOK; -} - -bool index_btree::latch_node(bt_node * node, latch_t latch_type) { - // TODO latch is disabled - if (!ENABLE_LATCH) return true; - bool success = false; - - while (!ATOM_CAS(node->latch, false, true)) { - } - - - latch_t node_latch = node->latch_type; - if (node_latch == LATCH_NONE || (node_latch == LATCH_SH && latch_type == LATCH_SH)) { - node->latch_type = latch_type; - if (node_latch == LATCH_NONE) M_ASSERT((node->share_cnt == 0), "share cnt none 0!"); - if (node->latch_type == LATCH_SH) node->share_cnt++; - success = true; - } else // latch_type incompatible - success = false; - - bool ok = ATOM_CAS(node->latch, true, false); - assert(ok); - - return success; -} - -latch_t index_btree::release_latch(bt_node * node) { - if (!ENABLE_LATCH) return LATCH_SH; - latch_t type = node->latch_type; - - while (!ATOM_CAS(node->latch, false, true)) { - } - - M_ASSERT((node->latch_type != LATCH_NONE), "release latch fault"); - if (node->latch_type == LATCH_EX) - node->latch_type = LATCH_NONE; - else if (node->latch_type == LATCH_SH) { - node->share_cnt --; - if (node->share_cnt == 0) node->latch_type = LATCH_NONE; - } - bool ok = ATOM_CAS(node->latch, true, false); - assert(ok); - return type; -} - -RC index_btree::upgrade_latch(bt_node * node) { - if (!ENABLE_LATCH) return RCOK; - bool success = false; - - while (!ATOM_CAS(node->latch, false, true)) { - } - - M_ASSERT( (node->latch_type == LATCH_SH), "" ); - if (node->share_cnt > 1) - success = false; - else { // share_cnt == 1 - success = true; - node->latch_type = LATCH_EX; - node->share_cnt = 0; - } - - bool ok = ATOM_CAS(node->latch, true, false); - assert(ok); - - if (success) - return RCOK; - else - return Abort; -} - -RC index_btree::cleanup(bt_node * node, bt_node * last_ex) { - if (last_ex != NULL) { - do { - node = node->parent; - release_latch(node); - } while (node != last_ex); - } - return RCOK; -} - -RC index_btree::find_leaf(glob_param params, idx_key_t key, idx_acc_t access_type, bt_node *& leaf) { - bt_node * last_ex = NULL; - assert(access_type != INDEX_INSERT); - RC rc = find_leaf(params, key, access_type, leaf, last_ex); - return rc; -} - -RC index_btree::find_leaf(glob_param params, idx_key_t key, idx_acc_t access_type, bt_node *&leaf, - bt_node *&last_ex) { - UInt32 i; - bt_node * c = find_root(params.part_id); - assert(c != NULL); - bt_node * child; - if (access_type == INDEX_NONE) { - while (!c->is_leaf) { - for (i = 0; i < c->num_keys; i++) { - if (key < c->keys[i]) break; - } - c = (bt_node *)c->pointers[i]; - } - leaf = c; - return RCOK; - } - - if (!latch_node(c, LATCH_SH)) return Abort; - while (!c->is_leaf) { - assert(get_part_id(c) == params.part_id); - assert(get_part_id(c->keys) == params.part_id); - for (i = 0; i < c->num_keys; i++) { - if (key < c->keys[i]) break; - } - child = (bt_node *)c->pointers[i]; - if (!latch_node(child, LATCH_SH)) { - release_latch(c); - cleanup(c, last_ex); - last_ex = NULL; - return Abort; - } - if (access_type == INDEX_INSERT) { - if (child->num_keys == order - 1) { - if (upgrade_latch(c) != RCOK) { - release_latch(c); - release_latch(child); - cleanup(c, last_ex); - last_ex = NULL; - return Abort; - } - if (last_ex == NULL) last_ex = c; - } else { - cleanup(c, last_ex); - last_ex = NULL; - release_latch(c); - } - } else - release_latch(c); // release the LATCH_SH on c - c = child; - } - // c is leaf - // at this point, if the access is a read, then only the leaf is latched by LATCH_SH - // if the access is an insertion, then the leaf is sh latched and related nodes in the tree - // are ex latched. - if (access_type == INDEX_INSERT) { - if (upgrade_latch(c) != RCOK) { - release_latch(c); - cleanup(c, last_ex); - return Abort; - } - } - leaf = c; - assert (leaf->is_leaf); - return RCOK; -} - -RC index_btree::insert_into_leaf(glob_param params, bt_node * leaf, idx_key_t key, itemid_t * item) { - UInt32 i, insertion_point; - insertion_point = 0; - int idx = leaf_has_key(leaf, key); - if (idx >= 0) { - item->next = (itemid_t *)leaf->pointers[idx]; - leaf->pointers[idx] = (void *) item; - return RCOK; - } - while (insertion_point < leaf->num_keys && leaf->keys[insertion_point] < key) insertion_point++; - for (i = leaf->num_keys; i > insertion_point; i--) { - leaf->keys[i] = leaf->keys[i - 1]; - leaf->pointers[i] = leaf->pointers[i - 1]; - } - leaf->keys[insertion_point] = key; - leaf->pointers[insertion_point] = (void *)item; - leaf->num_keys++; - M_ASSERT( (leaf->num_keys < order), "too many keys in leaf" ); - return RCOK; -} - -RC index_btree::split_lf_insert(glob_param params, bt_node * leaf, idx_key_t key, itemid_t * item) { - RC rc; - UInt32 insertion_index, split, i, j; - idx_key_t new_key; - - uint64_t part_id = params.part_id; - bt_node * new_leaf; - - rc = make_lf(part_id, new_leaf); - if (rc != RCOK) return rc; - - M_ASSERT(leaf->num_keys == order - 1, "trying to split non-full leaf!"); - - idx_key_t temp_keys[BTREE_ORDER]; - itemid_t * temp_pointers[BTREE_ORDER]; - insertion_index = 0; - while (insertion_index < order - 1 && leaf->keys[insertion_index] < key) insertion_index++; - - for (i = 0, j = 0; i < leaf->num_keys; i++, j++) { - if (j == insertion_index) j++; - - temp_keys[j] = leaf->keys[i]; - temp_pointers[j] = (itemid_t *)leaf->pointers[i]; - } - - temp_keys[insertion_index] = key; - temp_pointers[insertion_index] = item; - - split = cut(order - 1); - leaf->num_keys = 0; - for (i = 0; i < split; i++) { - leaf->pointers[i] = temp_pointers[i]; - leaf->keys[i] = temp_keys[i]; - leaf->num_keys++; - M_ASSERT( (leaf->num_keys < order), "too many keys in leaf" ); - } - for (i = split, j = 0; i < order; i++, j++) { - - new_leaf->pointers[j] = temp_pointers[i]; - new_leaf->keys[j] = temp_keys[i]; - new_leaf->num_keys++; - M_ASSERT( (leaf->num_keys < order), "too many keys in leaf" ); - } - - new_leaf->next = leaf->next; - leaf->next = new_leaf; - - for (i = leaf->num_keys; i < order - 1; i++) leaf->pointers[i] = NULL; - for (i = new_leaf->num_keys; i < order - 1; i++) new_leaf->pointers[i] = NULL; - - new_leaf->parent = leaf->parent; - new_key = new_leaf->keys[0]; - - rc = insert_into_parent(params, leaf, new_key, new_leaf); - return rc; -} - -RC index_btree::insert_into_parent(glob_param params, bt_node *left, idx_key_t key, - bt_node * right) { - - bt_node * parent = left->parent; - - /* Case: new root. */ - if (parent == NULL) return insert_into_new_root(params, left, key, right); - - UInt32 insert_idx = 0; - while (parent->keys[insert_idx] < key && insert_idx < parent->num_keys) insert_idx++; - // the parent has enough space, just insert into it - if (parent->num_keys < order - 1) { - for (UInt32 i = parent->num_keys-1; i >= insert_idx; i--) { - parent->keys[i + 1] = parent->keys[i]; - parent->pointers[i+2] = parent->pointers[i+1]; - } - parent->num_keys ++; - parent->keys[insert_idx] = key; - parent->pointers[insert_idx + 1] = right; - return RCOK; - } - - /* Harder case: split a node in order - * to preserve the B+ tree properties. - */ - - return split_nl_insert(params, parent, insert_idx, key, right); -} - -RC index_btree::insert_into_new_root(glob_param params, bt_node *left, idx_key_t key, - bt_node *right) { - RC rc; - uint64_t part_id = params.part_id; - bt_node * new_root; - - rc = make_nl(part_id, new_root); - if (rc != RCOK) return rc; - new_root->keys[0] = key; - new_root->pointers[0] = left; - new_root->pointers[1] = right; - new_root->num_keys++; - M_ASSERT( (new_root->num_keys < order), "too many keys in leaf" ); - new_root->parent = NULL; - left->parent = new_root; - right->parent = new_root; - left->next = right; - - this->roots[part_id] = new_root; - // TODO this new root is not latched, at this point, other threads - // may start to access this new root. Is this ok? - return RCOK; -} - -RC index_btree::split_nl_insert(glob_param params, bt_node *old_node, UInt32 left_index, - idx_key_t key, bt_node *right) { - RC rc; - uint64_t i, j, split, k_prime; - bt_node * new_node, * child; - - uint64_t part_id = params.part_id; - rc = make_node(part_id, new_node); - - /* First create a temporary set of keys and pointers - * to hold everything in order, including - * the new key and pointer, inserted in their - * correct places. - * Then create a new node and copy half of the - * keys and pointers to the old node and - * the other half to the new. - */ - - idx_key_t temp_keys[BTREE_ORDER]; - bt_node * temp_pointers[BTREE_ORDER + 1]; - for (i = 0, j = 0; i < old_node->num_keys + 1; i++, j++) { - if (j == left_index + 1) j++; - temp_pointers[j] = (bt_node *)old_node->pointers[i]; - } - - for (i = 0, j = 0; i < old_node->num_keys; i++, j++) { - if (j == left_index) j++; - - temp_keys[j] = old_node->keys[i]; - } - - temp_pointers[left_index + 1] = right; - temp_keys[left_index] = key; - - /* Create the new node and copy - * half the keys and pointers to the - * old and half to the new. - */ - split = cut(order); - if (rc != RCOK) return rc; - - old_node->num_keys = 0; - for (i = 0; i < split - 1; i++) { - old_node->pointers[i] = temp_pointers[i]; - old_node->keys[i] = temp_keys[i]; - old_node->num_keys++; - M_ASSERT( (old_node->num_keys < order), "too many keys in leaf" ); - } - - new_node->next = old_node->next; - old_node->next = new_node; - - old_node->pointers[i] = temp_pointers[i]; - k_prime = temp_keys[split - 1]; - for (++i, j = 0; i < order; i++, j++) { - new_node->pointers[j] = temp_pointers[i]; - new_node->keys[j] = temp_keys[i]; - - new_node->num_keys++; - M_ASSERT( (old_node->num_keys < order), "too many keys in leaf" ); - } - new_node->pointers[j] = temp_pointers[i]; - - new_node->parent = old_node->parent; - for (i = 0; i <= new_node->num_keys; i++) { - child = (bt_node *)new_node->pointers[i]; - child->parent = new_node; - } - - /* Insert a new key into the parent of the two - * nodes resulting from the split, with - * the old node to the left and the new to the right. - */ - - return insert_into_parent(params, old_node, k_prime, new_node); -} - -int index_btree::leaf_has_key(bt_node * leaf, idx_key_t key) { - for (UInt32 i = 0; i < leaf->num_keys; i++) - if (leaf->keys[i] == key) return i; - return -1; -} - -UInt32 index_btree::cut(UInt32 length) { - if (length % 2 == 0) - return length/2; - else - return length/2 + 1; -} diff --git a/contrib/deneva/storage/index_btree.h b/contrib/deneva/storage/index_btree.h deleted file mode 100644 index 2f41cfc9..00000000 --- a/contrib/deneva/storage/index_btree.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _BTREE_H_ -#define _BTREE_H_ - -#include "global.h" -#include "helper.h" -#include "index_base.h" - - -typedef struct bt_node { - // TODO bad hack! - void ** pointers; // for non-leaf nodes, point to bt_nodes - bool is_leaf; - idx_key_t * keys; - bt_node * parent; - UInt32 num_keys; - bt_node * next; - bool latch; - pthread_mutex_t locked; - latch_t latch_type; - UInt32 share_cnt; -} bt_node; - -struct glob_param { - uint64_t part_id; -}; - -class index_btree : public index_base { -public: - RC init(uint64_t part_cnt); - RC init(uint64_t part_cnt, table_t * table); - bool index_exist(idx_key_t key); // check if the key exist. - RC index_insert(idx_key_t key, itemid_t * item, int part_id = -1); - RC index_insert_nonunique(idx_key_t key, itemid_t * item, int part_id = -1) { return RCOK;} - RC index_read(idx_key_t key, itemid_t *&item, uint64_t thd_id, int64_t part_id = -1); - RC index_read(idx_key_t key, itemid_t * &item, int part_id = -1); - RC index_read(idx_key_t key, itemid_t * &item); - RC index_next(uint64_t thd_id, itemid_t * &item, bool samekey = false); - -private: - // index structures may have part_cnt = 1 or PART_CNT. - uint64_t part_cnt; - RC make_lf(uint64_t part_id, bt_node *& node); - RC make_nl(uint64_t part_id, bt_node *& node); - RC make_node(uint64_t part_id, bt_node *& node); - - RC start_new_tree(glob_param params, idx_key_t key, itemid_t * item); - RC find_leaf(glob_param params, idx_key_t key, idx_acc_t access_type, bt_node *&leaf, - bt_node *&last_ex); - RC find_leaf(glob_param params, idx_key_t key, idx_acc_t access_type, bt_node *& leaf); - RC insert_into_leaf(glob_param params, bt_node * leaf, idx_key_t key, itemid_t * item); - // handle split - RC split_lf_insert(glob_param params, bt_node * leaf, idx_key_t key, itemid_t * item); - RC split_nl_insert(glob_param params, bt_node *node, UInt32 left_index, idx_key_t key, - bt_node *right); - RC insert_into_parent(glob_param params, bt_node * left, idx_key_t key, bt_node * right); - RC insert_into_new_root(glob_param params, bt_node * left, idx_key_t key, bt_node * right); - - int leaf_has_key(bt_node * leaf, idx_key_t key); - - UInt32 cut(UInt32 length); - UInt32 order; // # of keys in a node(for both leaf and non-leaf) - bt_node ** roots; // each partition has a different root - bt_node * find_root(uint64_t part_id); - - bool latch_node(bt_node * node, latch_t latch_type); - latch_t release_latch(bt_node * node); - RC upgrade_latch(bt_node * node); - // clean up all the LATCH_EX up tp last_ex - RC cleanup(bt_node * node, bt_node * last_ex); - - // the leaf and the idx within the leaf that the thread last accessed. - bt_node *** cur_leaf_per_thd; - UInt32 ** cur_idx_per_thd; -}; - -#endif diff --git a/contrib/deneva/storage/index_hash.cpp b/contrib/deneva/storage/index_hash.cpp deleted file mode 100644 index 04d4227c..00000000 --- a/contrib/deneva/storage/index_hash.cpp +++ /dev/null @@ -1,247 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "global.h" -#include "index_hash.h" -#include "mem_alloc.h" -#include "row.h" - -RC IndexHash::init(uint64_t bucket_cnt) { - _bucket_cnt = bucket_cnt; - _bucket_cnt_per_part = bucket_cnt; - - _buckets = new BucketHeader * [1]; - _buckets[0] = (BucketHeader *) mem_allocator.alloc(sizeof(BucketHeader) * _bucket_cnt_per_part); - uint64_t buckets_init_cnt = 0; - for (UInt32 n = 0; n < _bucket_cnt_per_part; n ++) { - _buckets[0][n].init(); - ++buckets_init_cnt; - } - printf("Index init with %ld buckets\n",buckets_init_cnt); - return RCOK; -} - -RC IndexHash::init(int part_cnt, table_t *table, uint64_t bucket_cnt) { - init(bucket_cnt); - this->table = table; - return RCOK; -} - -void IndexHash::index_delete() { - for (UInt32 n = 0; n < _bucket_cnt_per_part; n ++) { - _buckets[0][n].delete_bucket(); - } - mem_allocator.free(_buckets[0],sizeof(BucketHeader) * _bucket_cnt_per_part); - delete _buckets; -} - -void IndexHash::index_reset() { - for (UInt32 n = 0; n < _bucket_cnt_per_part; n ++) { - _buckets[0][n].delete_bucket(); - } -} - -bool IndexHash::index_exist(idx_key_t key) { - assert(false); -} - -void -IndexHash::get_latch(BucketHeader * bucket) { - while (!ATOM_CAS(bucket->locked, false, true)) {} -} - -void -IndexHash::release_latch(BucketHeader * bucket) { - bool ok = ATOM_CAS(bucket->locked, true, false); - assert(ok); -} - - -RC IndexHash::index_insert(idx_key_t key, itemid_t * item, int part_id) { - RC rc = RCOK; - uint64_t bkt_idx = hash(key); - assert(bkt_idx < _bucket_cnt_per_part); - //BucketHeader * cur_bkt = &_buckets[part_id][bkt_idx]; - BucketHeader * cur_bkt = &_buckets[0][bkt_idx]; - // 1. get the ex latch - get_latch(cur_bkt); - - // 2. update the latch list - cur_bkt->insert_item(key, item, part_id); - - // 3. release the latch - release_latch(cur_bkt);//delete - return rc; -} -RC IndexHash::index_insert_nonunique(idx_key_t key, itemid_t * item, int part_id) { - RC rc = RCOK; - uint64_t bkt_idx = hash(key); - assert(bkt_idx < _bucket_cnt_per_part); - //BucketHeader * cur_bkt = &_buckets[part_id][bkt_idx]; - BucketHeader * cur_bkt = &_buckets[0][bkt_idx]; - // 1. get the ex latch - get_latch(cur_bkt); - - // 2. update the latch list - cur_bkt->insert_item_nonunique(key, item, part_id); - - // 3. release the latch - release_latch(cur_bkt); - return rc; -} - -RC IndexHash::index_read(idx_key_t key, itemid_t * &item, int part_id) { - uint64_t bkt_idx = hash(key); - assert(bkt_idx < _bucket_cnt_per_part); - //BucketHeader * cur_bkt = &_buckets[part_id][bkt_idx]; - BucketHeader * cur_bkt = &_buckets[0][bkt_idx]; - RC rc = RCOK; - // 1. get the sh latch - - cur_bkt->read_item(key, item); - - // 3. release the latch - return rc; - -} - -RC IndexHash::index_read(idx_key_t key, int count, itemid_t * &item, int part_id) { - uint64_t bkt_idx = hash(key); - assert(bkt_idx < _bucket_cnt_per_part); - //BucketHeader * cur_bkt = &_buckets[part_id][bkt_idx]; - BucketHeader * cur_bkt = &_buckets[0][bkt_idx]; - RC rc = RCOK; - // 1. get the sh latch - - cur_bkt->read_item(key, count, item); - - // 3. release the latch - return rc; - -} - - -RC IndexHash::index_read(idx_key_t key, itemid_t * &item, - int part_id, int thd_id) { - uint64_t bkt_idx = hash(key); - assert(bkt_idx < _bucket_cnt_per_part); - //BucketHeader * cur_bkt = &_buckets[part_id][bkt_idx]; - BucketHeader * cur_bkt = &_buckets[0][bkt_idx]; - RC rc = RCOK; - // 1. get the sh latch - - - cur_bkt->read_item(key, item); - - // 3. release the latch - return rc; -} - -/************** BucketHeader Operations ******************/ - -void BucketHeader::init() { - node_cnt = 0; - first_node = NULL; - locked = false; -} - -void BucketHeader::delete_bucket() { - BucketNode * cur_node = first_node; - while (cur_node != NULL) { - ((row_t *)cur_node->items->location)->free_row(); - cur_node = cur_node->next; - } - first_node=NULL; -} - - -void BucketHeader::insert_item(idx_key_t key, - itemid_t * item, - int part_id) -{ - - BucketNode * cur_node = first_node; - BucketNode * prev_node = NULL; - while (cur_node != NULL) { - if (cur_node->key == key) - break; - prev_node = cur_node; - cur_node = cur_node->next; - } - if (cur_node == NULL) { - BucketNode * new_node = (BucketNode *) - mem_allocator.alloc(sizeof(BucketNode)); - new_node->init(key); - new_node->items = item; - if (prev_node != NULL) { - new_node->next = prev_node->next; - prev_node->next = new_node; - } else { - new_node->next = first_node; - first_node = new_node; - } - } else { - item->next = cur_node->items; - cur_node->items = item; - } -} - - -void BucketHeader::insert_item_nonunique(idx_key_t key, - itemid_t * item, - int part_id) -{ - - BucketNode * new_node = (BucketNode *) - mem_allocator.alloc(sizeof(BucketNode)); - new_node->init(key); - new_node->items = item; - new_node->next = first_node; - first_node = new_node; -} - -void BucketHeader::read_item(idx_key_t key, itemid_t *&item) { - BucketNode * cur_node = first_node; - while (cur_node != NULL) { - if (cur_node->key == key) break; - cur_node = cur_node->next; - } - M_ASSERT_V(cur_node != NULL, "Key does not exist! %ld\n",key); - - assert(cur_node->key == key); - item = cur_node->items; -} - -void BucketHeader::read_item(idx_key_t key, uint32_t count, itemid_t *&item) { - BucketNode * cur_node = first_node; - uint32_t ctr = 0; - while (cur_node != NULL) { - if (cur_node->key == key) { - if (ctr == count) { - break; - } - ++ctr; - } - cur_node = cur_node->next; - } - if (cur_node == NULL) { - item = NULL; - return; - } - M_ASSERT_V(cur_node != NULL, "Key does not exist! %ld\n",key); - assert(cur_node->key == key); - item = cur_node->items; -} diff --git a/contrib/deneva/storage/index_hash.h b/contrib/deneva/storage/index_hash.h deleted file mode 100644 index d36d64f5..00000000 --- a/contrib/deneva/storage/index_hash.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _INDEX_HASH_H_ -#define _INDEX_HASH_H_ - -#include "global.h" -#include "helper.h" -#include "index_base.h" - -// each BucketNode contains items sharing the same key -class BucketNode { -public: - BucketNode(idx_key_t key) { - init(key); - }; - void init(idx_key_t key) { - this->key = key; - next = NULL; - items = NULL; - } - idx_key_t key; - // The node for the next key - BucketNode * next; - // NOTE. The items can be a list of items connected by the next pointer. - itemid_t * items; -}; - -// BucketHeader does concurrency control of Hash -class BucketHeader { -public: - void init(); - void delete_bucket(); - void insert_item(idx_key_t key, itemid_t * item, int part_id); - void insert_item_nonunique(idx_key_t key, itemid_t * item, int part_id); - void read_item(idx_key_t key, itemid_t * &item); - void read_item(idx_key_t key, uint32_t count, itemid_t * &item); - BucketNode * first_node; - uint64_t node_cnt; - bool locked; - -}; - -// TODO Hash index does not support partition yet. -class IndexHash : public index_base -{ -public: - RC init(uint64_t bucket_cnt); - RC init(int part_cnt, - table_t * table, - uint64_t bucket_cnt); - void index_delete(); - void index_reset(); - bool index_exist(idx_key_t key); // check if the key exist. - RC index_insert(idx_key_t key, itemid_t * item, int part_id=-1); - RC index_insert_nonunique(idx_key_t key, itemid_t * item, int part_id=-1); - // the following call returns a single item - RC index_read(idx_key_t key, itemid_t * &item, int part_id=-1); - RC index_read(idx_key_t key, int count, itemid_t * &item, int part_id=-1); - RC index_read(idx_key_t key, itemid_t * &item, - int part_id=-1, int thd_id=0); - - // the following call returns a list of items - - // TODO implement index_remove - - -private: - void get_latch(BucketHeader * bucket); - void release_latch(BucketHeader * bucket); - // TODO implement more complex hash function - uint64_t hash(idx_key_t key) { -#if WORKLOAD == YCSB - return (key / g_part_cnt) % _bucket_cnt_per_part; -#else - return key % _bucket_cnt_per_part; -#endif - } - - BucketHeader ** _buckets; - uint64_t _bucket_cnt; - uint64_t _bucket_cnt_per_part; -}; - -#endif diff --git a/contrib/deneva/storage/row.cpp b/contrib/deneva/storage/row.cpp deleted file mode 100644 index b1b60b7a..00000000 --- a/contrib/deneva/storage/row.cpp +++ /dev/null @@ -1,501 +0,0 @@ -/* - Tencent is pleased to support the open source community by making 3TS available. - - Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - Tencent Modifications are Copyright (C) THL A29 Limited. - - Author: hongyaozhao@ruc.edu.cn - - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "global.h" -#include "table.h" -#include "catalog.h" -#include "row.h" -#include "txn.h" - -#include "catalog.h" -#include "global.h" -#include "mem_alloc.h" -#include "row_lock.h" -#include "row_maat.h" -#include "row_mvcc.h" -#include "row_occ.h" -#include "row_ts.h" -#include "row_sundial.h" -#include "row_ssi.h" -#include "row_wsi.h" -#include "row_null.h" -#include "row_silo.h" -#include "mem_alloc.h" -#include "manager.h" - -#define SIM_FULL_ROW true - -RC row_t::init(table_t *host_table, uint64_t part_id, uint64_t row_id) { - part_info = true; - _row_id = row_id; - _part_id = part_id; - this->table = host_table; - Catalog * schema = host_table->get_schema(); - tuple_size = schema->get_tuple_size(); -#if SIM_FULL_ROW - data = (char *) mem_allocator.alloc(sizeof(char) * tuple_size); -#else - data = (char *) mem_allocator.alloc(sizeof(uint64_t) * 1); -#endif - return RCOK; -} - -RC row_t::switch_schema(table_t *host_table) { - this->table = host_table; - return RCOK; -} - -void row_t::init_manager(row_t * row) { -#if MODE==NOCC_MODE || MODE==QRY_ONLY_MODE - return; -#endif - DEBUG_M("row_t::init_manager alloc \n"); -#if CC_ALG == NO_WAIT || CC_ALG == WAIT_DIE || CC_ALG == CALVIN - manager = (Row_lock *) mem_allocator.align_alloc(sizeof(Row_lock)); -#elif CC_ALG == TIMESTAMP - manager = (Row_ts *) mem_allocator.align_alloc(sizeof(Row_ts)); -#elif CC_ALG == MVCC - manager = (Row_mvcc *) mem_allocator.align_alloc(sizeof(Row_mvcc)); -#elif CC_ALG == OCC || CC_ALG == BOCC || CC_ALG == FOCC - manager = (Row_occ *) mem_allocator.align_alloc(sizeof(Row_occ)); -#elif CC_ALG == MAAT - manager = (Row_maat *) mem_allocator.align_alloc(sizeof(Row_maat)); -#elif CC_ALG == SUNDIAL - manager = new Row_sundial(this); -#elif CC_ALG == SSI - manager = (Row_ssi *) mem_allocator.align_alloc(sizeof(Row_ssi)); -#elif CC_ALG == WSI - manager = (Row_wsi *) mem_allocator.align_alloc(sizeof(Row_wsi)); -#elif CC_ALG == CNULL - manager = (Row_null *) mem_allocator.align_alloc(sizeof(Row_null)); -#elif CC_ALG == SILO - manager = (Row_silo *) mem_allocator.align_alloc(sizeof(Row_silo)); -#endif - -#if CC_ALG != HSTORE && CC_ALG != HSTORE_SPEC - manager->init(this); -#endif -} - -table_t *row_t::get_table() { return table; } - -Catalog *row_t::get_schema() { return get_table()->get_schema(); } - -const char *row_t::get_table_name() { return get_table()->get_table_name(); }; -uint64_t row_t::get_tuple_size() { return get_schema()->get_tuple_size(); } - -uint64_t row_t::get_field_cnt() { return get_schema()->field_cnt; } - -void row_t::set_value(int id, void * ptr) { - int datasize = get_schema()->get_field_size(id); - int pos = get_schema()->get_field_index(id); - DEBUG("set_value pos %d datasize %d -- %lx\n", pos, datasize, (uint64_t)this); -#if SIM_FULL_ROW - memcpy( &data[pos], ptr, datasize); -#else - char d[tuple_size]; - memcpy( &d[pos], ptr, datasize); -#endif -} - -void row_t::set_value(int id, void * ptr, int size) { - int pos = get_schema()->get_field_index(id); -#if SIM_FULL_ROW - memcpy( &data[pos], ptr, size); -#else - char d[tuple_size]; - memcpy( &d[pos], ptr, size); -#endif -} - -void row_t::set_value(const char * col_name, void * ptr) { - uint64_t id = get_schema()->get_field_id(col_name); - set_value(id, ptr); -} - -SET_VALUE(uint64_t); -SET_VALUE(int64_t); -SET_VALUE(double); -SET_VALUE(UInt32); -SET_VALUE(SInt32); - -GET_VALUE(uint64_t); -GET_VALUE(int64_t); -GET_VALUE(double); -GET_VALUE(UInt32); -GET_VALUE(SInt32); - -char * row_t::get_value(int id) { - int pos __attribute__ ((unused)); - pos = get_schema()->get_field_index(id); - DEBUG("get_value pos %d -- %lx\n",pos,(uint64_t)this); -#if SIM_FULL_ROW - return &data[pos]; -#else - return data; -#endif -} - -char * row_t::get_value(char * col_name) { - uint64_t pos __attribute__ ((unused)); - pos = get_schema()->get_field_index(col_name); -#if SIM_FULL_ROW - return &data[pos]; -#else - return data; -#endif -} - -char *row_t::get_data() { return data; } - -void row_t::set_data(char * data) { - int tuple_size = get_schema()->get_tuple_size(); -#if SIM_FULL_ROW - memcpy(this->data, data, tuple_size); -#else - char d[tuple_size]; - memcpy(d, data, tuple_size); -#endif -} -// copy from the src to this -void row_t::copy(row_t * src) { - assert(src->get_schema() == this->get_schema()); -#if SIM_FULL_ROW - set_data(src->get_data()); -#else - char d[tuple_size]; - set_data(d); -#endif -} - -void row_t::free_row() { - DEBUG_M("row_t::free_row free\n"); -#if SIM_FULL - mem_allocator.free(data, sizeof(char) * get_tuple_size()); -#else - mem_allocator.free(data, sizeof(uint64_t) * 1); -#endif -} - -RC row_t::get_lock(access_t type, TxnManager * txn) { - RC rc = RCOK; -#if CC_ALG == CALVIN - lock_t lt = (type == RD || type == SCAN)? LOCK_SH : LOCK_EX; - rc = this->manager->lock_get(lt, txn); -#endif - return rc; -} - -RC row_t::get_row(access_t type, TxnManager *txn, Access *access) { - RC rc = RCOK; -#if MODE==NOCC_MODE || MODE==QRY_ONLY_MODE - access->data = this; - return rc; -#endif -#if ISOLATION_LEVEL == NOLOCK - access->data = this; - return rc; -#endif - -#if CC_ALG == CNULL - - txn->cur_row = (row_t *) mem_allocator.alloc(sizeof(row_t)); - txn->cur_row->init(get_table(), get_part_id()); - rc = this->manager->access(type,txn); - txn->cur_row->copy(this); - access->data = txn->cur_row; - assert(rc == RCOK); - goto end; -#endif -#if CC_ALG == MAAT - - DEBUG_M("row_t::get_row MAAT alloc \n"); - txn->cur_row = (row_t *) mem_allocator.alloc(sizeof(row_t)); - txn->cur_row->init(get_table(), get_part_id()); - rc = this->manager->access(type,txn); - txn->cur_row->copy(this); - - access->data = txn->cur_row; - assert(rc == RCOK); - goto end; -#endif - -#if CC_ALG == SUNDIAL - DEBUG_M("row_t::get_row SUNDIAL alloc \n"); - goto end; -#endif - -#if CC_ALG == WAIT_DIE || CC_ALG == NO_WAIT - //uint64_t thd_id = txn->get_thd_id(); - lock_t lt = (type == RD || type == SCAN) ? LOCK_SH : LOCK_EX; // ! this may be wrong - rc = this->manager->lock_get(lt, txn); - if (rc == RCOK) { - access->data = this; - } else if (rc == Abort) { - } else if (rc == WAIT) { - ASSERT(CC_ALG == WAIT_DIE); - } - goto end; -#elif CC_ALG == TIMESTAMP || CC_ALG == MVCC || CC_ALG == SSI || CC_ALG == WSI - //uint64_t thd_id = txn->get_thd_id(); -// For TIMESTAMP RD, a new copy of the access->data will be returned. - - // for MVCC RD, the version will be returned instead of a copy - // So for MVCC RD-WR, the version should be explicitly copied. - // row_t * newr = NULL; -#if CC_ALG == TIMESTAMP - DEBUG_M("row_t::get_row TIMESTAMP alloc \n"); - txn->cur_row = (row_t *) mem_allocator.alloc(sizeof(row_t)); - txn->cur_row->init(get_table(), this->get_part_id()); -#endif - - if (type == WR) { - rc = this->manager->access(txn, P_REQ, NULL); - if (rc != RCOK) goto end; - } - if ((type == WR && rc == RCOK) || type == RD || type == SCAN) { - rc = this->manager->access(txn, R_REQ, NULL); - if (rc == RCOK ) { - access->data = txn->cur_row; - } else if (rc == WAIT) { - rc = WAIT; - goto end; - } else if (rc == Abort) { - } - if (rc != Abort) { - assert(access->data->get_data() != NULL); - assert(access->data->get_table() != NULL); - assert(access->data->get_schema() == this->get_schema()); - assert(access->data->get_table_name() != NULL); - } - } - if (rc != Abort && (CC_ALG == MVCC || CC_ALG == SSI || CC_ALG == WSI) && type == WR) { - DEBUG_M("row_t::get_row MVCC alloc \n"); - row_t * newr = (row_t *) mem_allocator.alloc(sizeof(row_t)); - newr->init(this->get_table(), get_part_id()); - newr->copy(access->data); - access->data = newr; - } - goto end; -#elif CC_ALG == OCC || CC_ALG == FOCC || CC_ALG == BOCC - // OCC always make a local copy regardless of read or write - DEBUG_M("row_t::get_row OCC alloc \n"); - txn->cur_row = (row_t *) mem_allocator.alloc(sizeof(row_t)); - txn->cur_row->init(get_table(), get_part_id()); - rc = this->manager->access(txn, R_REQ); - access->data = txn->cur_row; - goto end; -#elif CC_ALG == SILO - // like OCC, sundial also makes a local copy for each read/write - DEBUG_M("row_t::get_row SILO alloc \n"); - txn->cur_row = (row_t *) mem_allocator.alloc(sizeof(row_t)); - txn->cur_row->init(get_table(), get_part_id()); - TsType ts_type = (type == RD)? R_REQ : P_REQ; - rc = this->manager->access(txn, ts_type, txn->cur_row); - access->data = txn->cur_row; - goto end; -#elif CC_ALG == HSTORE || CC_ALG == HSTORE_SPEC || CC_ALG == CALVIN -#if CC_ALG == HSTORE_SPEC - if(txn_table.spec_mode) { - DEBUG_M("row_t::get_row HSTORE_SPEC alloc \n"); - txn->cur_row = (row_t *) mem_allocator.alloc(sizeof(row_t)); - txn->cur_row->init(get_table(), get_part_id()); - rc = this->manager->access(txn, R_REQ); - access->data = txn->cur_row; - goto end; - } -#endif - access->data = this; - goto end; -#else - assert(false); -#endif - -end: - return rc; -} - -RC row_t::get_ts(uint64_t &orig_wts, uint64_t &orig_rts) { - RC rc = RCOK; -#if CC_ALG == SUNDIAL - this->manager->get_ts(orig_wts, orig_rts); -#endif - return rc; -} - -RC row_t::get_row(access_t type, TxnManager * txn, row_t *& row, uint64_t &orig_wts, uint64_t &orig_rts) { - RC rc = RCOK; -#if MODE==NOCC_MODE || MODE==QRY_ONLY_MODE - row = this; - return rc; -#endif -#if CC_ALG == SUNDIAL - DEBUG_M("row_t::get_row sundial alloc \n"); - txn->cur_row = (row_t *) mem_allocator.alloc(sizeof(row_t)); - txn->cur_row->init(get_table(), get_part_id()); - rc = this->manager->access(type,txn,row,orig_wts,orig_rts); - txn->cur_row->copy(this); - row = txn->cur_row; - assert(rc == RCOK); -#endif - return rc; -} -// Return call for get_row if waiting -RC row_t::get_row_post_wait(access_t type, TxnManager * txn, row_t *& row) { - RC rc = RCOK; - assert(CC_ALG == WAIT_DIE || CC_ALG == MVCC || CC_ALG == TIMESTAMP || CC_ALG == SUNDIAL || CC_ALG == SSI || CC_ALG == WSI || CC_ALG == TIMESTAMP || CC_ALG == FOCC || CC_ALG == BOCC); -#if CC_ALG == WAIT_DIE - assert(txn->lock_ready); - rc = RCOK; - //ts_t endtime = get_sys_clock(); - row = this; - -#elif CC_ALG == MVCC || CC_ALG == TIMESTAMP || CC_ALG == SUNDIAL || CC_ALG == SSI || CC_ALG == WSI - assert(txn->ts_ready); - //INC_STATS(thd_id, time_wait, t2 - t1); - row = txn->cur_row; - - assert(row->get_data() != NULL); - assert(row->get_table() != NULL); - assert(row->get_schema() == this->get_schema()); - assert(row->get_table_name() != NULL); - if (( CC_ALG == MVCC || CC_ALG == SUNDIAL || CC_ALG == SSI || CC_ALG == WSI) && type == WR) { - DEBUG_M("row_t::get_row_post_wait MVCC alloc \n"); - row_t * newr = (row_t *) mem_allocator.alloc(sizeof(row_t)); - newr->init(this->get_table(), get_part_id()); - - newr->copy(row); - row = newr; - } -#endif - return rc; -} - -// the "row" is the row read out in get_row(). For locking based CC_ALG, -// the "row" is the same as "this". For timestamp based CC_ALG, the -// "row" != "this", and the "row" must be freed. -// For MVCC, the row will simply serve as a version. The version will be -// delete during history cleanup. -// For TIMESTAMP, the row will be explicity deleted at the end of access(). -// (c.f. row_ts.cpp) -uint64_t row_t::return_row(RC rc, access_t type, TxnManager *txn, row_t *row) { -#if MODE==NOCC_MODE || MODE==QRY_ONLY_MODE - return 0; -#endif -#if ISOLATION_LEVEL == NOLOCK - return 0; -#endif - -#if CC_ALG == WAIT_DIE || CC_ALG == NO_WAIT || CC_ALG == CALVIN - assert (row == NULL || row == this || type == XP); - if (CC_ALG != CALVIN && ROLL_BACK && - type == XP) { // recover from previous writes. should not happen w/ Calvin - this->copy(row); - } - this->manager->lock_release(txn); - return 0; -#elif CC_ALG == TIMESTAMP || CC_ALG == MVCC || CC_ALG == SSI || CC_ALG == WSI - // for RD or SCAN or XP, the row should be deleted. - // because all WR should be companied by a RD - // for MVCC RD, the row is not copied, so no need to free. - if (CC_ALG == TIMESTAMP && (type == RD || type == SCAN)) { - row->free_row(); - DEBUG_M("row_t::return_row TIMESTAMP free \n"); - mem_allocator.free(row, sizeof(row_t)); - } - if (type == XP) { - row->free_row(); - DEBUG_M("row_t::return_row XP free \n"); - mem_allocator.free(row, sizeof(row_t)); - this->manager->access(txn, XP_REQ, NULL); - } else if (type == WR) { - assert (type == WR && row != NULL); - assert (row->get_schema() == this->get_schema()); - RC rc = this->manager->access(txn, W_REQ, row); - assert(rc == RCOK); - } - return 0; -#elif CC_ALG == OCC || CC_ALG == FOCC || CC_ALG == BOCC - assert (row != NULL); - if (type == WR) manager->write(row, txn->get_end_timestamp()); - row->free_row(); - DEBUG_M("row_t::return_row OCC free \n"); - mem_allocator.free(row, sizeof(row_t)); - manager->release(); - return 0; -#elif CC_ALG == CNULL - assert (row != NULL); - if (rc == Abort) { - manager->abort(type,txn); - } else { - manager->commit(type,txn,row); - } - - row->free_row(); - DEBUG_M("row_t::return_row Maat free \n"); - mem_allocator.free(row, sizeof(row_t)); - return 0; -#elif CC_ALG == MAAT - assert (row != NULL); - if (rc == Abort) { - manager->abort(type,txn); - } else { - manager->commit(type,txn,row); - } - - row->free_row(); - DEBUG_M("row_t::return_row Maat free \n"); - mem_allocator.free(row, sizeof(row_t)); - return 0; -#elif CC_ALG == SUNDIAL - assert (row != NULL); - if (rc == Abort) { - manager->abort(type,txn); - } else { - manager->commit(type,txn,row); - } - - if (type == XP) { - row->free_row(); - DEBUG_M("row_t::return_row XP free \n"); - mem_allocator.free(row, sizeof(row_t)); - } - return 0; - -#elif CC_ALG == HSTORE || CC_ALG == HSTORE_SPEC - assert (row != NULL); - if (ROLL_BACK && type == XP) {// recover from previous writes. - this->copy(row); - } - return 0; -#elif CC_ALG == SILO - assert (row != NULL); - row->free_row(); - DEBUG_M("row_t::return_row XP free \n"); - mem_allocator.free(row, sizeof(row_t)); - return 0; -#else - assert(false); -#endif -} diff --git a/contrib/deneva/storage/row.h b/contrib/deneva/storage/row.h deleted file mode 100644 index b2e3f936..00000000 --- a/contrib/deneva/storage/row.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - Tencent is pleased to support the open source community by making 3TS available. - - Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - Tencent Modifications are Copyright (C) THL A29 Limited. - - Author: hongyaozhao@ruc.edu.cn - - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _ROW_H_ -#define _ROW_H_ - -#include -#include "global.h" - - -#define DECL_SET_VALUE(type) void set_value(int col_id, type value); - -#define SET_VALUE(type) \ - void row_t::set_value(int col_id, type value) { set_value(col_id, &value); } - -#define DECL_GET_VALUE(type) void get_value(int col_id, type &value); - -#define GET_VALUE(type)\ - void row_t::get_value(int col_id, type & value) {\ - int pos = get_schema()->get_field_index(col_id);\ - DEBUG("get_value pos %d -- %lx\n",pos,(uint64_t)this); \ - value = *(type *)&data[pos];\ - } - -class table_t; -class Catalog; -class TxnManager; -class Row_lock; -class Row_mvcc; -class Row_ts; -class Row_occ; -class Row_ssi; -class Row_wsi; -class Row_maat; -class Row_specex; -class Row_sundial; -class Row_si; -class Row_null; -class Row_silo; - -class row_t { -public: - RC init(table_t * host_table, uint64_t part_id, uint64_t row_id = 0); - RC switch_schema(table_t * host_table); - // not every row has a manager - void init_manager(row_t * row); - - table_t * get_table(); - Catalog * get_schema(); - const char * get_table_name(); - uint64_t get_field_cnt(); - uint64_t get_tuple_size(); - uint64_t get_row_id() { return _row_id; }; - - void copy(row_t * src); - - void set_primary_key(uint64_t key) { _primary_key = key; }; - uint64_t get_primary_key() {return _primary_key; }; - uint64_t get_part_id() { return _part_id; }; - - void set_value(int id, void * ptr); - void set_value(int id, void * ptr, int size); - void set_value(const char * col_name, void * ptr); - char * get_value(int id); - char * get_value(char * col_name); - - DECL_SET_VALUE(uint64_t); - DECL_SET_VALUE(int64_t); - DECL_SET_VALUE(double); - DECL_SET_VALUE(UInt32); - DECL_SET_VALUE(SInt32); - - DECL_GET_VALUE(uint64_t); - DECL_GET_VALUE(int64_t); - DECL_GET_VALUE(double); - DECL_GET_VALUE(UInt32); - DECL_GET_VALUE(SInt32); - - - void set_data(char * data); - char * get_data(); - - void free_row(); - - // for concurrency control. can be lock, timestamp etc. - RC get_lock(access_t type, TxnManager * txn); - RC get_ts(uint64_t &orig_wts, uint64_t &orig_rts); - RC get_row(access_t type, TxnManager * txn, row_t *& row, uint64_t &orig_wts, uint64_t &orig_rts); - RC get_row(access_t type, TxnManager *txn, Access *access); - RC get_row_post_wait(access_t type, TxnManager * txn, row_t *& row); - uint64_t return_row(RC rc, access_t type, TxnManager *txn, row_t *row); - void return_row(RC rc, access_t type, TxnManager * txn, row_t * row, uint64_t _min_commit_ts); - - #if CC_ALG == DL_DETECT || CC_ALG == NO_WAIT || CC_ALG == WAIT_DIE || CC_ALG == CALVIN - Row_lock * manager; - #elif CC_ALG == TIMESTAMP - Row_ts * manager; - #elif CC_ALG == MVCC - Row_mvcc * manager; - #elif CC_ALG == OCC || CC_ALG == BOCC || CC_ALG == FOCC - Row_occ * manager; - #elif CC_ALG == MAAT - Row_maat * manager; - #elif CC_ALG == SUNDIAL - Row_sundial * manager; - #elif CC_ALG == HSTORE_SPEC - Row_specex * manager; - #elif CC_ALG == AVOID - Row_avoid * manager; - #elif CC_ALG == SSI - Row_ssi * manager; - #elif CC_ALG == WSI - Row_wsi * manager; - #elif CC_ALG == CNULL - Row_null * manager; - #elif CC_ALG == SILO - Row_silo * manager; - #endif - char * data; - int tuple_size; - table_t * table; -private: - // primary key should be calculated from the data stored in the row. - uint64_t _primary_key; - uint64_t _part_id; - bool part_info; - uint64_t _row_id; -}; - -#endif diff --git a/contrib/deneva/storage/table.cpp b/contrib/deneva/storage/table.cpp deleted file mode 100644 index 2e7885fe..00000000 --- a/contrib/deneva/storage/table.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "global.h" -#include "helper.h" -#include "table.h" -#include "catalog.h" -#include "row.h" -#include "mem_alloc.h" - -void table_t::init(Catalog * schema) { - this->table_name = schema->table_name; - this->table_id = schema->table_id; - this->schema = schema; - cur_tab_size = new uint64_t; - // isolate cur_tab_size with other parameters. - // Because cur_tab_size is frequently updated, causing false - // sharing problems - char * ptr = new char[CL_SIZE*2 + sizeof(uint64_t)]; - cur_tab_size = (uint64_t *) &ptr[CL_SIZE]; -} - -RC table_t::get_new_row(row_t *& row) { - // this function is obsolete. - assert(false); - return RCOK; -} - -// the row is not stored locally. the pointer must be maintained by index structure. -RC table_t::get_new_row(row_t *& row, uint64_t part_id, uint64_t &row_id) { - RC rc = RCOK; - DEBUG_M("table_t::get_new_row alloc\n"); - void * ptr = mem_allocator.alloc(sizeof(row_t)); - assert (ptr != NULL); - - row = (row_t *) ptr; - rc = row->init(this, part_id, row_id); - row->init_manager(row); - - return rc; -} diff --git a/contrib/deneva/storage/table.h b/contrib/deneva/storage/table.h deleted file mode 100644 index 4a8154f3..00000000 --- a/contrib/deneva/storage/table.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _TABLE_H_ -#define _TABLE_H_ - -#include "global.h" - -// TODO sequential scan is not supported yet. -// only index access is supported for table. - -class Catalog; -class row_t; - -class table_t -{ -public: - void init(Catalog * schema); - // row lookup should be done with index. But index does not have - // records for new rows. get_new_row returns the pointer to a - // new row. - RC get_new_row(row_t *& row); // this is equivalent to insert() - RC get_new_row(row_t *& row, uint64_t part_id, uint64_t &row_id); - - void delete_row(); // TODO delete_row is not supportet yet - - uint64_t get_table_size() { return *cur_tab_size; }; - Catalog * get_schema() { return schema; }; - const char * get_table_name() { return table_name; }; - uint32_t get_table_id() { return table_id; }; - - Catalog * schema; -private: - const char * table_name; - uint32_t table_id; - uint64_t * cur_tab_size; - char pad[CL_SIZE - sizeof(void *)*3 - sizeof(uint32_t)]; -}; - -#endif diff --git a/contrib/deneva/system/abort_queue.cpp b/contrib/deneva/system/abort_queue.cpp deleted file mode 100644 index 91537381..00000000 --- a/contrib/deneva/system/abort_queue.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "mem_alloc.h" -#include "abort_queue.h" -#include "message.h" -#include "work_queue.h" - -void AbortQueue::init() { pthread_mutex_init(&mtx, NULL); } - -uint64_t AbortQueue::enqueue(uint64_t thd_id, uint64_t txn_id, uint64_t abort_cnt) { - uint64_t starttime = get_sys_clock(); - uint64_t penalty = g_abort_penalty; -#if BACKOFF - penalty = max(penalty * 2^abort_cnt,g_abort_penalty_max); -#endif - penalty += starttime; - //abort_entry * entry = new abort_entry(penalty,txn_id); - DEBUG_M("AbortQueue::enqueue entry alloc\n"); - abort_entry * entry = (abort_entry*)mem_allocator.alloc(sizeof(abort_entry)); - entry->penalty_end = penalty; - entry->txn_id = txn_id; - uint64_t mtx_time_start = get_sys_clock(); - pthread_mutex_lock(&mtx); - INC_STATS(thd_id,mtx[0],get_sys_clock() - mtx_time_start); - DEBUG("AQ Enqueue %ld %f -- %f\n", entry->txn_id, float(penalty - starttime) / BILLION, - simulation->seconds_from_start(starttime)); - INC_STATS(thd_id,abort_queue_penalty,penalty - starttime); - INC_STATS(thd_id,abort_queue_enqueue_cnt,1); - queue.push(entry); - pthread_mutex_unlock(&mtx); - - INC_STATS(thd_id,abort_queue_enqueue_time,get_sys_clock() - starttime); - - return penalty - starttime; -} - -void AbortQueue::process(uint64_t thd_id) { - if (queue.empty()) return; - abort_entry * entry; - uint64_t mtx_time_start = get_sys_clock(); - pthread_mutex_lock(&mtx); - INC_STATS(thd_id,mtx[1],get_sys_clock() - mtx_time_start); - uint64_t starttime = get_sys_clock(); - while(!queue.empty()) { - entry = queue.top(); - if(entry->penalty_end < starttime) { - queue.pop(); - DEBUG("AQ Dequeue %ld %f -- %f\n", entry->txn_id, - float(starttime - entry->penalty_end) / BILLION, - simulation->seconds_from_start(starttime)); - INC_STATS(thd_id,abort_queue_penalty_extra,starttime - entry->penalty_end); - INC_STATS(thd_id,abort_queue_dequeue_cnt,1); - Message * msg = Message::create_message(RTXN); - msg->txn_id = entry->txn_id; - work_queue.enqueue(thd_id,msg,false); - //entry = queue.top(); - DEBUG_M("AbortQueue::dequeue entry free\n"); - mem_allocator.free(entry,sizeof(abort_entry)); - } else { - break; - } - } - pthread_mutex_unlock(&mtx); - - INC_STATS(thd_id,abort_queue_dequeue_time,get_sys_clock() - starttime); - -} - diff --git a/contrib/deneva/system/abort_queue.h b/contrib/deneva/system/abort_queue.h deleted file mode 100644 index 7cd442a4..00000000 --- a/contrib/deneva/system/abort_queue.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _ABORT_QUEUE_H_ -#define _ABORT_QUEUE_H_ - - -#include "global.h" -#include "helper.h" - -struct abort_entry { - uint64_t penalty_end; - uint64_t txn_id; - abort_entry() {} - abort_entry(uint64_t penalty_end, uint64_t txn_id) { - this->penalty_end = penalty_end; - this->txn_id = txn_id; - } -}; - - -struct CompareAbortEntry { - bool operator()(const abort_entry* lhs, const abort_entry* rhs) { - return lhs->penalty_end > rhs->penalty_end; - } -}; - -class AbortQueue { -public: - void init(); - uint64_t enqueue(uint64_t thd_id, uint64_t txn_id, uint64_t abort_cnt); - void process(uint64_t thd_id); -private: - std::priority_queue,CompareAbortEntry> queue; - pthread_mutex_t mtx; -}; - - - -#endif diff --git a/contrib/deneva/system/abort_thread.cpp b/contrib/deneva/system/abort_thread.cpp deleted file mode 100644 index 8f8516c4..00000000 --- a/contrib/deneva/system/abort_thread.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "global.h" -#include "helper.h" -#include "thread.h" -#include "abort_thread.h" -#include "abort_queue.h" - -void AbortThread::setup() {} - -RC AbortThread::run() { - tsetup(); - printf("Running AbortThread %ld\n",_thd_id); - while (!simulation->is_done()) { - heartbeat(); - abort_queue.process(get_thd_id()); - } - return FINISH; - -} - - diff --git a/contrib/deneva/system/abort_thread.h b/contrib/deneva/system/abort_thread.h deleted file mode 100644 index c2322497..00000000 --- a/contrib/deneva/system/abort_thread.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _ABORTTHREAD_H_ -#define _ABORTTHREAD_H_ - -#include "global.h" -#include "thread.h" -class Workload; - -class AbortThread : public Thread { -public: - RC run(); - void setup(); -}; - -#endif diff --git a/contrib/deneva/system/array.h b/contrib/deneva/system/array.h deleted file mode 100644 index 5a90d20e..00000000 --- a/contrib/deneva/system/array.h +++ /dev/null @@ -1,130 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _ARR_H_ -#define _ARR_H_ - -#include "global.h" -#include "helper.h" -#include "mem_alloc.h" - -template -class Array { -public: - Array() : items(NULL), capacity(0), count(0) {} - void init(uint64_t size) { - DEBUG_M("Array::init %ld*%ld\n",sizeof(T),size); - items = (T*) mem_allocator.alloc(sizeof(T)*size); - capacity = size; - assert(items); - assert(capacity == size); - count = 0; - } - - void clear() { count = 0; } - - void copy(Array a) { - init(a.size()); - for(uint64_t i = 0; i < a.size(); i++) { - add(a[i]); - } - assert(size() == a.size()); - } - - void append(Array a) { - assert(count + a.size() <= capacity); - for(uint64_t i = 0; i < a.size(); i++) { - add(a[i]); - } - } - - - void release() { - DEBUG_M("Array::release %ld*%ld\n",sizeof(T),capacity); - mem_allocator.free(items,sizeof(T)*capacity); - items = NULL; - count = 0; - capacity = 0; - } - - void add_unique(T item){ - for(uint64_t i = 0; i < count; i++) { - if (items[i] == item) return; - } - add(item); - } - - void add(T item){ - assert(count < capacity); - items[count] = item; - ++count; - } - - void add() { - assert(count < capacity); - ++count; - } - - T get(uint64_t idx) { - assert(idx < count); - return items[idx]; - } - - void set(uint64_t idx, T item) { - assert(idx < count); - items[idx] = item; - } - - bool contains(T item) { - for (uint64_t i = 0; i < count; i++) { - if (items[i] == item) { - return true; - } - } - return false; - } - - uint64_t getPosition(T item) { - for (uint64_t i = 0; i < count; i++) { - if (items[i] == item) { - return i; - } - } - return count; - } - - void swap(uint64_t i, uint64_t j) { - T tmp = items[i]; - items[i] = items[j]; - items[j] = tmp; - } - T operator[](uint64_t idx) { - assert(idx < count); - return items[idx]; - } - uint64_t get_count() {return count;} - uint64_t size() {return count;} - bool is_full() { return count == capacity;} - bool is_empty() { return count == 0;} -private: - T * items; - uint64_t capacity; - uint64_t count; - -}; - - -#endif diff --git a/contrib/deneva/system/calvin_thread.cpp b/contrib/deneva/system/calvin_thread.cpp deleted file mode 100644 index ba995b0f..00000000 --- a/contrib/deneva/system/calvin_thread.cpp +++ /dev/null @@ -1,168 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "global.h" -#include "manager.h" -#include "thread.h" -#include "calvin_thread.h" -#include "txn.h" -#include "wl.h" -#include "query.h" -#include "ycsb_query.h" -#include "tpcc_query.h" -#include "mem_alloc.h" -#include "transport.h" -#include "math.h" -#include "helper.h" -#include "msg_thread.h" -#include "msg_queue.h" -#include "sequencer.h" -#include "logger.h" -#include "message.h" -#include "work_queue.h" - -void CalvinLockThread::setup() {} - -RC CalvinLockThread::run() { - tsetup(); - - RC rc = RCOK; - TxnManager * txn_man; - uint64_t prof_starttime = get_sys_clock(); - uint64_t idle_starttime = 0; - - while(!simulation->is_done()) { - txn_man = NULL; - - Message * msg = work_queue.sched_dequeue(_thd_id); - - if(!msg) { - if (idle_starttime == 0) idle_starttime = get_sys_clock(); - continue; - } - if(idle_starttime > 0) { - INC_STATS(_thd_id,sched_idle_time,get_sys_clock() - idle_starttime); - idle_starttime = 0; - } - - prof_starttime = get_sys_clock(); - assert(msg->get_rtype() == CL_QRY); - assert(msg->get_txn_id() != UINT64_MAX); - - txn_man = - txn_table.get_transaction_manager(get_thd_id(), msg->get_txn_id(), msg->get_batch_id()); - while (!txn_man->unset_ready()) { - } - assert(ISSERVERN(msg->get_return_id())); - txn_man->txn_stats.starttime = get_sys_clock(); - - txn_man->txn_stats.lat_network_time_start = msg->lat_network_time; - txn_man->txn_stats.lat_other_time_start = msg->lat_other_time; - - msg->copy_to_txn(txn_man); - txn_man->register_thread(this); - assert(ISSERVERN(txn_man->return_id)); - - INC_STATS(get_thd_id(),sched_txn_table_time,get_sys_clock() - prof_starttime); - prof_starttime = get_sys_clock(); - - rc = RCOK; - // Acquire locks - if (!txn_man->isRecon()) { - rc = txn_man->acquire_locks(); - } - - if(rc == RCOK) { - work_queue.enqueue(_thd_id,msg,false); - } - txn_man->set_ready(); - - INC_STATS(_thd_id,mtx[33],get_sys_clock() - prof_starttime); - prof_starttime = get_sys_clock(); - } - printf("FINISH %ld:%ld\n",_node_id,_thd_id); - fflush(stdout); - return FINISH; -} - -void CalvinSequencerThread::setup() {} - -bool CalvinSequencerThread::is_batch_ready() { - bool ready = get_wall_clock() - simulation->last_seq_epoch_time >= g_seq_batch_time_limit; - return ready; -} - -RC CalvinSequencerThread::run() { - tsetup(); - - Message * msg; - uint64_t idle_starttime = 0; - uint64_t prof_starttime = 0; - - while(!simulation->is_done()) { - - prof_starttime = get_sys_clock(); - - if(is_batch_ready()) { - simulation->advance_seq_epoch(); - //last_batchtime = get_wall_clock(); - seq_man.send_next_batch(_thd_id); - } - - INC_STATS(_thd_id,mtx[30],get_sys_clock() - prof_starttime); - prof_starttime = get_sys_clock(); - - msg = work_queue.sequencer_dequeue(_thd_id); - - INC_STATS(_thd_id,mtx[31],get_sys_clock() - prof_starttime); - prof_starttime = get_sys_clock(); - - if(!msg) { - if (idle_starttime == 0) idle_starttime = get_sys_clock(); - continue; - } - if(idle_starttime > 0) { - INC_STATS(_thd_id,seq_idle_time,get_sys_clock() - idle_starttime); - idle_starttime = 0; - } - - switch (msg->get_rtype()) { - case CL_QRY: - // Query from client - DEBUG("SEQ process_txn\n"); - seq_man.process_txn(msg,get_thd_id(),0,0,0,0); - // Don't free message yet - break; - case CALVIN_ACK: - // Ack from server - DEBUG("SEQ process_ack (%ld,%ld) from %ld\n", msg->get_txn_id(), msg->get_batch_id(), - msg->get_return_id()); - seq_man.process_ack(msg,get_thd_id()); - // Free message here - msg->release(); - break; - default: - assert(false); - } - - INC_STATS(_thd_id,mtx[32],get_sys_clock() - prof_starttime); - prof_starttime = get_sys_clock(); - } - printf("FINISH %ld:%ld\n",_node_id,_thd_id); - fflush(stdout); - return FINISH; - -} diff --git a/contrib/deneva/system/calvin_thread.h b/contrib/deneva/system/calvin_thread.h deleted file mode 100644 index 4e525b06..00000000 --- a/contrib/deneva/system/calvin_thread.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _CALVINTHREAD_H_ -#define _CALVINTHREAD_H_ - -#include "global.h" - -class Workload; - -class CalvinLockThread : public Thread { -public: - RC run(); - void setup(); -private: - TxnManager * m_txn; -}; - -class CalvinSequencerThread : public Thread { -public: - RC run(); - void setup(); -private: - bool is_batch_ready(); - uint64_t last_batchtime; -}; - -#endif diff --git a/contrib/deneva/system/client_thread.cpp b/contrib/deneva/system/client_thread.cpp deleted file mode 100644 index 93c15ea4..00000000 --- a/contrib/deneva/system/client_thread.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "global.h" -#include "thread.h" -#include "client_thread.h" -#include "query.h" -#include "ycsb_query.h" -#include "tpcc_query.h" -#include "client_query.h" -#include "transport.h" -#include "client_txn.h" -#include "msg_thread.h" -#include "msg_queue.h" -#include "wl.h" -#include "message.h" - -void ClientThread::setup() { - if( _thd_id == 0) { - send_init_done_to_all_nodes(); - } -#if LOAD_METHOD == LOAD_RATE - assert(g_load_per_server > 0); - // send ~twice as frequently due to delays in context switching - send_interval = (g_client_thread_cnt * BILLION) / g_load_per_server / 1.8; - printf("Client interval: %ld\n",send_interval); -#endif - -} - -RC ClientThread::run() { - - tsetup(); - printf("Running ClientThread %ld\n",_thd_id); - BaseQuery * m_query; - uint64_t iters = 0; - uint32_t num_txns_sent = 0; - int txns_sent[g_servers_per_client]; - for (uint32_t i = 0; i < g_servers_per_client; ++i) txns_sent[i] = 0; - - run_starttime = get_sys_clock(); - while(!simulation->is_done()) { - heartbeat(); -#if SERVER_GENERATE_QUERIES - break; -#endif - //uint32_t next_node = iters++ % g_node_cnt; - progress_stats(); - int32_t inf_cnt; - #if CC_ALG == BOCC || CC_ALG == FOCC - uint32_t next_node = 0; - #else - uint32_t next_node = (((iters++) * g_client_thread_cnt) + _thd_id )% g_servers_per_client; - #endif - uint32_t next_node_id = next_node + g_server_start_node; - // Just in case... - if (iters == UINT64_MAX) - iters = 0; -#if LOAD_METHOD == LOAD_MAX - #if WORKLOAD != DA - if ((inf_cnt = client_man.inc_inflight(next_node)) < 0) - continue; - #endif - m_query = client_query_queue.get_next_query(next_node,_thd_id); - if(last_send_time > 0) { - INC_STATS(get_thd_id(),cl_send_intv,get_sys_clock() - last_send_time); - } - last_send_time = get_sys_clock(); - simulation->last_da_query_time = get_sys_clock(); -#elif LOAD_METHOD == LOAD_RATE - if ((inf_cnt = client_man.inc_inflight(next_node)) < 0) - continue; - uint64_t gate_time; - while((gate_time = get_sys_clock()) - last_send_time < send_interval) { } - if(last_send_time > 0) { - INC_STATS(get_thd_id(),cl_send_intv,gate_time - last_send_time); - } - last_send_time = gate_time; - m_query = client_query_queue.get_next_query(next_node,_thd_id); -#else - assert(false); -#endif - assert(m_query); - - DEBUG("Client: thread %lu sending query to node: %u, %d, %f\n", - _thd_id, next_node_id,inf_cnt,simulation->seconds_from_start(get_sys_clock())); - - Message * msg = Message::create_message((BaseQuery*)m_query,CL_QRY); - ((ClientQueryMessage*)msg)->client_startts = get_sys_clock(); - msg_queue.enqueue(get_thd_id(),msg,next_node_id); - num_txns_sent++; - txns_sent[next_node]++; - INC_STATS(get_thd_id(),txn_sent_cnt,1); - #if WORKLOAD==DA - delete m_query; - #endif - } - - for (uint64_t l = 0; l < g_servers_per_client; ++l) - printf("Txns sent to node %lu: %d\n", l+g_server_start_node, txns_sent[l]); - - //SET_STATS(get_thd_id(), total_runtime, get_sys_clock() - simulation->run_starttime); - - printf("FINISH %ld:%ld\n",_node_id,_thd_id); - fflush(stdout); - return FINISH; -} diff --git a/contrib/deneva/system/client_thread.h b/contrib/deneva/system/client_thread.h deleted file mode 100644 index bb1a677d..00000000 --- a/contrib/deneva/system/client_thread.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _CLIENT_THREAD_H_ -#define _CLIENT_THREAD_H_ - -#include "global.h" - -class Workload; - -class ClientThread : public Thread { -public: - RC run(); - void setup(); -private: - uint64_t last_send_time; - uint64_t send_interval; -}; - -#endif diff --git a/contrib/deneva/system/concurrentqueue.h b/contrib/deneva/system/concurrentqueue.h deleted file mode 100644 index 7cf7fe5b..00000000 --- a/contrib/deneva/system/concurrentqueue.h +++ /dev/null @@ -1,3774 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -// Provides a C++11 implementation of a multi-producer, multi-consumer lock-free queue. -// An overview, including benchmark results, is provided here: -// http://moodycamel.com/blog/2014/a-fast-general-purpose-lock-free-queue-for-c++ -// The full design is also described in excruciating detail at: -// http://moodycamel.com/blog/2014/detailed-design-of-a-lock-free-queue - -// Simplified BSD license: -// Copyright (c) 2013-2016, Cameron Desrochers. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// - Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// - Redistributions in binary form must reproduce the above copyright notice, this list of -// conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL -// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT -// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR -// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -#pragma once - -#if defined(__GNUC__) -// Disable -Wconversion warnings (spuriously triggered when Traits::size_t and -// Traits::index_t are set to < 32 bits, causing integer promotion, causing warnings -// upon assigning any computed values) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" - -#ifdef MCDBGQ_USE_RELACY -#pragma GCC diagnostic ignored "-Wint-to-pointer-cast" -#endif -#endif - -#ifdef MCDBGQ_USE_RELACY -#include "relacy/relacy_std.hpp" -#include "relacy_shims.h" -// We only use malloc/free anyway, and the delete macro messes up `= delete` method declarations. -// We'll override the default trait malloc ourselves without a macro. -#undef new -#undef delete -#undef malloc -#undef free -#else -#include // Requires C++11. Sorry VS2010. -#include -#endif -#include -#include -#include -#include -#include -#include -#include // for CHAR_BIT -#include -#include // for __WINPTHREADS_VERSION if on MinGW-w64 w/ POSIX threading - -// Platform-specific definitions of a numeric thread ID type and an invalid value -#if defined(MCDBGQ_USE_RELACY) -namespace moodycamel { -namespace details { - typedef std::uint32_t thread_id_t; - static const thread_id_t invalid_thread_id = 0xFFFFFFFFU; - static const thread_id_t invalid_thread_id2 = 0xFFFFFFFEU; - static inline thread_id_t thread_id() { return rl::thread_index(); } -} -} -#elif defined(_WIN32) || defined(__WINDOWS__) || defined(__WIN32__) -// No sense pulling in windows.h in a header, we'll manually declare the function -// we use and rely on backwards-compatibility for this not to break -extern "C" __declspec(dllimport) unsigned long __stdcall GetCurrentThreadId(void); -namespace moodycamel { -namespace details { -static_assert(sizeof(unsigned long) == sizeof(std::uint32_t), - "Expected size of unsigned long to be 32 bits on Windows"); - typedef std::uint32_t thread_id_t; -static const thread_id_t invalid_thread_id = - 0; // See http://blogs.msdn.com/b/oldnewthing/archive/2004/02/23/78395.aspx -static const thread_id_t invalid_thread_id2 = - 0xFFFFFFFFU; // Not technically guaranteed to be invalid, but is never used in practice. Note - // that all Win32 thread IDs are presently multiples of 4. - static inline thread_id_t thread_id() { return static_cast(::GetCurrentThreadId()); } -} -} -#else -// Use a nice trick from this answer: http://stackoverflow.com/a/8438730/21475 -// In order to get a numeric thread ID in a platform-independent way, we use a thread-local -// static variable's address as a thread identifier :-) -#if defined(__GNUC__) || defined(__INTEL_COMPILER) -#define MOODYCAMEL_THREADLOCAL __thread -#elif defined(_MSC_VER) -#define MOODYCAMEL_THREADLOCAL __declspec(thread) -#else -// Assume C++11 compliant compiler -#define MOODYCAMEL_THREADLOCAL thread_local -#endif -namespace moodycamel { -namespace details { - typedef std::uintptr_t thread_id_t; - static const thread_id_t invalid_thread_id = 0; // Address can't be nullptr -static const thread_id_t invalid_thread_id2 = - 1; // Member accesses off a null pointer are also generally invalid. Plus it's not aligned. -static inline thread_id_t thread_id() { - static MOODYCAMEL_THREADLOCAL int x; - return reinterpret_cast(&x); -} -} -} -#endif - -// Exceptions -#ifndef MOODYCAMEL_EXCEPTIONS_ENABLED -#if (defined(_MSC_VER) && defined(_CPPUNWIND)) || (defined(__GNUC__) && defined(__EXCEPTIONS)) || \ - (!defined(_MSC_VER) && !defined(__GNUC__)) -#define MOODYCAMEL_EXCEPTIONS_ENABLED -#define MOODYCAMEL_TRY try -#define MOODYCAMEL_CATCH(...) catch(__VA_ARGS__) -#define MOODYCAMEL_RETHROW throw -#define MOODYCAMEL_THROW(expr) throw (expr) -#else -#define MOODYCAMEL_TRY if (true) -#define MOODYCAMEL_CATCH(...) else if (false) -#define MOODYCAMEL_RETHROW -#define MOODYCAMEL_THROW(expr) -#endif -#endif - -#ifndef MOODYCAMEL_NOEXCEPT -#if !defined(MOODYCAMEL_EXCEPTIONS_ENABLED) -#define MOODYCAMEL_NOEXCEPT -#define MOODYCAMEL_NOEXCEPT_CTOR(type, valueType, expr) true -#define MOODYCAMEL_NOEXCEPT_ASSIGN(type, valueType, expr) true -#elif defined(_MSC_VER) && defined(_NOEXCEPT) && _MSC_VER < 1800 -// VS2012's std::is_nothrow_[move_]constructible is broken and returns true when it shouldn't :-( -// We have to assume *all* non-trivial constructors may throw on VS2012! -#define MOODYCAMEL_NOEXCEPT _NOEXCEPT -#define MOODYCAMEL_NOEXCEPT_CTOR(type, valueType, expr) \ - (std::is_rvalue_reference::value&& std::is_move_constructible::value \ - ? std::is_trivially_move_constructible::value \ - : std::is_trivially_copy_constructible::value) -#define MOODYCAMEL_NOEXCEPT_ASSIGN(type, valueType, expr) \ - ((std::is_rvalue_reference::value&& std::is_move_assignable::value \ - ? std::is_trivially_move_assignable::value || \ - std::is_nothrow_move_assignable::value \ - : std::is_trivially_copy_assignable::value || \ - std::is_nothrow_copy_assignable::value) && \ - MOODYCAMEL_NOEXCEPT_CTOR(type, valueType, expr)) -#elif defined(_MSC_VER) && defined(_NOEXCEPT) && _MSC_VER < 1900 -#define MOODYCAMEL_NOEXCEPT _NOEXCEPT -#define MOODYCAMEL_NOEXCEPT_CTOR(type, valueType, expr) \ - (std::is_rvalue_reference::value&& std::is_move_constructible::value \ - ? std::is_trivially_move_constructible::value || \ - std::is_nothrow_move_constructible::value \ - : std::is_trivially_copy_constructible::value || \ - std::is_nothrow_copy_constructible::value) -#define MOODYCAMEL_NOEXCEPT_ASSIGN(type, valueType, expr) \ - ((std::is_rvalue_reference::value&& std::is_move_assignable::value \ - ? std::is_trivially_move_assignable::value || \ - std::is_nothrow_move_assignable::value \ - : std::is_trivially_copy_assignable::value || \ - std::is_nothrow_copy_assignable::value) && \ - MOODYCAMEL_NOEXCEPT_CTOR(type, valueType, expr)) -#else -#define MOODYCAMEL_NOEXCEPT noexcept -#define MOODYCAMEL_NOEXCEPT_CTOR(type, valueType, expr) noexcept(expr) -#define MOODYCAMEL_NOEXCEPT_ASSIGN(type, valueType, expr) noexcept(expr) -#endif -#endif - -#ifndef MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED -#ifdef MCDBGQ_USE_RELACY -#define MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED -#else -//// VS2013 doesn't support `thread_local`, and MinGW-w64 w/ POSIX threading has a crippling bug: -///http://sourceforge.net/p/mingw-w64/bugs/445 -//// g++ <=4.7 doesn't support thread_local either -//#if (!defined(_MSC_VER) || _MSC_VER >= 1900) && (!defined(__MINGW32__) && !defined(__MINGW64__) || -//!defined(__WINPTHREADS_VERSION)) && (!defined(__GNUC__) || __GNUC__ > 4 || (__GNUC__ == 4 && -//__GNUC_MINOR__ >= 8)) -//// Assume `thread_local` is fully supported in all other C++11 compilers/runtimes -//#define MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED -//#endif -#endif -#endif - -// VS2012 doesn't support deleted functions. -// In this case, we declare the function normally but don't define it. A link error will be -// generated if the function is called. -#ifndef MOODYCAMEL_DELETE_FUNCTION -#if defined(_MSC_VER) && _MSC_VER < 1800 -#define MOODYCAMEL_DELETE_FUNCTION -#else -#define MOODYCAMEL_DELETE_FUNCTION = delete -#endif -#endif - -// Compiler-specific likely/unlikely hints -namespace moodycamel { -namespace details { -#if defined(__GNUC__) - inline bool likely(bool x) { return __builtin_expect((x), true); } - inline bool unlikely(bool x) { return __builtin_expect((x), false); } -#else - inline bool likely(bool x) { return x; } - inline bool unlikely(bool x) { return x; } -#endif -} -} - -#ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG -#include "internal/concurrentqueue_internal_debug.h" -#endif - -namespace moodycamel { -namespace details { - template - struct const_numeric_max { - static_assert(std::is_integral::value, "const_numeric_max can only be used with integers"); - static const T value = std::numeric_limits::is_signed - ? (static_cast(1) << (sizeof(T) * CHAR_BIT - 1)) - static_cast(1) - : static_cast(-1); - }; -} - -// Default traits for the ConcurrentQueue. To change some of the -// traits without re-implementing all of them, inherit from this -// struct and shadow the declarations you wish to be different; -// since the traits are used as a template type parameter, the -// shadowed declarations will be used where defined, and the defaults -// otherwise. -struct ConcurrentQueueDefaultTraits { - // General-purpose size type. std::size_t is strongly recommended. - typedef std::size_t size_t; - - // The type used for the enqueue and dequeue indices. Must be at least as - // large as size_t. Should be significantly larger than the number of elements - // you expect to hold at once, especially if you have a high turnover rate; - // for example, on 32-bit x86, if you expect to have over a hundred million - // elements or pump several million elements through your queue in a very - // short space of time, using a 32-bit type *may* trigger a race condition. - // A 64-bit int type is recommended in that case, and in practice will - // prevent a race condition no matter the usage of the queue. Note that - // whether the queue is lock-free with a 64-int type depends on the whether - // std::atomic is lock-free, which is platform-specific. - typedef std::size_t index_t; - - // Internally, all elements are enqueued and dequeued from multi-element - // blocks; this is the smallest controllable unit. If you expect few elements - // but many producers, a smaller block size should be favoured. For few producers - // and/or many elements, a larger block size is preferred. A sane default - // is provided. Must be a power of 2. - static const size_t BLOCK_SIZE = 32; - - // For explicit producers (i.e. when using a producer token), the block is - // checked for being empty by iterating through a list of flags, one per element. - // For large block sizes, this is too inefficient, and switching to an atomic - // counter-based approach is faster. The switch is made for block sizes strictly - // larger than this threshold. - static const size_t EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD = 32; - - // How many full blocks can be expected for a single explicit producer? This should - // reflect that number's maximum for optimal performance. Must be a power of 2. - static const size_t EXPLICIT_INITIAL_INDEX_SIZE = 32; - - // How many full blocks can be expected for a single implicit producer? This should - // reflect that number's maximum for optimal performance. Must be a power of 2. - static const size_t IMPLICIT_INITIAL_INDEX_SIZE = 32; - - // The initial size of the hash table mapping thread IDs to implicit producers. - // Note that the hash is resized every time it becomes half full. - // Must be a power of two, and either 0 or at least 1. If 0, implicit production - // (using the enqueue methods without an explicit producer token) is disabled. - static const size_t INITIAL_IMPLICIT_PRODUCER_HASH_SIZE = 32; - - // Controls the number of items that an explicit consumer (i.e. one with a token) - // must consume before it causes all consumers to rotate and move on to the next - // internal queue. - static const std::uint32_t EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE = 256; - - // The maximum number of elements (inclusive) that can be enqueued to a sub-queue. - // Enqueue operations that would cause this limit to be surpassed will fail. Note - // that this limit is enforced at the block level (for performance reasons), i.e. - // it's rounded up to the nearest block size. - static const size_t MAX_SUBQUEUE_SIZE = details::const_numeric_max::value; - - -#ifndef MCDBGQ_USE_RELACY - // Memory allocation can be customized if needed. - // malloc should return nullptr on failure, and handle alignment like std::malloc. -#if defined(malloc) || defined(free) - // Gah, this is 2016, stop defining macros that break standard code already! - // Work around malloc/free being special macros: - static inline void* WORKAROUND_malloc(size_t size) { return malloc(size); } - static inline void WORKAROUND_free(void* ptr) { return free(ptr); } - static inline void* (malloc)(size_t size) { return WORKAROUND_malloc(size); } - static inline void (free)(void* ptr) { return WORKAROUND_free(ptr); } -#else - static inline void* malloc(size_t size) { return std::malloc(size); } - static inline void free(void* ptr) { return std::free(ptr); } -#endif -#else - // Debug versions when running under the Relacy race detector (ignore - // these in user code) - static inline void* malloc(size_t size) { return rl::rl_malloc(size, $); } - static inline void free(void* ptr) { return rl::rl_free(ptr, $); } -#endif -}; - - -// When producing or consuming many elements, the most efficient way is to: -// 1) Use one of the bulk-operation methods of the queue with a token -// 2) Failing that, use the bulk-operation methods without a token -// 3) Failing that, create a token and use that with the single-item methods -// 4) Failing that, use the single-parameter methods of the queue -// Having said that, don't create tokens willy-nilly -- ideally there should be -// a maximum of one token per thread (of each kind). -struct ProducerToken; -struct ConsumerToken; - -template -class ConcurrentQueue; -template -class BlockingConcurrentQueue; -class ConcurrentQueueTests; - -namespace details { -struct ConcurrentQueueProducerTypelessBase { - ConcurrentQueueProducerTypelessBase* next; - std::atomic inactive; - ProducerToken* token; - - ConcurrentQueueProducerTypelessBase() : inactive(false), token(nullptr) {} - }; - -template -struct _hash_32_or_64 { - static inline std::uint32_t hash(std::uint32_t h) { - // MurmurHash3 finalizer -- see - // https://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp - // Since the thread ID is already unique, all we really want to do is propagate that - // uniqueness evenly across all the bits, so that we can use a subset of the bits while - // reducing collisions significantly - h ^= h >> 16; - h *= 0x85ebca6b; - h ^= h >> 13; - h *= 0xc2b2ae35; - return h ^ (h >> 16); - } - }; -template <> -struct _hash_32_or_64<1> { - static inline std::uint64_t hash(std::uint64_t h) { - h ^= h >> 33; - h *= 0xff51afd7ed558ccd; - h ^= h >> 33; - h *= 0xc4ceb9fe1a85ec53; - return h ^ (h >> 33); - } - }; -template -struct hash_32_or_64 : public _hash_32_or_64<(size > 4)> {}; - -static inline size_t hash_thread_id(thread_id_t id) { - static_assert(sizeof(thread_id_t) <= 8, - "Expected a platform where thread IDs are at most 64-bit values"); - return static_cast(hash_32_or_64::hash(id)); - } - - template -static inline bool circular_less_than(T a, T b) { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable: 4554) -#endif - static_assert(std::is_integral::value && !std::numeric_limits::is_signed, - "circular_less_than is intended to be used only with unsigned integer types"); - return static_cast(a - b) > - static_cast(static_cast(1) << static_cast(sizeof(T) * CHAR_BIT - 1)); -#ifdef _MSC_VER -#pragma warning(pop) -#endif - } - - template -static inline char* align_for(char* ptr) { - const std::size_t alignment = std::alignment_of::value; - return ptr + (alignment - (reinterpret_cast(ptr) % alignment)) % alignment; - } - - template -static inline T ceil_to_pow_2(T x) { - static_assert(std::is_integral::value && !std::numeric_limits::is_signed, - "ceil_to_pow_2 is intended to be used only with unsigned integer types"); - - // Adapted from http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2 - --x; - x |= x >> 1; - x |= x >> 2; - x |= x >> 4; - for (std::size_t i = 1; i < sizeof(T); i <<= 1) { - x |= x >> (i << 3); - } - ++x; - return x; - } - - template -static inline void swap_relaxed(std::atomic& left, std::atomic& right) { - T temp = std::move(left.load(std::memory_order_relaxed)); - left.store(std::move(right.load(std::memory_order_relaxed)), std::memory_order_relaxed); - right.store(std::move(temp), std::memory_order_relaxed); - } - - template -static inline T const& nomove(T const& x) { - return x; - } - - template -struct nomove_if { - template - static inline T const& eval(T const& x) { - return x; - } - }; - - template<> -struct nomove_if { - template - static inline auto eval(U&& x) -> decltype(std::forward(x)) { - return std::forward(x); - } - }; - - template -static inline auto deref_noexcept(It& it) MOODYCAMEL_NOEXCEPT -> decltype(*it) { - return *it; - } - -#if defined(__clang__) || !defined(__GNUC__) || __GNUC__ > 4 || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) -template -struct is_trivially_destructible : std::is_trivially_destructible {}; -#else -template -struct is_trivially_destructible : std::has_trivial_destructor {}; -#endif - -#ifdef MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED -#ifdef MCDBGQ_USE_RELACY - typedef RelacyThreadExitListener ThreadExitListener; - typedef RelacyThreadExitNotifier ThreadExitNotifier; -#else -struct ThreadExitListener { - typedef void (*callback_t)(void*); - callback_t callback; - void* userData; - - ThreadExitListener* next; // reserved for use by the ThreadExitNotifier - }; - -class ThreadExitNotifier { - public: - static void subscribe(ThreadExitListener* listener) { - auto& tlsInst = instance(); - listener->next = tlsInst.tail; - tlsInst.tail = listener; - } - - static void unsubscribe(ThreadExitListener* listener) { - auto& tlsInst = instance(); - ThreadExitListener** prev = &tlsInst.tail; - for (auto ptr = tlsInst.tail; ptr != nullptr; ptr = ptr->next) { - if (ptr == listener) { - *prev = ptr->next; - break; - } - prev = &ptr->next; - } - } - - private: - ThreadExitNotifier() : tail(nullptr) { } - ThreadExitNotifier(ThreadExitNotifier const&) MOODYCAMEL_DELETE_FUNCTION; - ThreadExitNotifier& operator=(ThreadExitNotifier const&) MOODYCAMEL_DELETE_FUNCTION; - - ~ThreadExitNotifier() { - // This thread is about to exit, let everyone know! - assert(this == &instance() && - "If this assert fails, you likely have a buggy compiler! Change the preprocessor " - "conditions such that MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED is no longer defined."); - for (auto ptr = tail; ptr != nullptr; ptr = ptr->next) { - ptr->callback(ptr->userData); - } - } - - // Thread-local - static inline ThreadExitNotifier& instance() { - static thread_local ThreadExitNotifier notifier; - return notifier; - } - - private: - ThreadExitListener* tail; - }; -#endif -#endif - -template -struct static_is_lock_free_num { - enum { - value = 0 - }; -}; -template <> -struct static_is_lock_free_num { - enum { - value = ATOMIC_CHAR_LOCK_FREE - }; -}; -template <> -struct static_is_lock_free_num { - enum { - value = ATOMIC_SHORT_LOCK_FREE - }; -}; -template <> -struct static_is_lock_free_num { - enum { - value = ATOMIC_INT_LOCK_FREE - }; -}; -template <> -struct static_is_lock_free_num { - enum { - value = ATOMIC_LONG_LOCK_FREE - }; -}; -template <> -struct static_is_lock_free_num { - enum { - value = ATOMIC_LLONG_LOCK_FREE - }; -}; -template -struct static_is_lock_free : static_is_lock_free_num::type> {}; -template <> -struct static_is_lock_free { - enum { - value = ATOMIC_BOOL_LOCK_FREE - }; -}; -template -struct static_is_lock_free { - enum { - value = ATOMIC_POINTER_LOCK_FREE - }; -}; -} - -struct ProducerToken { - template - explicit ProducerToken(ConcurrentQueue& queue); - - template - explicit ProducerToken(BlockingConcurrentQueue& queue); - - explicit ProducerToken(ProducerToken&& other) MOODYCAMEL_NOEXCEPT : producer(other.producer) { - other.producer = nullptr; - if (producer != nullptr) { - producer->token = this; - } - } - - inline ProducerToken& operator=(ProducerToken&& other) MOODYCAMEL_NOEXCEPT { - swap(other); - return *this; - } - - void swap(ProducerToken& other) MOODYCAMEL_NOEXCEPT { - std::swap(producer, other.producer); - if (producer != nullptr) { - producer->token = this; - } - if (other.producer != nullptr) { - other.producer->token = &other; - } - } - - // A token is always valid unless: - // 1) Memory allocation failed during construction - // 2) It was moved via the move constructor - // (Note: assignment does a swap, leaving both potentially valid) - // 3) The associated queue was destroyed - // Note that if valid() returns true, that only indicates - // that the token is valid for use with a specific queue, - // but not which one; that's up to the user to track. - inline bool valid() const { return producer != nullptr; } - - ~ProducerToken() { - if (producer != nullptr) { - producer->token = nullptr; - producer->inactive.store(true, std::memory_order_release); - } - } - - // Disable copying and assignment - ProducerToken(ProducerToken const&) MOODYCAMEL_DELETE_FUNCTION; - ProducerToken& operator=(ProducerToken const&) MOODYCAMEL_DELETE_FUNCTION; - -private: - template - friend class ConcurrentQueue; - friend class ConcurrentQueueTests; - -protected: - details::ConcurrentQueueProducerTypelessBase* producer; -}; - -struct ConsumerToken { - template - explicit ConsumerToken(ConcurrentQueue& q); - - template - explicit ConsumerToken(BlockingConcurrentQueue& q); - - explicit ConsumerToken(ConsumerToken&& other) MOODYCAMEL_NOEXCEPT - : initialOffset(other.initialOffset), - lastKnownGlobalOffset(other.lastKnownGlobalOffset), - itemsConsumedFromCurrent(other.itemsConsumedFromCurrent), - currentProducer(other.currentProducer), - desiredProducer(other.desiredProducer) {} - - inline ConsumerToken& operator=(ConsumerToken&& other) MOODYCAMEL_NOEXCEPT { - swap(other); - return *this; - } - - void swap(ConsumerToken& other) MOODYCAMEL_NOEXCEPT { - std::swap(initialOffset, other.initialOffset); - std::swap(lastKnownGlobalOffset, other.lastKnownGlobalOffset); - std::swap(itemsConsumedFromCurrent, other.itemsConsumedFromCurrent); - std::swap(currentProducer, other.currentProducer); - std::swap(desiredProducer, other.desiredProducer); - } - - // Disable copying and assignment - ConsumerToken(ConsumerToken const&) MOODYCAMEL_DELETE_FUNCTION; - ConsumerToken& operator=(ConsumerToken const&) MOODYCAMEL_DELETE_FUNCTION; - -private: - template - friend class ConcurrentQueue; - friend class ConcurrentQueueTests; - -private: // but shared with ConcurrentQueue - std::uint32_t initialOffset; - std::uint32_t lastKnownGlobalOffset; - std::uint32_t itemsConsumedFromCurrent; - details::ConcurrentQueueProducerTypelessBase* currentProducer; - details::ConcurrentQueueProducerTypelessBase* desiredProducer; -}; - -// Need to forward-declare this swap because it's in a namespace. -// See -// http://stackoverflow.com/questions/4492062/why-does-a-c-friend-class-need-a-forward-declaration-only-in-other-namespaces -template -inline void swap(typename ConcurrentQueue::ImplicitProducerKVP& a, - typename ConcurrentQueue::ImplicitProducerKVP& b) MOODYCAMEL_NOEXCEPT; - -template -class ConcurrentQueue { -public: - typedef ::moodycamel::ProducerToken producer_token_t; - typedef ::moodycamel::ConsumerToken consumer_token_t; - - typedef typename Traits::index_t index_t; - typedef typename Traits::size_t size_t; - - static const size_t BLOCK_SIZE = static_cast(Traits::BLOCK_SIZE); - static const size_t EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD = - static_cast(Traits::EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD); - static const size_t EXPLICIT_INITIAL_INDEX_SIZE = - static_cast(Traits::EXPLICIT_INITIAL_INDEX_SIZE); - static const size_t IMPLICIT_INITIAL_INDEX_SIZE = - static_cast(Traits::IMPLICIT_INITIAL_INDEX_SIZE); - static const size_t INITIAL_IMPLICIT_PRODUCER_HASH_SIZE = - static_cast(Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE); - static const std::uint32_t EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE = - static_cast(Traits::EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE); -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning( \ - disable : 4307) // + integral constant overflow (that's what the ternary expression is for!) -#pragma warning(disable: 4309) // static_cast: Truncation of constant value -#endif - static const size_t MAX_SUBQUEUE_SIZE = - (details::const_numeric_max::value - static_cast(Traits::MAX_SUBQUEUE_SIZE) < - BLOCK_SIZE) - ? details::const_numeric_max::value - : ((static_cast(Traits::MAX_SUBQUEUE_SIZE) + (BLOCK_SIZE - 1)) / BLOCK_SIZE * - BLOCK_SIZE); -#ifdef _MSC_VER -#pragma warning(pop) -#endif - - static_assert(!std::numeric_limits::is_signed && std::is_integral::value, - "Traits::size_t must be an unsigned integral type"); - static_assert(!std::numeric_limits::is_signed && std::is_integral::value, - "Traits::index_t must be an unsigned integral type"); - static_assert(sizeof(index_t) >= sizeof(size_t), - "Traits::index_t must be at least as wide as Traits::size_t"); - static_assert((BLOCK_SIZE > 1) && !(BLOCK_SIZE & (BLOCK_SIZE - 1)), - "Traits::BLOCK_SIZE must be a power of 2 (and at least 2)"); - static_assert( - (EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD > 1) && - !(EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD & (EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD - 1)), - "Traits::EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD must be a power of 2 (and greater than 1)"); - static_assert((EXPLICIT_INITIAL_INDEX_SIZE > 1) && - !(EXPLICIT_INITIAL_INDEX_SIZE & (EXPLICIT_INITIAL_INDEX_SIZE - 1)), - "Traits::EXPLICIT_INITIAL_INDEX_SIZE must be a power of 2 (and greater than 1)"); - static_assert((IMPLICIT_INITIAL_INDEX_SIZE > 1) && - !(IMPLICIT_INITIAL_INDEX_SIZE & (IMPLICIT_INITIAL_INDEX_SIZE - 1)), - "Traits::IMPLICIT_INITIAL_INDEX_SIZE must be a power of 2 (and greater than 1)"); - static_assert((INITIAL_IMPLICIT_PRODUCER_HASH_SIZE == 0) || - !(INITIAL_IMPLICIT_PRODUCER_HASH_SIZE & - (INITIAL_IMPLICIT_PRODUCER_HASH_SIZE - 1)), - "Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE must be a power of 2"); - static_assert(INITIAL_IMPLICIT_PRODUCER_HASH_SIZE == 0 || - INITIAL_IMPLICIT_PRODUCER_HASH_SIZE >= 1, - "Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE must be at least 1 (or 0 to disable " - "implicit enqueueing)"); - -public: - // Creates a queue with at least `capacity` element slots; note that the - // actual number of elements that can be inserted without additional memory - // allocation depends on the number of producers and the block size (e.g. if - // the block size is equal to `capacity`, only a single block will be allocated - // up-front, which means only a single producer will be able to enqueue elements - // without an extra allocation -- blocks aren't shared between producers). - // This method is not thread safe -- it is up to the user to ensure that the - // queue is fully constructed before it starts being used by other threads (this - // includes making the memory effects of construction visible, possibly with a - // memory barrier). - explicit ConcurrentQueue(size_t capacity = 6 * BLOCK_SIZE) - : producerListTail(nullptr), - producerCount(0), - initialBlockPoolIndex(0), - nextExplicitConsumerId(0), - globalExplicitConsumerOffset(0) { - implicitProducerHashResizeInProgress.clear(std::memory_order_relaxed); - populate_initial_implicit_producer_hash(); - populate_initial_block_list(capacity / BLOCK_SIZE + - ((capacity & (BLOCK_SIZE - 1)) == 0 ? 0 : 1)); - -#ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG - // Track all the producers using a fully-resolved typed list for - // each kind; this makes it possible to debug them starting from - // the root queue object (otherwise wacky casts are needed that - // don't compile in the debugger's expression evaluator). - explicitProducers.store(nullptr, std::memory_order_relaxed); - implicitProducers.store(nullptr, std::memory_order_relaxed); -#endif - } - - // Computes the correct amount of pre-allocated blocks for you based - // on the minimum number of elements you want available at any given - // time, and the maximum concurrent number of each type of producer. - ConcurrentQueue(size_t minCapacity, size_t maxExplicitProducers, size_t maxImplicitProducers) - : producerListTail(nullptr), - producerCount(0), - initialBlockPoolIndex(0), - nextExplicitConsumerId(0), - globalExplicitConsumerOffset(0) { - implicitProducerHashResizeInProgress.clear(std::memory_order_relaxed); - populate_initial_implicit_producer_hash(); - size_t blocks = - ((((minCapacity + BLOCK_SIZE - 1) / BLOCK_SIZE) - 1) * (maxExplicitProducers + 1) + - 2 * (maxExplicitProducers + maxImplicitProducers)) * - BLOCK_SIZE; - populate_initial_block_list(blocks); - -#ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG - explicitProducers.store(nullptr, std::memory_order_relaxed); - implicitProducers.store(nullptr, std::memory_order_relaxed); -#endif - } - - // Note: The queue should not be accessed concurrently while it's - // being deleted. It's up to the user to synchronize this. - // This method is not thread safe. - ~ConcurrentQueue() { - // Destroy producers - auto ptr = producerListTail.load(std::memory_order_relaxed); - while (ptr != nullptr) { - auto next = ptr->next_prod(); - if (ptr->token != nullptr) { - ptr->token->producer = nullptr; - } - destroy(ptr); - ptr = next; - } - - // Destroy implicit producer hash tables - if (INITIAL_IMPLICIT_PRODUCER_HASH_SIZE != 0) { - auto hash = implicitProducerHash.load(std::memory_order_relaxed); - while (hash != nullptr) { - auto prev = hash->prev; - if (prev != - nullptr) { // The last hash is part of this object and was not allocated dynamically - for (size_t i = 0; i != hash->capacity; ++i) { - hash->entries[i].~ImplicitProducerKVP(); - } - hash->~ImplicitProducerHash(); - (Traits::free)(hash); - } - hash = prev; - } - } - - // Destroy global free list - auto block = freeList.head_unsafe(); - while (block != nullptr) { - auto next = block->freeListNext.load(std::memory_order_relaxed); - if (block->dynamicallyAllocated) { - destroy(block); - } - block = next; - } - - // Destroy initial free list - destroy_array(initialBlockPool, initialBlockPoolSize); - } - - // Disable copying and copy assignment - ConcurrentQueue(ConcurrentQueue const&) MOODYCAMEL_DELETE_FUNCTION; - ConcurrentQueue& operator=(ConcurrentQueue const&) MOODYCAMEL_DELETE_FUNCTION; - - // Moving is supported, but note that it is *not* a thread-safe operation. - // Nobody can use the queue while it's being moved, and the memory effects - // of that move must be propagated to other threads before they can use it. - // Note: When a queue is moved, its tokens are still valid but can only be - // used with the destination queue (i.e. semantically they are moved along - // with the queue itself). - ConcurrentQueue(ConcurrentQueue&& other) MOODYCAMEL_NOEXCEPT - : producerListTail(other.producerListTail.load(std::memory_order_relaxed)), - producerCount(other.producerCount.load(std::memory_order_relaxed)), - initialBlockPoolIndex(other.initialBlockPoolIndex.load(std::memory_order_relaxed)), - initialBlockPool(other.initialBlockPool), - initialBlockPoolSize(other.initialBlockPoolSize), - freeList(std::move(other.freeList)), - nextExplicitConsumerId(other.nextExplicitConsumerId.load(std::memory_order_relaxed)), - globalExplicitConsumerOffset( - other.globalExplicitConsumerOffset.load(std::memory_order_relaxed)) { - // Move the other one into this, and leave the other one as an empty queue - implicitProducerHashResizeInProgress.clear(std::memory_order_relaxed); - populate_initial_implicit_producer_hash(); - swap_implicit_producer_hashes(other); - - other.producerListTail.store(nullptr, std::memory_order_relaxed); - other.producerCount.store(0, std::memory_order_relaxed); - other.nextExplicitConsumerId.store(0, std::memory_order_relaxed); - other.globalExplicitConsumerOffset.store(0, std::memory_order_relaxed); - -#ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG - explicitProducers.store(other.explicitProducers.load(std::memory_order_relaxed), - std::memory_order_relaxed); - other.explicitProducers.store(nullptr, std::memory_order_relaxed); - implicitProducers.store(other.implicitProducers.load(std::memory_order_relaxed), - std::memory_order_relaxed); - other.implicitProducers.store(nullptr, std::memory_order_relaxed); -#endif - - other.initialBlockPoolIndex.store(0, std::memory_order_relaxed); - other.initialBlockPoolSize = 0; - other.initialBlockPool = nullptr; - - reown_producers(); - } - - inline ConcurrentQueue& operator=(ConcurrentQueue&& other) MOODYCAMEL_NOEXCEPT { - return swap_internal(other); - } - - // Swaps this queue's state with the other's. Not thread-safe. - // Swapping two queues does not invalidate their tokens, however - // the tokens that were created for one queue must be used with - // only the swapped queue (i.e. the tokens are tied to the - // queue's movable state, not the object itself). - inline void swap(ConcurrentQueue& other) MOODYCAMEL_NOEXCEPT { swap_internal(other); } - -private: - ConcurrentQueue& swap_internal(ConcurrentQueue& other) { - if (this == &other) { - return *this; - } - - details::swap_relaxed(producerListTail, other.producerListTail); - details::swap_relaxed(producerCount, other.producerCount); - details::swap_relaxed(initialBlockPoolIndex, other.initialBlockPoolIndex); - std::swap(initialBlockPool, other.initialBlockPool); - std::swap(initialBlockPoolSize, other.initialBlockPoolSize); - freeList.swap(other.freeList); - details::swap_relaxed(nextExplicitConsumerId, other.nextExplicitConsumerId); - details::swap_relaxed(globalExplicitConsumerOffset, other.globalExplicitConsumerOffset); - - swap_implicit_producer_hashes(other); - - reown_producers(); - other.reown_producers(); - -#ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG - details::swap_relaxed(explicitProducers, other.explicitProducers); - details::swap_relaxed(implicitProducers, other.implicitProducers); -#endif - - return *this; - } - -public: - // Enqueues a single item (by copying it). - // Allocates memory if required. Only fails if memory allocation fails (or implicit - // production is disabled because Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE is 0, - // or Traits::MAX_SUBQUEUE_SIZE has been defined and would be surpassed). - // Thread-safe. - inline bool enqueue(T const& item) { - if (INITIAL_IMPLICIT_PRODUCER_HASH_SIZE == 0) return false; - return inner_enqueue(item); - } - - // Enqueues a single item (by moving it, if possible). - // Allocates memory if required. Only fails if memory allocation fails (or implicit - // production is disabled because Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE is 0, - // or Traits::MAX_SUBQUEUE_SIZE has been defined and would be surpassed). - // Thread-safe. - inline bool enqueue(T&& item) { - if (INITIAL_IMPLICIT_PRODUCER_HASH_SIZE == 0) return false; - return inner_enqueue(std::move(item)); - } - - // Enqueues a single item (by copying it) using an explicit producer token. - // Allocates memory if required. Only fails if memory allocation fails (or - // Traits::MAX_SUBQUEUE_SIZE has been defined and would be surpassed). - // Thread-safe. - inline bool enqueue(producer_token_t const& token, T const& item) { - return inner_enqueue(token, item); - } - - // Enqueues a single item (by moving it, if possible) using an explicit producer token. - // Allocates memory if required. Only fails if memory allocation fails (or - // Traits::MAX_SUBQUEUE_SIZE has been defined and would be surpassed). - // Thread-safe. - inline bool enqueue(producer_token_t const& token, T&& item) { - return inner_enqueue(token, std::move(item)); - } - - // Enqueues several items. - // Allocates memory if required. Only fails if memory allocation fails (or - // implicit production is disabled because Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE - // is 0, or Traits::MAX_SUBQUEUE_SIZE has been defined and would be surpassed). - // Note: Use std::make_move_iterator if the elements should be moved instead of copied. - // Thread-safe. - template - bool enqueue_bulk(It itemFirst, size_t count) { - if (INITIAL_IMPLICIT_PRODUCER_HASH_SIZE == 0) return false; - return inner_enqueue_bulk(std::forward(itemFirst), count); - } - - // Enqueues several items using an explicit producer token. - // Allocates memory if required. Only fails if memory allocation fails - // (or Traits::MAX_SUBQUEUE_SIZE has been defined and would be surpassed). - // Note: Use std::make_move_iterator if the elements should be moved - // instead of copied. - // Thread-safe. - template - bool enqueue_bulk(producer_token_t const& token, It itemFirst, size_t count) { - return inner_enqueue_bulk(token, std::forward(itemFirst), count); - } - - // Enqueues a single item (by copying it). - // Does not allocate memory. Fails if not enough room to enqueue (or implicit - // production is disabled because Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE - // is 0). - // Thread-safe. - inline bool try_enqueue(T const& item) { - if (INITIAL_IMPLICIT_PRODUCER_HASH_SIZE == 0) return false; - return inner_enqueue(item); - } - - // Enqueues a single item (by moving it, if possible). - // Does not allocate memory (except for one-time implicit producer). - // Fails if not enough room to enqueue (or implicit production is - // disabled because Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE is 0). - // Thread-safe. - inline bool try_enqueue(T&& item) { - if (INITIAL_IMPLICIT_PRODUCER_HASH_SIZE == 0) return false; - return inner_enqueue(std::move(item)); - } - - // Enqueues a single item (by copying it) using an explicit producer token. - // Does not allocate memory. Fails if not enough room to enqueue. - // Thread-safe. - inline bool try_enqueue(producer_token_t const& token, T const& item) { - return inner_enqueue(token, item); - } - - // Enqueues a single item (by moving it, if possible) using an explicit producer token. - // Does not allocate memory. Fails if not enough room to enqueue. - // Thread-safe. - inline bool try_enqueue(producer_token_t const& token, T&& item) { - return inner_enqueue(token, std::move(item)); - } - - // Enqueues several items. - // Does not allocate memory (except for one-time implicit producer). - // Fails if not enough room to enqueue (or implicit production is - // disabled because Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE is 0). - // Note: Use std::make_move_iterator if the elements should be moved - // instead of copied. - // Thread-safe. - template - bool try_enqueue_bulk(It itemFirst, size_t count) { - if (INITIAL_IMPLICIT_PRODUCER_HASH_SIZE == 0) return false; - return inner_enqueue_bulk(std::forward(itemFirst), count); - } - - // Enqueues several items using an explicit producer token. - // Does not allocate memory. Fails if not enough room to enqueue. - // Note: Use std::make_move_iterator if the elements should be moved - // instead of copied. - // Thread-safe. - template - bool try_enqueue_bulk(producer_token_t const& token, It itemFirst, size_t count) { - return inner_enqueue_bulk(token, std::forward(itemFirst), count); - } - - // Attempts to dequeue from the queue. - // Returns false if all producer streams appeared empty at the time they - // were checked (so, the queue is likely but not guaranteed to be empty). - // Never allocates. Thread-safe. - template - bool try_dequeue(U& item) { - // Instead of simply trying each producer in turn (which could cause needless contention on the - // first - // producer), we score them heuristically. - size_t nonEmptyCount = 0; - ProducerBase* best = nullptr; - size_t bestSize = 0; - for (auto ptr = producerListTail.load(std::memory_order_acquire); - nonEmptyCount < 3 && ptr != nullptr; ptr = ptr->next_prod()) { - auto size = ptr->size_approx(); - if (size > 0) { - if (size > bestSize) { - bestSize = size; - best = ptr; - } - ++nonEmptyCount; - } - } - - // If there was at least one non-empty queue but it appears empty at the time - // we try to dequeue from it, we need to make sure every queue's been tried - if (nonEmptyCount > 0) { - if (details::likely(best->dequeue(item))) { - return true; - } - for (auto ptr = producerListTail.load(std::memory_order_acquire); ptr != nullptr; - ptr = ptr->next_prod()) { - if (ptr != best && ptr->dequeue(item)) { - return true; - } - } - } - return false; - } - - // Attempts to dequeue from the queue. - // Returns false if all producer streams appeared empty at the time they - // were checked (so, the queue is likely but not guaranteed to be empty). - // This differs from the try_dequeue(item) method in that this one does - // not attempt to reduce contention by interleaving the order that producer - // streams are dequeued from. So, using this method can reduce overall throughput - // under contention, but will give more predictable results in single-threaded - // consumer scenarios. This is mostly only useful for internal unit tests. - // Never allocates. Thread-safe. - template - bool try_dequeue_non_interleaved(U& item) { - for (auto ptr = producerListTail.load(std::memory_order_acquire); ptr != nullptr; - ptr = ptr->next_prod()) { - if (ptr->dequeue(item)) { - return true; - } - } - return false; - } - - // Attempts to dequeue from the queue using an explicit consumer token. - // Returns false if all producer streams appeared empty at the time they - // were checked (so, the queue is likely but not guaranteed to be empty). - // Never allocates. Thread-safe. - template - bool try_dequeue(consumer_token_t& token, U& item) { - // The idea is roughly as follows: - // Every 256 items from one producer, make everyone rotate (increase the global offset) -> this - // means the highest efficiency consumer dictates the rotation speed of everyone else, more or - // less - // If you see that the global offset has changed, you must reset your consumption counter and - // move to your designated place - // If there's no items where you're supposed to be, keep moving until you find a producer with - // some items - // If the global offset has not changed but you've run out of items to consume, move over from - // your current position until you find an producer with something in it - - if (token.desiredProducer == nullptr || - token.lastKnownGlobalOffset != - globalExplicitConsumerOffset.load(std::memory_order_relaxed)) { - if (!update_current_producer_after_rotation(token)) { - return false; - } - } - - // If there was at least one non-empty queue but it appears empty at the time - // we try to dequeue from it, we need to make sure every queue's been tried - if (static_cast(token.currentProducer)->dequeue(item)) { - if (++token.itemsConsumedFromCurrent == EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE) { - globalExplicitConsumerOffset.fetch_add(1, std::memory_order_relaxed); - } - return true; - } - - auto tail = producerListTail.load(std::memory_order_acquire); - auto ptr = static_cast(token.currentProducer)->next_prod(); - if (ptr == nullptr) { - ptr = tail; - } - while (ptr != static_cast(token.currentProducer)) { - if (ptr->dequeue(item)) { - token.currentProducer = ptr; - token.itemsConsumedFromCurrent = 1; - return true; - } - ptr = ptr->next_prod(); - if (ptr == nullptr) { - ptr = tail; - } - } - return false; - } - - // Attempts to dequeue several elements from the queue. - // Returns the number of items actually dequeued. - // Returns 0 if all producer streams appeared empty at the time they - // were checked (so, the queue is likely but not guaranteed to be empty). - // Never allocates. Thread-safe. - template - size_t try_dequeue_bulk(It itemFirst, size_t max) { - size_t count = 0; - for (auto ptr = producerListTail.load(std::memory_order_acquire); ptr != nullptr; - ptr = ptr->next_prod()) { - count += ptr->dequeue_bulk(itemFirst, max - count); - if (count == max) { - break; - } - } - return count; - } - - // Attempts to dequeue several elements from the queue using an explicit consumer token. - // Returns the number of items actually dequeued. - // Returns 0 if all producer streams appeared empty at the time they - // were checked (so, the queue is likely but not guaranteed to be empty). - // Never allocates. Thread-safe. - template - size_t try_dequeue_bulk(consumer_token_t& token, It itemFirst, size_t max) { - if (token.desiredProducer == nullptr || - token.lastKnownGlobalOffset != - globalExplicitConsumerOffset.load(std::memory_order_relaxed)) { - if (!update_current_producer_after_rotation(token)) { - return false; - } - } - - size_t count = static_cast(token.currentProducer)->dequeue_bulk(itemFirst, max); - if (count == max) { - if ((token.itemsConsumedFromCurrent += static_cast(max)) >= - EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE) { - globalExplicitConsumerOffset.fetch_add(1, std::memory_order_relaxed); - } - return max; - } - token.itemsConsumedFromCurrent += static_cast(count); - max -= count; - - auto tail = producerListTail.load(std::memory_order_acquire); - auto ptr = static_cast(token.currentProducer)->next_prod(); - if (ptr == nullptr) { - ptr = tail; - } - while (ptr != static_cast(token.currentProducer)) { - auto dequeued = ptr->dequeue_bulk(itemFirst, max); - count += dequeued; - if (dequeued != 0) { - token.currentProducer = ptr; - token.itemsConsumedFromCurrent = static_cast(dequeued); - } - if (dequeued == max) { - break; - } - max -= dequeued; - ptr = ptr->next_prod(); - if (ptr == nullptr) { - ptr = tail; - } - } - return count; - } - - - - // Attempts to dequeue from a specific producer's inner queue. - // If you happen to know which producer you want to dequeue from, this - // is significantly faster than using the general-case try_dequeue methods. - // Returns false if the producer's queue appeared empty at the time it - // was checked (so, the queue is likely but not guaranteed to be empty). - // Never allocates. Thread-safe. - template - inline bool try_dequeue_from_producer(producer_token_t const& producer, U& item) { - return static_cast(producer.producer)->dequeue(item); - } - - // Attempts to dequeue several elements from a specific producer's inner queue. - // Returns the number of items actually dequeued. - // If you happen to know which producer you want to dequeue from, this - // is significantly faster than using the general-case try_dequeue methods. - // Returns 0 if the producer's queue appeared empty at the time it - // was checked (so, the queue is likely but not guaranteed to be empty). - // Never allocates. Thread-safe. - template - inline size_t try_dequeue_bulk_from_producer(producer_token_t const& producer, It itemFirst, - size_t max) { - return static_cast(producer.producer)->dequeue_bulk(itemFirst, max); - } - - // Returns an estimate of the total number of elements currently in the queue. This - // estimate is only accurate if the queue has completely stabilized before it is called - // (i.e. all enqueue and dequeue operations have completed and their memory effects are - // visible on the calling thread, and no further operations start while this method is - // being called). - // Thread-safe. - size_t size_approx() const { - size_t size = 0; - for (auto ptr = producerListTail.load(std::memory_order_acquire); ptr != nullptr; - ptr = ptr->next_prod()) { - size += ptr->size_approx(); - } - return size; - } - - // Returns true if the underlying atomic variables used by - // the queue are lock-free (they should be on most platforms). - // Thread-safe. - static bool is_lock_free() { - return details::static_is_lock_free::value == 2 && - details::static_is_lock_free::value == 2 && - details::static_is_lock_free::value == 2 && - details::static_is_lock_free::value == 2 && - details::static_is_lock_free::value == 2 && - details::static_is_lock_free::value == 2; - } - -private: - friend struct ProducerToken; - friend struct ConsumerToken; - friend struct ExplicitProducer; - friend class ConcurrentQueueTests; - - enum AllocationMode { - CanAlloc, - CannotAlloc - }; - - /////////////////////////////// - // Queue methods - /////////////////////////////// - - template - inline bool inner_enqueue(producer_token_t const& token, U&& element) { - return static_cast(token.producer) - ->ConcurrentQueue::ExplicitProducer::template enqueue(std::forward(element)); - } - - template - inline bool inner_enqueue(U&& element) { - auto producer = get_or_add_implicit_producer(); - return producer == nullptr - ? false - : producer->ConcurrentQueue::ImplicitProducer::template enqueue( - std::forward(element)); - } - - template - inline bool inner_enqueue_bulk(producer_token_t const& token, It itemFirst, size_t count) { - return static_cast(token.producer) - ->ConcurrentQueue::ExplicitProducer::template enqueue_bulk( - std::forward(itemFirst), count); - } - - template - inline bool inner_enqueue_bulk(It itemFirst, size_t count) { - auto producer = get_or_add_implicit_producer(); - return producer == nullptr - ? false - : producer->ConcurrentQueue::ImplicitProducer::template enqueue_bulk( - std::forward(itemFirst), count); - } - - inline bool update_current_producer_after_rotation(consumer_token_t& token) { - // Ah, there's been a rotation, figure out where we should be! - auto tail = producerListTail.load(std::memory_order_acquire); - if (token.desiredProducer == nullptr && tail == nullptr) { - return false; - } - auto prodCount = producerCount.load(std::memory_order_relaxed); - auto globalOffset = globalExplicitConsumerOffset.load(std::memory_order_relaxed); - if (details::unlikely(token.desiredProducer == nullptr)) { - // Aha, first time we're dequeueing anything. - // Figure out our local position - // Note: offset is from start, not end, but we're traversing from end -- subtract from count - // first - std::uint32_t offset = prodCount - 1 - (token.initialOffset % prodCount); - token.desiredProducer = tail; - for (std::uint32_t i = 0; i != offset; ++i) { - token.desiredProducer = static_cast(token.desiredProducer)->next_prod(); - if (token.desiredProducer == nullptr) { - token.desiredProducer = tail; - } - } - } - - std::uint32_t delta = globalOffset - token.lastKnownGlobalOffset; - if (delta >= prodCount) { - delta = delta % prodCount; - } - for (std::uint32_t i = 0; i != delta; ++i) { - token.desiredProducer = static_cast(token.desiredProducer)->next_prod(); - if (token.desiredProducer == nullptr) { - token.desiredProducer = tail; - } - } - - token.lastKnownGlobalOffset = globalOffset; - token.currentProducer = token.desiredProducer; - token.itemsConsumedFromCurrent = 0; - return true; - } - - /////////////////////////// - // Free list - /////////////////////////// - - template - struct FreeListNode { - FreeListNode() : freeListRefs(0), freeListNext(nullptr) { } - - std::atomic freeListRefs; - std::atomic freeListNext; - }; - - // A simple CAS-based lock-free free list. Not the fastest thing in the world under heavy - // contention, but - // simple and correct (assuming nodes are never freed until after the free list is destroyed), and - // fairly - // speedy under low contention. - template // N must inherit FreeListNode or have the same fields (and initialization - // of them) - struct FreeList { - FreeList() : freeListHead(nullptr) { } - FreeList(FreeList&& other) : freeListHead(other.freeListHead.load(std::memory_order_relaxed)) { - other.freeListHead.store(nullptr, std::memory_order_relaxed); - } - void swap(FreeList& other) { details::swap_relaxed(freeListHead, other.freeListHead); } - - FreeList(FreeList const&) MOODYCAMEL_DELETE_FUNCTION; - FreeList& operator=(FreeList const&) MOODYCAMEL_DELETE_FUNCTION; - - inline void add(N* node) { -#if MCDBGQ_NOLOCKFREE_FREELIST - debug::DebugLock lock(mutex); -#endif - // We know that the should-be-on-freelist bit is 0 at this point, so it's safe to - // set it using a fetch_add - if (node->freeListRefs.fetch_add(SHOULD_BE_ON_FREELIST, std::memory_order_acq_rel) == 0) { - // Oh look! We were the last ones referencing this node, and we know - // we want to add it to the free list, so let's do it! - add_knowing_refcount_is_zero(node); - } - } - - inline N* try_get() { -#if MCDBGQ_NOLOCKFREE_FREELIST - debug::DebugLock lock(mutex); -#endif - auto head = freeListHead.load(std::memory_order_acquire); - while (head != nullptr) { - auto prevHead = head; - auto refs = head->freeListRefs.load(std::memory_order_relaxed); - if ((refs & REFS_MASK) == 0 || - !head->freeListRefs.compare_exchange_strong(refs, refs + 1, std::memory_order_acquire, - std::memory_order_relaxed)) { - head = freeListHead.load(std::memory_order_acquire); - continue; - } - - // Good, reference count has been incremented (it wasn't at zero), which means we can read - // the - // next and not worry about it changing between now and the time we do the CAS - auto next = head->freeListNext.load(std::memory_order_relaxed); - if (freeListHead.compare_exchange_strong(head, next, std::memory_order_acquire, - std::memory_order_relaxed)) { - // Yay, got the node. This means it was on the list, which means shouldBeOnFreeList must - // be false no - // matter the refcount (because nobody else knows it's been taken off yet, it can't have - // been put back on). - assert((head->freeListRefs.load(std::memory_order_relaxed) & SHOULD_BE_ON_FREELIST) == 0); - - // Decrease refcount twice, once for our ref, and once for the list's ref - head->freeListRefs.fetch_add(-2, std::memory_order_release); - return head; - } - - // OK, the head must have changed on us, but we still need to decrease the refcount we - // increased. - // Note that we don't need to release any memory effects, but we do need to ensure that the - // reference - // count decrement happens-after the CAS on the head. - refs = prevHead->freeListRefs.fetch_add(-1, std::memory_order_acq_rel); - if (refs == SHOULD_BE_ON_FREELIST + 1) { - add_knowing_refcount_is_zero(prevHead); - } - } - - return nullptr; - } - - // Useful for traversing the list when there's no contention (e.g. to destroy remaining nodes) - N* head_unsafe() const { return freeListHead.load(std::memory_order_relaxed); } - - private: - inline void add_knowing_refcount_is_zero(N* node) { - // Since the refcount is zero, and nobody can increase it once it's zero (except us, and we - // run - // only one copy of this method per node at a time, i.e. the single thread case), then we know - // we can safely change the next pointer of the node; however, once the refcount is back above - // zero, then other threads could increase it (happens under heavy contention, when the - // refcount - // goes to zero in between a load and a refcount increment of a node in try_get, then back up - // to - // something non-zero, then the refcount increment is done by the other thread) -- so, if the - // CAS - // to add the node to the actual list fails, decrease the refcount and leave the add operation - // to - // the next thread who puts the refcount back at zero (which could be us, hence the loop). - auto head = freeListHead.load(std::memory_order_relaxed); - while (true) { - node->freeListNext.store(head, std::memory_order_relaxed); - node->freeListRefs.store(1, std::memory_order_release); - if (!freeListHead.compare_exchange_strong(head, node, std::memory_order_release, - std::memory_order_relaxed)) { - // Hmm, the add failed, but we can only try again when the refcount goes back to zero - if (node->freeListRefs.fetch_add(SHOULD_BE_ON_FREELIST - 1, std::memory_order_release) == - 1) { - continue; - } - } - return; - } - } - - private: - // Implemented like a stack, but where node order doesn't matter (nodes are inserted out of - // order under contention) - std::atomic freeListHead; - - static const std::uint32_t REFS_MASK = 0x7FFFFFFF; - static const std::uint32_t SHOULD_BE_ON_FREELIST = 0x80000000; - -#if MCDBGQ_NOLOCKFREE_FREELIST - debug::DebugMutex mutex; -#endif - }; - - /////////////////////////// - // Block - /////////////////////////// - - enum InnerQueueContext { - implicit_context = 0, - explicit_context = 1 - }; - - struct Block { - Block() - : elementsCompletelyDequeued(0), - freeListRefs(0), - freeListNext(nullptr), - shouldBeOnFreeList(false), - dynamicallyAllocated(true) { -#if MCDBGQ_TRACKMEM - owner = nullptr; -#endif - } - - template - inline bool is_empty() const { - if (context == explicit_context && BLOCK_SIZE <= EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD) { - // Check flags - for (size_t i = 0; i < BLOCK_SIZE; ++i) { - if (!emptyFlags[i].load(std::memory_order_relaxed)) { - return false; - } - } - - // Aha, empty; make sure we have all other memory effects that happened before the empty - // flags were set - std::atomic_thread_fence(std::memory_order_acquire); - return true; - } else { - // Check counter - if (elementsCompletelyDequeued.load(std::memory_order_relaxed) == BLOCK_SIZE) { - std::atomic_thread_fence(std::memory_order_acquire); - return true; - } - assert(elementsCompletelyDequeued.load(std::memory_order_relaxed) <= BLOCK_SIZE); - return false; - } - } - - // Returns true if the block is now empty (does not apply in explicit context) - template - inline bool set_empty(index_t i) { - if (context == explicit_context && BLOCK_SIZE <= EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD) { - // Set flag - assert(!emptyFlags - [BLOCK_SIZE - 1 - static_cast(i & static_cast(BLOCK_SIZE - 1))] - .load(std::memory_order_relaxed)); - emptyFlags[BLOCK_SIZE - 1 - static_cast(i & static_cast(BLOCK_SIZE - 1))] - .store(true, std::memory_order_release); - return false; - } else { - // Increment counter - auto prevVal = elementsCompletelyDequeued.fetch_add(1, std::memory_order_release); - assert(prevVal < BLOCK_SIZE); - return prevVal == BLOCK_SIZE - 1; - } - } - - // Sets multiple contiguous item statuses to 'empty' (assumes no wrapping and count > 0). - // Returns true if the block is now empty (does not apply in explicit context). - template - inline bool set_many_empty(index_t i, size_t count) { - if (context == explicit_context && BLOCK_SIZE <= EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD) { - // Set flags - std::atomic_thread_fence(std::memory_order_release); - i = BLOCK_SIZE - 1 - static_cast(i & static_cast(BLOCK_SIZE - 1)) - count + - 1; - for (size_t j = 0; j != count; ++j) { - assert(!emptyFlags[i + j].load(std::memory_order_relaxed)); - emptyFlags[i + j].store(true, std::memory_order_relaxed); - } - return false; - } else { - // Increment counter - auto prevVal = elementsCompletelyDequeued.fetch_add(count, std::memory_order_release); - assert(prevVal + count <= BLOCK_SIZE); - return prevVal + count == BLOCK_SIZE; - } - } - - template - inline void set_all_empty() { - if (context == explicit_context && BLOCK_SIZE <= EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD) { - // Set all flags - for (size_t i = 0; i != BLOCK_SIZE; ++i) { - emptyFlags[i].store(true, std::memory_order_relaxed); - } - } else { - // Reset counter - elementsCompletelyDequeued.store(BLOCK_SIZE, std::memory_order_relaxed); - } - } - - template - inline void reset_empty() { - if (context == explicit_context && BLOCK_SIZE <= EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD) { - // Reset flags - for (size_t i = 0; i != BLOCK_SIZE; ++i) { - emptyFlags[i].store(false, std::memory_order_relaxed); - } - } else { - // Reset counter - elementsCompletelyDequeued.store(0, std::memory_order_relaxed); - } - } - - inline T* operator[](index_t idx)MOODYCAMEL_NOEXCEPT { - return reinterpret_cast(elements) + - static_cast(idx & static_cast(BLOCK_SIZE - 1)); - } - inline T const* operator[](index_t idx) const MOODYCAMEL_NOEXCEPT { - return reinterpret_cast(elements) + - static_cast(idx & static_cast(BLOCK_SIZE - 1)); - } - - public: - Block* next; - std::atomic elementsCompletelyDequeued; - std::atomic emptyFlags - [BLOCK_SIZE <= EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD ? BLOCK_SIZE : 1]; - - private: - char elements[sizeof(T) * BLOCK_SIZE]; - - public: - std::atomic freeListRefs; - std::atomic freeListNext; - std::atomic shouldBeOnFreeList; - bool dynamicallyAllocated; // Perhaps a better name for this would be - // 'isNotPartOfInitialBlockPool' - -#if MCDBGQ_TRACKMEM - void* owner; -#endif - }; - - -#if MCDBGQ_TRACKMEM -public: - struct MemStats; -private: -#endif - - /////////////////////////// - // Producer base - /////////////////////////// - - struct ProducerBase : public details::ConcurrentQueueProducerTypelessBase { - ProducerBase(ConcurrentQueue* parent, bool isExplicit) - : tailIndex(0), - headIndex(0), - dequeueOptimisticCount(0), - dequeueOvercommit(0), - tailBlock(nullptr), - isExplicit(isExplicit), - parent(parent) {} - - virtual ~ProducerBase() { }; - - template - inline bool dequeue(U& element) { - if (isExplicit) { - return static_cast(this)->dequeue(element); - } else { - return static_cast(this)->dequeue(element); - } - } - - template - inline size_t dequeue_bulk(It& itemFirst, size_t max) { - if (isExplicit) { - return static_cast(this)->dequeue_bulk(itemFirst, max); - } else { - return static_cast(this)->dequeue_bulk(itemFirst, max); - } - } - - inline ProducerBase* next_prod() const { return static_cast(next); } - - inline size_t size_approx() const { - auto tail = tailIndex.load(std::memory_order_relaxed); - auto head = headIndex.load(std::memory_order_relaxed); - return details::circular_less_than(head, tail) ? static_cast(tail - head) : 0; - } - - inline index_t getTail() const { return tailIndex.load(std::memory_order_relaxed); } - protected: - std::atomic tailIndex; // Where to enqueue to next - std::atomic headIndex; // Where to dequeue from next - - std::atomic dequeueOptimisticCount; - std::atomic dequeueOvercommit; - - Block* tailBlock; - - public: - bool isExplicit; - ConcurrentQueue* parent; - - protected: -#if MCDBGQ_TRACKMEM - friend struct MemStats; -#endif - }; - - /////////////////////////// - // Explicit queue - /////////////////////////// - - struct ExplicitProducer : public ProducerBase { - explicit ExplicitProducer(ConcurrentQueue* parent) - : ProducerBase(parent, true), - blockIndex(nullptr), - pr_blockIndexSlotsUsed(0), - pr_blockIndexSize(EXPLICIT_INITIAL_INDEX_SIZE >> 1), - pr_blockIndexFront(0), - pr_blockIndexEntries(nullptr), - pr_blockIndexRaw(nullptr) { - size_t poolBasedIndexSize = details::ceil_to_pow_2(parent->initialBlockPoolSize) >> 1; - if (poolBasedIndexSize > pr_blockIndexSize) { - pr_blockIndexSize = poolBasedIndexSize; - } - - new_block_index(0); // This creates an index with double the number of current entries, i.e. - // EXPLICIT_INITIAL_INDEX_SIZE - } - - ~ExplicitProducer() { - // Destruct any elements not yet dequeued. - // Since we're in the destructor, we can assume all elements - // are either completely dequeued or completely not (no halfways). - if (this->tailBlock != nullptr) { // Note this means there must be a block index too - // First find the block that's partially dequeued, if any - Block* halfDequeuedBlock = nullptr; - if ((this->headIndex.load(std::memory_order_relaxed) & - static_cast(BLOCK_SIZE - 1)) != 0) { - // The head's not on a block boundary, meaning a block somewhere is partially dequeued - // (or the head block is the tail block and was fully dequeued, but the head/tail are - // still not on a boundary) - size_t i = (pr_blockIndexFront - pr_blockIndexSlotsUsed) & (pr_blockIndexSize - 1); - while (details::circular_less_than( - pr_blockIndexEntries[i].base + BLOCK_SIZE, - this->headIndex.load(std::memory_order_relaxed))) { - i = (i + 1) & (pr_blockIndexSize - 1); - } - assert(details::circular_less_than( - pr_blockIndexEntries[i].base, this->headIndex.load(std::memory_order_relaxed))); - halfDequeuedBlock = pr_blockIndexEntries[i].block; - } - - // Start at the head block (note the first line in the loop gives us the head from the tail - // on the first iteration) - auto block = this->tailBlock; - do { - block = block->next; - if (block->ConcurrentQueue::Block::template is_empty()) { - continue; - } - - size_t i = 0; // Offset into block - if (block == halfDequeuedBlock) { - i = static_cast(this->headIndex.load(std::memory_order_relaxed) & - static_cast(BLOCK_SIZE - 1)); - } - - // Walk through all the items in the block; if this is the tail block, we need to stop - // when we reach the tail index - auto lastValidIndex = - (this->tailIndex.load(std::memory_order_relaxed) & - static_cast(BLOCK_SIZE - 1)) == 0 - ? BLOCK_SIZE - : static_cast(this->tailIndex.load(std::memory_order_relaxed) & - static_cast(BLOCK_SIZE - 1)); - while (i != BLOCK_SIZE && (block != this->tailBlock || i != lastValidIndex)) { - (*block)[i++]->~T(); - } - } while (block != this->tailBlock); - } - - // Destroy all blocks that we own - if (this->tailBlock != nullptr) { - auto block = this->tailBlock; - do { - auto next = block->next; - if (block->dynamicallyAllocated) { - destroy(block); - } - block = next; - } while (block != this->tailBlock); - } - - // Destroy the block indices - auto header = static_cast(pr_blockIndexRaw); - while (header != nullptr) { - auto prev = static_cast(header->prev); - header->~BlockIndexHeader(); - (Traits::free)(header); - header = prev; - } - } - - template - inline bool enqueue(U&& element) { - index_t currentTailIndex = this->tailIndex.load(std::memory_order_relaxed); - index_t newTailIndex = 1 + currentTailIndex; - if ((currentTailIndex & static_cast(BLOCK_SIZE - 1)) == 0) { - // We reached the end of a block, start a new one - auto startBlock = this->tailBlock; - auto originalBlockIndexSlotsUsed = pr_blockIndexSlotsUsed; - if (this->tailBlock != nullptr && - this->tailBlock->next->ConcurrentQueue::Block::template is_empty()) { - // We can re-use the block ahead of us, it's empty! - this->tailBlock = this->tailBlock->next; - this->tailBlock->ConcurrentQueue::Block::template reset_empty(); - - // We'll put the block on the block index (guaranteed to be room since we're conceptually - // removing the - // last block from it first -- except instead of removing then adding, we can just - // overwrite). - // Note that there must be a valid block index here, since even if allocation failed in - // the ctor, - // it would have been re-attempted when adding the first block to the queue; since there - // is such - // a block, a block index must have been successfully allocated. - } else { - // Whatever head value we see here is >= the last value we saw here (relatively), - // and <= its current value. Since we have the most recent tail, the head must be - // <= to it. - auto head = this->headIndex.load(std::memory_order_relaxed); - assert(!details::circular_less_than(currentTailIndex, head)); - if (!details::circular_less_than(head, currentTailIndex + BLOCK_SIZE) || - (MAX_SUBQUEUE_SIZE != details::const_numeric_max::value && - (MAX_SUBQUEUE_SIZE == 0 || - MAX_SUBQUEUE_SIZE - BLOCK_SIZE < currentTailIndex - head))) { - // We can't enqueue in another block because there's not enough leeway -- the - // tail could surpass the head by the time the block fills up! (Or we'll exceed - // the size limit, if the second part of the condition was true.) - return false; - } - // We're going to need a new block; check that the block index has room - if (pr_blockIndexRaw == nullptr || pr_blockIndexSlotsUsed == pr_blockIndexSize) { - // Hmm, the circular block index is already full -- we'll need - // to allocate a new index. Note pr_blockIndexRaw can only be nullptr if - // the initial allocation failed in the constructor. - - if (allocMode == CannotAlloc || !new_block_index(pr_blockIndexSlotsUsed)) { - return false; - } - } - - // Insert a new block in the circular linked list - auto newBlock = this->parent->ConcurrentQueue::template requisition_block(); - if (newBlock == nullptr) { - return false; - } -#if MCDBGQ_TRACKMEM - newBlock->owner = this; -#endif - newBlock->ConcurrentQueue::Block::template reset_empty(); - if (this->tailBlock == nullptr) { - newBlock->next = newBlock; - } else { - newBlock->next = this->tailBlock->next; - this->tailBlock->next = newBlock; - } - this->tailBlock = newBlock; - ++pr_blockIndexSlotsUsed; - } - - if (!MOODYCAMEL_NOEXCEPT_CTOR(T, U, new (nullptr) T(std::forward(element)))) { - // The constructor may throw. We want the element not to appear in the queue in - // that case (without corrupting the queue): - MOODYCAMEL_TRY { new ((*this->tailBlock)[currentTailIndex]) T(std::forward(element)); } - MOODYCAMEL_CATCH (...) { - // Revert change to the current block, but leave the new block available - // for next time - pr_blockIndexSlotsUsed = originalBlockIndexSlotsUsed; - this->tailBlock = startBlock == nullptr ? this->tailBlock : startBlock; - MOODYCAMEL_RETHROW; - } - } else { - (void)startBlock; - (void)originalBlockIndexSlotsUsed; - } - - // Add block to block index - auto& entry = blockIndex.load(std::memory_order_relaxed)->entries[pr_blockIndexFront]; - entry.base = currentTailIndex; - entry.block = this->tailBlock; - blockIndex.load(std::memory_order_relaxed) - ->front.store(pr_blockIndexFront, std::memory_order_release); - pr_blockIndexFront = (pr_blockIndexFront + 1) & (pr_blockIndexSize - 1); - - if (!MOODYCAMEL_NOEXCEPT_CTOR(T, U, new (nullptr) T(std::forward(element)))) { - this->tailIndex.store(newTailIndex, std::memory_order_release); - return true; - } - } - - // Enqueue - new ((*this->tailBlock)[currentTailIndex]) T(std::forward(element)); - - this->tailIndex.store(newTailIndex, std::memory_order_release); - return true; - } - - template - bool dequeue(U& element) { - auto tail = this->tailIndex.load(std::memory_order_relaxed); - auto overcommit = this->dequeueOvercommit.load(std::memory_order_relaxed); - if (details::circular_less_than( - this->dequeueOptimisticCount.load(std::memory_order_relaxed) - overcommit, tail)) { - // Might be something to dequeue, let's give it a try - - // Note that this if is purely for performance purposes in the common case when the queue is - // empty and the values are eventually consistent -- we may enter here spuriously. - - // Note that whatever the values of overcommit and tail are, they are not going to change - // (unless we - // change them) and must be the same value at this point (inside the if) as when the if - // condition was - // evaluated. - - // We insert an acquire fence here to synchronize-with the release upon incrementing - // dequeueOvercommit below. - // This ensures that whatever the value we got loaded into overcommit, the load of - // dequeueOptisticCount in - // the fetch_add below will result in a value at least as recent as that (and therefore at - // least as large). - // Note that I believe a compiler (signal) fence here would be sufficient due to the nature - // of fetch_add (all - // read-modify-write operations are guaranteed to work on the latest value in the - // modification order), but - // unfortunately that can't be shown to be correct using only the C++11 standard. - // See - // http://stackoverflow.com/questions/18223161/what-are-the-c11-memory-ordering-guarantees-in-this-corner-case - std::atomic_thread_fence(std::memory_order_acquire); - - // Increment optimistic counter, then check if it went over the boundary - auto myDequeueCount = this->dequeueOptimisticCount.fetch_add(1, std::memory_order_relaxed); - - // Note that since dequeueOvercommit must be <= dequeueOptimisticCount (because - // dequeueOvercommit is only ever - // incremented after dequeueOptimisticCount -- this is enforced in the `else` block below), - // and since we now - // have a version of dequeueOptimisticCount that is at least as recent as overcommit (due to - // the release upon - // incrementing dequeueOvercommit and the acquire above that synchronizes with it), - // overcommit <= myDequeueCount. - assert(overcommit <= myDequeueCount); - - // Note that we reload tail here in case it changed; it will be the same value as before or - // greater, since - // this load is sequenced after (happens after) the earlier load above. This is supported by - // read-read - // coherency (as defined in the standard), explained here: - // http://en.cppreference.com/w/cpp/atomic/memory_order - tail = this->tailIndex.load(std::memory_order_acquire); - if (details::likely( - details::circular_less_than(myDequeueCount - overcommit, tail))) { - // Guaranteed to be at least one element to dequeue! - - // Get the index. Note that since there's guaranteed to be at least one element, this - // will never exceed tail. We need to do an acquire-release fence here since it's possible - // that whatever condition got us to this point was for an earlier enqueued element (that - // we already see the memory effects for), but that by the time we increment somebody else - // has incremented it, and we need to see the memory effects for *that* element, which is - // in such a case is necessarily visible on the thread that incremented it in the first - // place with the more current condition (they must have acquired a tail that is at least - // as recent). - auto index = this->headIndex.fetch_add(1, std::memory_order_acq_rel); - - - // Determine which block the element is in - - auto localBlockIndex = blockIndex.load(std::memory_order_acquire); - auto localBlockIndexHead = localBlockIndex->front.load(std::memory_order_acquire); - - // We need to be careful here about subtracting and dividing because of index wrap-around. - // When an index wraps, we need to preserve the sign of the offset when dividing it by the - // block size (in order to get a correct signed block count offset in all cases): - auto headBase = localBlockIndex->entries[localBlockIndexHead].base; - auto blockBaseIndex = index & ~static_cast(BLOCK_SIZE - 1); - auto offset = static_cast( - static_cast::type>(blockBaseIndex - headBase) / - BLOCK_SIZE); - auto block = - localBlockIndex->entries[(localBlockIndexHead + offset) & (localBlockIndex->size - 1)] - .block; - - // Dequeue - auto& el = *((*block)[index]); - if (!MOODYCAMEL_NOEXCEPT_ASSIGN(T, T&&, element = std::move(el))) { - // Make sure the element is still fully dequeued and destroyed even if the assignment - // throws - struct Guard { - Block* block; - index_t index; - - ~Guard() { - (*block)[index]->~T(); - block->ConcurrentQueue::Block::template set_empty(index); - } - } guard = { block, index }; - - element = std::move(el); - } else { - element = std::move(el); - el.~T(); - block->ConcurrentQueue::Block::template set_empty(index); - } - - return true; - } else { - // Wasn't anything to dequeue after all; make the effective dequeue count eventually - // consistent - this->dequeueOvercommit.fetch_add( - 1, std::memory_order_release); // Release so that the fetch_add on - // dequeueOptimisticCount is guaranteed to happen - // before this write - } - } - - return false; - } - - template - bool enqueue_bulk(It itemFirst, size_t count) { - // First, we need to make sure we have enough room to enqueue all of the elements; - // this means pre-allocating blocks and putting them in the block index (but only if - // all the allocations succeeded). - index_t startTailIndex = this->tailIndex.load(std::memory_order_relaxed); - auto startBlock = this->tailBlock; - auto originalBlockIndexFront = pr_blockIndexFront; - auto originalBlockIndexSlotsUsed = pr_blockIndexSlotsUsed; - - Block* firstAllocatedBlock = nullptr; - - // Figure out how many blocks we'll need to allocate, and do so - size_t blockBaseDiff = - ((startTailIndex + count - 1) & ~static_cast(BLOCK_SIZE - 1)) - - ((startTailIndex - 1) & ~static_cast(BLOCK_SIZE - 1)); - index_t currentTailIndex = (startTailIndex - 1) & ~static_cast(BLOCK_SIZE - 1); - if (blockBaseDiff > 0) { - // Allocate as many blocks as possible from ahead - while ( - blockBaseDiff > 0 && this->tailBlock != nullptr && - this->tailBlock->next != firstAllocatedBlock && - this->tailBlock->next->ConcurrentQueue::Block::template is_empty()) { - blockBaseDiff -= static_cast(BLOCK_SIZE); - currentTailIndex += static_cast(BLOCK_SIZE); - - this->tailBlock = this->tailBlock->next; - firstAllocatedBlock = - firstAllocatedBlock == nullptr ? this->tailBlock : firstAllocatedBlock; - - auto& entry = blockIndex.load(std::memory_order_relaxed)->entries[pr_blockIndexFront]; - entry.base = currentTailIndex; - entry.block = this->tailBlock; - pr_blockIndexFront = (pr_blockIndexFront + 1) & (pr_blockIndexSize - 1); - } - - // Now allocate as many blocks as necessary from the block pool - while (blockBaseDiff > 0) { - blockBaseDiff -= static_cast(BLOCK_SIZE); - currentTailIndex += static_cast(BLOCK_SIZE); - - auto head = this->headIndex.load(std::memory_order_relaxed); - assert(!details::circular_less_than(currentTailIndex, head)); - bool full = !details::circular_less_than(head, currentTailIndex + BLOCK_SIZE) || - (MAX_SUBQUEUE_SIZE != details::const_numeric_max::value && - (MAX_SUBQUEUE_SIZE == 0 || - MAX_SUBQUEUE_SIZE - BLOCK_SIZE < currentTailIndex - head)); - if (pr_blockIndexRaw == nullptr || pr_blockIndexSlotsUsed == pr_blockIndexSize || full) { - if (allocMode == CannotAlloc || full || !new_block_index(originalBlockIndexSlotsUsed)) { - // Failed to allocate, undo changes (but keep injected blocks) - pr_blockIndexFront = originalBlockIndexFront; - pr_blockIndexSlotsUsed = originalBlockIndexSlotsUsed; - this->tailBlock = startBlock == nullptr ? firstAllocatedBlock : startBlock; - return false; - } - - // pr_blockIndexFront is updated inside new_block_index, so we need to - // update our fallback value too (since we keep the new index even if we - // later fail) - originalBlockIndexFront = originalBlockIndexSlotsUsed; - } - - // Insert a new block in the circular linked list - auto newBlock = this->parent->ConcurrentQueue::template requisition_block(); - if (newBlock == nullptr) { - pr_blockIndexFront = originalBlockIndexFront; - pr_blockIndexSlotsUsed = originalBlockIndexSlotsUsed; - this->tailBlock = startBlock == nullptr ? firstAllocatedBlock : startBlock; - return false; - } - -#if MCDBGQ_TRACKMEM - newBlock->owner = this; -#endif - newBlock->ConcurrentQueue::Block::template set_all_empty(); - if (this->tailBlock == nullptr) { - newBlock->next = newBlock; - } else { - newBlock->next = this->tailBlock->next; - this->tailBlock->next = newBlock; - } - this->tailBlock = newBlock; - firstAllocatedBlock = - firstAllocatedBlock == nullptr ? this->tailBlock : firstAllocatedBlock; - - ++pr_blockIndexSlotsUsed; - - auto& entry = blockIndex.load(std::memory_order_relaxed)->entries[pr_blockIndexFront]; - entry.base = currentTailIndex; - entry.block = this->tailBlock; - pr_blockIndexFront = (pr_blockIndexFront + 1) & (pr_blockIndexSize - 1); - } - - // Excellent, all allocations succeeded. Reset each block's emptiness before we fill them - // up, and - // publish the new block index front - auto block = firstAllocatedBlock; - while (true) { - block->ConcurrentQueue::Block::template reset_empty(); - if (block == this->tailBlock) { - break; - } - block = block->next; - } - - if (MOODYCAMEL_NOEXCEPT_CTOR(T, decltype(*itemFirst), - new (nullptr) T(details::deref_noexcept(itemFirst)))) { - blockIndex.load(std::memory_order_relaxed)->front.store( - (pr_blockIndexFront - 1) & (pr_blockIndexSize - 1), std::memory_order_release); - } - } - - // Enqueue, one block at a time - index_t newTailIndex = startTailIndex + static_cast(count); - currentTailIndex = startTailIndex; - auto endBlock = this->tailBlock; - this->tailBlock = startBlock; - assert((startTailIndex & static_cast(BLOCK_SIZE - 1)) != 0 || - firstAllocatedBlock != nullptr || count == 0); - if ((startTailIndex & static_cast(BLOCK_SIZE - 1)) == 0 && - firstAllocatedBlock != nullptr) { - this->tailBlock = firstAllocatedBlock; - } - while (true) { - auto stopIndex = (currentTailIndex & ~static_cast(BLOCK_SIZE - 1)) + - static_cast(BLOCK_SIZE); - if (details::circular_less_than(newTailIndex, stopIndex)) { - stopIndex = newTailIndex; - } - if (MOODYCAMEL_NOEXCEPT_CTOR(T, decltype(*itemFirst), - new (nullptr) T(details::deref_noexcept(itemFirst)))) { - while (currentTailIndex != stopIndex) { - new ((*this->tailBlock)[currentTailIndex++]) T(*itemFirst++); - } - } else { - MOODYCAMEL_TRY { - while (currentTailIndex != stopIndex) { - // Must use copy constructor even if move constructor is available - // because we may have to revert if there's an exception. - // Sorry about the horrible templated next line, but it was the only way - // to disable moving *at compile time*, which is important because a type - // may only define a (noexcept) move constructor, and so calls to the - // cctor will not compile, even if they are in an if branch that will never - // be executed - new ((*this->tailBlock)[currentTailIndex]) T(details::nomove_if< - (bool)!MOODYCAMEL_NOEXCEPT_CTOR( - T, decltype(*itemFirst), new (nullptr) - T(details::deref_noexcept(itemFirst)))>::eval(*itemFirst)); - ++currentTailIndex; - ++itemFirst; - } - } - MOODYCAMEL_CATCH (...) { - // Oh dear, an exception's been thrown -- destroy the elements that - // were enqueued so far and revert the entire bulk operation (we'll keep - // any allocated blocks in our linked list for later, though). - auto constructedStopIndex = currentTailIndex; - auto lastBlockEnqueued = this->tailBlock; - - pr_blockIndexFront = originalBlockIndexFront; - pr_blockIndexSlotsUsed = originalBlockIndexSlotsUsed; - this->tailBlock = startBlock == nullptr ? firstAllocatedBlock : startBlock; - - if (!details::is_trivially_destructible::value) { - auto block = startBlock; - if ((startTailIndex & static_cast(BLOCK_SIZE - 1)) == 0) { - block = firstAllocatedBlock; - } - currentTailIndex = startTailIndex; - while (true) { - auto stopIndex = (currentTailIndex & ~static_cast(BLOCK_SIZE - 1)) + - static_cast(BLOCK_SIZE); - if (details::circular_less_than(constructedStopIndex, stopIndex)) { - stopIndex = constructedStopIndex; - } - while (currentTailIndex != stopIndex) { - (*block)[currentTailIndex++]->~T(); - } - if (block == lastBlockEnqueued) { - break; - } - block = block->next; - } - } - MOODYCAMEL_RETHROW; - } - } - - if (this->tailBlock == endBlock) { - assert(currentTailIndex == newTailIndex); - break; - } - this->tailBlock = this->tailBlock->next; - } - - if (!MOODYCAMEL_NOEXCEPT_CTOR(T, decltype(*itemFirst), - new (nullptr) T(details::deref_noexcept(itemFirst))) && - firstAllocatedBlock != nullptr) { - blockIndex.load(std::memory_order_relaxed)->front.store( - (pr_blockIndexFront - 1) & (pr_blockIndexSize - 1), std::memory_order_release); - } - - this->tailIndex.store(newTailIndex, std::memory_order_release); - return true; - } - - template - size_t dequeue_bulk(It& itemFirst, size_t max) { - auto tail = this->tailIndex.load(std::memory_order_relaxed); - auto overcommit = this->dequeueOvercommit.load(std::memory_order_relaxed); - auto desiredCount = static_cast( - tail - (this->dequeueOptimisticCount.load(std::memory_order_relaxed) - overcommit)); - if (details::circular_less_than(0, desiredCount)) { - desiredCount = desiredCount < max ? desiredCount : max; - std::atomic_thread_fence(std::memory_order_acquire); - - auto myDequeueCount = - this->dequeueOptimisticCount.fetch_add(desiredCount, std::memory_order_relaxed); - assert(overcommit <= myDequeueCount); - - tail = this->tailIndex.load(std::memory_order_acquire); - auto actualCount = static_cast(tail - (myDequeueCount - overcommit)); - if (details::circular_less_than(0, actualCount)) { - actualCount = desiredCount < actualCount ? desiredCount : actualCount; - if (actualCount < desiredCount) { - this->dequeueOvercommit.fetch_add(desiredCount - actualCount, - std::memory_order_release); - } - - // Get the first index. Note that since there's guaranteed to be at least actualCount - // elements, this - // will never exceed tail. - auto firstIndex = this->headIndex.fetch_add(actualCount, std::memory_order_acq_rel); - - // Determine which block the first element is in - auto localBlockIndex = blockIndex.load(std::memory_order_acquire); - auto localBlockIndexHead = localBlockIndex->front.load(std::memory_order_acquire); - - auto headBase = localBlockIndex->entries[localBlockIndexHead].base; - auto firstBlockBaseIndex = firstIndex & ~static_cast(BLOCK_SIZE - 1); - auto offset = static_cast(static_cast::type>( - firstBlockBaseIndex - headBase) / - BLOCK_SIZE); - auto indexIndex = (localBlockIndexHead + offset) & (localBlockIndex->size - 1); - - // Iterate the blocks and dequeue - auto index = firstIndex; - do { - auto firstIndexInBlock = index; - auto endIndex = - (index & ~static_cast(BLOCK_SIZE - 1)) + static_cast(BLOCK_SIZE); - endIndex = details::circular_less_than( - firstIndex + static_cast(actualCount), endIndex) - ? firstIndex + static_cast(actualCount) - : endIndex; - auto block = localBlockIndex->entries[indexIndex].block; - if (MOODYCAMEL_NOEXCEPT_ASSIGN( - T, T &&, details::deref_noexcept(itemFirst) = std::move((*(*block)[index])))) { - while (index != endIndex) { - auto& el = *((*block)[index]); - *itemFirst++ = std::move(el); - el.~T(); - ++index; - } - } else { - MOODYCAMEL_TRY { - while (index != endIndex) { - auto& el = *((*block)[index]); - *itemFirst = std::move(el); - ++itemFirst; - el.~T(); - ++index; - } - } - MOODYCAMEL_CATCH (...) { - // It's too late to revert the dequeue, but we can make sure that all - // the dequeued objects are properly destroyed and the block index - // (and empty count) are properly updated before we propagate the exception - do { - block = localBlockIndex->entries[indexIndex].block; - while (index != endIndex) { - (*block)[index++]->~T(); - } - block->ConcurrentQueue::Block::template set_many_empty( - firstIndexInBlock, static_cast(endIndex - firstIndexInBlock)); - indexIndex = (indexIndex + 1) & (localBlockIndex->size - 1); - - firstIndexInBlock = index; - endIndex = (index & ~static_cast(BLOCK_SIZE - 1)) + - static_cast(BLOCK_SIZE); - endIndex = details::circular_less_than( - firstIndex + static_cast(actualCount), endIndex) - ? firstIndex + static_cast(actualCount) - : endIndex; - } while (index != firstIndex + actualCount); - - MOODYCAMEL_RETHROW; - } - } - block->ConcurrentQueue::Block::template set_many_empty( - firstIndexInBlock, static_cast(endIndex - firstIndexInBlock)); - indexIndex = (indexIndex + 1) & (localBlockIndex->size - 1); - } while (index != firstIndex + actualCount); - - return actualCount; - } else { - // Wasn't anything to dequeue after all; make the effective dequeue count eventually - // consistent - this->dequeueOvercommit.fetch_add(desiredCount, std::memory_order_release); - } - } - - return 0; - } - - private: - struct BlockIndexEntry { - index_t base; - Block* block; - }; - - struct BlockIndexHeader { - size_t size; - std::atomic front; // Current slot (not next, like pr_blockIndexFront) - BlockIndexEntry* entries; - void* prev; - }; - - bool new_block_index(size_t numberOfFilledSlotsToExpose) { - auto prevBlockSizeMask = pr_blockIndexSize - 1; - - // Create the new block - pr_blockIndexSize <<= 1; - auto newRawPtr = static_cast( - (Traits::malloc)(sizeof(BlockIndexHeader) + std::alignment_of::value - - 1 + sizeof(BlockIndexEntry) * pr_blockIndexSize)); - if (newRawPtr == nullptr) { - pr_blockIndexSize >>= 1; // Reset to allow graceful retry - return false; - } - - auto newBlockIndexEntries = reinterpret_cast( - details::align_for(newRawPtr + sizeof(BlockIndexHeader))); - - // Copy in all the old indices, if any - size_t j = 0; - if (pr_blockIndexSlotsUsed != 0) { - auto i = (pr_blockIndexFront - pr_blockIndexSlotsUsed) & prevBlockSizeMask; - do { - newBlockIndexEntries[j++] = pr_blockIndexEntries[i]; - i = (i + 1) & prevBlockSizeMask; - } while (i != pr_blockIndexFront); - } - - // Update everything - auto header = new (newRawPtr) BlockIndexHeader; - header->size = pr_blockIndexSize; - header->front.store(numberOfFilledSlotsToExpose - 1, std::memory_order_relaxed); - header->entries = newBlockIndexEntries; - header->prev = - pr_blockIndexRaw; // we link the new block to the old one so we can free it later - - pr_blockIndexFront = j; - pr_blockIndexEntries = newBlockIndexEntries; - pr_blockIndexRaw = newRawPtr; - blockIndex.store(header, std::memory_order_release); - - return true; - } - - private: - std::atomic blockIndex; - - // To be used by producer only -- consumer must use the ones in referenced by blockIndex - size_t pr_blockIndexSlotsUsed; - size_t pr_blockIndexSize; - size_t pr_blockIndexFront; // Next slot (not current) - BlockIndexEntry* pr_blockIndexEntries; - void* pr_blockIndexRaw; - -#ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG - public: - ExplicitProducer* nextExplicitProducer; - private: -#endif - -#if MCDBGQ_TRACKMEM - friend struct MemStats; -#endif - }; - - ////////////////////////////////// - // Implicit queue - ////////////////////////////////// - - struct ImplicitProducer : public ProducerBase { - ImplicitProducer(ConcurrentQueue* parent) - : ProducerBase(parent, false), - nextBlockIndexCapacity(IMPLICIT_INITIAL_INDEX_SIZE), - blockIndex(nullptr) { - new_block_index(); - } - - ~ImplicitProducer() { - // Note that since we're in the destructor we can assume that all enqueue/dequeue operations - // completed already; this means that all undequeued elements are placed contiguously across - // contiguous blocks, and that only the first and last remaining blocks can be only partially - // empty (all other remaining blocks must be completely full). - -#ifdef MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED - // Unregister ourselves for thread termination notification - if (!this->inactive.load(std::memory_order_relaxed)) { - details::ThreadExitNotifier::unsubscribe(&threadExitListener); - } -#endif - - // Destroy all remaining elements! - auto tail = this->tailIndex.load(std::memory_order_relaxed); - auto index = this->headIndex.load(std::memory_order_relaxed); - Block* block = nullptr; - assert(index == tail || details::circular_less_than(index, tail)); - bool forceFreeLastBlock = - index != tail; // If we enter the loop, then the last (tail) block will not be freed - while (index != tail) { - if ((index & static_cast(BLOCK_SIZE - 1)) == 0 || block == nullptr) { - if (block != nullptr && block->dynamicallyAllocated) { - // Free the old block - this->parent->destroy(block); - } - - block = get_block_index_entry_for_index(index)->value.load(std::memory_order_relaxed); - } - - ((*block)[index])->~T(); - ++index; - } - // Even if the queue is empty, there's still one block that's not on the free list - // (unless the head index reached the end of it, in which case the tail will be poised - // to create a new block). - if (this->tailBlock != nullptr && - (forceFreeLastBlock || (tail & static_cast(BLOCK_SIZE - 1)) != 0) && - this->tailBlock->dynamicallyAllocated) { - this->parent->destroy(this->tailBlock); - } - - // Destroy block index - auto localBlockIndex = blockIndex.load(std::memory_order_relaxed); - if (localBlockIndex != nullptr) { - for (size_t i = 0; i != localBlockIndex->capacity; ++i) { - localBlockIndex->index[i]->~BlockIndexEntry(); - } - do { - auto prev = localBlockIndex->prev; - localBlockIndex->~BlockIndexHeader(); - (Traits::free)(localBlockIndex); - localBlockIndex = prev; - } while (localBlockIndex != nullptr); - } - } - - template - inline bool enqueue(U&& element) { - index_t currentTailIndex = this->tailIndex.load(std::memory_order_relaxed); - index_t newTailIndex = 1 + currentTailIndex; - if ((currentTailIndex & static_cast(BLOCK_SIZE - 1)) == 0) { - // We reached the end of a block, start a new one - auto head = this->headIndex.load(std::memory_order_relaxed); - assert(!details::circular_less_than(currentTailIndex, head)); - if (!details::circular_less_than(head, currentTailIndex + BLOCK_SIZE) || - (MAX_SUBQUEUE_SIZE != details::const_numeric_max::value && - (MAX_SUBQUEUE_SIZE == 0 || - MAX_SUBQUEUE_SIZE - BLOCK_SIZE < currentTailIndex - head))) { - return false; - } -#if MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX - debug::DebugLock lock(mutex); -#endif - // Find out where we'll be inserting this block in the block index - BlockIndexEntry* idxEntry; - if (!insert_block_index_entry(idxEntry, currentTailIndex)) { - return false; - } - - // Get ahold of a new block - auto newBlock = this->parent->ConcurrentQueue::template requisition_block(); - if (newBlock == nullptr) { - rewind_block_index_tail(); - idxEntry->value.store(nullptr, std::memory_order_relaxed); - return false; - } -#if MCDBGQ_TRACKMEM - newBlock->owner = this; -#endif - newBlock->ConcurrentQueue::Block::template reset_empty(); - - if (!MOODYCAMEL_NOEXCEPT_CTOR(T, U, new (nullptr) T(std::forward(element)))) { - // May throw, try to insert now before we publish the fact that we have this new block - MOODYCAMEL_TRY { new ((*newBlock)[currentTailIndex]) T(std::forward(element)); } - MOODYCAMEL_CATCH (...) { - rewind_block_index_tail(); - idxEntry->value.store(nullptr, std::memory_order_relaxed); - this->parent->add_block_to_free_list(newBlock); - MOODYCAMEL_RETHROW; - } - } - - // Insert the new block into the index - idxEntry->value.store(newBlock, std::memory_order_relaxed); - - this->tailBlock = newBlock; - - if (!MOODYCAMEL_NOEXCEPT_CTOR(T, U, new (nullptr) T(std::forward(element)))) { - this->tailIndex.store(newTailIndex, std::memory_order_release); - return true; - } - } - - // Enqueue - new ((*this->tailBlock)[currentTailIndex]) T(std::forward(element)); - - this->tailIndex.store(newTailIndex, std::memory_order_release); - return true; - } - - template - bool dequeue(U& element) { - // See ExplicitProducer::dequeue for rationale and explanation - index_t tail = this->tailIndex.load(std::memory_order_relaxed); - index_t overcommit = this->dequeueOvercommit.load(std::memory_order_relaxed); - if (details::circular_less_than( - this->dequeueOptimisticCount.load(std::memory_order_relaxed) - overcommit, tail)) { - std::atomic_thread_fence(std::memory_order_acquire); - - index_t myDequeueCount = - this->dequeueOptimisticCount.fetch_add(1, std::memory_order_relaxed); - assert(overcommit <= myDequeueCount); - tail = this->tailIndex.load(std::memory_order_acquire); - if (details::likely( - details::circular_less_than(myDequeueCount - overcommit, tail))) { - index_t index = this->headIndex.fetch_add(1, std::memory_order_acq_rel); - - // Determine which block the element is in - auto entry = get_block_index_entry_for_index(index); - - // Dequeue - auto block = entry->value.load(std::memory_order_relaxed); - auto& el = *((*block)[index]); - - if (!MOODYCAMEL_NOEXCEPT_ASSIGN(T, T&&, element = std::move(el))) { -#if MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX - // Note: Acquiring the mutex with every dequeue instead of only when a block - // is released is very sub-optimal, but it is, after all, purely debug code. - debug::DebugLock lock(producer->mutex); -#endif - struct Guard { - Block* block; - index_t index; - BlockIndexEntry* entry; - ConcurrentQueue* parent; - - ~Guard() { - (*block)[index]->~T(); - if (block->ConcurrentQueue::Block::template set_empty(index)) { - entry->value.store(nullptr, std::memory_order_relaxed); - parent->add_block_to_free_list(block); - } - } - } guard = { block, index, entry, this->parent }; - - element = std::move(el); - } else { - element = std::move(el); - el.~T(); - - if (block->ConcurrentQueue::Block::template set_empty(index)) { - { -#if MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX - debug::DebugLock lock(mutex); -#endif - // Add the block back into the global free pool (and remove from block index) - entry->value.store(nullptr, std::memory_order_relaxed); - } - this->parent->add_block_to_free_list(block); // releases the above store - } - } - - return true; - } else { - this->dequeueOvercommit.fetch_add(1, std::memory_order_release); - } - } - - return false; - } - - template - bool enqueue_bulk(It itemFirst, size_t count) { - // First, we need to make sure we have enough room to enqueue all of the elements; - // this means pre-allocating blocks and putting them in the block index (but only if - // all the allocations succeeded). - - // Note that the tailBlock we start off with may not be owned by us any more; - // this happens if it was filled up exactly to the top (setting tailIndex to - // the first index of the next block which is not yet allocated), then dequeued - // completely (putting it on the free list) before we enqueue again. - - index_t startTailIndex = this->tailIndex.load(std::memory_order_relaxed); - auto startBlock = this->tailBlock; - Block* firstAllocatedBlock = nullptr; - auto endBlock = this->tailBlock; - - // Figure out how many blocks we'll need to allocate, and do so - size_t blockBaseDiff = - ((startTailIndex + count - 1) & ~static_cast(BLOCK_SIZE - 1)) - - ((startTailIndex - 1) & ~static_cast(BLOCK_SIZE - 1)); - index_t currentTailIndex = (startTailIndex - 1) & ~static_cast(BLOCK_SIZE - 1); - if (blockBaseDiff > 0) { -#if MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX - debug::DebugLock lock(mutex); -#endif - do { - blockBaseDiff -= static_cast(BLOCK_SIZE); - currentTailIndex += static_cast(BLOCK_SIZE); - - // Find out where we'll be inserting this block in the block index - BlockIndexEntry* idxEntry; - Block* newBlock; - bool indexInserted = false; - auto head = this->headIndex.load(std::memory_order_relaxed); - assert(!details::circular_less_than(currentTailIndex, head)); - bool full = !details::circular_less_than(head, currentTailIndex + BLOCK_SIZE) || - (MAX_SUBQUEUE_SIZE != details::const_numeric_max::value && - (MAX_SUBQUEUE_SIZE == 0 || - MAX_SUBQUEUE_SIZE - BLOCK_SIZE < currentTailIndex - head)); - if (full || - !(indexInserted = insert_block_index_entry(idxEntry, currentTailIndex)) || - (newBlock = this->parent->ConcurrentQueue::template requisition_block()) == - nullptr) { - // Index allocation or block allocation failed; revert any other allocations - // and index insertions done so far for this operation - if (indexInserted) { - rewind_block_index_tail(); - idxEntry->value.store(nullptr, std::memory_order_relaxed); - } - currentTailIndex = (startTailIndex - 1) & ~static_cast(BLOCK_SIZE - 1); - for (auto block = firstAllocatedBlock; block != nullptr; block = block->next) { - currentTailIndex += static_cast(BLOCK_SIZE); - idxEntry = get_block_index_entry_for_index(currentTailIndex); - idxEntry->value.store(nullptr, std::memory_order_relaxed); - rewind_block_index_tail(); - } - this->parent->add_blocks_to_free_list(firstAllocatedBlock); - this->tailBlock = startBlock; - - return false; - } - -#if MCDBGQ_TRACKMEM - newBlock->owner = this; -#endif - newBlock->ConcurrentQueue::Block::template reset_empty(); - newBlock->next = nullptr; - - // Insert the new block into the index - idxEntry->value.store(newBlock, std::memory_order_relaxed); - - // Store the chain of blocks so that we can undo if later allocations fail, - // and so that we can find the blocks when we do the actual enqueueing - if ((startTailIndex & static_cast(BLOCK_SIZE - 1)) != 0 || - firstAllocatedBlock != nullptr) { - assert(this->tailBlock != nullptr); - this->tailBlock->next = newBlock; - } - this->tailBlock = newBlock; - endBlock = newBlock; - firstAllocatedBlock = firstAllocatedBlock == nullptr ? newBlock : firstAllocatedBlock; - } while (blockBaseDiff > 0); - } - - // Enqueue, one block at a time - index_t newTailIndex = startTailIndex + static_cast(count); - currentTailIndex = startTailIndex; - this->tailBlock = startBlock; - assert((startTailIndex & static_cast(BLOCK_SIZE - 1)) != 0 || - firstAllocatedBlock != nullptr || count == 0); - if ((startTailIndex & static_cast(BLOCK_SIZE - 1)) == 0 && - firstAllocatedBlock != nullptr) { - this->tailBlock = firstAllocatedBlock; - } - while (true) { - auto stopIndex = (currentTailIndex & ~static_cast(BLOCK_SIZE - 1)) + - static_cast(BLOCK_SIZE); - if (details::circular_less_than(newTailIndex, stopIndex)) { - stopIndex = newTailIndex; - } - if (MOODYCAMEL_NOEXCEPT_CTOR(T, decltype(*itemFirst), - new (nullptr) T(details::deref_noexcept(itemFirst)))) { - while (currentTailIndex != stopIndex) { - new ((*this->tailBlock)[currentTailIndex++]) T(*itemFirst++); - } - } else { - MOODYCAMEL_TRY { - while (currentTailIndex != stopIndex) { - new ((*this->tailBlock)[currentTailIndex]) T(details::nomove_if< - (bool)!MOODYCAMEL_NOEXCEPT_CTOR( - T, decltype(*itemFirst), new (nullptr) - T(details::deref_noexcept(itemFirst)))>::eval(*itemFirst)); - ++currentTailIndex; - ++itemFirst; - } - } - MOODYCAMEL_CATCH (...) { - auto constructedStopIndex = currentTailIndex; - auto lastBlockEnqueued = this->tailBlock; - - if (!details::is_trivially_destructible::value) { - auto block = startBlock; - if ((startTailIndex & static_cast(BLOCK_SIZE - 1)) == 0) { - block = firstAllocatedBlock; - } - currentTailIndex = startTailIndex; - while (true) { - auto stopIndex = (currentTailIndex & ~static_cast(BLOCK_SIZE - 1)) + - static_cast(BLOCK_SIZE); - if (details::circular_less_than(constructedStopIndex, stopIndex)) { - stopIndex = constructedStopIndex; - } - while (currentTailIndex != stopIndex) { - (*block)[currentTailIndex++]->~T(); - } - if (block == lastBlockEnqueued) { - break; - } - block = block->next; - } - } - - currentTailIndex = (startTailIndex - 1) & ~static_cast(BLOCK_SIZE - 1); - for (auto block = firstAllocatedBlock; block != nullptr; block = block->next) { - currentTailIndex += static_cast(BLOCK_SIZE); - auto idxEntry = get_block_index_entry_for_index(currentTailIndex); - idxEntry->value.store(nullptr, std::memory_order_relaxed); - rewind_block_index_tail(); - } - this->parent->add_blocks_to_free_list(firstAllocatedBlock); - this->tailBlock = startBlock; - MOODYCAMEL_RETHROW; - } - } - - if (this->tailBlock == endBlock) { - assert(currentTailIndex == newTailIndex); - break; - } - this->tailBlock = this->tailBlock->next; - } - this->tailIndex.store(newTailIndex, std::memory_order_release); - return true; - } - - template - size_t dequeue_bulk(It& itemFirst, size_t max) { - auto tail = this->tailIndex.load(std::memory_order_relaxed); - auto overcommit = this->dequeueOvercommit.load(std::memory_order_relaxed); - auto desiredCount = static_cast( - tail - (this->dequeueOptimisticCount.load(std::memory_order_relaxed) - overcommit)); - if (details::circular_less_than(0, desiredCount)) { - desiredCount = desiredCount < max ? desiredCount : max; - std::atomic_thread_fence(std::memory_order_acquire); - - auto myDequeueCount = - this->dequeueOptimisticCount.fetch_add(desiredCount, std::memory_order_relaxed); - assert(overcommit <= myDequeueCount); - - tail = this->tailIndex.load(std::memory_order_acquire); - auto actualCount = static_cast(tail - (myDequeueCount - overcommit)); - if (details::circular_less_than(0, actualCount)) { - actualCount = desiredCount < actualCount ? desiredCount : actualCount; - if (actualCount < desiredCount) { - this->dequeueOvercommit.fetch_add(desiredCount - actualCount, - std::memory_order_release); - } - - // Get the first index. Note that since there's guaranteed to be at least actualCount - // elements, this - // will never exceed tail. - auto firstIndex = this->headIndex.fetch_add(actualCount, std::memory_order_acq_rel); - - // Iterate the blocks and dequeue - auto index = firstIndex; - BlockIndexHeader* localBlockIndex; - auto indexIndex = get_block_index_index_for_index(index, localBlockIndex); - do { - auto blockStartIndex = index; - auto endIndex = - (index & ~static_cast(BLOCK_SIZE - 1)) + static_cast(BLOCK_SIZE); - endIndex = details::circular_less_than( - firstIndex + static_cast(actualCount), endIndex) - ? firstIndex + static_cast(actualCount) - : endIndex; - - auto entry = localBlockIndex->index[indexIndex]; - auto block = entry->value.load(std::memory_order_relaxed); - if (MOODYCAMEL_NOEXCEPT_ASSIGN( - T, T &&, details::deref_noexcept(itemFirst) = std::move((*(*block)[index])))) { - while (index != endIndex) { - auto& el = *((*block)[index]); - *itemFirst++ = std::move(el); - el.~T(); - ++index; - } - } else { - MOODYCAMEL_TRY { - while (index != endIndex) { - auto& el = *((*block)[index]); - *itemFirst = std::move(el); - ++itemFirst; - el.~T(); - ++index; - } - } - MOODYCAMEL_CATCH (...) { - do { - entry = localBlockIndex->index[indexIndex]; - block = entry->value.load(std::memory_order_relaxed); - while (index != endIndex) { - (*block)[index++]->~T(); - } - - if (block->ConcurrentQueue::Block::template set_many_empty( - blockStartIndex, static_cast(endIndex - blockStartIndex))) { -#if MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX - debug::DebugLock lock(mutex); -#endif - entry->value.store(nullptr, std::memory_order_relaxed); - this->parent->add_block_to_free_list(block); - } - indexIndex = (indexIndex + 1) & (localBlockIndex->capacity - 1); - - blockStartIndex = index; - endIndex = (index & ~static_cast(BLOCK_SIZE - 1)) + - static_cast(BLOCK_SIZE); - endIndex = details::circular_less_than( - firstIndex + static_cast(actualCount), endIndex) - ? firstIndex + static_cast(actualCount) - : endIndex; - } while (index != firstIndex + actualCount); - - MOODYCAMEL_RETHROW; - } - } - if (block->ConcurrentQueue::Block::template set_many_empty( - blockStartIndex, static_cast(endIndex - blockStartIndex))) { - { -#if MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX - debug::DebugLock lock(mutex); -#endif - // Note that the set_many_empty above did a release, meaning that anybody who - // acquires the block - // we're about to free can use it safely since our writes (and reads!) will have - // happened-before then. - entry->value.store(nullptr, std::memory_order_relaxed); - } - this->parent->add_block_to_free_list(block); // releases the above store - } - indexIndex = (indexIndex + 1) & (localBlockIndex->capacity - 1); - } while (index != firstIndex + actualCount); - - return actualCount; - } else { - this->dequeueOvercommit.fetch_add(desiredCount, std::memory_order_release); - } - } - - return 0; - } - - private: - // The block size must be > 1, so any number with the low bit set is an invalid block base index - static const index_t INVALID_BLOCK_BASE = 1; - - struct BlockIndexEntry { - std::atomic key; - std::atomic value; - }; - - struct BlockIndexHeader { - size_t capacity; - std::atomic tail; - BlockIndexEntry* entries; - BlockIndexEntry** index; - BlockIndexHeader* prev; - }; - - template - inline bool insert_block_index_entry(BlockIndexEntry*& idxEntry, index_t blockStartIndex) { - auto localBlockIndex = blockIndex.load( - std::memory_order_relaxed); // We're the only writer thread, relaxed is OK - auto newTail = (localBlockIndex->tail.load(std::memory_order_relaxed) + 1) & - (localBlockIndex->capacity - 1); - idxEntry = localBlockIndex->index[newTail]; - if (idxEntry->key.load(std::memory_order_relaxed) == INVALID_BLOCK_BASE || - idxEntry->value.load(std::memory_order_relaxed) == nullptr) { - - idxEntry->key.store(blockStartIndex, std::memory_order_relaxed); - localBlockIndex->tail.store(newTail, std::memory_order_release); - return true; - } - - // No room in the old block index, try to allocate another one! - if (allocMode == CannotAlloc || !new_block_index()) { - return false; - } - localBlockIndex = blockIndex.load(std::memory_order_relaxed); - newTail = (localBlockIndex->tail.load(std::memory_order_relaxed) + 1) & - (localBlockIndex->capacity - 1); - idxEntry = localBlockIndex->index[newTail]; - assert(idxEntry->key.load(std::memory_order_relaxed) == INVALID_BLOCK_BASE); - idxEntry->key.store(blockStartIndex, std::memory_order_relaxed); - localBlockIndex->tail.store(newTail, std::memory_order_release); - return true; - } - - inline void rewind_block_index_tail() { - auto localBlockIndex = blockIndex.load(std::memory_order_relaxed); - localBlockIndex->tail.store((localBlockIndex->tail.load(std::memory_order_relaxed) - 1) & - (localBlockIndex->capacity - 1), - std::memory_order_relaxed); - } - - inline BlockIndexEntry* get_block_index_entry_for_index(index_t index) const { - BlockIndexHeader* localBlockIndex; - auto idx = get_block_index_index_for_index(index, localBlockIndex); - return localBlockIndex->index[idx]; - } - - inline size_t get_block_index_index_for_index(index_t index, - BlockIndexHeader*& localBlockIndex) const { -#if MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX - debug::DebugLock lock(mutex); -#endif - index &= ~static_cast(BLOCK_SIZE - 1); - localBlockIndex = blockIndex.load(std::memory_order_acquire); - auto tail = localBlockIndex->tail.load(std::memory_order_acquire); - auto tailBase = localBlockIndex->index[tail]->key.load(std::memory_order_relaxed); - assert(tailBase != INVALID_BLOCK_BASE); - // Note: Must use division instead of shift because the index may wrap around, causing a - // negative - // offset, whose negativity we want to preserve - auto offset = static_cast( - static_cast::type>(index - tailBase) / BLOCK_SIZE); - size_t idx = (tail + offset) & (localBlockIndex->capacity - 1); - assert(localBlockIndex->index[idx]->key.load(std::memory_order_relaxed) == index && - localBlockIndex->index[idx]->value.load(std::memory_order_relaxed) != nullptr); - return idx; - } - - bool new_block_index() { - auto prev = blockIndex.load(std::memory_order_relaxed); - size_t prevCapacity = prev == nullptr ? 0 : prev->capacity; - auto entryCount = prev == nullptr ? nextBlockIndexCapacity : prevCapacity; - auto raw = static_cast((Traits::malloc)( - sizeof(BlockIndexHeader) + std::alignment_of::value - 1 + - sizeof(BlockIndexEntry) * entryCount + std::alignment_of::value - 1 + - sizeof(BlockIndexEntry*) * nextBlockIndexCapacity)); - if (raw == nullptr) { - return false; - } - - auto header = new (raw) BlockIndexHeader; - auto entries = reinterpret_cast( - details::align_for(raw + sizeof(BlockIndexHeader))); - auto index = reinterpret_cast(details::align_for( - reinterpret_cast(entries) + sizeof(BlockIndexEntry) * entryCount)); - if (prev != nullptr) { - auto prevTail = prev->tail.load(std::memory_order_relaxed); - auto prevPos = prevTail; - size_t i = 0; - do { - prevPos = (prevPos + 1) & (prev->capacity - 1); - index[i++] = prev->index[prevPos]; - } while (prevPos != prevTail); - assert(i == prevCapacity); - } - for (size_t i = 0; i != entryCount; ++i) { - new (entries + i) BlockIndexEntry; - entries[i].key.store(INVALID_BLOCK_BASE, std::memory_order_relaxed); - index[prevCapacity + i] = entries + i; - } - header->prev = prev; - header->entries = entries; - header->index = index; - header->capacity = nextBlockIndexCapacity; - header->tail.store((prevCapacity - 1) & (nextBlockIndexCapacity - 1), - std::memory_order_relaxed); - - blockIndex.store(header, std::memory_order_release); - - nextBlockIndexCapacity <<= 1; - - return true; - } - - private: - size_t nextBlockIndexCapacity; - std::atomic blockIndex; - -#ifdef MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED - public: - details::ThreadExitListener threadExitListener; - private: -#endif - -#ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG - public: - ImplicitProducer* nextImplicitProducer; - private: -#endif - -#if MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX - mutable debug::DebugMutex mutex; -#endif -#if MCDBGQ_TRACKMEM - friend struct MemStats; -#endif - }; - - ////////////////////////////////// - // Block pool manipulation - ////////////////////////////////// - - void populate_initial_block_list(size_t blockCount) { - initialBlockPoolSize = blockCount; - if (initialBlockPoolSize == 0) { - initialBlockPool = nullptr; - return; - } - - initialBlockPool = create_array(blockCount); - if (initialBlockPool == nullptr) { - initialBlockPoolSize = 0; - } - for (size_t i = 0; i < initialBlockPoolSize; ++i) { - initialBlockPool[i].dynamicallyAllocated = false; - } - } - - inline Block* try_get_block_from_initial_pool() { - if (initialBlockPoolIndex.load(std::memory_order_relaxed) >= initialBlockPoolSize) { - return nullptr; - } - - auto index = initialBlockPoolIndex.fetch_add(1, std::memory_order_relaxed); - - return index < initialBlockPoolSize ? (initialBlockPool + index) : nullptr; - } - - inline void add_block_to_free_list(Block* block) { -#if MCDBGQ_TRACKMEM - block->owner = nullptr; -#endif - freeList.add(block); - } - - inline void add_blocks_to_free_list(Block* block) { - while (block != nullptr) { - auto next = block->next; - add_block_to_free_list(block); - block = next; - } - } - - inline Block* try_get_block_from_free_list() { return freeList.try_get(); } - - // Gets a free block from one of the memory pools, or allocates a new one (if applicable) - template - Block* requisition_block() { - auto block = try_get_block_from_initial_pool(); - if (block != nullptr) { - return block; - } - - block = try_get_block_from_free_list(); - if (block != nullptr) { - return block; - } - - if (canAlloc == CanAlloc) { - return create(); - } - - return nullptr; - } - - -#if MCDBGQ_TRACKMEM - public: - struct MemStats { - size_t allocatedBlocks; - size_t usedBlocks; - size_t freeBlocks; - size_t ownedBlocksExplicit; - size_t ownedBlocksImplicit; - size_t implicitProducers; - size_t explicitProducers; - size_t elementsEnqueued; - size_t blockClassBytes; - size_t queueClassBytes; - size_t implicitBlockIndexBytes; - size_t explicitBlockIndexBytes; - - friend class ConcurrentQueue; - - private: - static MemStats getFor(ConcurrentQueue* q) { - MemStats stats = { 0 }; - - stats.elementsEnqueued = q->size_approx(); - - auto block = q->freeList.head_unsafe(); - while (block != nullptr) { - ++stats.allocatedBlocks; - ++stats.freeBlocks; - block = block->freeListNext.load(std::memory_order_relaxed); - } - - for (auto ptr = q->producerListTail.load(std::memory_order_acquire); ptr != nullptr; - ptr = ptr->next_prod()) { - bool implicit = dynamic_cast(ptr) != nullptr; - stats.implicitProducers += implicit ? 1 : 0; - stats.explicitProducers += implicit ? 0 : 1; - - if (implicit) { - auto prod = static_cast(ptr); - stats.queueClassBytes += sizeof(ImplicitProducer); - auto head = prod->headIndex.load(std::memory_order_relaxed); - auto tail = prod->tailIndex.load(std::memory_order_relaxed); - auto hash = prod->blockIndex.load(std::memory_order_relaxed); - if (hash != nullptr) { - for (size_t i = 0; i != hash->capacity; ++i) { - if (hash->index[i]->key.load(std::memory_order_relaxed) != - ImplicitProducer::INVALID_BLOCK_BASE && - hash->index[i]->value.load(std::memory_order_relaxed) != nullptr) { - ++stats.allocatedBlocks; - ++stats.ownedBlocksImplicit; - } - } - stats.implicitBlockIndexBytes += - hash->capacity * sizeof(typename ImplicitProducer::BlockIndexEntry); - for (; hash != nullptr; hash = hash->prev) { - stats.implicitBlockIndexBytes += - sizeof(typename ImplicitProducer::BlockIndexHeader) + - hash->capacity * sizeof(typename ImplicitProducer::BlockIndexEntry*); - } - } - for (; details::circular_less_than(head, tail); head += BLOCK_SIZE) { - //auto block = prod->get_block_index_entry_for_index(head); - ++stats.usedBlocks; - } - } else { - auto prod = static_cast(ptr); - stats.queueClassBytes += sizeof(ExplicitProducer); - auto tailBlock = prod->tailBlock; - bool wasNonEmpty = false; - if (tailBlock != nullptr) { - auto block = tailBlock; - do { - ++stats.allocatedBlocks; - if (!block->ConcurrentQueue::Block::template is_empty() || - wasNonEmpty) { - ++stats.usedBlocks; - wasNonEmpty = wasNonEmpty || block != tailBlock; - } - ++stats.ownedBlocksExplicit; - block = block->next; - } while (block != tailBlock); - } - auto index = prod->blockIndex.load(std::memory_order_relaxed); - while (index != nullptr) { - stats.explicitBlockIndexBytes += - sizeof(typename ExplicitProducer::BlockIndexHeader) + - index->size * sizeof(typename ExplicitProducer::BlockIndexEntry); - index = static_cast(index->prev); - } - } - } - - auto freeOnInitialPool = - q->initialBlockPoolIndex.load(std::memory_order_relaxed) >= q->initialBlockPoolSize - ? 0 - : q->initialBlockPoolSize - q->initialBlockPoolIndex.load(std::memory_order_relaxed); - stats.allocatedBlocks += freeOnInitialPool; - stats.freeBlocks += freeOnInitialPool; - - stats.blockClassBytes = sizeof(Block) * stats.allocatedBlocks; - stats.queueClassBytes += sizeof(ConcurrentQueue); - - return stats; - } - }; - - // For debugging only. Not thread-safe. - MemStats getMemStats() { return MemStats::getFor(this); } - - private: - friend struct MemStats; -#endif - - ////////////////////////////////// - // Producer list manipulation - ////////////////////////////////// - - ProducerBase* recycle_or_create_producer(bool isExplicit) { - bool recycled; - return recycle_or_create_producer(isExplicit, recycled); - } - - ProducerBase* recycle_or_create_producer(bool isExplicit, bool& recycled) { -#if MCDBGQ_NOLOCKFREE_IMPLICITPRODHASH - debug::DebugLock lock(implicitProdMutex); -#endif - // Try to re-use one first - for (auto ptr = producerListTail.load(std::memory_order_acquire); ptr != nullptr; - ptr = ptr->next_prod()) { - if (ptr->inactive.load(std::memory_order_relaxed) && ptr->isExplicit == isExplicit) { - bool expected = true; - if (ptr->inactive.compare_exchange_strong(expected, /* desired */ false, - std::memory_order_acquire, - std::memory_order_relaxed)) { - // We caught one! It's been marked as activated, the caller can have it - recycled = true; - return ptr; - } - } - } - - recycled = false; - return add_producer(isExplicit ? static_cast(create(this)) - : create(this)); - } - - ProducerBase* add_producer(ProducerBase* producer) { - // Handle failed memory allocation - if (producer == nullptr) { - return nullptr; - } - - producerCount.fetch_add(1, std::memory_order_relaxed); - - // Add it to the lock-free list - auto prevTail = producerListTail.load(std::memory_order_relaxed); - do { - producer->next = prevTail; - } while (!producerListTail.compare_exchange_weak(prevTail, producer, std::memory_order_release, - std::memory_order_relaxed)); - -#ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG - if (producer->isExplicit) { - auto prevTailExplicit = explicitProducers.load(std::memory_order_relaxed); - do { - static_cast(producer)->nextExplicitProducer = prevTailExplicit; - } while (!explicitProducers.compare_exchange_weak( - prevTailExplicit, static_cast(producer), - std::memory_order_release, std::memory_order_relaxed)); - } else { - auto prevTailImplicit = implicitProducers.load(std::memory_order_relaxed); - do { - static_cast(producer)->nextImplicitProducer = prevTailImplicit; - } while (!implicitProducers.compare_exchange_weak( - prevTailImplicit, static_cast(producer), - std::memory_order_release, std::memory_order_relaxed)); - } -#endif - - return producer; - } - - void reown_producers() { - // After another instance is moved-into/swapped-with this one, all the - // producers we stole still think their parents are the other queue. - // So fix them up! - for (auto ptr = producerListTail.load(std::memory_order_relaxed); ptr != nullptr; - ptr = ptr->next_prod()) { - ptr->parent = this; - } - } - - ////////////////////////////////// - // Implicit producer hash - ////////////////////////////////// - - struct ImplicitProducerKVP { - std::atomic key; - ImplicitProducer* value; // No need for atomicity since it's only read by the thread that sets - // it in the first place - - ImplicitProducerKVP() { } - - ImplicitProducerKVP(ImplicitProducerKVP&& other) MOODYCAMEL_NOEXCEPT { - key.store(other.key.load(std::memory_order_relaxed), std::memory_order_relaxed); - value = other.value; - } - - inline ImplicitProducerKVP& operator=(ImplicitProducerKVP&& other) MOODYCAMEL_NOEXCEPT { - swap(other); - return *this; - } - - inline void swap(ImplicitProducerKVP& other) MOODYCAMEL_NOEXCEPT { - if (this != &other) { - details::swap_relaxed(key, other.key); - std::swap(value, other.value); - } - } - }; - - template - friend void moodycamel::swap(typename ConcurrentQueue::ImplicitProducerKVP&, - typename ConcurrentQueue::ImplicitProducerKVP&) - MOODYCAMEL_NOEXCEPT; - - struct ImplicitProducerHash { - size_t capacity; - ImplicitProducerKVP* entries; - ImplicitProducerHash* prev; - }; - - inline void populate_initial_implicit_producer_hash() { - if (INITIAL_IMPLICIT_PRODUCER_HASH_SIZE == 0) return; - - implicitProducerHashCount.store(0, std::memory_order_relaxed); - auto hash = &initialImplicitProducerHash; - hash->capacity = INITIAL_IMPLICIT_PRODUCER_HASH_SIZE; - hash->entries = &initialImplicitProducerHashEntries[0]; - for (size_t i = 0; i != INITIAL_IMPLICIT_PRODUCER_HASH_SIZE; ++i) { - initialImplicitProducerHashEntries[i] - .key.store(details::invalid_thread_id, std::memory_order_relaxed); - } - hash->prev = nullptr; - implicitProducerHash.store(hash, std::memory_order_relaxed); - } - - void swap_implicit_producer_hashes(ConcurrentQueue& other) { - if (INITIAL_IMPLICIT_PRODUCER_HASH_SIZE == 0) return; - - // Swap (assumes our implicit producer hash is initialized) - initialImplicitProducerHashEntries.swap(other.initialImplicitProducerHashEntries); - initialImplicitProducerHash.entries = &initialImplicitProducerHashEntries[0]; - other.initialImplicitProducerHash.entries = &other.initialImplicitProducerHashEntries[0]; - - details::swap_relaxed(implicitProducerHashCount, other.implicitProducerHashCount); - - details::swap_relaxed(implicitProducerHash, other.implicitProducerHash); - if (implicitProducerHash.load(std::memory_order_relaxed) == - &other.initialImplicitProducerHash) { - implicitProducerHash.store(&initialImplicitProducerHash, std::memory_order_relaxed); - } else { - ImplicitProducerHash* hash; - for (hash = implicitProducerHash.load(std::memory_order_relaxed); - hash->prev != &other.initialImplicitProducerHash; hash = hash->prev) { - continue; - } - hash->prev = &initialImplicitProducerHash; - } - if (other.implicitProducerHash.load(std::memory_order_relaxed) == - &initialImplicitProducerHash) { - other.implicitProducerHash.store(&other.initialImplicitProducerHash, - std::memory_order_relaxed); - } else { - ImplicitProducerHash* hash; - for (hash = other.implicitProducerHash.load(std::memory_order_relaxed); - hash->prev != &initialImplicitProducerHash; hash = hash->prev) { - continue; - } - hash->prev = &other.initialImplicitProducerHash; - } - } - - // Only fails (returns nullptr) if memory allocation fails - ImplicitProducer* get_or_add_implicit_producer() { - // Note that since the data is essentially thread-local (key is thread ID), - // there's a reduced need for fences (memory ordering is already consistent - // for any individual thread), except for the current table itself. - - // Start by looking for the thread ID in the current and all previous hash tables. - // If it's not found, it must not be in there yet, since this same thread would - // have added it previously to one of the tables that we traversed. - -// Code and algorithm adapted from -// http://preshing.com/20130605/the-worlds-simplest-lock-free-hash-table - -#if MCDBGQ_NOLOCKFREE_IMPLICITPRODHASH - debug::DebugLock lock(implicitProdMutex); -#endif - - auto id = details::thread_id(); - auto hashedId = details::hash_thread_id(id); - - auto mainHash = implicitProducerHash.load(std::memory_order_acquire); - for (auto hash = mainHash; hash != nullptr; hash = hash->prev) { - // Look for the id in this hash - auto index = hashedId; - while (true) { // Not an infinite loop because at least one slot is free in the hash table - index &= hash->capacity - 1; - - auto probedKey = hash->entries[index].key.load(std::memory_order_relaxed); - if (probedKey == id) { - // Found it! If we had to search several hashes deep, though, we should lazily add it - // to the current main hash table to avoid the extended search next time. - // Note there's guaranteed to be room in the current hash table since every subsequent - // table implicitly reserves space for all previous tables (there's only one - // implicitProducerHashCount). - auto value = hash->entries[index].value; - if (hash != mainHash) { - index = hashedId; - while (true) { - index &= mainHash->capacity - 1; - probedKey = mainHash->entries[index].key.load(std::memory_order_relaxed); - auto empty = details::invalid_thread_id; -#ifdef MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED - auto reusable = details::invalid_thread_id2; - if ((probedKey == empty && mainHash->entries[index].key.compare_exchange_strong( - empty, id, std::memory_order_relaxed)) || - (probedKey == reusable && mainHash->entries[index].key.compare_exchange_strong( - reusable, id, std::memory_order_acquire))) { -#else - if ((probedKey == empty && mainHash->entries[index].key.compare_exchange_strong( - empty, id, std::memory_order_relaxed))) { -#endif - mainHash->entries[index].value = value; - break; - } - ++index; - } - } - - return value; - } - if (probedKey == details::invalid_thread_id) { - break; // Not in this hash table - } - ++index; - } - } - - // Insert! - auto newCount = 1 + implicitProducerHashCount.fetch_add(1, std::memory_order_relaxed); - while (true) { - if (newCount >= (mainHash->capacity >> 1) && - !implicitProducerHashResizeInProgress.test_and_set(std::memory_order_acquire)) { - // We've acquired the resize lock, try to allocate a bigger hash table. - // Note the acquire fence synchronizes with the release fence at the end of this block, and - // hence when - // we reload implicitProducerHash it must be the most recent version (it only gets changed - // within this - // locked block). - mainHash = implicitProducerHash.load(std::memory_order_acquire); - if (newCount >= (mainHash->capacity >> 1)) { - auto newCapacity = mainHash->capacity << 1; - while (newCount >= (newCapacity >> 1)) { - newCapacity <<= 1; - } - auto raw = static_cast((Traits::malloc)( - sizeof(ImplicitProducerHash) + std::alignment_of::value - 1 + - sizeof(ImplicitProducerKVP) * newCapacity)); - if (raw == nullptr) { - // Allocation failed - implicitProducerHashCount.fetch_add(-1, std::memory_order_relaxed); - implicitProducerHashResizeInProgress.clear(std::memory_order_relaxed); - return nullptr; - } - - auto newHash = new (raw) ImplicitProducerHash; - newHash->capacity = newCapacity; - newHash->entries = reinterpret_cast( - details::align_for(raw + sizeof(ImplicitProducerHash))); - for (size_t i = 0; i != newCapacity; ++i) { - new (newHash->entries + i) ImplicitProducerKVP; - newHash->entries[i].key.store(details::invalid_thread_id, std::memory_order_relaxed); - } - newHash->prev = mainHash; - implicitProducerHash.store(newHash, std::memory_order_release); - implicitProducerHashResizeInProgress.clear(std::memory_order_release); - mainHash = newHash; - } else { - implicitProducerHashResizeInProgress.clear(std::memory_order_release); - } - } - - // If it's < three-quarters full, add to the old one anyway so that we don't have to wait for - // the next table - // to finish being allocated by another thread (and if we just finished allocating above, the - // condition will - // always be true) - if (newCount < (mainHash->capacity >> 1) + (mainHash->capacity >> 2)) { - bool recycled; - auto producer = static_cast(recycle_or_create_producer(false, recycled)); - if (producer == nullptr) { - implicitProducerHashCount.fetch_add(-1, std::memory_order_relaxed); - return nullptr; - } - if (recycled) { - implicitProducerHashCount.fetch_add(-1, std::memory_order_relaxed); - } - -#ifdef MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED - producer->threadExitListener.callback = - &ConcurrentQueue::implicit_producer_thread_exited_callback; - producer->threadExitListener.userData = producer; - details::ThreadExitNotifier::subscribe(&producer->threadExitListener); -#endif - - auto index = hashedId; - while (true) { - index &= mainHash->capacity - 1; - auto probedKey = mainHash->entries[index].key.load(std::memory_order_relaxed); - - auto empty = details::invalid_thread_id; -#ifdef MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED - auto reusable = details::invalid_thread_id2; - if ((probedKey == empty && mainHash->entries[index].key.compare_exchange_strong( - empty, id, std::memory_order_relaxed)) || - (probedKey == reusable && mainHash->entries[index].key.compare_exchange_strong( - reusable, id, std::memory_order_acquire))) { -#else - if ((probedKey == empty && mainHash->entries[index].key.compare_exchange_strong( - empty, id, std::memory_order_relaxed))) { -#endif - mainHash->entries[index].value = producer; - break; - } - ++index; - } - return producer; - } - - // Hmm, the old hash is quite full and somebody else is busy allocating a new one. - // We need to wait for the allocating thread to finish (if it succeeds, we add, if not, - // we try to allocate ourselves). - mainHash = implicitProducerHash.load(std::memory_order_acquire); - } - } - -#ifdef MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED - void implicit_producer_thread_exited(ImplicitProducer* producer) { - // Remove from thread exit listeners - details::ThreadExitNotifier::unsubscribe(&producer->threadExitListener); - - // Remove from hash -#if MCDBGQ_NOLOCKFREE_IMPLICITPRODHASH - debug::DebugLock lock(implicitProdMutex); -#endif - auto hash = implicitProducerHash.load(std::memory_order_acquire); - assert(hash != nullptr); // The thread exit listener is only registered if we were added to a - // hash in the first place - auto id = details::thread_id(); - auto hashedId = details::hash_thread_id(id); - details::thread_id_t probedKey; - - // We need to traverse all the hashes just in case other threads aren't on the current one yet - // and are - // trying to add an entry thinking there's a free slot (because they reused a producer) - for (; hash != nullptr; hash = hash->prev) { - auto index = hashedId; - do { - index &= hash->capacity - 1; - probedKey = hash->entries[index].key.load(std::memory_order_relaxed); - if (probedKey == id) { - hash->entries[index].key.store(details::invalid_thread_id2, std::memory_order_release); - break; - } - ++index; - } while (probedKey != details::invalid_thread_id); // Can happen if the hash has changed but - // we weren't put back in it yet, or if we - // weren't added to this hash in the first - // place - } - - // Mark the queue as being recyclable - producer->inactive.store(true, std::memory_order_release); - } - - static void implicit_producer_thread_exited_callback(void* userData) { - auto producer = static_cast(userData); - auto queue = producer->parent; - queue->implicit_producer_thread_exited(producer); - } -#endif - - ////////////////////////////////// - // Utility functions - ////////////////////////////////// - - template - static inline U* create_array(size_t count) { - assert(count > 0); - auto p = static_cast((Traits::malloc)(sizeof(U) * count)); - if (p == nullptr) { - return nullptr; - } - - for (size_t i = 0; i != count; ++i) { - new (p + i) U(); - } - return p; - } - - template - static inline void destroy_array(U* p, size_t count) { - if (p != nullptr) { - assert(count > 0); - for (size_t i = count; i != 0; ) { - (p + --i)->~U(); - } - //(Traits::free)(p); - } - } - - template - static inline U* create() { - auto p = (Traits::malloc)(sizeof(U)); - return p != nullptr ? new (p) U : nullptr; - } - - template - static inline U* create(A1&& a1) { - auto p = (Traits::malloc)(sizeof(U)); - return p != nullptr ? new (p) U(std::forward(a1)) : nullptr; - } - - template - static inline void destroy(U* p) { - if (p != nullptr) { - p->~U(); - } - (Traits::free)(p); - } - -private: - std::atomic producerListTail; - std::atomic producerCount; - - std::atomic initialBlockPoolIndex; - Block* initialBlockPool; - size_t initialBlockPoolSize; - -#if !MCDBGQ_USEDEBUGFREELIST - FreeList freeList; -#else - debug::DebugFreeList freeList; -#endif - - std::atomic implicitProducerHash; - std::atomic implicitProducerHashCount; // Number of slots logically used - ImplicitProducerHash initialImplicitProducerHash; - std::array - initialImplicitProducerHashEntries; - std::atomic_flag implicitProducerHashResizeInProgress; - - std::atomic nextExplicitConsumerId; - std::atomic globalExplicitConsumerOffset; - -#if MCDBGQ_NOLOCKFREE_IMPLICITPRODHASH - debug::DebugMutex implicitProdMutex; -#endif - -#ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG - std::atomic explicitProducers; - std::atomic implicitProducers; -#endif -}; - -template -ProducerToken::ProducerToken(ConcurrentQueue& queue) - : producer(queue.recycle_or_create_producer(true)) { - if (producer != nullptr) { - producer->token = this; - } -} - -template -ProducerToken::ProducerToken(BlockingConcurrentQueue& queue) - : producer( - reinterpret_cast*>(&queue)->recycle_or_create_producer(true)) { - if (producer != nullptr) { - producer->token = this; - } -} - -template -ConsumerToken::ConsumerToken(ConcurrentQueue& queue) - : itemsConsumedFromCurrent(0), currentProducer(nullptr), desiredProducer(nullptr) { - initialOffset = queue.nextExplicitConsumerId.fetch_add(1, std::memory_order_release); - lastKnownGlobalOffset = -1; -} - -template -ConsumerToken::ConsumerToken(BlockingConcurrentQueue& queue) - : itemsConsumedFromCurrent(0), currentProducer(nullptr), desiredProducer(nullptr) { - initialOffset = reinterpret_cast*>(&queue) - ->nextExplicitConsumerId.fetch_add(1, std::memory_order_release); - lastKnownGlobalOffset = -1; -} - -template -inline void swap(ConcurrentQueue& a, ConcurrentQueue& b) MOODYCAMEL_NOEXCEPT { - a.swap(b); -} - -inline void swap(ProducerToken& a, ProducerToken& b) MOODYCAMEL_NOEXCEPT { a.swap(b); } - -inline void swap(ConsumerToken& a, ConsumerToken& b) MOODYCAMEL_NOEXCEPT { a.swap(b); } - -template -inline void swap(typename ConcurrentQueue::ImplicitProducerKVP& a, - typename ConcurrentQueue::ImplicitProducerKVP& b) MOODYCAMEL_NOEXCEPT { - a.swap(b); -} -} - -#if defined(__GNUC__) -#pragma GCC diagnostic pop -#endif - diff --git a/contrib/deneva/system/global.cpp b/contrib/deneva/system/global.cpp deleted file mode 100644 index 55d8daf9..00000000 --- a/contrib/deneva/system/global.cpp +++ /dev/null @@ -1,243 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "global.h" -#include "mem_alloc.h" -#include "stats.h" -#include "sim_manager.h" -#include "manager.h" -#include "query.h" -#include "client_query.h" -#include "occ.h" -#include "bocc.h" -#include "focc.h" -#include "ssi.h" -#include "wsi.h" -#include "transport.h" -#include "work_queue.h" -#include "abort_queue.h" -#include "client_query.h" -#include "client_txn.h" -#include "logger.h" -#include "maat.h" -#include "manager.h" -#include "mem_alloc.h" -#include "msg_queue.h" -#include "pool.h" -#include "query.h" -#include "sequencer.h" -#include "sim_manager.h" -#include "stats.h" -#include "transport.h" -#include "txn_table.h" -#include "work_queue.h" -#include "client_txn.h" -#include "sequencer.h" -#include "logger.h" -#include "maat.h" -#include "sundial.h" -#include "http.h" - - -#include -#include "da_block_queue.h" - - -mem_alloc mem_allocator; -Stats stats; -SimManager * simulation; -Manager glob_manager; -Query_queue query_queue; -Client_query_queue client_query_queue; -OptCC occ_man; -Focc focc_man; -Bocc bocc_man; -Maat maat_man; -ssi ssi_man; -wsi wsi_man; -Sundial sundial_man; -Transport tport_man; -TxnManPool txn_man_pool; -TxnPool txn_pool; -AccessPool access_pool; -TxnTablePool txn_table_pool; -MsgPool msg_pool; -RowPool row_pool; -QryPool qry_pool; -TxnTable txn_table; -QWorkQueue work_queue; -AbortQueue abort_queue; -MessageQueue msg_queue; -Client_txn client_man; -Sequencer seq_man; -Logger logger; -TimeTable time_table; -InOutTable inout_table; -// QTcpQueue tcp_queue; -TcpTimestamp tcp_ts; -boost::lockfree::queue> da_query_queue{100}; -DABlockQueue da_gen_qry_queue(50); -bool is_server=false; -map da_start_stamp_tab; -set da_start_trans_tab; -map da_stamp_tab; -set already_abort_tab; -string DA_history_mem; -bool abort_history; -ofstream commit_file; -ofstream abort_file; - -bool volatile warmup_done = false; -bool volatile enable_thread_mem_pool = false; -pthread_barrier_t warmup_bar; - -ts_t g_abort_penalty = ABORT_PENALTY; -ts_t g_abort_penalty_max = ABORT_PENALTY_MAX; -bool g_central_man = CENTRAL_MAN; -UInt32 g_ts_alloc = TS_ALLOC; -bool g_key_order = KEY_ORDER; -bool g_ts_batch_alloc = TS_BATCH_ALLOC; -UInt32 g_ts_batch_num = TS_BATCH_NUM; -int32_t g_inflight_max = MAX_TXN_IN_FLIGHT; -//int32_t g_inflight_max = MAX_TXN_IN_FLIGHT/NODE_CNT; -uint64_t g_msg_size = MSG_SIZE_MAX; -int32_t g_load_per_server = LOAD_PER_SERVER; - -bool g_hw_migrate = HW_MIGRATE; - -volatile UInt64 g_row_id = 0; -bool g_part_alloc = PART_ALLOC; -bool g_mem_pad = MEM_PAD; -UInt32 g_cc_alg = CC_ALG; -ts_t g_query_intvl = QUERY_INTVL; -UInt32 g_part_per_txn = PART_PER_TXN; -double g_perc_multi_part = PERC_MULTI_PART; -double g_txn_read_perc = 1.0 - TXN_WRITE_PERC; -double g_txn_write_perc = TXN_WRITE_PERC; -double g_tup_read_perc = 1.0 - TUP_WRITE_PERC; -double g_tup_write_perc = TUP_WRITE_PERC; -double g_zipf_theta = ZIPF_THETA; -double g_data_perc = DATA_PERC; -double g_access_perc = ACCESS_PERC; -bool g_prt_lat_distr = PRT_LAT_DISTR; -UInt32 g_node_id = 0; -UInt32 g_node_cnt = NODE_CNT; -UInt32 g_part_cnt = PART_CNT; -UInt32 g_virtual_part_cnt = VIRTUAL_PART_CNT; -UInt32 g_core_cnt = CORE_CNT; - -#if CC_ALG == HSTORE || CC_ALG == HSTORE_SPEC -UInt32 g_thread_cnt = PART_CNT/NODE_CNT; -#else -UInt32 g_thread_cnt = THREAD_CNT; -#endif -UInt32 g_rem_thread_cnt = REM_THREAD_CNT; -UInt32 g_abort_thread_cnt = 1; -#if LOGGING -UInt32 g_logger_thread_cnt = 1; -#else -UInt32 g_logger_thread_cnt = 0; -#endif -UInt32 g_send_thread_cnt = SEND_THREAD_CNT; -#if CC_ALG == CALVIN -// sequencer + scheduler thread -UInt32 g_total_thread_cnt = g_thread_cnt + g_rem_thread_cnt + g_send_thread_cnt + g_abort_thread_cnt + g_logger_thread_cnt + 3; -#else -UInt32 g_total_thread_cnt = g_thread_cnt + g_rem_thread_cnt + g_send_thread_cnt + g_abort_thread_cnt + g_logger_thread_cnt + 1; -#endif - -UInt32 g_total_client_thread_cnt = g_client_thread_cnt + g_client_rem_thread_cnt + g_client_send_thread_cnt; -UInt32 g_total_node_cnt = g_node_cnt + g_client_node_cnt + g_repl_cnt*g_node_cnt; -UInt64 g_synth_table_size = SYNTH_TABLE_SIZE; -UInt32 g_req_per_query = REQ_PER_QUERY; -bool g_strict_ppt = STRICT_PPT == 1; -UInt32 g_field_per_tuple = FIELD_PER_TUPLE; -UInt32 g_init_parallelism = INIT_PARALLELISM; -UInt32 g_client_node_cnt = CLIENT_NODE_CNT; -UInt32 g_client_thread_cnt = CLIENT_THREAD_CNT; -UInt32 g_client_rem_thread_cnt = CLIENT_REM_THREAD_CNT; -UInt32 g_client_send_thread_cnt = CLIENT_SEND_THREAD_CNT; -UInt32 g_servers_per_client = 0; -UInt32 g_clients_per_server = 0; -UInt32 g_server_start_node = 0; - -UInt32 g_this_thread_cnt = ISCLIENT ? g_client_thread_cnt : g_thread_cnt; -UInt32 g_this_rem_thread_cnt = ISCLIENT ? g_client_rem_thread_cnt : g_rem_thread_cnt; -UInt32 g_this_send_thread_cnt = ISCLIENT ? g_client_send_thread_cnt : g_send_thread_cnt; -UInt32 g_this_total_thread_cnt = ISCLIENT ? g_total_client_thread_cnt : g_total_thread_cnt; - -UInt32 g_max_txn_per_part = MAX_TXN_PER_PART; -UInt32 g_network_delay = NETWORK_DELAY; -UInt64 g_done_timer = DONE_TIMER; -UInt64 g_batch_time_limit = BATCH_TIMER; -UInt64 g_seq_batch_time_limit = SEQ_BATCH_TIMER; -UInt64 g_prog_timer = PROG_TIMER; -UInt64 g_warmup_timer = WARMUP_TIMER; -UInt64 g_msg_time_limit = MSG_TIME_LIMIT; - -UInt64 g_log_buf_max = LOG_BUF_MAX; -UInt64 g_log_flush_timeout = LOG_BUF_TIMEOUT; - -// MVCC -UInt64 g_max_read_req = MAX_READ_REQ; -UInt64 g_max_pre_req = MAX_PRE_REQ; -UInt64 g_his_recycle_len = HIS_RECYCLE_LEN; - -// CALVIN -UInt32 g_seq_thread_cnt = SEQ_THREAD_CNT; - -// SUNDIAL -uint32_t g_max_num_waits = MAX_NUM_WAITS; - -double g_mpr = MPR; -double g_mpitem = MPIR; - -// PPS (Product-Part-Supplier) -UInt32 g_max_parts_per = MAX_PPS_PARTS_PER; -UInt32 g_max_part_key = MAX_PPS_PART_KEY; -UInt32 g_max_product_key = MAX_PPS_PRODUCT_KEY; -UInt32 g_max_supplier_key = MAX_PPS_SUPPLIER_KEY; -double g_perc_getparts = PERC_PPS_GETPART; -double g_perc_getproducts = PERC_PPS_GETPRODUCT; -double g_perc_getsuppliers = PERC_PPS_GETSUPPLIER; -double g_perc_getpartbyproduct = PERC_PPS_GETPARTBYPRODUCT; -double g_perc_getpartbysupplier = PERC_PPS_GETPARTBYSUPPLIER; -double g_perc_orderproduct = PERC_PPS_ORDERPRODUCT; -double g_perc_updateproductpart = PERC_PPS_UPDATEPRODUCTPART; -double g_perc_updatepart = PERC_PPS_UPDATEPART; - -// TPCC -UInt32 g_num_wh = NUM_WH; -double g_perc_payment = PERC_PAYMENT; -bool g_wh_update = WH_UPDATE; -char * output_file = NULL; -char * input_file = NULL; -char * txn_file = NULL; - -#if TPCC_SMALL -UInt32 g_max_items = MAX_ITEMS_SMALL; -UInt32 g_cust_per_dist = CUST_PER_DIST_SMALL; -#else -UInt32 g_max_items = MAX_ITEMS_NORM; -UInt32 g_cust_per_dist = CUST_PER_DIST_NORM; -#endif -UInt32 g_max_items_per_txn = MAX_ITEMS_PER_TXN; -UInt32 g_dist_per_wh = DIST_PER_WH; - -UInt32 g_repl_type = REPL_TYPE; -UInt32 g_repl_cnt = REPLICA_CNT; - -map g_params; diff --git a/contrib/deneva/system/global.h b/contrib/deneva/system/global.h deleted file mode 100644 index 6bffd819..00000000 --- a/contrib/deneva/system/global.h +++ /dev/null @@ -1,392 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _GLOBAL_H_ -#define _GLOBAL_H_ - -#define __STDC_LIMIT_MACROS -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "pthread.h" -#include "config.h" -#include "stats.h" -//#include "work_queue.h" -#include "pool.h" -#include "txn_table.h" -#include "logger.h" -#include "sim_manager.h" - -#include -#include "da_block_queue.h" -//#include "maat.h" - -using namespace std; - -class mem_alloc; -class Stats; -class SimManager; -class Manager; -class Query_queue; -class OptCC; -class Focc; -class Bocc; -class ssi; -class wsi; -class Maat; -class Sundial; -class Transport; -class Remote_query; -class TxnManPool; -class TxnPool; -class AccessPool; -class TxnTablePool; -class MsgPool; -class RowPool; -class QryPool; -class TxnTable; -class QWorkQueue; -class AbortQueue; -class MessageQueue; -class Client_query_queue; -class Client_txn; -class Sequencer; -class Logger; -class TimeTable; -class InOutTable; - -class DAQuery; -class DABlockQueue; -class KeyXidCache; -class RtsCache; -// class QTcpQueue; -class TcpTimestamp; - -typedef uint32_t UInt32; -typedef int32_t SInt32; -typedef uint64_t UInt64; -typedef int64_t SInt64; - -typedef uint64_t ts_t; // time stamp type - -/******************************************/ -// Global Data Structure -/******************************************/ -extern mem_alloc mem_allocator; -extern Stats stats; -extern SimManager * simulation; -extern Manager glob_manager; -extern Query_queue query_queue; -extern Client_query_queue client_query_queue; -extern OptCC occ_man; -extern Focc focc_man; -extern Bocc bocc_man; -extern ssi ssi_man; -extern wsi wsi_man; -extern Maat maat_man; -extern Sundial sundial_man; -extern Transport tport_man; -extern TxnManPool txn_man_pool; -extern TxnPool txn_pool; -extern AccessPool access_pool; -extern TxnTablePool txn_table_pool; -extern MsgPool msg_pool; -extern RowPool row_pool; -extern QryPool qry_pool; -extern TxnTable txn_table; -extern QWorkQueue work_queue; -extern AbortQueue abort_queue; -extern MessageQueue msg_queue; -extern Client_txn client_man; -extern Sequencer seq_man; -extern Logger logger; -extern TimeTable time_table; -extern InOutTable inout_table; - -// extern QTcpQueue tcp_queue; -extern TcpTimestamp tcp_ts; - -extern map g_params; - -extern bool volatile warmup_done; -extern bool volatile enable_thread_mem_pool; -extern pthread_barrier_t warmup_bar; - -/******************************************/ -// Client Global Params -/******************************************/ -extern UInt32 g_client_thread_cnt; -extern UInt32 g_client_rem_thread_cnt; -extern UInt32 g_client_send_thread_cnt; -extern UInt32 g_client_node_cnt; -extern UInt32 g_servers_per_client; -extern UInt32 g_clients_per_server; -extern UInt32 g_server_start_node; - -/******************************************/ -// Global Parameter -/******************************************/ -extern volatile UInt64 g_row_id; -extern bool g_part_alloc; -extern bool g_mem_pad; -extern bool g_prt_lat_distr; -extern UInt32 g_node_id; -extern UInt32 g_node_cnt; -extern UInt32 g_part_cnt; -extern UInt32 g_virtual_part_cnt; -extern UInt32 g_core_cnt; -extern UInt32 g_total_node_cnt; -extern UInt32 g_total_thread_cnt; -extern UInt32 g_total_client_thread_cnt; -extern UInt32 g_this_thread_cnt; -extern UInt32 g_this_rem_thread_cnt; -extern UInt32 g_this_send_thread_cnt; -extern UInt32 g_this_total_thread_cnt; -extern UInt32 g_thread_cnt; -extern UInt32 g_abort_thread_cnt; -extern UInt32 g_logger_thread_cnt; -extern UInt32 g_tcp_thread_cnt; -extern UInt32 g_send_thread_cnt; -extern UInt32 g_rem_thread_cnt; -extern ts_t g_abort_penalty; -extern ts_t g_abort_penalty_max; -extern bool g_central_man; -extern UInt32 g_ts_alloc; -extern bool g_key_order; -extern bool g_ts_batch_alloc; -extern UInt32 g_ts_batch_num; -extern int32_t g_inflight_max; -extern uint64_t g_msg_size; -extern uint64_t g_log_buf_max; -extern uint64_t g_log_flush_timeout; - -extern UInt32 g_max_txn_per_part; -extern int32_t g_load_per_server; - -extern bool g_hw_migrate; -extern UInt32 g_network_delay; -extern UInt64 g_done_timer; -extern UInt64 g_batch_time_limit; -extern UInt64 g_seq_batch_time_limit; -extern UInt64 g_prog_timer; -extern UInt64 g_warmup_timer; -extern UInt64 g_msg_time_limit; - -// MVCC -extern UInt64 g_max_read_req; -extern UInt64 g_max_pre_req; -extern UInt64 g_his_recycle_len; - -// YCSB -extern UInt32 g_cc_alg; -extern ts_t g_query_intvl; -extern UInt32 g_part_per_txn; -extern double g_perc_multi_part; -extern double g_txn_read_perc; -extern double g_txn_write_perc; -extern double g_tup_read_perc; -extern double g_tup_write_perc; -extern double g_zipf_theta; -extern double g_data_perc; -extern double g_access_perc; -extern UInt64 g_synth_table_size; -extern UInt32 g_req_per_query; -extern bool g_strict_ppt; -extern UInt32 g_field_per_tuple; -extern UInt32 g_init_parallelism; -extern double g_mpr; -extern double g_mpitem; - -// TPCC -extern UInt32 g_num_wh; -extern double g_perc_payment; -extern bool g_wh_update; -extern char * output_file; -extern char * input_file; -extern char * txn_file; -extern UInt32 g_max_items; -extern UInt32 g_dist_per_wh; -extern UInt32 g_cust_per_dist; -extern UInt32 g_max_items_per_txn; - -// PPS (Product-Part-Supplier) -extern UInt32 g_max_parts_per; -extern UInt32 g_max_part_key; -extern UInt32 g_max_product_key; -extern UInt32 g_max_supplier_key; -extern double g_perc_getparts; -extern double g_perc_getproducts; -extern double g_perc_getsuppliers; -extern double g_perc_getpartbyproduct; -extern double g_perc_getpartbysupplier; -extern double g_perc_orderproduct; -extern double g_perc_updateproductpart; -extern double g_perc_updatepart; - -extern boost::lockfree::queue> da_query_queue; -extern DABlockQueue da_gen_qry_queue; -extern bool is_server; -extern map da_start_stamp_tab; -extern set da_start_trans_tab; -extern map da_stamp_tab; -extern set already_abort_tab; -extern string DA_history_mem; -extern bool abort_history; -extern ofstream commit_file; -extern ofstream abort_file; -// CALVIN -extern UInt32 g_seq_thread_cnt; - -// SUNDIAL -extern uint32_t g_max_num_waits; - -// Replication -extern UInt32 g_repl_type; -extern UInt32 g_repl_cnt; - -enum RC { RCOK=0, Commit, Abort, WAIT, WAIT_REM, ERROR, FINISH, NONE}; -enum RemReqType { - INIT_DONE = 0, - RLK, - RULK, - CL_QRY, - RQRY, - RQRY_CONT, - RFIN, - RLK_RSP, - RULK_RSP, - RQRY_RSP, - RACK, - RACK_PREP, - RACK_FIN, - RTXN, - RTXN_CONT, - RINIT, - RPREPARE, - RPASS, - RFWD, - RDONE, - CL_RSP, - LOG_MSG, - LOG_MSG_RSP, - LOG_FLUSHED, - CALVIN_ACK, - NO_MSG -}; - -// Calvin -enum CALVIN_PHASE { - CALVIN_RW_ANALYSIS = 0, - CALVIN_LOC_RD, - CALVIN_SERVE_RD, - CALVIN_COLLECT_RD, - CALVIN_EXEC_WR, - CALVIN_DONE -}; - -/* Thread */ -typedef uint64_t txnid_t; - -/* Txn */ -typedef uint64_t txn_t; - -/* Table and Row */ -typedef uint64_t rid_t; // row id -typedef uint64_t pgid_t; // page id - - - -/* INDEX */ -enum latch_t {LATCH_EX, LATCH_SH, LATCH_NONE}; -// accessing type determines the latch type on nodes -enum idx_acc_t {INDEX_INSERT, INDEX_READ, INDEX_NONE}; -typedef uint64_t idx_key_t; // key id for index -typedef uint64_t (*func_ptr)(idx_key_t); // part_id func_ptr(index_key); - -/* general concurrency control */ -enum access_t {RD, WR, XP, SCAN}; -/* LOCK */ -enum lock_t {LOCK_EX = 0, LOCK_SH, LOCK_NONE, LOCK_COM}; -/* TIMESTAMP */ -enum TsType {R_REQ = 0, W_REQ, P_REQ, XP_REQ}; - -/*DA query build queue*/ -//queue query_build_queue; - - - -#define GET_THREAD_ID(id) (id % g_thread_cnt) -#define GET_NODE_ID(id) (id % g_node_cnt) -#define GET_PART_ID(t,n) (n) -#define GET_PART_ID_FROM_IDX(idx) (g_node_id + idx * g_node_cnt) -#define GET_PART_ID_IDX(p) (p / g_node_cnt) -#define ISSERVER (g_node_id < g_node_cnt) -#define ISSERVERN(id) (id < g_node_cnt) -#define ISCLIENT (g_node_id >= g_node_cnt && g_node_id < g_node_cnt + g_client_node_cnt) -#define ISREPLICA \ - (g_node_id >= g_node_cnt + g_client_node_cnt && \ - g_node_id < g_node_cnt + g_client_node_cnt + g_repl_cnt * g_node_cnt) -#define ISREPLICAN(id) \ - (id >= g_node_cnt + g_client_node_cnt && \ - id < g_node_cnt + g_client_node_cnt + g_repl_cnt * g_node_cnt) -#define ISCLIENTN(id) (id >= g_node_cnt && id < g_node_cnt + g_client_node_cnt) -#define IS_LOCAL(tid) (tid % g_node_cnt == g_node_id || CC_ALG == CALVIN) -#define IS_REMOTE(tid) (tid % g_node_cnt != g_node_id || CC_ALG == CALVIN) -#define IS_LOCAL_KEY(key) (key % g_node_cnt == g_node_id) - -/* -#define GET_THREAD_ID(id) (id % g_thread_cnt) -#define GET_NODE_ID(id) (id / g_thread_cnt) -#define GET_PART_ID(t,n) (n*g_thread_cnt + t) -*/ - -#define MSG(str, args...) \ - { printf("[%s : %d] " str, __FILE__, __LINE__, args); } // printf(args); } - -// principal index structure. The workload may decide to use a different -// index structure for specific purposes. (e.g. non-primary key access should use hash) -#if (INDEX_STRUCT == IDX_BTREE) -#define INDEX index_btree -#else // IDX_HASH -#define INDEX IndexHash -#endif - -/************************************************/ -// constants -/************************************************/ -#ifndef UINT64_MAX -#define UINT64_MAX 18446744073709551615UL -#endif // UINT64_MAX - -#endif diff --git a/contrib/deneva/system/hash.cpp b/contrib/deneva/system/hash.cpp deleted file mode 100644 index c5ec045c..00000000 --- a/contrib/deneva/system/hash.cpp +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. -// This source code is licensed under both the GPLv2 (found in the -// COPYING file in the root directory) and Apache 2.0 License -// (found in the LICENSE.Apache file in the root directory). - -#include "hash.h" - -int hash_any(register const unsigned char *k, register int keylen) { - register uint32_t a, b, c, len; - - /* Set up the internal state */ - len = keylen; - a = b = c = 0x9e3779b9 + len + 3923095; - - /* If the source pointer is word-aligned, we use word-wide fetches */ - if (((uintptr_t)k & UINT32_ALIGN_MASK) == 0) { - /* Code path for aligned source data */ - register const uint32_t *ka = (const uint32_t *)k; - - /* handle most of the key */ - while (len >= 12) { - a += ka[0]; - b += ka[1]; - c += ka[2]; - mix(a, b, c); - ka += 3; - len -= 12; - } - - /* handle the last 11 bytes */ - k = (const unsigned char *)ka; - switch (len) { - case 11: - c += ((uint32_t)k[10] << 24); - /* fall through */ - case 10: - c += ((uint32_t)k[9] << 16); - /* fall through */ - case 9: - c += ((uint32_t)k[8] << 8); - /* the lowest byte of c is reserved for the length */ - /* fall through */ - case 8: - b += ka[1]; - a += ka[0]; - break; - case 7: - b += ((uint32_t)k[6] << 16); - /* fall through */ - case 6: - b += ((uint32_t)k[5] << 8); - /* fall through */ - case 5: - b += k[4]; - /* fall through */ - case 4: - a += ka[0]; - break; - case 3: - a += ((uint32_t)k[2] << 16); - /* fall through */ - case 2: - a += ((uint32_t)k[1] << 8); - /* fall through */ - case 1: - a += k[0]; - /* case 0: nothing left to add */ - } - } else { - /* Code path for non-aligned source data */ - - /* handle most of the key */ - while (len >= 12) { - a += (k[0] + ((uint32_t)k[1] << 8) + ((uint32_t)k[2] << 16) + ((uint32_t)k[3] << 24)); - b += (k[4] + ((uint32_t)k[5] << 8) + ((uint32_t)k[6] << 16) + ((uint32_t)k[7] << 24)); - c += (k[8] + ((uint32_t)k[9] << 8) + ((uint32_t)k[10] << 16) + ((uint32_t)k[11] << 24)); - mix(a, b, c); - k += 12; - len -= 12; - } - - /* handle the last 11 bytes */ - switch (len) /* all the case statements fall through */ - { - case 11: - c += ((uint32_t)k[10] << 24); - case 10: - c += ((uint32_t)k[9] << 16); - case 9: - c += ((uint32_t)k[8] << 8); - /* the lowest byte of c is reserved for the length */ - case 8: - b += ((uint32_t)k[7] << 24); - case 7: - b += ((uint32_t)k[6] << 16); - case 6: - b += ((uint32_t)k[5] << 8); - case 5: - b += k[4]; - case 4: - a += ((uint32_t)k[3] << 24); - case 3: - a += ((uint32_t)k[2] << 16); - case 2: - a += ((uint32_t)k[1] << 8); - case 1: - a += k[0]; - /* case 0: nothing left to add */ - } - } - - final(a, b, c); - /* report the result */ - return c; -} diff --git a/contrib/deneva/system/hash.h b/contrib/deneva/system/hash.h deleted file mode 100644 index 2c330ff7..00000000 --- a/contrib/deneva/system/hash.h +++ /dev/null @@ -1,56 +0,0 @@ - -#pragma once - -#ifndef KEY_RANGE_HASH -#define KEY_RANGE_HASH - -#include -#include -#include -#include - -#define UINT32_ALIGN_MASK (sizeof(uint32_t) - 1) -#define rot(x, k) (((x) << (k)) | ((x) >> (32 - (k)))) -#define mix(a, b, c) \ -{ \ - a -= c; \ - a ^= rot(c, 4); \ - c += b; \ - b -= a; \ - b ^= rot(a, 6); \ - a += c; \ - c -= b; \ - c ^= rot(b, 8); \ - b += a; \ - a -= c; \ - a ^= rot(c, 16); \ - c += b; \ - b -= a; \ - b ^= rot(a, 19); \ - a += c; \ - c -= b; \ - c ^= rot(b, 4); \ - b += a; \ -} - -#define final(a, b, c) \ -{ \ - c ^= b; \ - c -= rot(b, 14); \ - a ^= c; \ - a -= rot(c, 11); \ - b ^= a; \ - b -= rot(a, 25); \ - c ^= b; \ - c -= rot(b, 16); \ - a ^= c; \ - a -= rot(c, 4); \ - b ^= a; \ - b -= rot(a, 14); \ - c ^= b; \ - c -= rot(b, 24); \ -} - -int hash_any(register const unsigned char *k, register int keylen); - -#endif \ No newline at end of file diff --git a/contrib/deneva/system/helper.cpp b/contrib/deneva/system/helper.cpp deleted file mode 100644 index b12ab58b..00000000 --- a/contrib/deneva/system/helper.cpp +++ /dev/null @@ -1,144 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "global.h" -#include "helper.h" -#include "mem_alloc.h" -#include "time.h" - -bool itemid_t::operator==(const itemid_t &other) const { - return (type == other.type && location == other.location); -} - -bool itemid_t::operator!=(const itemid_t &other) const { return !(*this == other); } - -void itemid_t::operator=(const itemid_t &other){ - this->valid = other.valid; - this->type = other.type; - this->location = other.location; - assert(*this == other); - assert(this->valid); -} - -void itemid_t::init() { - valid = false; - location = 0; - next = NULL; -} - -int get_thdid_from_txnid(uint64_t txnid) { return txnid % g_thread_cnt; } - -uint64_t get_part_id(void *addr) { return ((uint64_t)addr / PAGE_SIZE) % g_part_cnt; } - -uint64_t key_to_part(uint64_t key) { - if (g_part_alloc) - return key % g_part_cnt; - else - return 0; -} - -uint64_t merge_idx_key(UInt64 key_cnt, UInt64 * keys) { - UInt64 len = 64 / key_cnt; - UInt64 key = 0; - for (UInt32 i = 0; i < len; i++) { - assert(keys[i] < (1UL << len)); - key = (key << len) | keys[i]; - } - return key; -} - -uint64_t merge_idx_key(uint64_t key1, uint64_t key2) { - assert(key1 < (1UL << 32) && key2 < (1UL << 32)); - return key1 << 32 | key2; -} - -uint64_t merge_idx_key(uint64_t key1, uint64_t key2, uint64_t key3) { - assert(key1 < (1 << 21) && key2 < (1 << 21) && key3 < (1 << 21)); - return key1 << 42 | key2 << 21 | key3; -} - -void init_globals() { - g_max_read_req = g_node_cnt * g_inflight_max; - g_max_pre_req = g_node_cnt * g_inflight_max; -} - -void init_client_globals() { - if(g_node_cnt > g_client_node_cnt) { - g_servers_per_client = g_node_cnt / g_client_node_cnt; - g_clients_per_server = 1; - } else { - g_servers_per_client = 1; - g_clients_per_server = g_client_node_cnt / g_node_cnt; - } -#if CC_ALG == BOCC || CC_ALG == FOCC - g_server_start_node = 0; -#else - uint32_t client_node_id = g_node_id - g_node_cnt; - g_server_start_node = (client_node_id * g_servers_per_client) % g_node_cnt; -#endif - if (g_node_cnt >= g_client_node_cnt && g_node_cnt % g_client_node_cnt != 0 && - g_node_id == (g_node_cnt + g_client_node_cnt - 1)) { - // Have last client pick up any leftover servers if the number of - // servers cannot be evenly divided between client nodes - // fix the remainder to be equally distributed among clients - g_servers_per_client += g_node_cnt % g_client_node_cnt; - } - printf("Node %u: servicing %u total nodes starting with node %u\n", g_node_id, - g_servers_per_client, g_server_start_node); -} - -/****************************************************/ -// Global Clock! -/****************************************************/ - -uint64_t get_wall_clock() { - timespec * tp = new timespec; - clock_gettime(CLOCK_REALTIME, tp); - uint64_t ret = tp->tv_sec * 1000000000 + tp->tv_nsec; - delete tp; - return ret; -} - -uint64_t get_server_clock() { -#if defined(__i386__) - uint64_t ret; - __asm__ __volatile__("rdtsc" : "=A" (ret)); -#elif defined(__x86_64__) - unsigned hi, lo; - __asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi)); - uint64_t ret = ( (uint64_t)lo)|( ((uint64_t)hi)<<32 ); - ret = (uint64_t) ((double)ret / CPU_FREQ); -#else - timespec * tp = new timespec; - clock_gettime(CLOCK_REALTIME, tp); - uint64_t ret = tp->tv_sec * 1000000000 + tp->tv_nsec; - delete tp; -#endif - return ret; -} - -uint64_t get_sys_clock() { - if (TIME_ENABLE) return get_server_clock(); - return 0; -} - -void myrand::init(uint64_t seed) { this->seed = seed; } - -uint64_t myrand::next() { - seed = (seed * 1103515247UL + 12345UL) % (1UL<<63); - return (seed / 65537) % RAND_MAX; -} - diff --git a/contrib/deneva/system/helper.h b/contrib/deneva/system/helper.h deleted file mode 100644 index e64f3ac3..00000000 --- a/contrib/deneva/system/helper.h +++ /dev/null @@ -1,287 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _HELPER_H_ -#define _HELPER_H_ - -#include -#include -#include -#include "global.h" - -/************************************************/ -// Debugging -/************************************************/ -#define DEBUG(...) \ - if(DEBUG_DISTR) { \ - fprintf(stdout,__VA_ARGS__); \ - fflush(stdout); \ - } -#define DEBUG_FLUSH() \ - if(DEBUG_DISTR) { \ - fflush(stdout); \ - } - -#define DEBUG_M(...) \ - if(DEBUG_ALLOC && warmup_done) { \ - fprintf(stdout,__VA_ARGS__); \ - fflush(stdout); \ - } - -#define DEBUG_R(...) \ - if(DEBUG_RACE && warmup_done) { \ - fprintf(stdout,__VA_ARGS__); \ - fflush(stdout); \ - } - -#define PRINT_LATENCY(...) \ - if(DEBUG_LATENCY && warmup_done) { \ - fprintf(stdout,__VA_ARGS__); \ - fflush(stdout); \ - } - -/************************************************/ -// atomic operations -/************************************************/ -#define ATOM_ADD(dest, value) __sync_fetch_and_add(&(dest), value) -#define ATOM_SUB(dest, value) __sync_fetch_and_sub(&(dest), value) -// returns true if cas is successful -#define ATOM_CAS(dest, oldval, newval) __sync_bool_compare_and_swap(&(dest), oldval, newval) -#define ATOM_ADD_FETCH(dest, value) __sync_add_and_fetch(&(dest), value) -#define ATOM_FETCH_ADD(dest, value) __sync_fetch_and_add(&(dest), value) -#define ATOM_SUB_FETCH(dest, value) __sync_sub_and_fetch(&(dest), value) - -#define COMPILER_BARRIER asm volatile("" ::: "memory"); -#define PAUSE_SILO { __asm__ ( "pause;" ); } - -/************************************************/ -// ASSERT Helper -/************************************************/ - -#define M_ASSERT_V(cond, ...) \ - if (!(cond)) {\ - fprintf(stdout,"ASSERTION FAILURE [%s : %d]\n", __FILE__, __LINE__);\ - fprintf(stdout,__VA_ARGS__); \ - fflush(stdout); \ - assert(cond); \ - } -#define M_ASSERT(cond, str) \ - if (!(cond)) {\ - printf("ASSERTION FAILURE [%s : %d] msg:%s\n", __FILE__, __LINE__, str);\ - fflush(stdout); \ - exit(0); \ - } -#define ASSERT(cond) assert(cond) - -/************************************************/ -// STACK helper (push & pop) -/************************************************/ -#define STACK_POP(stack, top) \ -{ \ - if (stack == NULL) \ - top = NULL; \ - else { \ - top = stack; \ - stack = stack->next; \ - } \ -} -#define STACK_PUSH(stack, entry) \ -{ \ - entry->next = stack; \ - stack = entry; \ -} - -/************************************************/ -// LIST helper (read from head & write to tail) -/************************************************/ -#define LIST_GET_HEAD(lhead, ltail, en) \ -{ \ - en = lhead; \ - if (lhead) lhead = lhead->next; \ - if (lhead) \ - lhead->prev = NULL; \ - else \ - ltail = NULL; \ - if (en) en->next = NULL; \ -} -#define LIST_PUT_TAIL(lhead, ltail, en) \ -{ \ - en->next = NULL; \ - en->prev = NULL; \ - if (ltail) { \ - en->prev = ltail; \ - ltail->next = en; \ - ltail = en; \ - } else { \ - lhead = en; \ - ltail = en; \ - } \ -} -#define LIST_INSERT_BEFORE(entry, newentry, lhead) \ -{ \ - newentry->next = entry; \ - newentry->prev = entry->prev; \ - if (entry->prev) entry->prev->next = newentry; \ - entry->prev = newentry; \ - if (lhead == entry) lhead = newentry; \ -} -#define LIST_REMOVE(entry) \ -{ \ - if (entry->next) entry->next->prev = entry->prev; \ - if (entry->prev) entry->prev->next = entry->next; \ -} -#define LIST_REMOVE_HT(entry, head, tail) \ -{ \ - if (entry->next) \ - entry->next->prev = entry->prev; \ - else { \ - assert(entry == tail); \ - tail = entry->prev; \ - } \ - if (entry->prev) \ - entry->prev->next = entry->next; \ - else { \ - assert(entry == head); \ - head = entry->next; \ - } \ -} - -/************************************************/ -// STATS helper -/************************************************/ -#define SET_STATS(tid, name, value) \ - if (STATS_ENABLE && simulation->is_warmup_done()) stats._stats[tid]->name = value; - -#define INC_STATS(tid, name, value) \ - if (STATS_ENABLE && simulation->is_warmup_done()) stats._stats[tid]->name += value; - -#define INC_STATS_ARR(tid, name, value) \ - if (STATS_ENABLE && simulation->is_warmup_done()) stats._stats[tid]->name.insert(value); - -#define INC_GLOB_STATS(name, value) \ - if (STATS_ENABLE && simulation->is_warmup_done()) stats.name += value; - -/************************************************/ -// mem copy helper -/************************************************/ -#define COPY_VAL(v,d,p) \ - memcpy(&v,&d[p],sizeof(v)); \ - p += sizeof(v); - -#define COPY_VAL_SIZE(v,d,p,s) \ - memcpy(&v,&d[p],s); \ - p += s; - -#define COPY_BUF(d,v,p) \ - memcpy(&((char*)d)[p],(char*)&v,sizeof(v)); \ - p += sizeof(v); - -#define COPY_BUF_SIZE(d,v,p,s) \ - memcpy(&((char*)d)[p],(char*)&v,s); \ - p += s; - -#define WRITE_VAL(f, v) f.write((char *)&v, sizeof(v)); - -#define WRITE_VAL_SIZE(f, v, s) f.write(v, sizeof(char) * s); -/************************************************/ -// malloc helper -/************************************************/ -// In order to avoid false sharing, any unshared read/write array residing on the same -// cache line should be modified to be read only array with pointers to thread local data block. -// TODO. in order to have per-thread malloc, this needs to be modified !!! - -#define ARR_PTR_MULTI(type, name, size, scale) \ - name = new type * [size]; \ - if (g_part_alloc || THREAD_ALLOC) { \ - for (UInt32 i = 0; i < size; i ++) {\ - UInt32 padsize = sizeof(type) * (scale); \ - if (g_mem_pad && padsize % CL_SIZE != 0) padsize += CL_SIZE - padsize % CL_SIZE; \ - name[i] = (type *) mem_allocator.alloc(padsize); \ - for (UInt32 j = 0; j < scale; j++) new (&name[i][j]) type(); \ - }\ - } else { \ - for (UInt32 i = 0; i < size; i++) name[i] = new type[scale]; \ - } - -#define ARR_PTR(type, name, size) ARR_PTR_MULTI(type, name, size, 1) - -#define ARR_PTR_INIT(type, name, size, value) \ - name = new type * [size]; \ - if (g_part_alloc) { \ - for (UInt32 i = 0; i < size; i ++) {\ - int padsize = sizeof(type); \ - if (g_mem_pad && padsize % CL_SIZE != 0) padsize += CL_SIZE - padsize % CL_SIZE; \ - name[i] = (type *) mem_allocator.alloc(padsize); \ - new (name[i]) type(); \ - }\ - } else \ - for (UInt32 i = 0; i < size; i++) name[i] = new type; \ - for (UInt32 i = 0; i < size; i++) *name[i] = value; - -#define YCSB_QUERY_FREE(qry) qry_pool.put(qry); - -enum Data_type { - DT_table, - DT_page, - DT_row -}; - -// TODO currently, only DR_row supported -// data item type. -class itemid_t { -public: - itemid_t() { }; - itemid_t(Data_type type, void * loc) { - this->type = type; - this->location = loc; - }; - Data_type type; - void * location; // points to the table | page | row - itemid_t * next; - bool valid; - void init(); - bool operator==(const itemid_t &other) const; - bool operator!=(const itemid_t &other) const; - void operator=(const itemid_t &other); -}; - -int get_thdid_from_txnid(uint64_t txnid); - -// key_to_part() is only for ycsb -uint64_t key_to_part(uint64_t key); -uint64_t get_part_id(void * addr); -// TODO can the following two functions be merged? -uint64_t merge_idx_key(uint64_t key_cnt, uint64_t * keys); -uint64_t merge_idx_key(uint64_t key1, uint64_t key2); -uint64_t merge_idx_key(uint64_t key1, uint64_t key2, uint64_t key3); - -void init_client_globals(); -void init_globals(); - -extern timespec * res; -uint64_t get_wall_clock(); -uint64_t get_server_clock(); -uint64_t get_sys_clock(); // return: in ns - -class myrand { -public: - void init(uint64_t seed); - uint64_t next(); -private: - uint64_t seed; -}; - -#endif diff --git a/contrib/deneva/system/http.cpp b/contrib/deneva/system/http.cpp deleted file mode 100644 index ca8229bc..00000000 --- a/contrib/deneva/system/http.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@ruc.edu.cn - * - */ -#include "global.h" -#include "manager.h" -#include "http.h" -#include "libtcpforcpp.h" -#include -#include -#include -#include -#include -#include "mem_alloc.h" -#include "helper.h" - -static uint64_t stouint64(char *ptr) -{ - uint64_t num = 0; - int i = 0; - while (ptr[i]) - { - num = num * 10 + (ptr[i++] - '0'); - } - return num; -} - -size_t WriteTimeStampCallBack(void *ptr, size_t size, size_t nmemb, void *data) -{ - size_t realsize = size * nmemb; - uint64_t *ts = (uint64_t *)data; - *ts = stouint64((char *)ptr); - return realsize; -} - -static char curlip[100]; - -uint64_t CurlGetTimeStamp(void) -{ - CURL *curl; - CURLcode res; - - curl = curl_easy_init(); - if (!curl) - { - fprintf(stderr, "curl_easy_init() error"); - return 1; - } - uint64_t ts; - curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ts); - curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteTimeStampCallBack); - - snprintf(curlip, sizeof(curlip), "http://%s:%d/lts-cluster/api/ts/1", LTS_TCP_IP, LTS_TCP_PORT); - curl_easy_setopt(curl, CURLOPT_URL, curlip); - res = curl_easy_perform(curl); - if (res != CURLE_OK) - { - fprintf(stderr, "curl_easy_perform() error: %s\n", curl_easy_strerror(res)); - } - curl_easy_cleanup(curl); - return ts; -} - -void TcpTimestamp::init(int all_thd_num) -{ - socket = (TcpLtsSocket*)mem_allocator.align_alloc(sizeof(TcpLtsSocket) * all_thd_num); - socket_num = all_thd_num; - for (int i = 0; i < all_thd_num; i ++) { - socket[i].init(); - ConnectToLts(i); - } - -} - -void TcpTimestamp::ConnectToLts(uint64_t thd_id) -{ - int result = 0; - for (int retry = 0; retry < 10; retry++) - { - result = socket[thd_id].connectTo(LTS_TCP_IP, LTS_TCP_PORT); - if (result == 0) - break; - } - if (result != 0) - { - printf("\nLTS: connection failed"); - } -} - -void TcpTimestamp::CloseToLts(uint64_t thd_id) -{ - int result = 0; - result = socket[thd_id].closeConnection(); - if (result != 0) - { - printf("\nLTS: close failed"); - } -} - -uint64_t TcpTimestamp::TcpGetTimeStamp(uint64_t thd_id) -{ - uint64_t start_ts = get_sys_clock(); - uint64_t ts = 0; - ts = socket[thd_id].getTimestamp(); - - if (ts == (uint64_t)-1) - { - //core_dump(); - } - uint64_t end_ts = get_sys_clock(); - DEBUG("Tcp get timestamp %ld, latency %ld\n",ts, end_ts-start_ts); - return ts; -} diff --git a/contrib/deneva/system/http.h b/contrib/deneva/system/http.h deleted file mode 100644 index d770a43f..00000000 --- a/contrib/deneva/system/http.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@ruc.edu.cn - * - */ - -#ifndef HTTP_TS_H -#define HTTP_TS_H - -#include -#include - -#include - -#include -#include "libtcpforcpp.h" - -uint64_t CurlGetTimeStamp(void); -uint64_t TcpGetTimeStamp(void); - -void ConnectToLts(void); -void CloseToLts(void); - -class TcpTimestamp { -public: - void init(int all_thd_num); - void ConnectToLts(uint64_t thd_id); - void CloseToLts(uint64_t thd_id); - uint64_t TcpGetTimeStamp(uint64_t thd_id); -private: - TcpLtsSocket * socket; - int socket_num; - // pthread_mutex_t ** lock_; -}; - -#endif diff --git a/contrib/deneva/system/io_thread.cpp b/contrib/deneva/system/io_thread.cpp deleted file mode 100644 index 8a839a4e..00000000 --- a/contrib/deneva/system/io_thread.cpp +++ /dev/null @@ -1,257 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "global.h" -#include "helper.h" -#include "manager.h" -#include "thread.h" -#include "io_thread.h" -#include "query.h" -#include "ycsb_query.h" -#include "tpcc_query.h" -#include "mem_alloc.h" -#include "transport.h" -#include "math.h" -#include "msg_thread.h" -#include "msg_queue.h" -#include "message.h" -#include "client_txn.h" -#include "work_queue.h" -#include "txn.h" -#include "ycsb.h" - -void InputThread::setup() { - - std::vector * msgs; - while(!simulation->is_setup_done()) { - msgs = tport_man.recv_msg(get_thd_id()); - if (msgs == NULL) continue; - while(!msgs->empty()) { - Message * msg = msgs->front(); - if(msg->rtype == INIT_DONE) { - printf("Received INIT_DONE from node %ld\n",msg->return_node_id); - fflush(stdout); - simulation->process_setup_msg(); - } else { - assert(ISSERVER || ISREPLICA); - //printf("Received Msg %d from node %ld\n",msg->rtype,msg->return_node_id); -#if CC_ALG == CALVIN - if(msg->rtype == CALVIN_ACK ||(msg->rtype == CL_QRY && ISCLIENTN(msg->get_return_id()))) { - work_queue.sequencer_enqueue(get_thd_id(),msg); - msgs->erase(msgs->begin()); - continue; - } - if( msg->rtype == RDONE || msg->rtype == CL_QRY) { - assert(ISSERVERN(msg->get_return_id())); - work_queue.sched_enqueue(get_thd_id(),msg); - msgs->erase(msgs->begin()); - continue; - } -#endif - work_queue.enqueue(get_thd_id(),msg,false); - } - msgs->erase(msgs->begin()); - } - delete msgs; - } - if (!ISCLIENT) { - txn_man = (YCSBTxnManager *) - mem_allocator.align_alloc( sizeof(YCSBTxnManager)); - new(txn_man) YCSBTxnManager(); - // txn_man = (TxnManager*) malloc(sizeof(TxnManager)); - uint64_t thd_id = get_thd_id(); - txn_man->init(thd_id, NULL); - } -} - -RC InputThread::run() { - tsetup(); - printf("Running InputThread %ld\n",_thd_id); - - if(ISCLIENT) { - client_recv_loop(); - } else { - server_recv_loop(); - } - - return FINISH; - -} - -RC InputThread::client_recv_loop() { - int rsp_cnts[g_servers_per_client]; - memset(rsp_cnts, 0, g_servers_per_client * sizeof(int)); - - run_starttime = get_sys_clock(); - uint64_t return_node_offset; - uint64_t inf; - - std::vector * msgs; - - while (!simulation->is_done()) { - heartbeat(); - uint64_t starttime = get_sys_clock(); - msgs = tport_man.recv_msg(get_thd_id()); - INC_STATS(_thd_id,mtx[28], get_sys_clock() - starttime); - starttime = get_sys_clock(); - //while((m_query = work_queue.get_next_query(get_thd_id())) != NULL) { - //Message * msg = work_queue.dequeue(); - if (msgs == NULL) continue; - while(!msgs->empty()) { - Message * msg = msgs->front(); - assert(msg->rtype == CL_RSP); - return_node_offset = msg->return_node_id - g_server_start_node; - assert(return_node_offset < g_servers_per_client); - rsp_cnts[return_node_offset]++; - INC_STATS(get_thd_id(),txn_cnt,1); - uint64_t timespan = get_sys_clock() - ((ClientResponseMessage*)msg)->client_startts; - INC_STATS(get_thd_id(),txn_run_time, timespan); - if (warmup_done) { - INC_STATS_ARR(get_thd_id(),client_client_latency, timespan); - } - //INC_STATS_ARR(get_thd_id(),all_lat,timespan); - inf = client_man.dec_inflight(return_node_offset); - DEBUG("Recv %ld from %ld, %ld -- %f\n", ((ClientResponseMessage *)msg)->txn_id, - msg->return_node_id, inf, float(timespan) / BILLION); - assert(inf >=0); - // delete message here - msgs->erase(msgs->begin()); - } - delete msgs; - INC_STATS(_thd_id,mtx[29], get_sys_clock() - starttime); - - } - - printf("FINISH %ld:%ld\n",_node_id,_thd_id); - fflush(stdout); - return FINISH; -} - - -bool InputThread::fakeprocess(Message * msg) { - RC rc __attribute__ ((unused)); - bool eq = false; - - txn_man->set_txn_id(msg->get_txn_id()); - - switch(msg->get_rtype()) { - case RPREPARE: - rc = RCOK; - txn_man->set_rc(rc); - msg_queue.enqueue(get_thd_id(),Message::create_message(txn_man,RACK_PREP),msg->return_node_id); - break; - case RQRY: - rc = RCOK; - txn_man->set_rc(rc); - msg_queue.enqueue(get_thd_id(),Message::create_message(txn_man,RQRY_RSP),msg->return_node_id); - break; - case RQRY_CONT: - rc = RCOK; - txn_man->set_rc(rc); - msg_queue.enqueue(get_thd_id(),Message::create_message(txn_man,RQRY_RSP),msg->return_node_id); - break; - case RFIN: - rc = RCOK; - txn_man->set_rc(rc); - if(!((FinishMessage*)msg)->readonly || CC_ALG == MAAT || CC_ALG == OCC || CC_ALG == SUNDIAL || CC_ALG == BOCC || CC_ALG == SSI) - msg_queue.enqueue(get_thd_id(),Message::create_message(txn_man,RACK_FIN),GET_NODE_ID(msg->get_txn_id())); - // rc = process_rfin(msg); - break; - default: - eq = true; - break; - } - return eq; -} - -RC InputThread::server_recv_loop() { - - myrand rdm; - rdm.init(get_thd_id()); - RC rc = RCOK; - assert (rc == RCOK); - uint64_t starttime; - - std::vector * msgs; - while (!simulation->is_done()) { - heartbeat(); - starttime = get_sys_clock(); - - msgs = tport_man.recv_msg(get_thd_id()); - - INC_STATS(_thd_id,mtx[28], get_sys_clock() - starttime); - starttime = get_sys_clock(); - - if (msgs == NULL) continue; - while(!msgs->empty()) { - Message * msg = msgs->front(); - if(msg->rtype == INIT_DONE) { - msgs->erase(msgs->begin()); - continue; - } -#if CC_ALG == CALVIN - if(msg->rtype == CALVIN_ACK ||(msg->rtype == CL_QRY && ISCLIENTN(msg->get_return_id()))) { - work_queue.sequencer_enqueue(get_thd_id(),msg); - msgs->erase(msgs->begin()); - continue; - } - if( msg->rtype == RDONE || msg->rtype == CL_QRY) { - assert(ISSERVERN(msg->get_return_id())); - work_queue.sched_enqueue(get_thd_id(),msg); - msgs->erase(msgs->begin()); - continue; - } -#endif -#ifdef FAKE_PROCESS - if (fakeprocess(msg)) -#endif - work_queue.enqueue(get_thd_id(),msg,false); - msgs->erase(msgs->begin()); - } - delete msgs; - INC_STATS(_thd_id,mtx[29], get_sys_clock() - starttime); - - } - printf("FINISH %ld:%ld\n",_node_id,_thd_id); - fflush(stdout); - return FINISH; -} - -void OutputThread::setup() { - DEBUG_M("OutputThread::setup MessageThread alloc\n"); - messager = (MessageThread *) mem_allocator.alloc(sizeof(MessageThread)); - messager->init(_thd_id); - while (!simulation->is_setup_done()) { - messager->run(); - } -} - -RC OutputThread::run() { - - tsetup(); - printf("Running OutputThread %ld\n",_thd_id); - - while (!simulation->is_done()) { - heartbeat(); - messager->run(); - } - - printf("FINISH %ld:%ld\n",_node_id,_thd_id); - fflush(stdout); - return FINISH; -} - - diff --git a/contrib/deneva/system/io_thread.h b/contrib/deneva/system/io_thread.h deleted file mode 100644 index 1fa03245..00000000 --- a/contrib/deneva/system/io_thread.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _IOTHREAD_H_ -#define _IOTHREAD_H_ - -#include "global.h" -#include "message.h" -class Workload; -class MessageThread; - -class InputThread : public Thread { -public: - RC run(); - RC client_recv_loop(); - RC server_recv_loop(); - void check_for_init_done(); - void setup(); - - bool fakeprocess(Message * msg); - TxnManager * txn_man; -}; - -class OutputThread : public Thread { -public: - RC run(); - void setup(); - MessageThread * messager; -}; - -#endif diff --git a/contrib/deneva/system/latch.h b/contrib/deneva/system/latch.h deleted file mode 100644 index 7a2d61cf..00000000 --- a/contrib/deneva/system/latch.h +++ /dev/null @@ -1,63 +0,0 @@ - -#ifndef _LATCH_H_ -#define _LATCH_H_ - -#include -#include -#include -#include -#include -#include - -// static std::default_random_engine e(time(0)); -// static std::uniform_int_distribution u(0, 9); - -class Latch { -public: - Latch(int limit) { - this->limit_ = limit; - this->lt_ = limit; - } - - virtual void await() = 0; - virtual void count_down() = 0; - virtual int get_unarrived() = 0; - virtual void reset() = 0; -protected: - int limit_; - int lt_; -}; - -class CountDownLatch : public Latch { -public: - using Latch::Latch; - -void await() override { - std::unique_lock lk(mtx_); - cv_.wait(lk, [&]{ - //std::cout << "limit_: " << limit_ << std::endl; - return (limit_ == 0); - }); -} - -void count_down() override { - std::unique_lock lk(mtx_); - limit_--; - cv_.notify_all(); -} - -int get_unarrived() override { - std::unique_lock lk(mtx_); - return limit_; -} - -void reset() override { - std::unique_lock lk(mtx_); - limit_ = lt_; -} -private: - std::mutex mtx_; - std::condition_variable cv_; -}; - -#endif diff --git a/contrib/deneva/system/libtcpforcpp.cpp b/contrib/deneva/system/libtcpforcpp.cpp deleted file mode 100644 index f87fb71e..00000000 --- a/contrib/deneva/system/libtcpforcpp.cpp +++ /dev/null @@ -1,139 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@ruc.edu.cn - * - */ - -#include "libtcpforcpp.h" - -#include - -#include -#include -#include - -#include -#include - -#include "manager.h" -#include "ltsrpc.pb.h" - -const int headerLen = 2; -const int minSendLength = 24; - -void TcpLtsSocket::init() { - txn = 12345678; - req = (char *)malloc(minSendLength); - tcpres = (char *)malloc(minSendLength); - buffer = (char *)malloc(18); - ind = 0; - result = 0; - sendresult = 0; - errorno = 0; -} - -int TcpLtsSocket::connectTo(const char *ip, uint16_t port) -{ - s = socket(AF_INET, SOCK_STREAM, 0); - if (s < 0) - { - return -1; - } - struct sockaddr_in addr; - bzero(&addr, sizeof(struct sockaddr_in)); - addr.sin_family = AF_INET; - addr.sin_port = htons(port); - addr.sin_addr.s_addr = inet_addr(ip); - if (connect(s, (sockaddr *)&addr, sizeof(addr)) < 0) - { - return -1; - } - struct timeval tv; - tv.tv_sec = 1; - tv.tv_usec = 0; - setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, (const char *)&tv, sizeof(struct timeval)); - - return 0; -} - -uint64_t TcpLtsSocket::getTimestamp() -{ - if (s == -1) - { - while (connectTo(LTS_TCP_IP, LTS_TCP_PORT)); - } - ltsrpc::GetTxnTimestampCtx lts; - - lts.set_txn_id(txn); - - std::string message; - lts.SerializeToString(&message); - auto size = (uint16_t)message.size(); - uint16_t cpsize = htons(size); - - memcpy(req, (void *)&cpsize, sizeof(uint16_t)); - memcpy(req + headerLen, message.data(), size); - memset(req + headerLen + size, 0, minSendLength - headerLen - size); - uint64_t start_ts = get_sys_clock(); -resend: - sendresult = send(s, req, minSendLength, 0); - - ind = 0; - - for (;;) - { - rerecv: - result = recv(s, buffer, 18, 0); - if (result == -1) - { - errorno = errno; - switch (errorno) - { - case 104: - break; - case EINTR: - case EAGAIN: - goto rerecv; - default: - break; - } - closeConnection(); - while (connectTo(LTS_TCP_IP, LTS_TCP_PORT)) - ; - goto resend; - } - if (ind + result > 18) - { - ind = 0; - } - memcpy(tcpres + ind, buffer, result); - ind += result; - if (ind == 18) - { - ind = 0; - break; - } - } - // free(buffer); - - uint16_t olen = *(uint16_t *)tcpres; - uint16_t respLen = ntohs(olen); - lts.ParseFromArray(tcpres + 2, respLen); - uint64_t end_ts = get_sys_clock(); - DEBUG("Tcp get timestamp %ld by id %ld latency %ld\n",lts.txn_ts(), txn, end_ts-start_ts); - // DEBUG("Tcp get timestamp %ld by id %ld\n",lts.txn_ts(),txn); - return lts.txn_ts(); -} - -int TcpLtsSocket::closeConnection() -{ - if (s == -1) - return 0; - int re = close(s); - s = -1; - return re; -} diff --git a/contrib/deneva/system/libtcpforcpp.h b/contrib/deneva/system/libtcpforcpp.h deleted file mode 100644 index 1fce5df3..00000000 --- a/contrib/deneva/system/libtcpforcpp.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@ruc.edu.cn - * - */ - -#include -#include - -#ifndef TCP_TS_H -#define TCP_TS_H - -class TcpLtsSocket{ -private: - int s; - - - uint64_t txn; - char *req; - char *tcpres; - char *buffer; - int result; - int sendresult; - int errorno; - int ind; -public: - void init(); - int connectTo(const char *ip, uint16_t port); - uint64_t getTimestamp(); - int closeConnection(); -}; - -#endif diff --git a/contrib/deneva/system/lock_free_queue.cpp b/contrib/deneva/system/lock_free_queue.cpp deleted file mode 100644 index 30aa1dc6..00000000 --- a/contrib/deneva/system/lock_free_queue.cpp +++ /dev/null @@ -1,60 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include "helper.h" -#include "lock_free_queue.h" - -using namespace std; - -LockfreeQueue::LockfreeQueue() { - _head = NULL; - _tail = NULL; -} - -bool LockfreeQueue::enqueue(uintptr_t value) { - bool success = false; - QueueEntry * new_head = (QueueEntry *) malloc(sizeof(QueueEntry)); - new_head->value = value; - new_head->next = NULL; - QueueEntry * old_head; - while (!success) { - old_head = _head; - success = ATOM_CAS(_head, old_head, new_head); - if (!success) PAUSE - } - if (old_head == NULL) - _tail = new_head; - else - old_head->next = new_head; - return true; -} - -bool LockfreeQueue::dequeue(uintptr_t &value) { - bool success = false; - QueueEntry * old_tail; - QueueEntry * old_head; - while (!success) { - old_tail = _tail; - old_head = _head; - if (old_tail == NULL) { - PAUSE - return false; - } - if (old_tail->next != NULL) - success = ATOM_CAS(_tail, old_tail, old_tail->next); - else if (old_tail == old_head) { - success = ATOM_CAS(_head, old_tail, NULL); - if (success) ATOM_CAS(_tail, old_tail, NULL); - } - if (!success) PAUSE - } - value = old_tail->value; - free(old_tail); - return true; -} - - diff --git a/contrib/deneva/system/lock_free_queue.h b/contrib/deneva/system/lock_free_queue.h deleted file mode 100644 index 7c7b0060..00000000 --- a/contrib/deneva/system/lock_free_queue.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef _LF_QUEUE_H_ -#define _LF_QUEUE_H_ - -#define COMPILER_BARRIER asm volatile("" ::: "memory"); -#define PAUSE usleep(1); - -struct QueueEntry { - volatile uintptr_t value; // the value stored in the entry. i.e., the pointer. - QueueEntry * next; -}; - -class LockfreeQueue { -public: - LockfreeQueue(); - bool enqueue(uintptr_t value); - bool dequeue(uintptr_t &value); -private: - QueueEntry * volatile _head; - QueueEntry * volatile _tail; -}; - -#endif diff --git a/contrib/deneva/system/log_thread.cpp b/contrib/deneva/system/log_thread.cpp deleted file mode 100644 index e4d1bd2e..00000000 --- a/contrib/deneva/system/log_thread.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "global.h" -#include "helper.h" -#include "thread.h" -#include "log_thread.h" -#include "logger.h" - -void LogThread::setup() {} - -RC LogThread::run() { - tsetup(); - while (!simulation->is_done()) { - logger.processRecord(get_thd_id()); - } - return FINISH; -} - - diff --git a/contrib/deneva/system/log_thread.h b/contrib/deneva/system/log_thread.h deleted file mode 100644 index 830008f7..00000000 --- a/contrib/deneva/system/log_thread.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _LOGTHREAD_H_ -#define _LOGTHREAD_H_ - -#include "global.h" - -class Workload; - -class LogThread : public Thread { -public: - RC run(); - void setup(); -}; - -#endif diff --git a/contrib/deneva/system/logger.cpp b/contrib/deneva/system/logger.cpp deleted file mode 100644 index 322b7e6c..00000000 --- a/contrib/deneva/system/logger.cpp +++ /dev/null @@ -1,144 +0,0 @@ -#include "logger.h" -#include "work_queue.h" -#include "message.h" -#include "mem_alloc.h" -#include - - -void Logger::init(const char * log_file_name) { - this->log_file_name = log_file_name; - log_file.open(log_file_name, ios::out | ios::app | ios::binary); - assert(log_file.is_open()); - pthread_mutex_init(&mtx,NULL); -} - -void Logger::release() { log_file.close(); } - -LogRecord* Logger::createRecord(uint64_t txn_id, LogIUD iud, uint64_t table_id, uint64_t key) { - LogRecord * record = (LogRecord*)mem_allocator.alloc(sizeof(LogRecord)); - record->rcd.init(); - record->rcd.lsn = ATOM_FETCH_ADD(lsn,1); - record->rcd.iud = iud; - record->rcd.txn_id = txn_id; - record->rcd.table_id = table_id; - record->rcd.key = key; - return record; -} - -LogRecord* Logger::createRecord(LogRecord* record) { - LogRecord * my_record = (LogRecord*)mem_allocator.alloc(sizeof(LogRecord)); - my_record->rcd.init(); - my_record->copyRecord(record); - return my_record; -} - -void LogRecord::copyRecord(LogRecord* record) { - rcd.init(); - rcd.lsn = record->rcd.lsn; - rcd.iud = record->rcd.iud; - rcd.type = record->rcd.type; - rcd.txn_id = record->rcd.txn_id; - rcd.table_id = record->rcd.table_id; - rcd.key = record->rcd.key; -} - - -void Logger::enqueueRecord(LogRecord* record) { - DEBUG("Enqueue Log Record %ld\n",record->rcd.txn_id); - pthread_mutex_lock(&mtx); - log_queue.push(record); - pthread_mutex_unlock(&mtx); -} - -void Logger::processRecord(uint64_t thd_id) { - if (log_queue.empty()) return; - LogRecord * record = NULL; - pthread_mutex_lock(&mtx); - if(!log_queue.empty()) { - record = log_queue.front(); - log_queue.pop(); - } - pthread_mutex_unlock(&mtx); - - if(record) { - uint64_t starttime = get_sys_clock(); - DEBUG("Dequeue Log Record %ld\n",record->rcd.txn_id); - if(record->rcd.iud == L_NOTIFY) { - flushBuffer(thd_id); - work_queue.enqueue(thd_id,Message::create_message(record->rcd.txn_id,LOG_FLUSHED),false); - - } - writeToBuffer(thd_id,record); - //writeToBuffer((char*)(&record->rcd),sizeof(record->rcd)); - log_buf_cnt++; - mem_allocator.free(record,sizeof(LogRecord)); - INC_STATS(thd_id,log_process_time,get_sys_clock() - starttime); - } - -} - -uint64_t Logger::reserveBuffer(uint64_t size) { return ATOM_FETCH_ADD(aries_write_offset, size); } - - -void Logger::writeToBuffer(uint64_t thd_id, char * data, uint64_t size) { - uint64_t starttime = get_sys_clock(); - log_file.write(data,size); - INC_STATS(thd_id,log_write_time,get_sys_clock() - starttime); - INC_STATS(thd_id,log_write_cnt,1); -} - -void Logger::notify_on_sync(uint64_t txn_id) { - LogRecord * record = (LogRecord*)mem_allocator.alloc(sizeof(LogRecord)); - record->rcd.init(); - record->rcd.txn_id = txn_id; - record->rcd.iud = L_NOTIFY; - enqueueRecord(record); -} - -void Logger::writeToBuffer(uint64_t thd_id, LogRecord * record) { - DEBUG("Buffer Write\n"); - uint64_t starttime = get_sys_clock(); -#if LOG_COMMAND - - WRITE_VAL(log_file,record->rcd.checksum); - WRITE_VAL(log_file,record->rcd.lsn); - WRITE_VAL(log_file,record->rcd.type); - WRITE_VAL(log_file,record->rcd.txn_id); - //WRITE_VAL(log_file,record->rcd.partid); -#if WORKLOAD == TPCC - WRITE_VAL(log_file,record->rcd.txntype); -#endif - WRITE_VAL_SIZE(log_file,record->rcd.params,record->rcd.params_size); - -#else - - WRITE_VAL(log_file,record->rcd.checksum); - WRITE_VAL(log_file,record->rcd.lsn); - WRITE_VAL(log_file,record->rcd.type); - WRITE_VAL(log_file,record->rcd.iud); - WRITE_VAL(log_file,record->rcd.txn_id); - //WRITE_VAL(log_file,record->rcd.partid); - WRITE_VAL(log_file,record->rcd.table_id); - WRITE_VAL(log_file,record->rcd.key); - -#endif - INC_STATS(thd_id,log_write_time,get_sys_clock() - starttime); - -} - -void Logger::flushBufferCheck(uint64_t thd_id) { - if(log_buf_cnt >= g_log_buf_max || get_sys_clock() - last_flush > g_log_flush_timeout) { - flushBuffer(thd_id); - } -} - -void Logger::flushBuffer(uint64_t thd_id) { - DEBUG("Flush Buffer\n"); - uint64_t starttime = get_sys_clock(); - log_file.flush(); - INC_STATS(thd_id,log_flush_time,get_sys_clock() - starttime); - INC_STATS(thd_id,log_flush_cnt,1); - - last_flush = get_sys_clock(); - log_buf_cnt = 0; -} diff --git a/contrib/deneva/system/logger.h b/contrib/deneva/system/logger.h deleted file mode 100644 index b27b3dba..00000000 --- a/contrib/deneva/system/logger.h +++ /dev/null @@ -1,114 +0,0 @@ -#ifndef LOGGER_H -#define LOGGER_H - -#include "global.h" -#include "helper.h" -#include "concurrentqueue.h" -#include -#include -#include - -enum LogRecType { - LRT_INVALID = 0, - LRT_INSERT, - LRT_UPDATE, - LRT_DELETE, - LRT_TRUNCATE -}; -enum LogIUD { - L_INSERT = 0, - L_UPDATE, - L_DELETE, - L_NOTIFY -}; - -// Command log record (logical logging) -struct CmdLogRecord { - uint32_t checksum; - uint64_t lsn; - LogRecType type; - uint64_t txn_id; // transaction id -#if WORKLOAD==TPCC - TPCCTxnType txntype; -#elif WORKLOAD==YCSB - //YCSBTxnType txntype; -#endif - uint32_t params_size; - char * params; // input parameters for this transaction type -}; - -// ARIES-style log record (physiological logging) -struct AriesLogRecord { - void init() { - checksum = 0; - lsn = UINT64_MAX; - type = LRT_UPDATE; - iud = L_UPDATE; - txn_id = UINT64_MAX; - table_id = 0; - key = UINT64_MAX; - } - - uint32_t checksum; - uint64_t lsn; - LogRecType type; - LogIUD iud; - uint64_t txn_id; // transaction id - //uint32_t partid; // partition id - uint32_t table_id; // table being updated - uint64_t key; // primary key (determines the partition ID) -}; - -class LogRecord { -public: - //LogRecord(); - LogRecType getType() { return rcd.type; } - void copyRecord( LogRecord * record); - // TODO: compute a reasonable checksum - uint64_t computeChecksum() { - return (uint64_t)rcd.txn_id; - }; -#if LOG_COMMAND - CmdLogRecord rcd; -#else - AriesLogRecord rcd; -#endif -private: - bool isValid; - -}; - -class Logger { -public: - void init(const char * log_file); - void release(); - void flushBufferCheck(uint64_t thd_id); - LogRecord * createRecord(LogRecord* record); - - LogRecord * createRecord( - //LogRecType type, - uint64_t txn_id, LogIUD iud, - //uint64_t partid, - uint64_t table_id, uint64_t key); - void enqueueRecord(LogRecord* record); - void processRecord(uint64_t thd_id); - void writeToBuffer(uint64_t thd_id,char * data, uint64_t size); - void writeToBuffer(uint64_t thd_id,LogRecord* record); - uint64_t reserveBuffer(uint64_t size); - void notify_on_sync(uint64_t txn_id); -private: - pthread_mutex_t mtx; - uint64_t lsn; - - void flushBuffer(uint64_t thd_id); - std::queue log_queue; - const char * log_file_name; - std::ofstream log_file; - uint64_t aries_write_offset; - std::set txns_to_notify; - uint64_t last_flush; - uint64_t log_buf_cnt; -}; - - -#endif diff --git a/contrib/deneva/system/ltsrpc.pb.cpp b/contrib/deneva/system/ltsrpc.pb.cpp deleted file mode 100644 index ca4d94fb..00000000 --- a/contrib/deneva/system/ltsrpc.pb.cpp +++ /dev/null @@ -1,2968 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: ltsrpc.proto - -#include "ltsrpc.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include -extern PROTOBUF_INTERNAL_EXPORT_ltsrpc_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Member_ltsrpc_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_ltsrpc_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_RequestHeader_ltsrpc_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_ltsrpc_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ResponseHeader_ltsrpc_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_ltsrpc_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Status_ltsrpc_2eproto; -namespace ltsrpc { -class ClusterDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Cluster_default_instance_; -class StatusDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Status_default_instance_; -class MemberDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Member_default_instance_; -class RequestHeaderDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _RequestHeader_default_instance_; -class ResponseHeaderDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _ResponseHeader_default_instance_; -class GetMembersRequestDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _GetMembersRequest_default_instance_; -class GetMembersResponseDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _GetMembersResponse_default_instance_; -class GetTxnTimestampCtxDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _GetTxnTimestampCtx_default_instance_; -} // namespace ltsrpc -static void InitDefaultsscc_info_Cluster_ltsrpc_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::ltsrpc::_Cluster_default_instance_; - new (ptr) ::ltsrpc::Cluster(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::ltsrpc::Cluster::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Cluster_ltsrpc_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Cluster_ltsrpc_2eproto}, {}}; - -static void InitDefaultsscc_info_GetMembersRequest_ltsrpc_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::ltsrpc::_GetMembersRequest_default_instance_; - new (ptr) ::ltsrpc::GetMembersRequest(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::ltsrpc::GetMembersRequest::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_GetMembersRequest_ltsrpc_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_GetMembersRequest_ltsrpc_2eproto}, { - &scc_info_RequestHeader_ltsrpc_2eproto.base,}}; - -static void InitDefaultsscc_info_GetMembersResponse_ltsrpc_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::ltsrpc::_GetMembersResponse_default_instance_; - new (ptr) ::ltsrpc::GetMembersResponse(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::ltsrpc::GetMembersResponse::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_GetMembersResponse_ltsrpc_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_GetMembersResponse_ltsrpc_2eproto}, { - &scc_info_ResponseHeader_ltsrpc_2eproto.base, - &scc_info_Member_ltsrpc_2eproto.base,}}; - -static void InitDefaultsscc_info_GetTxnTimestampCtx_ltsrpc_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::ltsrpc::_GetTxnTimestampCtx_default_instance_; - new (ptr) ::ltsrpc::GetTxnTimestampCtx(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::ltsrpc::GetTxnTimestampCtx::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_GetTxnTimestampCtx_ltsrpc_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_GetTxnTimestampCtx_ltsrpc_2eproto}, {}}; - -static void InitDefaultsscc_info_Member_ltsrpc_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::ltsrpc::_Member_default_instance_; - new (ptr) ::ltsrpc::Member(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::ltsrpc::Member::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Member_ltsrpc_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Member_ltsrpc_2eproto}, {}}; - -static void InitDefaultsscc_info_RequestHeader_ltsrpc_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::ltsrpc::_RequestHeader_default_instance_; - new (ptr) ::ltsrpc::RequestHeader(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::ltsrpc::RequestHeader::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_RequestHeader_ltsrpc_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_RequestHeader_ltsrpc_2eproto}, {}}; - -static void InitDefaultsscc_info_ResponseHeader_ltsrpc_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::ltsrpc::_ResponseHeader_default_instance_; - new (ptr) ::ltsrpc::ResponseHeader(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::ltsrpc::ResponseHeader::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ResponseHeader_ltsrpc_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_ResponseHeader_ltsrpc_2eproto}, { - &scc_info_Status_ltsrpc_2eproto.base,}}; - -static void InitDefaultsscc_info_Status_ltsrpc_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::ltsrpc::_Status_default_instance_; - new (ptr) ::ltsrpc::Status(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::ltsrpc::Status::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Status_ltsrpc_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Status_ltsrpc_2eproto}, {}}; - -static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_ltsrpc_2eproto[8]; -static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_ltsrpc_2eproto[1]; -static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_ltsrpc_2eproto = nullptr; - -const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_ltsrpc_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::ltsrpc::Cluster, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::ltsrpc::Cluster, cluster_id_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::ltsrpc::Status, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::ltsrpc::Status, code_), - PROTOBUF_FIELD_OFFSET(::ltsrpc::Status, msg_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::ltsrpc::Member, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::ltsrpc::Member, member_id_), - PROTOBUF_FIELD_OFFSET(::ltsrpc::Member, name_), - PROTOBUF_FIELD_OFFSET(::ltsrpc::Member, peer_urls_), - PROTOBUF_FIELD_OFFSET(::ltsrpc::Member, client_urls_), - PROTOBUF_FIELD_OFFSET(::ltsrpc::Member, leader_priority_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::ltsrpc::RequestHeader, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::ltsrpc::RequestHeader, cluster_id_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::ltsrpc::ResponseHeader, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::ltsrpc::ResponseHeader, cluster_id_), - PROTOBUF_FIELD_OFFSET(::ltsrpc::ResponseHeader, status_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::ltsrpc::GetMembersRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::ltsrpc::GetMembersRequest, header_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::ltsrpc::GetMembersResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::ltsrpc::GetMembersResponse, header_), - PROTOBUF_FIELD_OFFSET(::ltsrpc::GetMembersResponse, members_), - PROTOBUF_FIELD_OFFSET(::ltsrpc::GetMembersResponse, leader_), - PROTOBUF_FIELD_OFFSET(::ltsrpc::GetMembersResponse, etcd_leader_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::ltsrpc::GetTxnTimestampCtx, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::ltsrpc::GetTxnTimestampCtx, txn_id_), - PROTOBUF_FIELD_OFFSET(::ltsrpc::GetTxnTimestampCtx, txn_ts_), -}; -static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::ltsrpc::Cluster)}, - { 6, -1, sizeof(::ltsrpc::Status)}, - { 13, -1, sizeof(::ltsrpc::Member)}, - { 23, -1, sizeof(::ltsrpc::RequestHeader)}, - { 29, -1, sizeof(::ltsrpc::ResponseHeader)}, - { 36, -1, sizeof(::ltsrpc::GetMembersRequest)}, - { 42, -1, sizeof(::ltsrpc::GetMembersResponse)}, - { 51, -1, sizeof(::ltsrpc::GetTxnTimestampCtx)}, -}; - -static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { - reinterpret_cast(&::ltsrpc::_Cluster_default_instance_), - reinterpret_cast(&::ltsrpc::_Status_default_instance_), - reinterpret_cast(&::ltsrpc::_Member_default_instance_), - reinterpret_cast(&::ltsrpc::_RequestHeader_default_instance_), - reinterpret_cast(&::ltsrpc::_ResponseHeader_default_instance_), - reinterpret_cast(&::ltsrpc::_GetMembersRequest_default_instance_), - reinterpret_cast(&::ltsrpc::_GetMembersResponse_default_instance_), - reinterpret_cast(&::ltsrpc::_GetTxnTimestampCtx_default_instance_), -}; - -const char descriptor_table_protodef_ltsrpc_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\014ltsrpc.proto\022\006ltsrpc\"\035\n\007Cluster\022\022\n\nclu" - "ster_id\030\001 \001(\r\"7\n\006Status\022 \n\004code\030\001 \001(\0162\022." - "ltsrpc.StatusCode\022\013\n\003msg\030\002 \001(\t\"j\n\006Member" - "\022\021\n\tmember_id\030\001 \001(\004\022\014\n\004name\030\002 \001(\t\022\021\n\tpee" - "r_urls\030\003 \003(\t\022\023\n\013client_urls\030\004 \003(\t\022\027\n\017lea" - "der_priority\030\005 \001(\005\"#\n\rRequestHeader\022\022\n\nc" - "luster_id\030\001 \001(\r\"D\n\016ResponseHeader\022\022\n\nclu" - "ster_id\030\001 \001(\r\022\036\n\006status\030\002 \001(\0132\016.ltsrpc.S" - "tatus\":\n\021GetMembersRequest\022%\n\006header\030\001 \001" - "(\0132\025.ltsrpc.RequestHeader\"\242\001\n\022GetMembers" - "Response\022&\n\006header\030\001 \001(\0132\026.ltsrpc.Respon" - "seHeader\022\037\n\007members\030\002 \003(\0132\016.ltsrpc.Membe" - "r\022\036\n\006leader\030\003 \001(\0132\016.ltsrpc.Member\022#\n\013etc" - "d_leader\030\004 \001(\0132\016.ltsrpc.Member\"4\n\022GetTxn" - "TimestampCtx\022\016\n\006txn_id\030\001 \001(\004\022\016\n\006txn_ts\030\002" - " \001(\004*\256\001\n\nStatusCode\022\t\n\005SC_OK\020\000\022\014\n\010SC_ERR" - "OR\020\001\022\016\n\nSC_UNKNOWN\020\002\022\021\n\rSC_NOT_LEADER\020\003\022" - "\021\n\rSC_NOT_EXISTS\020\004\022\r\n\tSC_CANCEL\020\005\022\031\n\025SC_" - "RESOURCE_EXHAUSTED\020\006\022\016\n\nSC_ABORTED\020\007\022\027\n\023" - "SC_LEADER_NOT_FOUND\020\0102\231\001\n\003LTS\022K\n\017GetTxnT" - "imestamp\022\032.ltsrpc.GetTxnTimestampCtx\032\032.l" - "tsrpc.GetTxnTimestampCtx\"\000\022E\n\nGetMembers" - "\022\031.ltsrpc.GetMembersRequest\032\032.ltsrpc.Get" - "MembersResponse\"\000b\006proto3" - ; -static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_ltsrpc_2eproto_deps[1] = { -}; -static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_ltsrpc_2eproto_sccs[8] = { - &scc_info_Cluster_ltsrpc_2eproto.base, - &scc_info_GetMembersRequest_ltsrpc_2eproto.base, - &scc_info_GetMembersResponse_ltsrpc_2eproto.base, - &scc_info_GetTxnTimestampCtx_ltsrpc_2eproto.base, - &scc_info_Member_ltsrpc_2eproto.base, - &scc_info_RequestHeader_ltsrpc_2eproto.base, - &scc_info_ResponseHeader_ltsrpc_2eproto.base, - &scc_info_Status_ltsrpc_2eproto.base, -}; -static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_ltsrpc_2eproto_once; -static bool descriptor_table_ltsrpc_2eproto_initialized = false; -const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ltsrpc_2eproto = { - &descriptor_table_ltsrpc_2eproto_initialized, descriptor_table_protodef_ltsrpc_2eproto, "ltsrpc.proto", 945, - &descriptor_table_ltsrpc_2eproto_once, descriptor_table_ltsrpc_2eproto_sccs, descriptor_table_ltsrpc_2eproto_deps, 8, 0, - schemas, file_default_instances, TableStruct_ltsrpc_2eproto::offsets, - file_level_metadata_ltsrpc_2eproto, 8, file_level_enum_descriptors_ltsrpc_2eproto, file_level_service_descriptors_ltsrpc_2eproto, -}; - -// Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_ltsrpc_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_ltsrpc_2eproto), true); -namespace ltsrpc { -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* StatusCode_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_ltsrpc_2eproto); - return file_level_enum_descriptors_ltsrpc_2eproto[0]; -} -bool StatusCode_IsValid(int value) { - switch (value) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - return true; - default: - return false; - } -} - - -// =================================================================== - -void Cluster::InitAsDefaultInstance() { -} -class Cluster::_Internal { - public: -}; - -Cluster::Cluster() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:ltsrpc.Cluster) -} -Cluster::Cluster(const Cluster& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr) { - _internal_metadata_.MergeFrom(from._internal_metadata_); - cluster_id_ = from.cluster_id_; - // @@protoc_insertion_point(copy_constructor:ltsrpc.Cluster) -} - -void Cluster::SharedCtor() { - cluster_id_ = 0u; -} - -Cluster::~Cluster() { - // @@protoc_insertion_point(destructor:ltsrpc.Cluster) - SharedDtor(); -} - -void Cluster::SharedDtor() { -} - -void Cluster::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const Cluster& Cluster::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Cluster_ltsrpc_2eproto.base); - return *internal_default_instance(); -} - - -void Cluster::Clear() { -// @@protoc_insertion_point(message_clear_start:ltsrpc.Cluster) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cluster_id_ = 0u; - _internal_metadata_.Clear(); -} - -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* Cluster::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // uint32 cluster_id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - cluster_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Cluster::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:ltsrpc.Cluster) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // uint32 cluster_id = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::uint32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT32>( - input, &cluster_id_))); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:ltsrpc.Cluster) - return true; -failure: - // @@protoc_insertion_point(parse_failure:ltsrpc.Cluster) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void Cluster::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:ltsrpc.Cluster) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // uint32 cluster_id = 1; - if (this->cluster_id() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32(1, this->cluster_id(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:ltsrpc.Cluster) -} - -::PROTOBUF_NAMESPACE_ID::uint8* Cluster::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:ltsrpc.Cluster) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // uint32 cluster_id = 1; - if (this->cluster_id() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->cluster_id(), target); - } - - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); - } - // @@protoc_insertion_point(serialize_to_array_end:ltsrpc.Cluster) - return target; -} - -size_t Cluster::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:ltsrpc.Cluster) - size_t total_size = 0; - - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // uint32 cluster_id = 1; - if (this->cluster_id() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size( - this->cluster_id()); - } - - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void Cluster::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:ltsrpc.Cluster) - GOOGLE_DCHECK_NE(&from, this); - const Cluster* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:ltsrpc.Cluster) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:ltsrpc.Cluster) - MergeFrom(*source); - } -} - -void Cluster::MergeFrom(const Cluster& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:ltsrpc.Cluster) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.cluster_id() != 0) { - set_cluster_id(from.cluster_id()); - } -} - -void Cluster::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:ltsrpc.Cluster) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void Cluster::CopyFrom(const Cluster& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:ltsrpc.Cluster) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Cluster::IsInitialized() const { - return true; -} - -void Cluster::InternalSwap(Cluster* other) { - using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - swap(cluster_id_, other->cluster_id_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Cluster::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void Status::InitAsDefaultInstance() { -} -class Status::_Internal { - public: -}; - -Status::Status() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:ltsrpc.Status) -} -Status::Status(const Status& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr) { - _internal_metadata_.MergeFrom(from._internal_metadata_); - msg_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from.msg().empty()) { - msg_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.msg_); - } - code_ = from.code_; - // @@protoc_insertion_point(copy_constructor:ltsrpc.Status) -} - -void Status::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Status_ltsrpc_2eproto.base); - msg_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - code_ = 0; -} - -Status::~Status() { - // @@protoc_insertion_point(destructor:ltsrpc.Status) - SharedDtor(); -} - -void Status::SharedDtor() { - msg_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void Status::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const Status& Status::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Status_ltsrpc_2eproto.base); - return *internal_default_instance(); -} - - -void Status::Clear() { -// @@protoc_insertion_point(message_clear_start:ltsrpc.Status) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - msg_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - code_ = 0; - _internal_metadata_.Clear(); -} - -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* Status::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // .ltsrpc.StatusCode code = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); - CHK_(ptr); - set_code(static_cast<::ltsrpc::StatusCode>(val)); - } else goto handle_unusual; - continue; - // string msg = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_msg(), ptr, ctx, "ltsrpc.Status.msg"); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Status::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:ltsrpc.Status) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .ltsrpc.StatusCode code = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - int value = 0; - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - set_code(static_cast< ::ltsrpc::StatusCode >(value)); - } else { - goto handle_unusual; - } - break; - } - - // string msg = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_msg())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->msg().data(), static_cast(this->msg().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "ltsrpc.Status.msg")); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:ltsrpc.Status) - return true; -failure: - // @@protoc_insertion_point(parse_failure:ltsrpc.Status) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void Status::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:ltsrpc.Status) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // .ltsrpc.StatusCode code = 1; - if (this->code() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( - 1, this->code(), output); - } - - // string msg = 2; - if (this->msg().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->msg().data(), static_cast(this->msg().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "ltsrpc.Status.msg"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 2, this->msg(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:ltsrpc.Status) -} - -::PROTOBUF_NAMESPACE_ID::uint8* Status::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:ltsrpc.Status) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // .ltsrpc.StatusCode code = 1; - if (this->code() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 1, this->code(), target); - } - - // string msg = 2; - if (this->msg().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->msg().data(), static_cast(this->msg().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "ltsrpc.Status.msg"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 2, this->msg(), target); - } - - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); - } - // @@protoc_insertion_point(serialize_to_array_end:ltsrpc.Status) - return target; -} - -size_t Status::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:ltsrpc.Status) - size_t total_size = 0; - - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string msg = 2; - if (this->msg().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->msg()); - } - - // .ltsrpc.StatusCode code = 1; - if (this->code() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->code()); - } - - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void Status::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:ltsrpc.Status) - GOOGLE_DCHECK_NE(&from, this); - const Status* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:ltsrpc.Status) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:ltsrpc.Status) - MergeFrom(*source); - } -} - -void Status::MergeFrom(const Status& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:ltsrpc.Status) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.msg().size() > 0) { - - msg_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.msg_); - } - if (from.code() != 0) { - set_code(from.code()); - } -} - -void Status::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:ltsrpc.Status) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void Status::CopyFrom(const Status& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:ltsrpc.Status) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Status::IsInitialized() const { - return true; -} - -void Status::InternalSwap(Status* other) { - using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - msg_.Swap(&other->msg_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - swap(code_, other->code_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Status::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void Member::InitAsDefaultInstance() { -} -class Member::_Internal { - public: -}; - -Member::Member() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:ltsrpc.Member) -} -Member::Member(const Member& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), - peer_urls_(from.peer_urls_), - client_urls_(from.client_urls_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); - name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from.name().empty()) { - name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); - } - ::memcpy(&member_id_, &from.member_id_, - static_cast(reinterpret_cast(&leader_priority_) - - reinterpret_cast(&member_id_)) + sizeof(leader_priority_)); - // @@protoc_insertion_point(copy_constructor:ltsrpc.Member) -} - -void Member::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Member_ltsrpc_2eproto.base); - name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - ::memset(&member_id_, 0, static_cast( - reinterpret_cast(&leader_priority_) - - reinterpret_cast(&member_id_)) + sizeof(leader_priority_)); -} - -Member::~Member() { - // @@protoc_insertion_point(destructor:ltsrpc.Member) - SharedDtor(); -} - -void Member::SharedDtor() { - name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void Member::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const Member& Member::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Member_ltsrpc_2eproto.base); - return *internal_default_instance(); -} - - -void Member::Clear() { -// @@protoc_insertion_point(message_clear_start:ltsrpc.Member) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - peer_urls_.Clear(); - client_urls_.Clear(); - name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - ::memset(&member_id_, 0, static_cast( - reinterpret_cast(&leader_priority_) - - reinterpret_cast(&member_id_)) + sizeof(leader_priority_)); - _internal_metadata_.Clear(); -} - -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* Member::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // uint64 member_id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - member_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string name = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "ltsrpc.Member.name"); - CHK_(ptr); - } else goto handle_unusual; - continue; - // repeated string peer_urls = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr -= 1; - do { - ptr += 1; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_peer_urls(), ptr, ctx, "ltsrpc.Member.peer_urls"); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26); - } else goto handle_unusual; - continue; - // repeated string client_urls = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { - ptr -= 1; - do { - ptr += 1; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_client_urls(), ptr, ctx, "ltsrpc.Member.client_urls"); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 34); - } else goto handle_unusual; - continue; - // int32 leader_priority = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - leader_priority_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Member::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:ltsrpc.Member) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // uint64 member_id = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>( - input, &member_id_))); - } else { - goto handle_unusual; - } - break; - } - - // string name = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "ltsrpc.Member.name")); - } else { - goto handle_unusual; - } - break; - } - - // repeated string peer_urls = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->add_peer_urls())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->peer_urls(this->peer_urls_size() - 1).data(), - static_cast(this->peer_urls(this->peer_urls_size() - 1).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "ltsrpc.Member.peer_urls")); - } else { - goto handle_unusual; - } - break; - } - - // repeated string client_urls = 4; - case 4: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->add_client_urls())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->client_urls(this->client_urls_size() - 1).data(), - static_cast(this->client_urls(this->client_urls_size() - 1).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "ltsrpc.Member.client_urls")); - } else { - goto handle_unusual; - } - break; - } - - // int32 leader_priority = 5; - case 5: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, &leader_priority_))); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:ltsrpc.Member) - return true; -failure: - // @@protoc_insertion_point(parse_failure:ltsrpc.Member) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void Member::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:ltsrpc.Member) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // uint64 member_id = 1; - if (this->member_id() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(1, this->member_id(), output); - } - - // string name = 2; - if (this->name().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "ltsrpc.Member.name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 2, this->name(), output); - } - - // repeated string peer_urls = 3; - for (int i = 0, n = this->peer_urls_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->peer_urls(i).data(), static_cast(this->peer_urls(i).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "ltsrpc.Member.peer_urls"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( - 3, this->peer_urls(i), output); - } - - // repeated string client_urls = 4; - for (int i = 0, n = this->client_urls_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->client_urls(i).data(), static_cast(this->client_urls(i).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "ltsrpc.Member.client_urls"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( - 4, this->client_urls(i), output); - } - - // int32 leader_priority = 5; - if (this->leader_priority() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(5, this->leader_priority(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:ltsrpc.Member) -} - -::PROTOBUF_NAMESPACE_ID::uint8* Member::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:ltsrpc.Member) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // uint64 member_id = 1; - if (this->member_id() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(1, this->member_id(), target); - } - - // string name = 2; - if (this->name().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "ltsrpc.Member.name"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 2, this->name(), target); - } - - // repeated string peer_urls = 3; - for (int i = 0, n = this->peer_urls_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->peer_urls(i).data(), static_cast(this->peer_urls(i).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "ltsrpc.Member.peer_urls"); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteStringToArray(3, this->peer_urls(i), target); - } - - // repeated string client_urls = 4; - for (int i = 0, n = this->client_urls_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->client_urls(i).data(), static_cast(this->client_urls(i).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "ltsrpc.Member.client_urls"); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteStringToArray(4, this->client_urls(i), target); - } - - // int32 leader_priority = 5; - if (this->leader_priority() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->leader_priority(), target); - } - - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); - } - // @@protoc_insertion_point(serialize_to_array_end:ltsrpc.Member) - return target; -} - -size_t Member::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:ltsrpc.Member) - size_t total_size = 0; - - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated string peer_urls = 3; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->peer_urls_size()); - for (int i = 0, n = this->peer_urls_size(); i < n; i++) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->peer_urls(i)); - } - - // repeated string client_urls = 4; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->client_urls_size()); - for (int i = 0, n = this->client_urls_size(); i < n; i++) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->client_urls(i)); - } - - // string name = 2; - if (this->name().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->name()); - } - - // uint64 member_id = 1; - if (this->member_id() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( - this->member_id()); - } - - // int32 leader_priority = 5; - if (this->leader_priority() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->leader_priority()); - } - - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void Member::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:ltsrpc.Member) - GOOGLE_DCHECK_NE(&from, this); - const Member* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:ltsrpc.Member) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:ltsrpc.Member) - MergeFrom(*source); - } -} - -void Member::MergeFrom(const Member& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:ltsrpc.Member) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - peer_urls_.MergeFrom(from.peer_urls_); - client_urls_.MergeFrom(from.client_urls_); - if (from.name().size() > 0) { - - name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); - } - if (from.member_id() != 0) { - set_member_id(from.member_id()); - } - if (from.leader_priority() != 0) { - set_leader_priority(from.leader_priority()); - } -} - -void Member::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:ltsrpc.Member) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void Member::CopyFrom(const Member& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:ltsrpc.Member) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Member::IsInitialized() const { - return true; -} - -void Member::InternalSwap(Member* other) { - using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - peer_urls_.InternalSwap(CastToBase(&other->peer_urls_)); - client_urls_.InternalSwap(CastToBase(&other->client_urls_)); - name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - swap(member_id_, other->member_id_); - swap(leader_priority_, other->leader_priority_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Member::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void RequestHeader::InitAsDefaultInstance() { -} -class RequestHeader::_Internal { - public: -}; - -RequestHeader::RequestHeader() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:ltsrpc.RequestHeader) -} -RequestHeader::RequestHeader(const RequestHeader& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr) { - _internal_metadata_.MergeFrom(from._internal_metadata_); - cluster_id_ = from.cluster_id_; - // @@protoc_insertion_point(copy_constructor:ltsrpc.RequestHeader) -} - -void RequestHeader::SharedCtor() { - cluster_id_ = 0u; -} - -RequestHeader::~RequestHeader() { - // @@protoc_insertion_point(destructor:ltsrpc.RequestHeader) - SharedDtor(); -} - -void RequestHeader::SharedDtor() { -} - -void RequestHeader::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const RequestHeader& RequestHeader::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RequestHeader_ltsrpc_2eproto.base); - return *internal_default_instance(); -} - - -void RequestHeader::Clear() { -// @@protoc_insertion_point(message_clear_start:ltsrpc.RequestHeader) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cluster_id_ = 0u; - _internal_metadata_.Clear(); -} - -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* RequestHeader::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // uint32 cluster_id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - cluster_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool RequestHeader::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:ltsrpc.RequestHeader) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // uint32 cluster_id = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::uint32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT32>( - input, &cluster_id_))); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:ltsrpc.RequestHeader) - return true; -failure: - // @@protoc_insertion_point(parse_failure:ltsrpc.RequestHeader) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void RequestHeader::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:ltsrpc.RequestHeader) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // uint32 cluster_id = 1; - if (this->cluster_id() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32(1, this->cluster_id(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:ltsrpc.RequestHeader) -} - -::PROTOBUF_NAMESPACE_ID::uint8* RequestHeader::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:ltsrpc.RequestHeader) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // uint32 cluster_id = 1; - if (this->cluster_id() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->cluster_id(), target); - } - - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); - } - // @@protoc_insertion_point(serialize_to_array_end:ltsrpc.RequestHeader) - return target; -} - -size_t RequestHeader::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:ltsrpc.RequestHeader) - size_t total_size = 0; - - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // uint32 cluster_id = 1; - if (this->cluster_id() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size( - this->cluster_id()); - } - - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void RequestHeader::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:ltsrpc.RequestHeader) - GOOGLE_DCHECK_NE(&from, this); - const RequestHeader* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:ltsrpc.RequestHeader) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:ltsrpc.RequestHeader) - MergeFrom(*source); - } -} - -void RequestHeader::MergeFrom(const RequestHeader& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:ltsrpc.RequestHeader) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.cluster_id() != 0) { - set_cluster_id(from.cluster_id()); - } -} - -void RequestHeader::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:ltsrpc.RequestHeader) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void RequestHeader::CopyFrom(const RequestHeader& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:ltsrpc.RequestHeader) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool RequestHeader::IsInitialized() const { - return true; -} - -void RequestHeader::InternalSwap(RequestHeader* other) { - using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - swap(cluster_id_, other->cluster_id_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata RequestHeader::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void ResponseHeader::InitAsDefaultInstance() { - ::ltsrpc::_ResponseHeader_default_instance_._instance.get_mutable()->status_ = const_cast< ::ltsrpc::Status*>( - ::ltsrpc::Status::internal_default_instance()); -} -class ResponseHeader::_Internal { - public: - static const ::ltsrpc::Status& status(const ResponseHeader* msg); -}; - -const ::ltsrpc::Status& -ResponseHeader::_Internal::status(const ResponseHeader* msg) { - return *msg->status_; -} -ResponseHeader::ResponseHeader() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:ltsrpc.ResponseHeader) -} -ResponseHeader::ResponseHeader(const ResponseHeader& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr) { - _internal_metadata_.MergeFrom(from._internal_metadata_); - if (from.has_status()) { - status_ = new ::ltsrpc::Status(*from.status_); - } else { - status_ = nullptr; - } - cluster_id_ = from.cluster_id_; - // @@protoc_insertion_point(copy_constructor:ltsrpc.ResponseHeader) -} - -void ResponseHeader::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ResponseHeader_ltsrpc_2eproto.base); - ::memset(&status_, 0, static_cast( - reinterpret_cast(&cluster_id_) - - reinterpret_cast(&status_)) + sizeof(cluster_id_)); -} - -ResponseHeader::~ResponseHeader() { - // @@protoc_insertion_point(destructor:ltsrpc.ResponseHeader) - SharedDtor(); -} - -void ResponseHeader::SharedDtor() { - if (this != internal_default_instance()) delete status_; -} - -void ResponseHeader::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const ResponseHeader& ResponseHeader::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ResponseHeader_ltsrpc_2eproto.base); - return *internal_default_instance(); -} - - -void ResponseHeader::Clear() { -// @@protoc_insertion_point(message_clear_start:ltsrpc.ResponseHeader) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - if (GetArenaNoVirtual() == nullptr && status_ != nullptr) { - delete status_; - } - status_ = nullptr; - cluster_id_ = 0u; - _internal_metadata_.Clear(); -} - -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* ResponseHeader::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // uint32 cluster_id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - cluster_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // .ltsrpc.Status status = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ctx->ParseMessage(mutable_status(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool ResponseHeader::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:ltsrpc.ResponseHeader) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // uint32 cluster_id = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::uint32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT32>( - input, &cluster_id_))); - } else { - goto handle_unusual; - } - break; - } - - // .ltsrpc.Status status = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_status())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:ltsrpc.ResponseHeader) - return true; -failure: - // @@protoc_insertion_point(parse_failure:ltsrpc.ResponseHeader) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void ResponseHeader::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:ltsrpc.ResponseHeader) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // uint32 cluster_id = 1; - if (this->cluster_id() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32(1, this->cluster_id(), output); - } - - // .ltsrpc.Status status = 2; - if (this->has_status()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, _Internal::status(this), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:ltsrpc.ResponseHeader) -} - -::PROTOBUF_NAMESPACE_ID::uint8* ResponseHeader::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:ltsrpc.ResponseHeader) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // uint32 cluster_id = 1; - if (this->cluster_id() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->cluster_id(), target); - } - - // .ltsrpc.Status status = 2; - if (this->has_status()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 2, _Internal::status(this), target); - } - - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); - } - // @@protoc_insertion_point(serialize_to_array_end:ltsrpc.ResponseHeader) - return target; -} - -size_t ResponseHeader::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:ltsrpc.ResponseHeader) - size_t total_size = 0; - - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // .ltsrpc.Status status = 2; - if (this->has_status()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *status_); - } - - // uint32 cluster_id = 1; - if (this->cluster_id() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size( - this->cluster_id()); - } - - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void ResponseHeader::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:ltsrpc.ResponseHeader) - GOOGLE_DCHECK_NE(&from, this); - const ResponseHeader* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:ltsrpc.ResponseHeader) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:ltsrpc.ResponseHeader) - MergeFrom(*source); - } -} - -void ResponseHeader::MergeFrom(const ResponseHeader& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:ltsrpc.ResponseHeader) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.has_status()) { - mutable_status()->::ltsrpc::Status::MergeFrom(from.status()); - } - if (from.cluster_id() != 0) { - set_cluster_id(from.cluster_id()); - } -} - -void ResponseHeader::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:ltsrpc.ResponseHeader) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void ResponseHeader::CopyFrom(const ResponseHeader& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:ltsrpc.ResponseHeader) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ResponseHeader::IsInitialized() const { - return true; -} - -void ResponseHeader::InternalSwap(ResponseHeader* other) { - using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - swap(status_, other->status_); - swap(cluster_id_, other->cluster_id_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata ResponseHeader::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void GetMembersRequest::InitAsDefaultInstance() { - ::ltsrpc::_GetMembersRequest_default_instance_._instance.get_mutable()->header_ = const_cast< ::ltsrpc::RequestHeader*>( - ::ltsrpc::RequestHeader::internal_default_instance()); -} -class GetMembersRequest::_Internal { - public: - static const ::ltsrpc::RequestHeader& header(const GetMembersRequest* msg); -}; - -const ::ltsrpc::RequestHeader& -GetMembersRequest::_Internal::header(const GetMembersRequest* msg) { - return *msg->header_; -} -GetMembersRequest::GetMembersRequest() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:ltsrpc.GetMembersRequest) -} -GetMembersRequest::GetMembersRequest(const GetMembersRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr) { - _internal_metadata_.MergeFrom(from._internal_metadata_); - if (from.has_header()) { - header_ = new ::ltsrpc::RequestHeader(*from.header_); - } else { - header_ = nullptr; - } - // @@protoc_insertion_point(copy_constructor:ltsrpc.GetMembersRequest) -} - -void GetMembersRequest::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_GetMembersRequest_ltsrpc_2eproto.base); - header_ = nullptr; -} - -GetMembersRequest::~GetMembersRequest() { - // @@protoc_insertion_point(destructor:ltsrpc.GetMembersRequest) - SharedDtor(); -} - -void GetMembersRequest::SharedDtor() { - if (this != internal_default_instance()) delete header_; -} - -void GetMembersRequest::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const GetMembersRequest& GetMembersRequest::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_GetMembersRequest_ltsrpc_2eproto.base); - return *internal_default_instance(); -} - - -void GetMembersRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:ltsrpc.GetMembersRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - if (GetArenaNoVirtual() == nullptr && header_ != nullptr) { - delete header_; - } - header_ = nullptr; - _internal_metadata_.Clear(); -} - -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* GetMembersRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // .ltsrpc.RequestHeader header = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ctx->ParseMessage(mutable_header(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool GetMembersRequest::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:ltsrpc.GetMembersRequest) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .ltsrpc.RequestHeader header = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_header())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:ltsrpc.GetMembersRequest) - return true; -failure: - // @@protoc_insertion_point(parse_failure:ltsrpc.GetMembersRequest) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void GetMembersRequest::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:ltsrpc.GetMembersRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // .ltsrpc.RequestHeader header = 1; - if (this->has_header()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, _Internal::header(this), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:ltsrpc.GetMembersRequest) -} - -::PROTOBUF_NAMESPACE_ID::uint8* GetMembersRequest::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:ltsrpc.GetMembersRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // .ltsrpc.RequestHeader header = 1; - if (this->has_header()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 1, _Internal::header(this), target); - } - - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); - } - // @@protoc_insertion_point(serialize_to_array_end:ltsrpc.GetMembersRequest) - return target; -} - -size_t GetMembersRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:ltsrpc.GetMembersRequest) - size_t total_size = 0; - - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // .ltsrpc.RequestHeader header = 1; - if (this->has_header()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *header_); - } - - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void GetMembersRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:ltsrpc.GetMembersRequest) - GOOGLE_DCHECK_NE(&from, this); - const GetMembersRequest* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:ltsrpc.GetMembersRequest) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:ltsrpc.GetMembersRequest) - MergeFrom(*source); - } -} - -void GetMembersRequest::MergeFrom(const GetMembersRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:ltsrpc.GetMembersRequest) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.has_header()) { - mutable_header()->::ltsrpc::RequestHeader::MergeFrom(from.header()); - } -} - -void GetMembersRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:ltsrpc.GetMembersRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void GetMembersRequest::CopyFrom(const GetMembersRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:ltsrpc.GetMembersRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool GetMembersRequest::IsInitialized() const { - return true; -} - -void GetMembersRequest::InternalSwap(GetMembersRequest* other) { - using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - swap(header_, other->header_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata GetMembersRequest::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void GetMembersResponse::InitAsDefaultInstance() { - ::ltsrpc::_GetMembersResponse_default_instance_._instance.get_mutable()->header_ = const_cast< ::ltsrpc::ResponseHeader*>( - ::ltsrpc::ResponseHeader::internal_default_instance()); - ::ltsrpc::_GetMembersResponse_default_instance_._instance.get_mutable()->leader_ = const_cast< ::ltsrpc::Member*>( - ::ltsrpc::Member::internal_default_instance()); - ::ltsrpc::_GetMembersResponse_default_instance_._instance.get_mutable()->etcd_leader_ = const_cast< ::ltsrpc::Member*>( - ::ltsrpc::Member::internal_default_instance()); -} -class GetMembersResponse::_Internal { - public: - static const ::ltsrpc::ResponseHeader& header(const GetMembersResponse* msg); - static const ::ltsrpc::Member& leader(const GetMembersResponse* msg); - static const ::ltsrpc::Member& etcd_leader(const GetMembersResponse* msg); -}; - -const ::ltsrpc::ResponseHeader& -GetMembersResponse::_Internal::header(const GetMembersResponse* msg) { - return *msg->header_; -} -const ::ltsrpc::Member& -GetMembersResponse::_Internal::leader(const GetMembersResponse* msg) { - return *msg->leader_; -} -const ::ltsrpc::Member& -GetMembersResponse::_Internal::etcd_leader(const GetMembersResponse* msg) { - return *msg->etcd_leader_; -} -GetMembersResponse::GetMembersResponse() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:ltsrpc.GetMembersResponse) -} -GetMembersResponse::GetMembersResponse(const GetMembersResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), - members_(from.members_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); - if (from.has_header()) { - header_ = new ::ltsrpc::ResponseHeader(*from.header_); - } else { - header_ = nullptr; - } - if (from.has_leader()) { - leader_ = new ::ltsrpc::Member(*from.leader_); - } else { - leader_ = nullptr; - } - if (from.has_etcd_leader()) { - etcd_leader_ = new ::ltsrpc::Member(*from.etcd_leader_); - } else { - etcd_leader_ = nullptr; - } - // @@protoc_insertion_point(copy_constructor:ltsrpc.GetMembersResponse) -} - -void GetMembersResponse::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_GetMembersResponse_ltsrpc_2eproto.base); - ::memset(&header_, 0, static_cast( - reinterpret_cast(&etcd_leader_) - - reinterpret_cast(&header_)) + sizeof(etcd_leader_)); -} - -GetMembersResponse::~GetMembersResponse() { - // @@protoc_insertion_point(destructor:ltsrpc.GetMembersResponse) - SharedDtor(); -} - -void GetMembersResponse::SharedDtor() { - if (this != internal_default_instance()) delete header_; - if (this != internal_default_instance()) delete leader_; - if (this != internal_default_instance()) delete etcd_leader_; -} - -void GetMembersResponse::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const GetMembersResponse& GetMembersResponse::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_GetMembersResponse_ltsrpc_2eproto.base); - return *internal_default_instance(); -} - - -void GetMembersResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:ltsrpc.GetMembersResponse) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - members_.Clear(); - if (GetArenaNoVirtual() == nullptr && header_ != nullptr) { - delete header_; - } - header_ = nullptr; - if (GetArenaNoVirtual() == nullptr && leader_ != nullptr) { - delete leader_; - } - leader_ = nullptr; - if (GetArenaNoVirtual() == nullptr && etcd_leader_ != nullptr) { - delete etcd_leader_; - } - etcd_leader_ = nullptr; - _internal_metadata_.Clear(); -} - -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* GetMembersResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // .ltsrpc.ResponseHeader header = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ctx->ParseMessage(mutable_header(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // repeated .ltsrpc.Member members = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(add_members(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); - } else goto handle_unusual; - continue; - // .ltsrpc.Member leader = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr = ctx->ParseMessage(mutable_leader(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // .ltsrpc.Member etcd_leader = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { - ptr = ctx->ParseMessage(mutable_etcd_leader(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool GetMembersResponse::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:ltsrpc.GetMembersResponse) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .ltsrpc.ResponseHeader header = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_header())); - } else { - goto handle_unusual; - } - break; - } - - // repeated .ltsrpc.Member members = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_members())); - } else { - goto handle_unusual; - } - break; - } - - // .ltsrpc.Member leader = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_leader())); - } else { - goto handle_unusual; - } - break; - } - - // .ltsrpc.Member etcd_leader = 4; - case 4: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_etcd_leader())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:ltsrpc.GetMembersResponse) - return true; -failure: - // @@protoc_insertion_point(parse_failure:ltsrpc.GetMembersResponse) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void GetMembersResponse::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:ltsrpc.GetMembersResponse) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // .ltsrpc.ResponseHeader header = 1; - if (this->has_header()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, _Internal::header(this), output); - } - - // repeated .ltsrpc.Member members = 2; - for (unsigned int i = 0, - n = static_cast(this->members_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, - this->members(static_cast(i)), - output); - } - - // .ltsrpc.Member leader = 3; - if (this->has_leader()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, _Internal::leader(this), output); - } - - // .ltsrpc.Member etcd_leader = 4; - if (this->has_etcd_leader()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 4, _Internal::etcd_leader(this), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:ltsrpc.GetMembersResponse) -} - -::PROTOBUF_NAMESPACE_ID::uint8* GetMembersResponse::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:ltsrpc.GetMembersResponse) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // .ltsrpc.ResponseHeader header = 1; - if (this->has_header()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 1, _Internal::header(this), target); - } - - // repeated .ltsrpc.Member members = 2; - for (unsigned int i = 0, - n = static_cast(this->members_size()); i < n; i++) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 2, this->members(static_cast(i)), target); - } - - // .ltsrpc.Member leader = 3; - if (this->has_leader()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 3, _Internal::leader(this), target); - } - - // .ltsrpc.Member etcd_leader = 4; - if (this->has_etcd_leader()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 4, _Internal::etcd_leader(this), target); - } - - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); - } - // @@protoc_insertion_point(serialize_to_array_end:ltsrpc.GetMembersResponse) - return target; -} - -size_t GetMembersResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:ltsrpc.GetMembersResponse) - size_t total_size = 0; - - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated .ltsrpc.Member members = 2; - { - unsigned int count = static_cast(this->members_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->members(static_cast(i))); - } - } - - // .ltsrpc.ResponseHeader header = 1; - if (this->has_header()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *header_); - } - - // .ltsrpc.Member leader = 3; - if (this->has_leader()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *leader_); - } - - // .ltsrpc.Member etcd_leader = 4; - if (this->has_etcd_leader()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *etcd_leader_); - } - - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void GetMembersResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:ltsrpc.GetMembersResponse) - GOOGLE_DCHECK_NE(&from, this); - const GetMembersResponse* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:ltsrpc.GetMembersResponse) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:ltsrpc.GetMembersResponse) - MergeFrom(*source); - } -} - -void GetMembersResponse::MergeFrom(const GetMembersResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:ltsrpc.GetMembersResponse) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - members_.MergeFrom(from.members_); - if (from.has_header()) { - mutable_header()->::ltsrpc::ResponseHeader::MergeFrom(from.header()); - } - if (from.has_leader()) { - mutable_leader()->::ltsrpc::Member::MergeFrom(from.leader()); - } - if (from.has_etcd_leader()) { - mutable_etcd_leader()->::ltsrpc::Member::MergeFrom(from.etcd_leader()); - } -} - -void GetMembersResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:ltsrpc.GetMembersResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void GetMembersResponse::CopyFrom(const GetMembersResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:ltsrpc.GetMembersResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool GetMembersResponse::IsInitialized() const { - return true; -} - -void GetMembersResponse::InternalSwap(GetMembersResponse* other) { - using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - CastToBase(&members_)->InternalSwap(CastToBase(&other->members_)); - swap(header_, other->header_); - swap(leader_, other->leader_); - swap(etcd_leader_, other->etcd_leader_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata GetMembersResponse::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void GetTxnTimestampCtx::InitAsDefaultInstance() { -} -class GetTxnTimestampCtx::_Internal { - public: -}; - -GetTxnTimestampCtx::GetTxnTimestampCtx() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:ltsrpc.GetTxnTimestampCtx) -} -GetTxnTimestampCtx::GetTxnTimestampCtx(const GetTxnTimestampCtx& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr) { - _internal_metadata_.MergeFrom(from._internal_metadata_); - ::memcpy(&txn_id_, &from.txn_id_, - static_cast(reinterpret_cast(&txn_ts_) - - reinterpret_cast(&txn_id_)) + sizeof(txn_ts_)); - // @@protoc_insertion_point(copy_constructor:ltsrpc.GetTxnTimestampCtx) -} - -void GetTxnTimestampCtx::SharedCtor() { - ::memset(&txn_id_, 0, static_cast( - reinterpret_cast(&txn_ts_) - - reinterpret_cast(&txn_id_)) + sizeof(txn_ts_)); -} - -GetTxnTimestampCtx::~GetTxnTimestampCtx() { - // @@protoc_insertion_point(destructor:ltsrpc.GetTxnTimestampCtx) - SharedDtor(); -} - -void GetTxnTimestampCtx::SharedDtor() { -} - -void GetTxnTimestampCtx::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const GetTxnTimestampCtx& GetTxnTimestampCtx::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_GetTxnTimestampCtx_ltsrpc_2eproto.base); - return *internal_default_instance(); -} - - -void GetTxnTimestampCtx::Clear() { -// @@protoc_insertion_point(message_clear_start:ltsrpc.GetTxnTimestampCtx) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - ::memset(&txn_id_, 0, static_cast( - reinterpret_cast(&txn_ts_) - - reinterpret_cast(&txn_id_)) + sizeof(txn_ts_)); - _internal_metadata_.Clear(); -} - -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* GetTxnTimestampCtx::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // uint64 txn_id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - txn_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // uint64 txn_ts = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - txn_ts_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool GetTxnTimestampCtx::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:ltsrpc.GetTxnTimestampCtx) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // uint64 txn_id = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>( - input, &txn_id_))); - } else { - goto handle_unusual; - } - break; - } - - // uint64 txn_ts = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>( - input, &txn_ts_))); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:ltsrpc.GetTxnTimestampCtx) - return true; -failure: - // @@protoc_insertion_point(parse_failure:ltsrpc.GetTxnTimestampCtx) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void GetTxnTimestampCtx::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:ltsrpc.GetTxnTimestampCtx) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // uint64 txn_id = 1; - if (this->txn_id() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(1, this->txn_id(), output); - } - - // uint64 txn_ts = 2; - if (this->txn_ts() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(2, this->txn_ts(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:ltsrpc.GetTxnTimestampCtx) -} - -::PROTOBUF_NAMESPACE_ID::uint8* GetTxnTimestampCtx::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:ltsrpc.GetTxnTimestampCtx) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // uint64 txn_id = 1; - if (this->txn_id() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(1, this->txn_id(), target); - } - - // uint64 txn_ts = 2; - if (this->txn_ts() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(2, this->txn_ts(), target); - } - - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); - } - // @@protoc_insertion_point(serialize_to_array_end:ltsrpc.GetTxnTimestampCtx) - return target; -} - -size_t GetTxnTimestampCtx::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:ltsrpc.GetTxnTimestampCtx) - size_t total_size = 0; - - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // uint64 txn_id = 1; - if (this->txn_id() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( - this->txn_id()); - } - - // uint64 txn_ts = 2; - if (this->txn_ts() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( - this->txn_ts()); - } - - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void GetTxnTimestampCtx::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:ltsrpc.GetTxnTimestampCtx) - GOOGLE_DCHECK_NE(&from, this); - const GetTxnTimestampCtx* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:ltsrpc.GetTxnTimestampCtx) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:ltsrpc.GetTxnTimestampCtx) - MergeFrom(*source); - } -} - -void GetTxnTimestampCtx::MergeFrom(const GetTxnTimestampCtx& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:ltsrpc.GetTxnTimestampCtx) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.txn_id() != 0) { - set_txn_id(from.txn_id()); - } - if (from.txn_ts() != 0) { - set_txn_ts(from.txn_ts()); - } -} - -void GetTxnTimestampCtx::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:ltsrpc.GetTxnTimestampCtx) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void GetTxnTimestampCtx::CopyFrom(const GetTxnTimestampCtx& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:ltsrpc.GetTxnTimestampCtx) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool GetTxnTimestampCtx::IsInitialized() const { - return true; -} - -void GetTxnTimestampCtx::InternalSwap(GetTxnTimestampCtx* other) { - using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - swap(txn_id_, other->txn_id_); - swap(txn_ts_, other->txn_ts_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata GetTxnTimestampCtx::GetMetadata() const { - return GetMetadataStatic(); -} - - -// @@protoc_insertion_point(namespace_scope) -} // namespace ltsrpc -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::ltsrpc::Cluster* Arena::CreateMaybeMessage< ::ltsrpc::Cluster >(Arena* arena) { - return Arena::CreateInternal< ::ltsrpc::Cluster >(arena); -} -template<> PROTOBUF_NOINLINE ::ltsrpc::Status* Arena::CreateMaybeMessage< ::ltsrpc::Status >(Arena* arena) { - return Arena::CreateInternal< ::ltsrpc::Status >(arena); -} -template<> PROTOBUF_NOINLINE ::ltsrpc::Member* Arena::CreateMaybeMessage< ::ltsrpc::Member >(Arena* arena) { - return Arena::CreateInternal< ::ltsrpc::Member >(arena); -} -template<> PROTOBUF_NOINLINE ::ltsrpc::RequestHeader* Arena::CreateMaybeMessage< ::ltsrpc::RequestHeader >(Arena* arena) { - return Arena::CreateInternal< ::ltsrpc::RequestHeader >(arena); -} -template<> PROTOBUF_NOINLINE ::ltsrpc::ResponseHeader* Arena::CreateMaybeMessage< ::ltsrpc::ResponseHeader >(Arena* arena) { - return Arena::CreateInternal< ::ltsrpc::ResponseHeader >(arena); -} -template<> PROTOBUF_NOINLINE ::ltsrpc::GetMembersRequest* Arena::CreateMaybeMessage< ::ltsrpc::GetMembersRequest >(Arena* arena) { - return Arena::CreateInternal< ::ltsrpc::GetMembersRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::ltsrpc::GetMembersResponse* Arena::CreateMaybeMessage< ::ltsrpc::GetMembersResponse >(Arena* arena) { - return Arena::CreateInternal< ::ltsrpc::GetMembersResponse >(arena); -} -template<> PROTOBUF_NOINLINE ::ltsrpc::GetTxnTimestampCtx* Arena::CreateMaybeMessage< ::ltsrpc::GetTxnTimestampCtx >(Arena* arena) { - return Arena::CreateInternal< ::ltsrpc::GetTxnTimestampCtx >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/contrib/deneva/system/ltsrpc.pb.h b/contrib/deneva/system/ltsrpc.pb.h deleted file mode 100644 index 96c57b97..00000000 --- a/contrib/deneva/system/ltsrpc.pb.h +++ /dev/null @@ -1,2006 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: ltsrpc.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_ltsrpc_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_ltsrpc_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3009000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3009001 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_ltsrpc_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_ltsrpc_2eproto { - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[8] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; - static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; - static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ltsrpc_2eproto; -namespace ltsrpc { -class Cluster; -class ClusterDefaultTypeInternal; -extern ClusterDefaultTypeInternal _Cluster_default_instance_; -class GetMembersRequest; -class GetMembersRequestDefaultTypeInternal; -extern GetMembersRequestDefaultTypeInternal _GetMembersRequest_default_instance_; -class GetMembersResponse; -class GetMembersResponseDefaultTypeInternal; -extern GetMembersResponseDefaultTypeInternal _GetMembersResponse_default_instance_; -class GetTxnTimestampCtx; -class GetTxnTimestampCtxDefaultTypeInternal; -extern GetTxnTimestampCtxDefaultTypeInternal _GetTxnTimestampCtx_default_instance_; -class Member; -class MemberDefaultTypeInternal; -extern MemberDefaultTypeInternal _Member_default_instance_; -class RequestHeader; -class RequestHeaderDefaultTypeInternal; -extern RequestHeaderDefaultTypeInternal _RequestHeader_default_instance_; -class ResponseHeader; -class ResponseHeaderDefaultTypeInternal; -extern ResponseHeaderDefaultTypeInternal _ResponseHeader_default_instance_; -class Status; -class StatusDefaultTypeInternal; -extern StatusDefaultTypeInternal _Status_default_instance_; -} // namespace ltsrpc -PROTOBUF_NAMESPACE_OPEN -template<> ::ltsrpc::Cluster* Arena::CreateMaybeMessage<::ltsrpc::Cluster>(Arena*); -template<> ::ltsrpc::GetMembersRequest* Arena::CreateMaybeMessage<::ltsrpc::GetMembersRequest>(Arena*); -template<> ::ltsrpc::GetMembersResponse* Arena::CreateMaybeMessage<::ltsrpc::GetMembersResponse>(Arena*); -template<> ::ltsrpc::GetTxnTimestampCtx* Arena::CreateMaybeMessage<::ltsrpc::GetTxnTimestampCtx>(Arena*); -template<> ::ltsrpc::Member* Arena::CreateMaybeMessage<::ltsrpc::Member>(Arena*); -template<> ::ltsrpc::RequestHeader* Arena::CreateMaybeMessage<::ltsrpc::RequestHeader>(Arena*); -template<> ::ltsrpc::ResponseHeader* Arena::CreateMaybeMessage<::ltsrpc::ResponseHeader>(Arena*); -template<> ::ltsrpc::Status* Arena::CreateMaybeMessage<::ltsrpc::Status>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace ltsrpc { - -enum StatusCode : int { - SC_OK = 0, - SC_ERROR = 1, - SC_UNKNOWN = 2, - SC_NOT_LEADER = 3, - SC_NOT_EXISTS = 4, - SC_CANCEL = 5, - SC_RESOURCE_EXHAUSTED = 6, - SC_ABORTED = 7, - SC_LEADER_NOT_FOUND = 8, - StatusCode_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), - StatusCode_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() -}; -bool StatusCode_IsValid(int value); -constexpr StatusCode StatusCode_MIN = SC_OK; -constexpr StatusCode StatusCode_MAX = SC_LEADER_NOT_FOUND; -constexpr int StatusCode_ARRAYSIZE = StatusCode_MAX + 1; - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* StatusCode_descriptor(); -template -inline const std::string& StatusCode_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function StatusCode_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - StatusCode_descriptor(), enum_t_value); -} -inline bool StatusCode_Parse( - const std::string& name, StatusCode* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - StatusCode_descriptor(), name, value); -} -// =================================================================== - -class Cluster : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:ltsrpc.Cluster) */ { - public: - Cluster(); - virtual ~Cluster(); - - Cluster(const Cluster& from); - Cluster(Cluster&& from) noexcept - : Cluster() { - *this = ::std::move(from); - } - - inline Cluster& operator=(const Cluster& from) { - CopyFrom(from); - return *this; - } - inline Cluster& operator=(Cluster&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const Cluster& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Cluster* internal_default_instance() { - return reinterpret_cast( - &_Cluster_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(Cluster& a, Cluster& b) { - a.Swap(&b); - } - inline void Swap(Cluster* other) { - if (other == this) return; - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline Cluster* New() const final { - return CreateMaybeMessage(nullptr); - } - - Cluster* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Cluster& from); - void MergeFrom(const Cluster& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Cluster* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "ltsrpc.Cluster"; - } - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return nullptr; - } - inline void* MaybeArenaPtr() const { - return nullptr; - } - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_ltsrpc_2eproto); - return ::descriptor_table_ltsrpc_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kClusterIdFieldNumber = 1, - }; - // uint32 cluster_id = 1; - void clear_cluster_id(); - ::PROTOBUF_NAMESPACE_ID::uint32 cluster_id() const; - void set_cluster_id(::PROTOBUF_NAMESPACE_ID::uint32 value); - - // @@protoc_insertion_point(class_scope:ltsrpc.Cluster) - private: - class _Internal; - - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; - ::PROTOBUF_NAMESPACE_ID::uint32 cluster_id_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_ltsrpc_2eproto; -}; -// ------------------------------------------------------------------- - -class Status : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:ltsrpc.Status) */ { - public: - Status(); - virtual ~Status(); - - Status(const Status& from); - Status(Status&& from) noexcept - : Status() { - *this = ::std::move(from); - } - - inline Status& operator=(const Status& from) { - CopyFrom(from); - return *this; - } - inline Status& operator=(Status&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const Status& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Status* internal_default_instance() { - return reinterpret_cast( - &_Status_default_instance_); - } - static constexpr int kIndexInFileMessages = - 1; - - friend void swap(Status& a, Status& b) { - a.Swap(&b); - } - inline void Swap(Status* other) { - if (other == this) return; - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline Status* New() const final { - return CreateMaybeMessage(nullptr); - } - - Status* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Status& from); - void MergeFrom(const Status& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Status* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "ltsrpc.Status"; - } - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return nullptr; - } - inline void* MaybeArenaPtr() const { - return nullptr; - } - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_ltsrpc_2eproto); - return ::descriptor_table_ltsrpc_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kMsgFieldNumber = 2, - kCodeFieldNumber = 1, - }; - // string msg = 2; - void clear_msg(); - const std::string& msg() const; - void set_msg(const std::string& value); - void set_msg(std::string&& value); - void set_msg(const char* value); - void set_msg(const char* value, size_t size); - std::string* mutable_msg(); - std::string* release_msg(); - void set_allocated_msg(std::string* msg); - - // .ltsrpc.StatusCode code = 1; - void clear_code(); - ::ltsrpc::StatusCode code() const; - void set_code(::ltsrpc::StatusCode value); - - // @@protoc_insertion_point(class_scope:ltsrpc.Status) - private: - class _Internal; - - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr msg_; - int code_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_ltsrpc_2eproto; -}; -// ------------------------------------------------------------------- - -class Member : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:ltsrpc.Member) */ { - public: - Member(); - virtual ~Member(); - - Member(const Member& from); - Member(Member&& from) noexcept - : Member() { - *this = ::std::move(from); - } - - inline Member& operator=(const Member& from) { - CopyFrom(from); - return *this; - } - inline Member& operator=(Member&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const Member& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Member* internal_default_instance() { - return reinterpret_cast( - &_Member_default_instance_); - } - static constexpr int kIndexInFileMessages = - 2; - - friend void swap(Member& a, Member& b) { - a.Swap(&b); - } - inline void Swap(Member* other) { - if (other == this) return; - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline Member* New() const final { - return CreateMaybeMessage(nullptr); - } - - Member* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Member& from); - void MergeFrom(const Member& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Member* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "ltsrpc.Member"; - } - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return nullptr; - } - inline void* MaybeArenaPtr() const { - return nullptr; - } - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_ltsrpc_2eproto); - return ::descriptor_table_ltsrpc_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kPeerUrlsFieldNumber = 3, - kClientUrlsFieldNumber = 4, - kNameFieldNumber = 2, - kMemberIdFieldNumber = 1, - kLeaderPriorityFieldNumber = 5, - }; - // repeated string peer_urls = 3; - int peer_urls_size() const; - void clear_peer_urls(); - const std::string& peer_urls(int index) const; - std::string* mutable_peer_urls(int index); - void set_peer_urls(int index, const std::string& value); - void set_peer_urls(int index, std::string&& value); - void set_peer_urls(int index, const char* value); - void set_peer_urls(int index, const char* value, size_t size); - std::string* add_peer_urls(); - void add_peer_urls(const std::string& value); - void add_peer_urls(std::string&& value); - void add_peer_urls(const char* value); - void add_peer_urls(const char* value, size_t size); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& peer_urls() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_peer_urls(); - - // repeated string client_urls = 4; - int client_urls_size() const; - void clear_client_urls(); - const std::string& client_urls(int index) const; - std::string* mutable_client_urls(int index); - void set_client_urls(int index, const std::string& value); - void set_client_urls(int index, std::string&& value); - void set_client_urls(int index, const char* value); - void set_client_urls(int index, const char* value, size_t size); - std::string* add_client_urls(); - void add_client_urls(const std::string& value); - void add_client_urls(std::string&& value); - void add_client_urls(const char* value); - void add_client_urls(const char* value, size_t size); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& client_urls() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_client_urls(); - - // string name = 2; - void clear_name(); - const std::string& name() const; - void set_name(const std::string& value); - void set_name(std::string&& value); - void set_name(const char* value); - void set_name(const char* value, size_t size); - std::string* mutable_name(); - std::string* release_name(); - void set_allocated_name(std::string* name); - - // uint64 member_id = 1; - void clear_member_id(); - ::PROTOBUF_NAMESPACE_ID::uint64 member_id() const; - void set_member_id(::PROTOBUF_NAMESPACE_ID::uint64 value); - - // int32 leader_priority = 5; - void clear_leader_priority(); - ::PROTOBUF_NAMESPACE_ID::int32 leader_priority() const; - void set_leader_priority(::PROTOBUF_NAMESPACE_ID::int32 value); - - // @@protoc_insertion_point(class_scope:ltsrpc.Member) - private: - class _Internal; - - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField peer_urls_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField client_urls_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; - ::PROTOBUF_NAMESPACE_ID::uint64 member_id_; - ::PROTOBUF_NAMESPACE_ID::int32 leader_priority_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_ltsrpc_2eproto; -}; -// ------------------------------------------------------------------- - -class RequestHeader : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:ltsrpc.RequestHeader) */ { - public: - RequestHeader(); - virtual ~RequestHeader(); - - RequestHeader(const RequestHeader& from); - RequestHeader(RequestHeader&& from) noexcept - : RequestHeader() { - *this = ::std::move(from); - } - - inline RequestHeader& operator=(const RequestHeader& from) { - CopyFrom(from); - return *this; - } - inline RequestHeader& operator=(RequestHeader&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const RequestHeader& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const RequestHeader* internal_default_instance() { - return reinterpret_cast( - &_RequestHeader_default_instance_); - } - static constexpr int kIndexInFileMessages = - 3; - - friend void swap(RequestHeader& a, RequestHeader& b) { - a.Swap(&b); - } - inline void Swap(RequestHeader* other) { - if (other == this) return; - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline RequestHeader* New() const final { - return CreateMaybeMessage(nullptr); - } - - RequestHeader* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const RequestHeader& from); - void MergeFrom(const RequestHeader& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RequestHeader* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "ltsrpc.RequestHeader"; - } - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return nullptr; - } - inline void* MaybeArenaPtr() const { - return nullptr; - } - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_ltsrpc_2eproto); - return ::descriptor_table_ltsrpc_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kClusterIdFieldNumber = 1, - }; - // uint32 cluster_id = 1; - void clear_cluster_id(); - ::PROTOBUF_NAMESPACE_ID::uint32 cluster_id() const; - void set_cluster_id(::PROTOBUF_NAMESPACE_ID::uint32 value); - - // @@protoc_insertion_point(class_scope:ltsrpc.RequestHeader) - private: - class _Internal; - - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; - ::PROTOBUF_NAMESPACE_ID::uint32 cluster_id_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_ltsrpc_2eproto; -}; -// ------------------------------------------------------------------- - -class ResponseHeader : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:ltsrpc.ResponseHeader) */ { - public: - ResponseHeader(); - virtual ~ResponseHeader(); - - ResponseHeader(const ResponseHeader& from); - ResponseHeader(ResponseHeader&& from) noexcept - : ResponseHeader() { - *this = ::std::move(from); - } - - inline ResponseHeader& operator=(const ResponseHeader& from) { - CopyFrom(from); - return *this; - } - inline ResponseHeader& operator=(ResponseHeader&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const ResponseHeader& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const ResponseHeader* internal_default_instance() { - return reinterpret_cast( - &_ResponseHeader_default_instance_); - } - static constexpr int kIndexInFileMessages = - 4; - - friend void swap(ResponseHeader& a, ResponseHeader& b) { - a.Swap(&b); - } - inline void Swap(ResponseHeader* other) { - if (other == this) return; - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline ResponseHeader* New() const final { - return CreateMaybeMessage(nullptr); - } - - ResponseHeader* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const ResponseHeader& from); - void MergeFrom(const ResponseHeader& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(ResponseHeader* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "ltsrpc.ResponseHeader"; - } - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return nullptr; - } - inline void* MaybeArenaPtr() const { - return nullptr; - } - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_ltsrpc_2eproto); - return ::descriptor_table_ltsrpc_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kStatusFieldNumber = 2, - kClusterIdFieldNumber = 1, - }; - // .ltsrpc.Status status = 2; - bool has_status() const; - void clear_status(); - const ::ltsrpc::Status& status() const; - ::ltsrpc::Status* release_status(); - ::ltsrpc::Status* mutable_status(); - void set_allocated_status(::ltsrpc::Status* status); - - // uint32 cluster_id = 1; - void clear_cluster_id(); - ::PROTOBUF_NAMESPACE_ID::uint32 cluster_id() const; - void set_cluster_id(::PROTOBUF_NAMESPACE_ID::uint32 value); - - // @@protoc_insertion_point(class_scope:ltsrpc.ResponseHeader) - private: - class _Internal; - - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; - ::ltsrpc::Status* status_; - ::PROTOBUF_NAMESPACE_ID::uint32 cluster_id_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_ltsrpc_2eproto; -}; -// ------------------------------------------------------------------- - -class GetMembersRequest : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:ltsrpc.GetMembersRequest) */ { - public: - GetMembersRequest(); - virtual ~GetMembersRequest(); - - GetMembersRequest(const GetMembersRequest& from); - GetMembersRequest(GetMembersRequest&& from) noexcept - : GetMembersRequest() { - *this = ::std::move(from); - } - - inline GetMembersRequest& operator=(const GetMembersRequest& from) { - CopyFrom(from); - return *this; - } - inline GetMembersRequest& operator=(GetMembersRequest&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const GetMembersRequest& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const GetMembersRequest* internal_default_instance() { - return reinterpret_cast( - &_GetMembersRequest_default_instance_); - } - static constexpr int kIndexInFileMessages = - 5; - - friend void swap(GetMembersRequest& a, GetMembersRequest& b) { - a.Swap(&b); - } - inline void Swap(GetMembersRequest* other) { - if (other == this) return; - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline GetMembersRequest* New() const final { - return CreateMaybeMessage(nullptr); - } - - GetMembersRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const GetMembersRequest& from); - void MergeFrom(const GetMembersRequest& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(GetMembersRequest* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "ltsrpc.GetMembersRequest"; - } - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return nullptr; - } - inline void* MaybeArenaPtr() const { - return nullptr; - } - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_ltsrpc_2eproto); - return ::descriptor_table_ltsrpc_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kHeaderFieldNumber = 1, - }; - // .ltsrpc.RequestHeader header = 1; - bool has_header() const; - void clear_header(); - const ::ltsrpc::RequestHeader& header() const; - ::ltsrpc::RequestHeader* release_header(); - ::ltsrpc::RequestHeader* mutable_header(); - void set_allocated_header(::ltsrpc::RequestHeader* header); - - // @@protoc_insertion_point(class_scope:ltsrpc.GetMembersRequest) - private: - class _Internal; - - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; - ::ltsrpc::RequestHeader* header_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_ltsrpc_2eproto; -}; -// ------------------------------------------------------------------- - -class GetMembersResponse : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:ltsrpc.GetMembersResponse) */ { - public: - GetMembersResponse(); - virtual ~GetMembersResponse(); - - GetMembersResponse(const GetMembersResponse& from); - GetMembersResponse(GetMembersResponse&& from) noexcept - : GetMembersResponse() { - *this = ::std::move(from); - } - - inline GetMembersResponse& operator=(const GetMembersResponse& from) { - CopyFrom(from); - return *this; - } - inline GetMembersResponse& operator=(GetMembersResponse&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const GetMembersResponse& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const GetMembersResponse* internal_default_instance() { - return reinterpret_cast( - &_GetMembersResponse_default_instance_); - } - static constexpr int kIndexInFileMessages = - 6; - - friend void swap(GetMembersResponse& a, GetMembersResponse& b) { - a.Swap(&b); - } - inline void Swap(GetMembersResponse* other) { - if (other == this) return; - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline GetMembersResponse* New() const final { - return CreateMaybeMessage(nullptr); - } - - GetMembersResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const GetMembersResponse& from); - void MergeFrom(const GetMembersResponse& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(GetMembersResponse* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "ltsrpc.GetMembersResponse"; - } - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return nullptr; - } - inline void* MaybeArenaPtr() const { - return nullptr; - } - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_ltsrpc_2eproto); - return ::descriptor_table_ltsrpc_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kMembersFieldNumber = 2, - kHeaderFieldNumber = 1, - kLeaderFieldNumber = 3, - kEtcdLeaderFieldNumber = 4, - }; - // repeated .ltsrpc.Member members = 2; - int members_size() const; - void clear_members(); - ::ltsrpc::Member* mutable_members(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::ltsrpc::Member >* - mutable_members(); - const ::ltsrpc::Member& members(int index) const; - ::ltsrpc::Member* add_members(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::ltsrpc::Member >& - members() const; - - // .ltsrpc.ResponseHeader header = 1; - bool has_header() const; - void clear_header(); - const ::ltsrpc::ResponseHeader& header() const; - ::ltsrpc::ResponseHeader* release_header(); - ::ltsrpc::ResponseHeader* mutable_header(); - void set_allocated_header(::ltsrpc::ResponseHeader* header); - - // .ltsrpc.Member leader = 3; - bool has_leader() const; - void clear_leader(); - const ::ltsrpc::Member& leader() const; - ::ltsrpc::Member* release_leader(); - ::ltsrpc::Member* mutable_leader(); - void set_allocated_leader(::ltsrpc::Member* leader); - - // .ltsrpc.Member etcd_leader = 4; - bool has_etcd_leader() const; - void clear_etcd_leader(); - const ::ltsrpc::Member& etcd_leader() const; - ::ltsrpc::Member* release_etcd_leader(); - ::ltsrpc::Member* mutable_etcd_leader(); - void set_allocated_etcd_leader(::ltsrpc::Member* etcd_leader); - - // @@protoc_insertion_point(class_scope:ltsrpc.GetMembersResponse) - private: - class _Internal; - - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::ltsrpc::Member > members_; - ::ltsrpc::ResponseHeader* header_; - ::ltsrpc::Member* leader_; - ::ltsrpc::Member* etcd_leader_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_ltsrpc_2eproto; -}; -// ------------------------------------------------------------------- - -class GetTxnTimestampCtx : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:ltsrpc.GetTxnTimestampCtx) */ { - public: - GetTxnTimestampCtx(); - virtual ~GetTxnTimestampCtx(); - - GetTxnTimestampCtx(const GetTxnTimestampCtx& from); - GetTxnTimestampCtx(GetTxnTimestampCtx&& from) noexcept - : GetTxnTimestampCtx() { - *this = ::std::move(from); - } - - inline GetTxnTimestampCtx& operator=(const GetTxnTimestampCtx& from) { - CopyFrom(from); - return *this; - } - inline GetTxnTimestampCtx& operator=(GetTxnTimestampCtx&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const GetTxnTimestampCtx& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const GetTxnTimestampCtx* internal_default_instance() { - return reinterpret_cast( - &_GetTxnTimestampCtx_default_instance_); - } - static constexpr int kIndexInFileMessages = - 7; - - friend void swap(GetTxnTimestampCtx& a, GetTxnTimestampCtx& b) { - a.Swap(&b); - } - inline void Swap(GetTxnTimestampCtx* other) { - if (other == this) return; - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline GetTxnTimestampCtx* New() const final { - return CreateMaybeMessage(nullptr); - } - - GetTxnTimestampCtx* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const GetTxnTimestampCtx& from); - void MergeFrom(const GetTxnTimestampCtx& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(GetTxnTimestampCtx* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "ltsrpc.GetTxnTimestampCtx"; - } - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return nullptr; - } - inline void* MaybeArenaPtr() const { - return nullptr; - } - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_ltsrpc_2eproto); - return ::descriptor_table_ltsrpc_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kTxnIdFieldNumber = 1, - kTxnTsFieldNumber = 2, - }; - // uint64 txn_id = 1; - void clear_txn_id(); - ::PROTOBUF_NAMESPACE_ID::uint64 txn_id() const; - void set_txn_id(::PROTOBUF_NAMESPACE_ID::uint64 value); - - // uint64 txn_ts = 2; - void clear_txn_ts(); - ::PROTOBUF_NAMESPACE_ID::uint64 txn_ts() const; - void set_txn_ts(::PROTOBUF_NAMESPACE_ID::uint64 value); - - // @@protoc_insertion_point(class_scope:ltsrpc.GetTxnTimestampCtx) - private: - class _Internal; - - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; - ::PROTOBUF_NAMESPACE_ID::uint64 txn_id_; - ::PROTOBUF_NAMESPACE_ID::uint64 txn_ts_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_ltsrpc_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// Cluster - -// uint32 cluster_id = 1; -inline void Cluster::clear_cluster_id() { - cluster_id_ = 0u; -} -inline ::PROTOBUF_NAMESPACE_ID::uint32 Cluster::cluster_id() const { - // @@protoc_insertion_point(field_get:ltsrpc.Cluster.cluster_id) - return cluster_id_; -} -inline void Cluster::set_cluster_id(::PROTOBUF_NAMESPACE_ID::uint32 value) { - - cluster_id_ = value; - // @@protoc_insertion_point(field_set:ltsrpc.Cluster.cluster_id) -} - -// ------------------------------------------------------------------- - -// Status - -// .ltsrpc.StatusCode code = 1; -inline void Status::clear_code() { - code_ = 0; -} -inline ::ltsrpc::StatusCode Status::code() const { - // @@protoc_insertion_point(field_get:ltsrpc.Status.code) - return static_cast< ::ltsrpc::StatusCode >(code_); -} -inline void Status::set_code(::ltsrpc::StatusCode value) { - - code_ = value; - // @@protoc_insertion_point(field_set:ltsrpc.Status.code) -} - -// string msg = 2; -inline void Status::clear_msg() { - msg_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} -inline const std::string& Status::msg() const { - // @@protoc_insertion_point(field_get:ltsrpc.Status.msg) - return msg_.GetNoArena(); -} -inline void Status::set_msg(const std::string& value) { - - msg_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:ltsrpc.Status.msg) -} -inline void Status::set_msg(std::string&& value) { - - msg_.SetNoArena( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:ltsrpc.Status.msg) -} -inline void Status::set_msg(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - msg_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:ltsrpc.Status.msg) -} -inline void Status::set_msg(const char* value, size_t size) { - - msg_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:ltsrpc.Status.msg) -} -inline std::string* Status::mutable_msg() { - - // @@protoc_insertion_point(field_mutable:ltsrpc.Status.msg) - return msg_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} -inline std::string* Status::release_msg() { - // @@protoc_insertion_point(field_release:ltsrpc.Status.msg) - - return msg_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} -inline void Status::set_allocated_msg(std::string* msg) { - if (msg != nullptr) { - - } else { - - } - msg_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), msg); - // @@protoc_insertion_point(field_set_allocated:ltsrpc.Status.msg) -} - -// ------------------------------------------------------------------- - -// Member - -// uint64 member_id = 1; -inline void Member::clear_member_id() { - member_id_ = PROTOBUF_ULONGLONG(0); -} -inline ::PROTOBUF_NAMESPACE_ID::uint64 Member::member_id() const { - // @@protoc_insertion_point(field_get:ltsrpc.Member.member_id) - return member_id_; -} -inline void Member::set_member_id(::PROTOBUF_NAMESPACE_ID::uint64 value) { - - member_id_ = value; - // @@protoc_insertion_point(field_set:ltsrpc.Member.member_id) -} - -// string name = 2; -inline void Member::clear_name() { - name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} -inline const std::string& Member::name() const { - // @@protoc_insertion_point(field_get:ltsrpc.Member.name) - return name_.GetNoArena(); -} -inline void Member::set_name(const std::string& value) { - - name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:ltsrpc.Member.name) -} -inline void Member::set_name(std::string&& value) { - - name_.SetNoArena( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:ltsrpc.Member.name) -} -inline void Member::set_name(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:ltsrpc.Member.name) -} -inline void Member::set_name(const char* value, size_t size) { - - name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:ltsrpc.Member.name) -} -inline std::string* Member::mutable_name() { - - // @@protoc_insertion_point(field_mutable:ltsrpc.Member.name) - return name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} -inline std::string* Member::release_name() { - // @@protoc_insertion_point(field_release:ltsrpc.Member.name) - - return name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} -inline void Member::set_allocated_name(std::string* name) { - if (name != nullptr) { - - } else { - - } - name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name); - // @@protoc_insertion_point(field_set_allocated:ltsrpc.Member.name) -} - -// repeated string peer_urls = 3; -inline int Member::peer_urls_size() const { - return peer_urls_.size(); -} -inline void Member::clear_peer_urls() { - peer_urls_.Clear(); -} -inline const std::string& Member::peer_urls(int index) const { - // @@protoc_insertion_point(field_get:ltsrpc.Member.peer_urls) - return peer_urls_.Get(index); -} -inline std::string* Member::mutable_peer_urls(int index) { - // @@protoc_insertion_point(field_mutable:ltsrpc.Member.peer_urls) - return peer_urls_.Mutable(index); -} -inline void Member::set_peer_urls(int index, const std::string& value) { - // @@protoc_insertion_point(field_set:ltsrpc.Member.peer_urls) - peer_urls_.Mutable(index)->assign(value); -} -inline void Member::set_peer_urls(int index, std::string&& value) { - // @@protoc_insertion_point(field_set:ltsrpc.Member.peer_urls) - peer_urls_.Mutable(index)->assign(std::move(value)); -} -inline void Member::set_peer_urls(int index, const char* value) { - GOOGLE_DCHECK(value != nullptr); - peer_urls_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:ltsrpc.Member.peer_urls) -} -inline void Member::set_peer_urls(int index, const char* value, size_t size) { - peer_urls_.Mutable(index)->assign( - reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:ltsrpc.Member.peer_urls) -} -inline std::string* Member::add_peer_urls() { - // @@protoc_insertion_point(field_add_mutable:ltsrpc.Member.peer_urls) - return peer_urls_.Add(); -} -inline void Member::add_peer_urls(const std::string& value) { - peer_urls_.Add()->assign(value); - // @@protoc_insertion_point(field_add:ltsrpc.Member.peer_urls) -} -inline void Member::add_peer_urls(std::string&& value) { - peer_urls_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:ltsrpc.Member.peer_urls) -} -inline void Member::add_peer_urls(const char* value) { - GOOGLE_DCHECK(value != nullptr); - peer_urls_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:ltsrpc.Member.peer_urls) -} -inline void Member::add_peer_urls(const char* value, size_t size) { - peer_urls_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:ltsrpc.Member.peer_urls) -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& -Member::peer_urls() const { - // @@protoc_insertion_point(field_list:ltsrpc.Member.peer_urls) - return peer_urls_; -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* -Member::mutable_peer_urls() { - // @@protoc_insertion_point(field_mutable_list:ltsrpc.Member.peer_urls) - return &peer_urls_; -} - -// repeated string client_urls = 4; -inline int Member::client_urls_size() const { - return client_urls_.size(); -} -inline void Member::clear_client_urls() { - client_urls_.Clear(); -} -inline const std::string& Member::client_urls(int index) const { - // @@protoc_insertion_point(field_get:ltsrpc.Member.client_urls) - return client_urls_.Get(index); -} -inline std::string* Member::mutable_client_urls(int index) { - // @@protoc_insertion_point(field_mutable:ltsrpc.Member.client_urls) - return client_urls_.Mutable(index); -} -inline void Member::set_client_urls(int index, const std::string& value) { - // @@protoc_insertion_point(field_set:ltsrpc.Member.client_urls) - client_urls_.Mutable(index)->assign(value); -} -inline void Member::set_client_urls(int index, std::string&& value) { - // @@protoc_insertion_point(field_set:ltsrpc.Member.client_urls) - client_urls_.Mutable(index)->assign(std::move(value)); -} -inline void Member::set_client_urls(int index, const char* value) { - GOOGLE_DCHECK(value != nullptr); - client_urls_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:ltsrpc.Member.client_urls) -} -inline void Member::set_client_urls(int index, const char* value, size_t size) { - client_urls_.Mutable(index)->assign( - reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:ltsrpc.Member.client_urls) -} -inline std::string* Member::add_client_urls() { - // @@protoc_insertion_point(field_add_mutable:ltsrpc.Member.client_urls) - return client_urls_.Add(); -} -inline void Member::add_client_urls(const std::string& value) { - client_urls_.Add()->assign(value); - // @@protoc_insertion_point(field_add:ltsrpc.Member.client_urls) -} -inline void Member::add_client_urls(std::string&& value) { - client_urls_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:ltsrpc.Member.client_urls) -} -inline void Member::add_client_urls(const char* value) { - GOOGLE_DCHECK(value != nullptr); - client_urls_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:ltsrpc.Member.client_urls) -} -inline void Member::add_client_urls(const char* value, size_t size) { - client_urls_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:ltsrpc.Member.client_urls) -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& -Member::client_urls() const { - // @@protoc_insertion_point(field_list:ltsrpc.Member.client_urls) - return client_urls_; -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* -Member::mutable_client_urls() { - // @@protoc_insertion_point(field_mutable_list:ltsrpc.Member.client_urls) - return &client_urls_; -} - -// int32 leader_priority = 5; -inline void Member::clear_leader_priority() { - leader_priority_ = 0; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Member::leader_priority() const { - // @@protoc_insertion_point(field_get:ltsrpc.Member.leader_priority) - return leader_priority_; -} -inline void Member::set_leader_priority(::PROTOBUF_NAMESPACE_ID::int32 value) { - - leader_priority_ = value; - // @@protoc_insertion_point(field_set:ltsrpc.Member.leader_priority) -} - -// ------------------------------------------------------------------- - -// RequestHeader - -// uint32 cluster_id = 1; -inline void RequestHeader::clear_cluster_id() { - cluster_id_ = 0u; -} -inline ::PROTOBUF_NAMESPACE_ID::uint32 RequestHeader::cluster_id() const { - // @@protoc_insertion_point(field_get:ltsrpc.RequestHeader.cluster_id) - return cluster_id_; -} -inline void RequestHeader::set_cluster_id(::PROTOBUF_NAMESPACE_ID::uint32 value) { - - cluster_id_ = value; - // @@protoc_insertion_point(field_set:ltsrpc.RequestHeader.cluster_id) -} - -// ------------------------------------------------------------------- - -// ResponseHeader - -// uint32 cluster_id = 1; -inline void ResponseHeader::clear_cluster_id() { - cluster_id_ = 0u; -} -inline ::PROTOBUF_NAMESPACE_ID::uint32 ResponseHeader::cluster_id() const { - // @@protoc_insertion_point(field_get:ltsrpc.ResponseHeader.cluster_id) - return cluster_id_; -} -inline void ResponseHeader::set_cluster_id(::PROTOBUF_NAMESPACE_ID::uint32 value) { - - cluster_id_ = value; - // @@protoc_insertion_point(field_set:ltsrpc.ResponseHeader.cluster_id) -} - -// .ltsrpc.Status status = 2; -inline bool ResponseHeader::has_status() const { - return this != internal_default_instance() && status_ != nullptr; -} -inline void ResponseHeader::clear_status() { - if (GetArenaNoVirtual() == nullptr && status_ != nullptr) { - delete status_; - } - status_ = nullptr; -} -inline const ::ltsrpc::Status& ResponseHeader::status() const { - const ::ltsrpc::Status* p = status_; - // @@protoc_insertion_point(field_get:ltsrpc.ResponseHeader.status) - return p != nullptr ? *p : *reinterpret_cast( - &::ltsrpc::_Status_default_instance_); -} -inline ::ltsrpc::Status* ResponseHeader::release_status() { - // @@protoc_insertion_point(field_release:ltsrpc.ResponseHeader.status) - - ::ltsrpc::Status* temp = status_; - status_ = nullptr; - return temp; -} -inline ::ltsrpc::Status* ResponseHeader::mutable_status() { - - if (status_ == nullptr) { - auto* p = CreateMaybeMessage<::ltsrpc::Status>(GetArenaNoVirtual()); - status_ = p; - } - // @@protoc_insertion_point(field_mutable:ltsrpc.ResponseHeader.status) - return status_; -} -inline void ResponseHeader::set_allocated_status(::ltsrpc::Status* status) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); - if (message_arena == nullptr) { - delete status_; - } - if (status) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; - if (message_arena != submessage_arena) { - status = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, status, submessage_arena); - } - - } else { - - } - status_ = status; - // @@protoc_insertion_point(field_set_allocated:ltsrpc.ResponseHeader.status) -} - -// ------------------------------------------------------------------- - -// GetMembersRequest - -// .ltsrpc.RequestHeader header = 1; -inline bool GetMembersRequest::has_header() const { - return this != internal_default_instance() && header_ != nullptr; -} -inline void GetMembersRequest::clear_header() { - if (GetArenaNoVirtual() == nullptr && header_ != nullptr) { - delete header_; - } - header_ = nullptr; -} -inline const ::ltsrpc::RequestHeader& GetMembersRequest::header() const { - const ::ltsrpc::RequestHeader* p = header_; - // @@protoc_insertion_point(field_get:ltsrpc.GetMembersRequest.header) - return p != nullptr ? *p : *reinterpret_cast( - &::ltsrpc::_RequestHeader_default_instance_); -} -inline ::ltsrpc::RequestHeader* GetMembersRequest::release_header() { - // @@protoc_insertion_point(field_release:ltsrpc.GetMembersRequest.header) - - ::ltsrpc::RequestHeader* temp = header_; - header_ = nullptr; - return temp; -} -inline ::ltsrpc::RequestHeader* GetMembersRequest::mutable_header() { - - if (header_ == nullptr) { - auto* p = CreateMaybeMessage<::ltsrpc::RequestHeader>(GetArenaNoVirtual()); - header_ = p; - } - // @@protoc_insertion_point(field_mutable:ltsrpc.GetMembersRequest.header) - return header_; -} -inline void GetMembersRequest::set_allocated_header(::ltsrpc::RequestHeader* header) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); - if (message_arena == nullptr) { - delete header_; - } - if (header) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; - if (message_arena != submessage_arena) { - header = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, header, submessage_arena); - } - - } else { - - } - header_ = header; - // @@protoc_insertion_point(field_set_allocated:ltsrpc.GetMembersRequest.header) -} - -// ------------------------------------------------------------------- - -// GetMembersResponse - -// .ltsrpc.ResponseHeader header = 1; -inline bool GetMembersResponse::has_header() const { - return this != internal_default_instance() && header_ != nullptr; -} -inline void GetMembersResponse::clear_header() { - if (GetArenaNoVirtual() == nullptr && header_ != nullptr) { - delete header_; - } - header_ = nullptr; -} -inline const ::ltsrpc::ResponseHeader& GetMembersResponse::header() const { - const ::ltsrpc::ResponseHeader* p = header_; - // @@protoc_insertion_point(field_get:ltsrpc.GetMembersResponse.header) - return p != nullptr ? *p : *reinterpret_cast( - &::ltsrpc::_ResponseHeader_default_instance_); -} -inline ::ltsrpc::ResponseHeader* GetMembersResponse::release_header() { - // @@protoc_insertion_point(field_release:ltsrpc.GetMembersResponse.header) - - ::ltsrpc::ResponseHeader* temp = header_; - header_ = nullptr; - return temp; -} -inline ::ltsrpc::ResponseHeader* GetMembersResponse::mutable_header() { - - if (header_ == nullptr) { - auto* p = CreateMaybeMessage<::ltsrpc::ResponseHeader>(GetArenaNoVirtual()); - header_ = p; - } - // @@protoc_insertion_point(field_mutable:ltsrpc.GetMembersResponse.header) - return header_; -} -inline void GetMembersResponse::set_allocated_header(::ltsrpc::ResponseHeader* header) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); - if (message_arena == nullptr) { - delete header_; - } - if (header) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; - if (message_arena != submessage_arena) { - header = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, header, submessage_arena); - } - - } else { - - } - header_ = header; - // @@protoc_insertion_point(field_set_allocated:ltsrpc.GetMembersResponse.header) -} - -// repeated .ltsrpc.Member members = 2; -inline int GetMembersResponse::members_size() const { - return members_.size(); -} -inline void GetMembersResponse::clear_members() { - members_.Clear(); -} -inline ::ltsrpc::Member* GetMembersResponse::mutable_members(int index) { - // @@protoc_insertion_point(field_mutable:ltsrpc.GetMembersResponse.members) - return members_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::ltsrpc::Member >* -GetMembersResponse::mutable_members() { - // @@protoc_insertion_point(field_mutable_list:ltsrpc.GetMembersResponse.members) - return &members_; -} -inline const ::ltsrpc::Member& GetMembersResponse::members(int index) const { - // @@protoc_insertion_point(field_get:ltsrpc.GetMembersResponse.members) - return members_.Get(index); -} -inline ::ltsrpc::Member* GetMembersResponse::add_members() { - // @@protoc_insertion_point(field_add:ltsrpc.GetMembersResponse.members) - return members_.Add(); -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::ltsrpc::Member >& -GetMembersResponse::members() const { - // @@protoc_insertion_point(field_list:ltsrpc.GetMembersResponse.members) - return members_; -} - -// .ltsrpc.Member leader = 3; -inline bool GetMembersResponse::has_leader() const { - return this != internal_default_instance() && leader_ != nullptr; -} -inline void GetMembersResponse::clear_leader() { - if (GetArenaNoVirtual() == nullptr && leader_ != nullptr) { - delete leader_; - } - leader_ = nullptr; -} -inline const ::ltsrpc::Member& GetMembersResponse::leader() const { - const ::ltsrpc::Member* p = leader_; - // @@protoc_insertion_point(field_get:ltsrpc.GetMembersResponse.leader) - return p != nullptr ? *p : *reinterpret_cast( - &::ltsrpc::_Member_default_instance_); -} -inline ::ltsrpc::Member* GetMembersResponse::release_leader() { - // @@protoc_insertion_point(field_release:ltsrpc.GetMembersResponse.leader) - - ::ltsrpc::Member* temp = leader_; - leader_ = nullptr; - return temp; -} -inline ::ltsrpc::Member* GetMembersResponse::mutable_leader() { - - if (leader_ == nullptr) { - auto* p = CreateMaybeMessage<::ltsrpc::Member>(GetArenaNoVirtual()); - leader_ = p; - } - // @@protoc_insertion_point(field_mutable:ltsrpc.GetMembersResponse.leader) - return leader_; -} -inline void GetMembersResponse::set_allocated_leader(::ltsrpc::Member* leader) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); - if (message_arena == nullptr) { - delete leader_; - } - if (leader) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; - if (message_arena != submessage_arena) { - leader = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, leader, submessage_arena); - } - - } else { - - } - leader_ = leader; - // @@protoc_insertion_point(field_set_allocated:ltsrpc.GetMembersResponse.leader) -} - -// .ltsrpc.Member etcd_leader = 4; -inline bool GetMembersResponse::has_etcd_leader() const { - return this != internal_default_instance() && etcd_leader_ != nullptr; -} -inline void GetMembersResponse::clear_etcd_leader() { - if (GetArenaNoVirtual() == nullptr && etcd_leader_ != nullptr) { - delete etcd_leader_; - } - etcd_leader_ = nullptr; -} -inline const ::ltsrpc::Member& GetMembersResponse::etcd_leader() const { - const ::ltsrpc::Member* p = etcd_leader_; - // @@protoc_insertion_point(field_get:ltsrpc.GetMembersResponse.etcd_leader) - return p != nullptr ? *p : *reinterpret_cast( - &::ltsrpc::_Member_default_instance_); -} -inline ::ltsrpc::Member* GetMembersResponse::release_etcd_leader() { - // @@protoc_insertion_point(field_release:ltsrpc.GetMembersResponse.etcd_leader) - - ::ltsrpc::Member* temp = etcd_leader_; - etcd_leader_ = nullptr; - return temp; -} -inline ::ltsrpc::Member* GetMembersResponse::mutable_etcd_leader() { - - if (etcd_leader_ == nullptr) { - auto* p = CreateMaybeMessage<::ltsrpc::Member>(GetArenaNoVirtual()); - etcd_leader_ = p; - } - // @@protoc_insertion_point(field_mutable:ltsrpc.GetMembersResponse.etcd_leader) - return etcd_leader_; -} -inline void GetMembersResponse::set_allocated_etcd_leader(::ltsrpc::Member* etcd_leader) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); - if (message_arena == nullptr) { - delete etcd_leader_; - } - if (etcd_leader) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; - if (message_arena != submessage_arena) { - etcd_leader = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, etcd_leader, submessage_arena); - } - - } else { - - } - etcd_leader_ = etcd_leader; - // @@protoc_insertion_point(field_set_allocated:ltsrpc.GetMembersResponse.etcd_leader) -} - -// ------------------------------------------------------------------- - -// GetTxnTimestampCtx - -// uint64 txn_id = 1; -inline void GetTxnTimestampCtx::clear_txn_id() { - txn_id_ = PROTOBUF_ULONGLONG(0); -} -inline ::PROTOBUF_NAMESPACE_ID::uint64 GetTxnTimestampCtx::txn_id() const { - // @@protoc_insertion_point(field_get:ltsrpc.GetTxnTimestampCtx.txn_id) - return txn_id_; -} -inline void GetTxnTimestampCtx::set_txn_id(::PROTOBUF_NAMESPACE_ID::uint64 value) { - - txn_id_ = value; - // @@protoc_insertion_point(field_set:ltsrpc.GetTxnTimestampCtx.txn_id) -} - -// uint64 txn_ts = 2; -inline void GetTxnTimestampCtx::clear_txn_ts() { - txn_ts_ = PROTOBUF_ULONGLONG(0); -} -inline ::PROTOBUF_NAMESPACE_ID::uint64 GetTxnTimestampCtx::txn_ts() const { - // @@protoc_insertion_point(field_get:ltsrpc.GetTxnTimestampCtx.txn_ts) - return txn_ts_; -} -inline void GetTxnTimestampCtx::set_txn_ts(::PROTOBUF_NAMESPACE_ID::uint64 value) { - - txn_ts_ = value; - // @@protoc_insertion_point(field_set:ltsrpc.GetTxnTimestampCtx.txn_ts) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace ltsrpc - -PROTOBUF_NAMESPACE_OPEN - -template <> struct is_proto_enum< ::ltsrpc::StatusCode> : ::std::true_type {}; -template <> -inline const EnumDescriptor* GetEnumDescriptor< ::ltsrpc::StatusCode>() { - return ::ltsrpc::StatusCode_descriptor(); -} - -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_ltsrpc_2eproto diff --git a/contrib/deneva/system/ltsrpc.proto b/contrib/deneva/system/ltsrpc.proto deleted file mode 100644 index 2af7a904..00000000 --- a/contrib/deneva/system/ltsrpc.proto +++ /dev/null @@ -1,77 +0,0 @@ -/* Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: hongyaozhao@ruc.edu.cn - * - */ -syntax = "proto3"; - -package ltsrpc; - -service LTS { - rpc GetTxnTimestamp(GetTxnTimestampCtx) returns(GetTxnTimestampCtx) {} - rpc GetMembers(GetMembersRequest) returns (GetMembersResponse) {} -} - -// Common -enum StatusCode { - SC_OK = 0; - SC_ERROR = 1; - SC_UNKNOWN = 2; - SC_NOT_LEADER = 3; - SC_NOT_EXISTS = 4; - SC_CANCEL = 5; - SC_RESOURCE_EXHAUSTED = 6; - SC_ABORTED = 7; - SC_LEADER_NOT_FOUND = 8; -} - -message Cluster { - uint32 cluster_id = 1; -} - -// Code and description -message Status { - StatusCode code = 1; - string msg = 2; -} - -// Cluster member information -message Member { - uint64 member_id = 1; - string name = 2; - repeated string peer_urls = 3; - repeated string client_urls = 4; - int32 leader_priority = 5; -} - -message RequestHeader { - uint32 cluster_id = 1; -} - -message ResponseHeader { - uint32 cluster_id = 1; - Status status = 2; -} - -// Cluster member RPC -message GetMembersRequest { - RequestHeader header = 1; -} - -message GetMembersResponse { - ResponseHeader header = 1; - repeated Member members = 2; - Member leader = 3; - Member etcd_leader = 4; -} - -// For txn timestamp request/response -message GetTxnTimestampCtx { - uint64 txn_id = 1; - uint64 txn_ts = 2; -} - diff --git a/contrib/deneva/system/main.cpp b/contrib/deneva/system/main.cpp deleted file mode 100644 index 4e987004..00000000 --- a/contrib/deneva/system/main.cpp +++ /dev/null @@ -1,412 +0,0 @@ -/* - Tencent is pleased to support the open source community by making 3TS available. - - Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - Tencent Modifications are Copyright (C) THL A29 Limited. - - Author: hongyaozhao@ruc.edu.cn - - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "abort_thread.h" -#include "calvin_thread.h" -#include "client_query.h" -#include "global.h" -#include "io_thread.h" -#include "log_thread.h" -#include "logger.h" -#include "maat.h" -#include "manager.h" -#include "math.h" -#include "msg_queue.h" -#include "occ.h" -#include "pps.h" -#include "query.h" -#include "sequencer.h" -#include "sim_manager.h" -#include "abort_queue.h" -#include "thread.h" -#include "tpcc.h" -#include "transport.h" -#include "work_queue.h" -#include "worker_thread.h" -#include "ycsb.h" -#include "ycsb_query.h" -#include "da.h" -#include "maat.h" -#include "ssi.h" -#include "wsi.h" -#include "focc.h" -#include "bocc.h" -#include "client_query.h" -#include "sundial.h" -#include "http.h" - -void network_test(); -void network_test_recv(); -void * run_thread(void *); - -WorkerThread * worker_thds; -WorkerNumThread * worker_num_thds; -InputThread * input_thds; -OutputThread * output_thds; -AbortThread * abort_thds; -LogThread * log_thds; -#if CC_ALG == CALVIN -CalvinLockThread * calvin_lock_thds; -CalvinSequencerThread * calvin_seq_thds; -#endif - -// defined in parser.cpp -void parser(int argc, char * argv[]); - -int main(int argc, char *argv[]) { - // 0. initialize global data structure - parser(argc, argv); -#if SEED != 0 - uint64_t seed = SEED + g_node_id; -#else - uint64_t seed = get_sys_clock(); -#endif - srand(seed); - printf("Random seed: %ld\n",seed); - - int64_t starttime; - int64_t endtime; - starttime = get_server_clock(); - printf("Initializing stats... "); - fflush(stdout); - stats.init(g_total_thread_cnt); - printf("Done\n"); - - printf("Initializing global manager... "); - fflush(stdout); - glob_manager.init(); - printf("Done\n"); - printf("Initializing transport manager... "); - fflush(stdout); - tport_man.init(); - printf("Done\n"); - fflush(stdout); - printf("Initializing simulation... "); - fflush(stdout); - simulation = new SimManager; - simulation->init(); - printf("Done\n"); - fflush(stdout); - Workload * m_wl; - switch (WORKLOAD) { - case YCSB : - m_wl = new YCSBWorkload; - break; - case TPCC : - m_wl = new TPCCWorkload; - break; - case PPS : - m_wl = new PPSWorkload; - break; - case DA: - m_wl = new DAWorkload; - is_server=true; - break; - default: - assert(false); - } - m_wl->init(); - printf("Workload initialized!\n"); - fflush(stdout); -#if NETWORK_TEST - tport_man.init(g_node_id,m_wl); - sleep(3); - if(g_node_id == 0) - network_test(); - else if(g_node_id == 1) - network_test_recv(); - - return 0; -#endif - - - printf("Initializing work queue... "); - fflush(stdout); - work_queue.init(); - printf("Done\n"); - printf("Initializing abort queue... "); - fflush(stdout); - abort_queue.init(); - printf("Done\n"); - printf("Initializing message queue... "); - fflush(stdout); - msg_queue.init(); - printf("Done\n"); - printf("Initializing transaction manager pool... "); - fflush(stdout); - txn_man_pool.init(m_wl,0); - printf("Done\n"); - printf("Initializing transaction pool... "); - fflush(stdout); - txn_pool.init(m_wl,0); - printf("Done\n"); - printf("Initializing row pool... "); - fflush(stdout); - row_pool.init(m_wl,0); - printf("Done\n"); - printf("Initializing access pool... "); - fflush(stdout); - access_pool.init(m_wl,0); - printf("Done\n"); - printf("Initializing txn node table pool... "); - fflush(stdout); - txn_table_pool.init(m_wl,0); - printf("Done\n"); - printf("Initializing query pool... "); - fflush(stdout); - qry_pool.init(m_wl,0); - printf("Done\n"); - printf("Initializing msg pool... "); - fflush(stdout); - msg_pool.init(m_wl,0); - printf("Done\n"); - printf("Initializing transaction table... "); - fflush(stdout); - txn_table.init(); - printf("Done\n"); -#if CC_ALG == CALVIN - printf("Initializing sequencer... "); - fflush(stdout); - seq_man.init(m_wl); - printf("Done\n"); -#endif -#if CC_ALG == MAAT - printf("Initializing Time Table... "); - fflush(stdout); - time_table.init(); - printf("Done\n"); - printf("Initializing MaaT manager... "); - fflush(stdout); - maat_man.init(); - printf("Done\n"); -#endif -#if CC_ALG == SSI - printf("Initializing In Out Table... "); - fflush(stdout); - inout_table.init(); - printf("Done\n"); - printf("Initializing SSI manager... "); - fflush(stdout); - ssi_man.init(); - printf("Done\n"); -#endif -#if CC_ALG == WSI - printf("Initializing WSI manager... "); - fflush(stdout); - wsi_man.init(); - printf("Done\n"); -#endif -#if CC_ALG == SUNDIAL - printf("Initializing MaaT manager... "); - fflush(stdout); - sundial_man.init(); - printf("Done\n"); -#endif -#if LOGGING - printf("Initializing logger... "); - fflush(stdout); - logger.init("logfile.log"); - printf("Done\n"); -#endif - -#if SERVER_GENERATE_QUERIES - printf("Initializing client query queue... "); - fflush(stdout); - client_query_queue.init(m_wl); - printf("Done\n"); - fflush(stdout); -#endif - -#if WORKLOAD==DA - commit_file.open("commit_histroy.txt",ios::app); - abort_file.open("abort_histroy.txt",ios::app); -#endif - - // 2. spawn multiple threads - uint64_t thd_cnt = g_thread_cnt; - uint64_t wthd_cnt = thd_cnt; - uint64_t rthd_cnt = g_rem_thread_cnt; - uint64_t sthd_cnt = g_send_thread_cnt; - uint64_t all_thd_cnt = thd_cnt + rthd_cnt + sthd_cnt + g_abort_thread_cnt + 1; -#if LOGGING - all_thd_cnt += 1; // logger thread -#endif -#if CC_ALG == CALVIN - all_thd_cnt += 2; // sequencer + scheduler thread -#endif - - if (g_ts_alloc == LTS_TCP_CLOCK) { - printf("Initializing tcp queue... "); - fflush(stdout); - tcp_ts.init(all_thd_cnt); - printf("Done\n"); - } - - printf("%ld, %ld, %ld, %d \n", thd_cnt, rthd_cnt, sthd_cnt, g_abort_thread_cnt); - printf("all_thd_cnt: %ld, g_this_total_thread_cnt: %d \n", all_thd_cnt, g_this_total_thread_cnt); - fflush(stdout); - assert(all_thd_cnt == g_this_total_thread_cnt); - - pthread_t *p_thds = (pthread_t *)malloc(sizeof(pthread_t) * (all_thd_cnt)); - pthread_attr_t attr; - pthread_attr_init(&attr); - - worker_thds = new WorkerThread[wthd_cnt]; - worker_num_thds = new WorkerNumThread[1]; - input_thds = new InputThread[rthd_cnt]; - output_thds = new OutputThread[sthd_cnt]; - abort_thds = new AbortThread[1]; - log_thds = new LogThread[1]; -#if CC_ALG == CALVIN - calvin_lock_thds = new CalvinLockThread[1]; - calvin_seq_thds = new CalvinSequencerThread[1]; -#endif - // query_queue should be the last one to be initialized!!! - // because it collects txn latency - //if (WORKLOAD != TEST) { - // query_queue.init(m_wl); - //} -#if CC_ALG == OCC - printf("Initializing occ lock manager... "); - occ_man.init(); - printf("Done\n"); -#endif - -#if CC_ALG == BOCC - printf("Initializing occ lock manager... "); - bocc_man.init(); - printf("Done\n"); -#endif - -#if CC_ALG == FOCC - printf("Initializing occ lock manager... "); - focc_man.init(); - printf("Done\n"); -#endif - - endtime = get_server_clock(); - printf("Initialization Time = %ld\n", endtime - starttime); - fflush(stdout); - warmup_done = true; - pthread_barrier_init( &warmup_bar, NULL, all_thd_cnt); - -#if SET_AFFINITY - uint64_t cpu_cnt = 0; - cpu_set_t cpus; -#endif - // spawn and run txns again. - starttime = get_server_clock(); - simulation->run_starttime = starttime; - simulation->last_da_query_time = starttime; - - uint64_t id = 0; - for (uint64_t i = 0; i < wthd_cnt; i++) { -#if SET_AFFINITY - CPU_ZERO(&cpus); - CPU_SET(cpu_cnt, &cpus); - pthread_attr_setaffinity_np(&attr, sizeof(cpu_set_t), &cpus); - cpu_cnt++; -#endif - assert(id >= 0 && id < wthd_cnt); - worker_thds[i].init(id,g_node_id,m_wl); - pthread_create(&p_thds[id++], &attr, run_thread, (void *)&worker_thds[i]); - } - for (uint64_t j = 0; j < rthd_cnt ; j++) { - assert(id >= wthd_cnt && id < wthd_cnt + rthd_cnt); - input_thds[j].init(id,g_node_id,m_wl); - pthread_create(&p_thds[id++], NULL, run_thread, (void *)&input_thds[j]); - } - - for (uint64_t j = 0; j < sthd_cnt; j++) { - assert(id >= wthd_cnt + rthd_cnt && id < wthd_cnt + rthd_cnt + sthd_cnt); - output_thds[j].init(id,g_node_id,m_wl); - pthread_create(&p_thds[id++], NULL, run_thread, (void *)&output_thds[j]); - } -#if LOGGING - log_thds[0].init(id,g_node_id,m_wl); - pthread_create(&p_thds[id++], NULL, run_thread, (void *)&log_thds[0]); -#endif - -#if CC_ALG != CALVIN - abort_thds[0].init(id,g_node_id,m_wl); - pthread_create(&p_thds[id++], NULL, run_thread, (void *)&abort_thds[0]); -#endif - -#if CC_ALG == CALVIN -#if SET_AFFINITY - CPU_ZERO(&cpus); - CPU_SET(cpu_cnt, &cpus); - pthread_attr_setaffinity_np(&attr, sizeof(cpu_set_t), &cpus); - cpu_cnt++; -#endif - - calvin_lock_thds[0].init(id,g_node_id,m_wl); - pthread_create(&p_thds[id++], &attr, run_thread, (void *)&calvin_lock_thds[0]); -#if SET_AFFINITY - CPU_ZERO(&cpus); - CPU_SET(cpu_cnt, &cpus); - pthread_attr_setaffinity_np(&attr, sizeof(cpu_set_t), &cpus); - cpu_cnt++; -#endif - - calvin_seq_thds[0].init(id,g_node_id,m_wl); - pthread_create(&p_thds[id++], &attr, run_thread, (void *)&calvin_seq_thds[0]); -#endif - - worker_num_thds[0].init(id,g_node_id,m_wl); - pthread_create(&p_thds[id++], &attr, run_thread, (void *)&worker_num_thds[0]); - for (uint64_t i = 0; i < all_thd_cnt; i++) pthread_join(p_thds[i], NULL); - - endtime = get_server_clock(); - - fflush(stdout); - printf("PASS! SimTime = %f\n", (float)(endtime - starttime) / BILLION); - if (STATS_ENABLE) stats.print(false); - - printf("\n"); - fflush(stdout); - - m_wl->index_delete_all(); - - if (g_ts_alloc == LTS_TCP_CLOCK) { - for (uint32_t i = 0; i < all_thd_cnt; i++) { - tcp_ts.CloseToLts(i); - } - } - return 0; -} - -void * run_thread(void * id) { - Thread * thd = (Thread *) id; - thd->run(); - return NULL; -} - -void network_test() { - -} - -void network_test_recv() { - -} diff --git a/contrib/deneva/system/manager.cpp b/contrib/deneva/system/manager.cpp deleted file mode 100644 index ea2b09a1..00000000 --- a/contrib/deneva/system/manager.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* - Tencent is pleased to support the open source community by making 3TS available. - - Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - Tencent Modifications are Copyright (C) THL A29 Limited. - - Author: hongyaozhao@ruc.edu.cn - - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -#include "global.h" -#include "manager.h" -#include "row.h" -#include "txn.h" -#include "pthread.h" -#include "http.h" -//#include -__thread uint64_t Manager::_max_cts = 1; -void Manager::init() { - timestamp = 1; - last_min_ts_time = 0; - min_ts = 0; - all_ts = (ts_t *) malloc(sizeof(ts_t) * (g_thread_cnt * g_node_cnt)); - _all_txns = new TxnManager * [g_thread_cnt + g_rem_thread_cnt]; - for (UInt32 i = 0; i < g_thread_cnt + g_rem_thread_cnt; i++) { - _all_txns[i] = NULL; - } - for (UInt32 i = 0; i < BUCKET_CNT; i++) pthread_mutex_init(&mutexes[i], NULL); - for (UInt32 i = 0; i < g_thread_cnt * g_node_cnt; ++i) all_ts[i] = 0; -} - -uint64_t Manager::get_ts(uint64_t thread_id) { - if (g_ts_batch_alloc) assert(g_ts_alloc == TS_CAS); - uint64_t time; - uint64_t starttime = get_sys_clock(); - switch(g_ts_alloc) { - case TS_MUTEX : - pthread_mutex_lock( &ts_mutex ); - time = ++timestamp; - pthread_mutex_unlock( &ts_mutex ); - break; - case TS_CAS : - if (g_ts_batch_alloc) - time = ATOM_FETCH_ADD(timestamp, g_ts_batch_num); - else - time = ATOM_FETCH_ADD(timestamp, 1); - break; - case TS_HW : - assert(false); - break; - case TS_CLOCK : - time = get_wall_clock() * (g_node_cnt + g_thread_cnt) + (g_node_id * g_thread_cnt + thread_id); - break; - case LTS_CURL_CLOCK: - time = CurlGetTimeStamp(); - break; - case LTS_TCP_CLOCK: - time = tcp_ts.TcpGetTimeStamp(thread_id); - - break; - default : - assert(false); - } - INC_STATS(thread_id, ts_alloc_time, get_sys_clock() - starttime); - return time; -} - -ts_t Manager::get_min_ts(uint64_t tid) { - uint64_t now = get_sys_clock(); - if (now - last_min_ts_time > MIN_TS_INTVL) { - last_min_ts_time = now; - uint64_t min = txn_table.get_min_ts(tid); - if (min > min_ts) min_ts = min; - } - return min_ts; -} - -void Manager::set_txn_man(TxnManager * txn) { - int thd_id = txn->get_thd_id(); - _all_txns[thd_id] = txn; -} - - -uint64_t Manager::hash(row_t * row) { - uint64_t addr = (uint64_t)row / MEM_ALLIGN; - return (addr * 1103515247 + 12345) % BUCKET_CNT; -} - -void Manager::lock_row(row_t * row) { - int bid = hash(row); - uint64_t mtx_time_start = get_sys_clock(); - pthread_mutex_lock( &mutexes[bid] ); - INC_STATS(0,mtx[2],get_sys_clock() - mtx_time_start); -} - -void Manager::release_row(row_t * row) { - int bid = hash(row); - pthread_mutex_unlock( &mutexes[bid] ); -} diff --git a/contrib/deneva/system/manager.h b/contrib/deneva/system/manager.h deleted file mode 100644 index aca5eeb4..00000000 --- a/contrib/deneva/system/manager.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _MANAGER_H_ -#define _MANAGER_H_ - -#include "helper.h" -#include "global.h" - -class row_t; -class TxnManager; - -class Manager { -public: - void init(); - // returns the next timestamp. - ts_t get_ts(uint64_t thread_id); - - // For MVCC. To calculate the min active ts in the system - ts_t get_min_ts(uint64_t tid = 0); - - // HACK! the following mutexes are used to model a centralized - // lock/timestamp manager. - void lock_row(row_t * row); - void release_row(row_t * row); - - // SUNDIAL, max_cts - void set_max_cts(uint64_t cts) { _max_cts = cts; } - uint64_t get_max_cts() { return _max_cts; } - - TxnManager* get_txn_man(int thd_id) { - return _all_txns[thd_id]; - }; - void set_txn_man(TxnManager * txn); - // For SILO - uint64_t get_epoch() { return *_epoch; }; - void update_epoch(); -private: - // For SILO - volatile uint64_t * _epoch; - ts_t * _last_epoch_update_time; - - pthread_mutex_t ts_mutex; - uint64_t timestamp; - pthread_mutex_t mutexes[BUCKET_CNT]; - uint64_t hash(row_t * row); - ts_t * volatile all_ts; - TxnManager ** _all_txns; - ts_t last_min_ts_time; - ts_t min_ts; - - static __thread uint64_t _max_cts; // max commit timestamp seen by the thread so far. -}; - -#endif diff --git a/contrib/deneva/system/mem_alloc.cpp b/contrib/deneva/system/mem_alloc.cpp deleted file mode 100644 index 9e3de003..00000000 --- a/contrib/deneva/system/mem_alloc.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "mem_alloc.h" - -#include "global.h" -#include "helper.h" -//#include "jemalloc/jemalloc.h" - -#define N_MALLOC - -void mem_alloc::free(void * ptr, uint64_t size) { - if (NO_FREE) { - } - DEBUG_M("free %ld 0x%lx\n",size,(uint64_t)ptr); -#ifdef N_MALLOC - std::free(ptr); -#else - je_free(ptr); -#endif -} - -void * mem_alloc::alloc(uint64_t size) { - void * ptr; - -#ifdef N_MALLOC - ptr = malloc(size); -#else - ptr = je_malloc(size); -#endif - DEBUG_M("alloc %ld 0x%lx\n",size,(uint64_t)ptr); - assert(ptr != NULL); - return ptr; -} - -void * mem_alloc::align_alloc(uint64_t size) { - uint64_t aligned_size = size + CL_SIZE - (size % CL_SIZE); - return alloc(aligned_size); -} - - -void * mem_alloc::realloc(void * ptr, uint64_t size) { -#ifdef N_MALLOC - void * _ptr = std::realloc(ptr,size); -#else - void * _ptr = je_realloc(ptr,size); -#endif - DEBUG_M("realloc %ld 0x%lx\n",size,(uint64_t)_ptr); - return _ptr; -} - - diff --git a/contrib/deneva/system/mem_alloc.h b/contrib/deneva/system/mem_alloc.h deleted file mode 100644 index 8f1e6334..00000000 --- a/contrib/deneva/system/mem_alloc.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _MEM_ALLOC_H_ -#define _MEM_ALLOC_H_ - -#include "global.h" - -class mem_alloc { -public: - void * alloc(uint64_t size); - void * align_alloc(uint64_t size); - void * realloc(void * ptr, uint64_t size); - void free(void * block, uint64_t size); -}; - -#endif diff --git a/contrib/deneva/system/msg_queue.cpp b/contrib/deneva/system/msg_queue.cpp deleted file mode 100644 index b024d8ec..00000000 --- a/contrib/deneva/system/msg_queue.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "msg_queue.h" -#include "mem_alloc.h" -#include "query.h" -#include "pool.h" -#include "message.h" -#include - -void MessageQueue::init() { - //m_queue = new boost::lockfree::queue (0); - m_queue = new boost::lockfree::queue * [g_this_send_thread_cnt]; -#if NETWORK_DELAY_TEST - cl_m_queue = new boost::lockfree::queue * [g_this_send_thread_cnt]; -#endif - for(uint64_t i = 0; i < g_this_send_thread_cnt; i++) { - m_queue[i] = new boost::lockfree::queue (0); -#if NETWORK_DELAY_TEST - cl_m_queue[i] = new boost::lockfree::queue (0); -#endif - } - ctr = new uint64_t * [g_this_send_thread_cnt]; - for(uint64_t i = 0; i < g_this_send_thread_cnt; i++) { - ctr[i] = (uint64_t*) mem_allocator.align_alloc(sizeof(uint64_t)); - *ctr[i] = i % g_thread_cnt; - } - for (uint64_t i = 0; i < g_this_send_thread_cnt; i++) sthd_m_cache.push_back(NULL); -} - -void MessageQueue::enqueue(uint64_t thd_id, Message * msg,uint64_t dest) { - DEBUG("MQ Enqueue %ld\n",dest) - assert(dest < g_total_node_cnt); - assert(dest != g_node_id); - DEBUG_M("MessageQueue::enqueue msg_entry alloc\n"); - msg_entry * entry = (msg_entry*) mem_allocator.alloc(sizeof(struct msg_entry)); - //msg_pool.get(entry); - entry->msg = msg; - entry->dest = dest; - entry->starttime = get_sys_clock(); - assert(entry->dest < g_total_node_cnt); - uint64_t mtx_time_start = get_sys_clock(); -#if CC_ALG == CALVIN - // Need to have strict message ordering for sequencer thread - uint64_t rand = thd_id % g_this_send_thread_cnt; -#elif WORKLOAD == DA - uint64_t rand = 0; -#else - uint64_t rand = mtx_time_start % g_this_send_thread_cnt; -#endif -#if NETWORK_DELAY_TEST - if(ISCLIENTN(dest)) { - while (!cl_m_queue[rand]->push(entry) && !simulation->is_done()) { - } - return; - } -#endif - while (!m_queue[rand]->push(entry) && !simulation->is_done()) { - } - INC_STATS(thd_id,mtx[3],get_sys_clock() - mtx_time_start); - INC_STATS(thd_id,msg_queue_enq_cnt,1); -} - -uint64_t MessageQueue::dequeue(uint64_t thd_id, Message *& msg) { - msg_entry * entry = NULL; - uint64_t dest = UINT64_MAX; - uint64_t mtx_time_start = get_sys_clock(); - bool valid = false; -#if NETWORK_DELAY_TEST - valid = cl_m_queue[thd_id%g_this_send_thread_cnt]->pop(entry); - if(!valid) { - entry = sthd_m_cache[thd_id % g_this_send_thread_cnt]; - if(entry) - valid = true; - else - valid = m_queue[thd_id%g_this_send_thread_cnt]->pop(entry); - } -#elif WORKLOAD == DA - valid = m_queue[0]->pop(entry); -#else - - valid = m_queue[thd_id%g_this_send_thread_cnt]->pop(entry); -#endif - - INC_STATS(thd_id,mtx[4],get_sys_clock() - mtx_time_start); - uint64_t curr_time = get_sys_clock(); - if(valid) { - assert(entry); -#if NETWORK_DELAY_TEST - if(!ISCLIENTN(entry->dest)) { - if(ISSERVER && (get_sys_clock() - entry->starttime) < g_network_delay) { - sthd_m_cache[thd_id%g_this_send_thread_cnt] = entry; - INC_STATS(thd_id,mtx[5],get_sys_clock() - curr_time); - return UINT64_MAX; - } else { - sthd_m_cache[thd_id%g_this_send_thread_cnt] = NULL; - } - if(ISSERVER) { - INC_STATS(thd_id,mtx[38],1); - INC_STATS(thd_id,mtx[39],curr_time - entry->starttime); - } - } - -#endif - dest = entry->dest; - assert(dest < g_total_node_cnt); - msg = entry->msg; - DEBUG("MQ Dequeue %ld\n",dest) - INC_STATS(thd_id,msg_queue_delay_time,curr_time - entry->starttime); - INC_STATS(thd_id,msg_queue_cnt,1); - msg->mq_time = curr_time - entry->starttime; - //msg_pool.put(entry); - DEBUG_M("MessageQueue::enqueue msg_entry free\n"); - mem_allocator.free(entry,sizeof(struct msg_entry)); - } else { - msg = NULL; - dest = UINT64_MAX; - } - INC_STATS(thd_id,mtx[5],get_sys_clock() - curr_time); - return dest; -} diff --git a/contrib/deneva/system/msg_queue.h b/contrib/deneva/system/msg_queue.h deleted file mode 100644 index 8c87051f..00000000 --- a/contrib/deneva/system/msg_queue.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _MSG_QUEUE_H_ -#define _MSG_QUEUE_H_ - -#include "global.h" -#include "helper.h" -#include "concurrentqueue.h" -#include "lock_free_queue.h" -#include - -class BaseQuery; -class Message; - -struct msg_entry { - Message * msg; - uint64_t dest; - uint64_t starttime; -}; - -typedef msg_entry * msg_entry_t; - -class MessageQueue { -public: - void init(); - void enqueue(uint64_t thd_id, Message * msg, uint64_t dest); - uint64_t dequeue(uint64_t thd_id, Message *& msg); -private: - //LockfreeQueue m_queue; -// This is close to max capacity for boost -#if NETWORK_DELAY_TEST - boost::lockfree::queue ** cl_m_queue; -#endif - boost::lockfree::queue ** m_queue; - std::vector sthd_m_cache; - uint64_t ** ctr; - -}; - -#endif diff --git a/contrib/deneva/system/parser.cpp b/contrib/deneva/system/parser.cpp deleted file mode 100644 index e7833e0a..00000000 --- a/contrib/deneva/system/parser.cpp +++ /dev/null @@ -1,263 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "global.h" -#include "helper.h" - -void print_usage() { - printf("[usage]:\n"); - printf("\t-nidINT ; NODE_ID\n"); - printf("\t-pINT ; PART_CNT\n"); - printf("\t-nINT ; NODE_CNT\n"); - printf("\t-cnINT ; CLIENT_NODE_CNT\n"); - - printf("\t-vINT ; VIRTUAL_PART_CNT\n"); - - printf("\t-tINT ; THREAD_CNT\n"); - printf("\t-trINT ; REM_THREAD_CNT\n"); - printf("\t-tsINT ; SEND_THREAD_CNT\n"); - printf("\t-ctINT ; CLIENT_THREAD_CNT\n"); - printf("\t-ctrINT ; CLIENT_REM_THREAD_CNT\n"); - printf("\t-ctsINT ; CLIENT_SEND_THREAD_CNT\n"); - - printf("\t-tppINT ; MAX_TXN_PER_PART\n"); - printf("\t-tifINT ; MAX_TXN_IN_FLIGHT\n"); - printf("\t-mprINT ; MPR\n"); - printf("\t-mpiINT ; MPIR\n"); - printf("\t-doneINT ; DONE_TIMER\n"); - printf("\t-btmrINT ; BATCH_TIMER\n"); - printf("\t-stmrINT ; SEQ_BATCH_TIMER\n"); - printf("\t-progINT ; PROG_TIMER\n"); - printf("\t-abrtINT ; ABORT_PENALTY (ms)\n"); - - printf("\t-qINT ; QUERY_INTVL\n"); - printf("\t-dINT ; PRT_LAT_DISTR\n"); - printf("\t-aINT ; PART_ALLOC (0 or 1)\n"); - printf("\t-mINT ; MEM_PAD (0 or 1)\n"); - - printf("\t-rnINT ; REPLICA_CNT (0+)\n"); - printf("\t-rtINT ; REPL_TYPE (AA: 1, AP: 2)\n"); - - printf("\t-o STRING ; output file\n"); - printf("\t-i STRING ; input file\n"); - printf("\t-cf STRING ; txn file\n"); - printf("\t-ndly ; NETWORK_DELAY\n"); - printf(" [YCSB]:\n"); - printf("\t-dpFLOAT ; DATA_PERC\n"); - printf("\t-apFLOAT ; ACCESS_PERC\n"); - printf("\t-pptINT ; PART_PER_TXN\n"); - printf("\t-spptINT ; STRICT_PPT\n"); - printf("\t-eINT ; PERC_MULTI_PART\n"); - printf("\t-wFLOAT ; WRITE_PERC\n"); - printf("\t-zipfFLOAT ; ZIPF_THETA\n"); - printf("\t-sINT ; SYNTH_TABLE_SIZE\n"); - printf("\t-rpqINT ; REQ_PER_QUERY\n"); - printf("\t-fINT ; FIELD_PER_TUPLE\n"); - printf(" [TPCC]:\n"); - printf("\t-whINT ; NUM_WH\n"); - printf("\t-ppFLOAT ; PERC_PAYMENT\n"); - printf("\t-upINT ; WH_UPDATE\n"); - -} - -void parser(int argc, char * argv[]) { - - g_params["validation_lock"] = VALIDATION_LOCK; - g_params["pre_abort"] = PRE_ABORT2; - - for (int i = 1; i < argc; i++) { - assert(argv[i][0] == '-'); - if (argv[i][1] == 'n' && argv[i][2] == 'd' && argv[i][3] == 'l' && argv[i][4] == 'y') - g_network_delay = atoi( &argv[i][5] ); - else if (argv[i][1] == 'd' && argv[i][2] == 'o' && argv[i][3] == 'n' && argv[i][4] == 'e') - g_done_timer = atoi( &argv[i][5] ); - else if (argv[i][1] == 'b' && argv[i][2] == 't' && argv[i][3] == 'm' && argv[i][4] == 'r') - g_batch_time_limit = atoi( &argv[i][5] ); - else if (argv[i][1] == 's' && argv[i][2] == 't' && argv[i][3] == 'm' && argv[i][4] == 'r') - g_seq_batch_time_limit = atoi( &argv[i][5] ); - else if (argv[i][1] == 's' && argv[i][2] == 'p' && argv[i][3] == 'p' && argv[i][4] == 't') - g_strict_ppt = atoi( &argv[i][5] ) == 1; - else if (argv[i][1] == 'p' && argv[i][2] == 'r' && argv[i][3] == 'o' && argv[i][4] == 'g') - g_thread_cnt = atoi( &argv[i][5] ); - else if (argv[i][1] == 'a' && argv[i][2] == 'b' && argv[i][3] == 'r' && argv[i][4] == 't') - g_abort_penalty = atoi( &argv[i][5] ); - else if (argv[i][1] == 'z' && argv[i][2] == 'i' && argv[i][3] == 'p' && argv[i][4] == 'f') - g_zipf_theta = atof( &argv[i][5] ); - else if (argv[i][1] == 'n' && argv[i][2] == 'i' && argv[i][3] == 'd') - g_node_id = atoi( &argv[i][4] ); - else if (argv[i][1] == 'c' && argv[i][2] == 't' && argv[i][3] == 'r') - g_client_rem_thread_cnt = atoi( &argv[i][4] ); - else if (argv[i][1] == 'c' && argv[i][2] == 't' && argv[i][3] == 's') - g_client_send_thread_cnt = atoi( &argv[i][4] ); - else if (argv[i][1] == 'l' && argv[i][2] == 'p' && argv[i][3] == 's') - g_load_per_server = atoi( &argv[i][4] ); - else if (argv[i][1] == 't' && argv[i][2] == 'p' && argv[i][3] == 'p') - g_max_txn_per_part = atoi( &argv[i][4] ); - else if (argv[i][1] == 't' && argv[i][2] == 'i' && argv[i][3] == 'f') - g_inflight_max = atoi( &argv[i][4] ); - else if (argv[i][1] == 'm' && argv[i][2] == 'p' && argv[i][3] == 'r') - g_mpr = atof( &argv[i][4] ); - else if (argv[i][1] == 'm' && argv[i][2] == 'p' && argv[i][3] == 'i') - g_mpitem = atof( &argv[i][4] ); - else if (argv[i][1] == 'p' && argv[i][2] == 'p' && argv[i][3] == 't') - g_part_per_txn = atoi( &argv[i][4] ); - else if (argv[i][1] == 'r' && argv[i][2] == 'p' && argv[i][3] == 'q') - g_req_per_query = atoi( &argv[i][4] ); - else if (argv[i][1] == 'c' && argv[i][2] == 'n') - g_client_node_cnt = atoi( &argv[i][3] ); - else if (argv[i][1] == 't' && argv[i][2] == 'r') - g_rem_thread_cnt = atoi( &argv[i][3] ); - else if (argv[i][1] == 't' && argv[i][2] == 's') - g_send_thread_cnt = atoi( &argv[i][3] ); - else if (argv[i][1] == 'c' && argv[i][2] == 't') - g_client_thread_cnt = atoi( &argv[i][3] ); - else if (argv[i][1] == 'w' && argv[i][2] == 'h') - g_num_wh = atoi( &argv[i][3] ); - else if (argv[i][1] == 'c' && argv[i][2] == 'f') - txn_file = argv[++i]; - else if (argv[i][1] == 'p' && argv[i][2] == 'p') - g_perc_payment = atof( &argv[i][3] ); - else if (argv[i][1] == 'u' && argv[i][2] == 'p') - g_wh_update = atoi( &argv[i][3] ); - else if (argv[i][1] == 'd' && argv[i][2] == 'p') - g_data_perc = atof( &argv[i][3] ); - else if (argv[i][1] == 'a' && argv[i][2] == 'p') - g_access_perc = atof( &argv[i][3] ); - else if (argv[i][1] == 'r' && argv[i][2] == 'n') - g_repl_cnt = atof( &argv[i][3] ); - else if (argv[i][1] == 'r' && argv[i][2] == 't') - g_repl_type = atof( &argv[i][3] ); - else if (argv[i][1] == 't'&& argv[i][2] == 'w') { - g_txn_write_perc = atof( &argv[i][3] ); - g_txn_read_perc = 1.0 - atof( &argv[i][3] ); - } else if (argv[i][1] == 'p') - g_part_cnt = atoi( &argv[i][2] ); - else if (argv[i][1] == 'n') - g_node_cnt = atoi( &argv[i][2] ); - else if (argv[i][1] == 't') - g_thread_cnt = atoi( &argv[i][2] ); - else if (argv[i][1] == 'q') - g_query_intvl = atoi( &argv[i][2] ); - else if (argv[i][1] == 'd') - g_prt_lat_distr = atoi( &argv[i][2] ); - else if (argv[i][1] == 'a') - g_part_alloc = atoi( &argv[i][2] ); - else if (argv[i][1] == 'm') - g_mem_pad = atoi( &argv[i][2] ); - else if (argv[i][1] == 'o') - output_file = argv[++i]; - else if (argv[i][1] == 'i') - input_file = argv[++i]; - else if (argv[i][1] == 'e') - g_perc_multi_part = atof( &argv[i][2] ); - else if (argv[i][1] == 'w') { - g_tup_write_perc = atof( &argv[i][2] ); - g_tup_read_perc = 1.0 - atof( &argv[i][2] ); - } else if (argv[i][1] == 's') - g_synth_table_size = atoi( &argv[i][2] ); - else if (argv[i][1] == 'f') - g_field_per_tuple = atoi( &argv[i][2] ); - else if (argv[i][1] == 'h') { - print_usage(); - exit(0); - } else { - printf("%s\n",argv[i]); - fflush(stdout); - assert(false); - } - } - g_total_thread_cnt = g_thread_cnt + g_rem_thread_cnt + g_send_thread_cnt + g_abort_thread_cnt + 1; -#if LOGGING - g_total_thread_cnt += g_logger_thread_cnt; // logger thread -#endif -#if CC_ALG == CALVIN - g_total_thread_cnt += 2; // sequencer + scheduler thread - // Remove abort thread - g_abort_thread_cnt = 0; - g_total_thread_cnt -= 1; -#endif - g_total_client_thread_cnt = - g_client_thread_cnt + g_client_rem_thread_cnt + g_client_send_thread_cnt; - g_total_node_cnt = g_node_cnt + g_client_node_cnt + g_repl_cnt*g_node_cnt; - if(ISCLIENT) { - g_this_thread_cnt = g_client_thread_cnt; - g_this_rem_thread_cnt = g_client_rem_thread_cnt; - g_this_send_thread_cnt = g_client_send_thread_cnt; - g_this_total_thread_cnt = g_total_client_thread_cnt; - } else { - g_this_thread_cnt = g_thread_cnt; - g_this_rem_thread_cnt = g_rem_thread_cnt; - g_this_send_thread_cnt = g_send_thread_cnt; - g_this_total_thread_cnt = g_total_thread_cnt; - } - // Scale # of keys with cluster size - g_max_part_key *= g_node_cnt; - g_max_product_key *= g_node_cnt; - g_max_supplier_key *= g_node_cnt; - - //g_inflight_max = g_inflight_max / g_node_cnt; - printf("CC Alg %d\n",CC_ALG); - printf("g_done_timer %ld\n",g_done_timer); - printf("g_thread_cnt %d\n",g_thread_cnt ); - printf("g_abort_penalty %ld\n",g_abort_penalty); - printf("g_zipf_theta %f\n",g_zipf_theta ); - printf("g_node_id %d\n",g_node_id ); - printf("g_client_rem_thread_cnt %d\n",g_client_rem_thread_cnt ); - printf("g_client_send_thread_cnt %d\n",g_client_send_thread_cnt ); - printf("g_max_txn_per_part %d\n",g_max_txn_per_part ); - printf("g_load_per_server %d\n",g_load_per_server ); - printf("g_inflight_max %d\n",g_inflight_max ); - printf("g_mpr %f\n",g_mpr ); - printf("g_mpitem %f\n",g_mpitem ); - printf("g_part_per_txn %d\n",g_part_per_txn ); - printf("g_req_per_query %d\n",g_req_per_query ); - printf("g_client_node_cnt %d\n",g_client_node_cnt ); - printf("g_rem_thread_cnt %d\n",g_rem_thread_cnt ); - printf("g_send_thread_cnt %d\n",g_send_thread_cnt ); - printf("g_client_thread_cnt %d\n",g_client_thread_cnt ); - printf("g_num_wh %d\n",g_num_wh ); - printf("g_perc_payment %f\n",g_perc_payment ); - printf("g_wh_update %d\n",g_wh_update ); - printf("g_part_cnt %d\n",g_part_cnt ); - printf("g_node_cnt %d\n",g_node_cnt ); - printf("g_thread_cnt %d\n",g_thread_cnt ); - printf("g_query_intvl %ld\n",g_query_intvl ); - printf("g_prt_lat_distr %d\n",g_prt_lat_distr ); - printf("g_part_alloc %d\n",g_part_alloc ); - printf("g_mem_pad %d\n",g_mem_pad ); - printf("g_perc_multi_part %f\n",g_perc_multi_part ); - printf("g_tup_read_perc %f\n",g_tup_read_perc ); - printf("g_tup_write_perc %f\n",g_tup_write_perc ); - printf("g_txn_read_perc %f\n",g_txn_read_perc ); - printf("g_txn_write_perc %f\n",g_txn_write_perc ); - printf("g_synth_table_size %ld\n",g_synth_table_size ); - printf("g_max_part_key %d\n",g_max_part_key); - printf("g_max_product_key %d\n",g_max_product_key); - printf("g_max_supplier_key %d\n",g_max_supplier_key); - printf("g_field_per_tuple %d\n",g_field_per_tuple ); - printf("g_data_perc %f\n",g_data_perc); - printf("g_access_perc %f\n",g_access_perc); - printf("g_strict_ppt %d\n",g_strict_ppt); - printf("g_network_delay %d\n",g_network_delay); - printf("g_total_thread_cnt %d\n",g_total_thread_cnt); - printf("g_total_client_thread_cnt %d\n",g_total_client_thread_cnt); - printf("g_total_node_cnt %d\n",g_total_node_cnt); - printf("g_seq_batch_time_limit %ld\n",g_seq_batch_time_limit); - - // Initialize client-specific globals - if (g_node_id >= g_node_cnt) init_client_globals(); - init_globals(); -} diff --git a/contrib/deneva/system/pool.cpp b/contrib/deneva/system/pool.cpp deleted file mode 100644 index eb4fe5c4..00000000 --- a/contrib/deneva/system/pool.cpp +++ /dev/null @@ -1,442 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "pool.h" -#include "global.h" -#include "helper.h" -#include "txn.h" -#include "mem_alloc.h" -#include "wl.h" -#include "ycsb_query.h" -#include "ycsb.h" -#include "tpcc_query.h" -#include "pps_query.h" -#include "da.h" -#include "da_query.h" -#include "query.h" -#include "msg_queue.h" -#include "row.h" - -#define TRY_LIMIT 10 - -void TxnManPool::init(Workload * wl, uint64_t size) { - _wl = wl; -#if CC_ALG == CALVIN - pool = new boost::lockfree::queue (size); -#else - pool = new boost::lockfree::queue * [g_total_thread_cnt]; -#endif - TxnManager * txn; - for(uint64_t thd_id = 0; thd_id < g_total_thread_cnt; thd_id++) { -#if CC_ALG != CALVIN - pool[thd_id] = new boost::lockfree::queue (size); -#endif - for(uint64_t i = 0; i < size; i++) { - //put(items[i]); - _wl->get_txn_man(txn); - txn->init(thd_id,_wl); - put(thd_id, txn); - } - } -} - -void TxnManPool::get(uint64_t thd_id, TxnManager *& item) { -#if CC_ALG == CALVIN - bool r = pool->pop(item); -#else - bool r = pool[thd_id]->pop(item); -#endif - if(!r) { - _wl->get_txn_man(item); - } - item->init(thd_id,_wl); -} - -void TxnManPool::put(uint64_t thd_id, TxnManager * item) { - item->release(); - int tries = 0; -#if CC_ALG == CALVIN - while (!pool->push(item) && tries++ < TRY_LIMIT) { - } -#else - while (!pool[thd_id]->push(item) && tries++ < TRY_LIMIT) { - } -#endif - if(tries >= TRY_LIMIT) { - mem_allocator.free(item,sizeof(TxnManager)); - } -} - -void TxnManPool::free_all() { - TxnManager * item; - for(uint64_t thd_id = 0; thd_id < g_total_thread_cnt; thd_id++) { -#if CC_ALG == CALVIN - while(pool->pop(item)) { -#else - while(pool[thd_id]->pop(item)) { -#endif - mem_allocator.free(item,sizeof(TxnManager)); - } - } -} - -void TxnPool::init(Workload * wl, uint64_t size) { - _wl = wl; -#if CC_ALG == CALVIN - pool = new boost::lockfree::queue (size); -#else - pool = new boost::lockfree::queue * [g_total_thread_cnt]; -#endif - Transaction * txn; - for(uint64_t thd_id = 0; thd_id < g_total_thread_cnt; thd_id++) { -#if CC_ALG != CALVIN - pool[thd_id] = new boost::lockfree::queue (size); -#endif - for(uint64_t i = 0; i < size; i++) { - //put(items[i]); - txn = (Transaction*) mem_allocator.alloc(sizeof(Transaction)); - txn->init(); - put(thd_id,txn); - } - } -} - -void TxnPool::get(uint64_t thd_id, Transaction *& item) { -#if CC_ALG == CALVIN - bool r = pool->pop(item); -#else - bool r = pool[thd_id]->pop(item); -#endif - if(!r) { - item = (Transaction*) mem_allocator.alloc(sizeof(Transaction)); - item->init(); - } -} - -void TxnPool::put(uint64_t thd_id,Transaction * item) { - //item->release(); - item->reset(thd_id); - int tries = 0; -#if CC_ALG == CALVIN - while (!pool->push(item) && tries++ < TRY_LIMIT) { - } -#else - while (!pool[thd_id]->push(item) && tries++ < TRY_LIMIT) { - } -#endif - if(tries >= TRY_LIMIT) { - item->release(thd_id); - mem_allocator.free(item,sizeof(Transaction)); - } -} - -void TxnPool::free_all() { - TxnManager * item; - for(uint64_t thd_id = 0; thd_id < g_total_thread_cnt; thd_id++) { -#if CC_ALG == CALVIN - while(pool->pop(item)) { -#else - while(pool[thd_id]->pop(item)) { -#endif - mem_allocator.free(item,sizeof(item)); - - } - } -} - -void QryPool::init(Workload * wl, uint64_t size) { - _wl = wl; -#if CC_ALG == CALVIN - pool = new boost::lockfree::queue (size); -#else - pool = new boost::lockfree::queue * [g_total_thread_cnt]; -#endif - BaseQuery * qry=NULL; - DEBUG_M("QryPool alloc init\n"); - for(uint64_t thd_id = 0; thd_id < g_total_thread_cnt; thd_id++) { -#if CC_ALG != CALVIN - pool[thd_id] = new boost::lockfree::queue (size); -#endif - for(uint64_t i = 0; i < size; i++) { - //put(items[i]); -#if WORKLOAD==TPCC - TPCCQuery * m_qry = (TPCCQuery *) mem_allocator.alloc(sizeof(TPCCQuery)); - m_qry = new TPCCQuery(); -#elif WORKLOAD==PPS - PPSQuery * m_qry = (PPSQuery *) mem_allocator.alloc(sizeof(PPSQuery)); - m_qry = new PPSQuery(); -#elif WORKLOAD==YCSB - YCSBQuery * m_qry = (YCSBQuery *) mem_allocator.alloc(sizeof(YCSBQuery)); - m_qry = new YCSBQuery(); -#elif WORKLOAD==DA - DAQuery * m_qry = (DAQuery *) mem_allocator.alloc(sizeof(DAQuery)); - m_qry = new DAQuery(); -#endif - m_qry->init(); - qry = m_qry; - put(thd_id,qry); - } - } -} - -void QryPool::get(uint64_t thd_id, BaseQuery *& item) { -#if CC_ALG == CALVIN - bool r = pool->pop(item); -#else - bool r = pool[thd_id]->pop(item); -#endif - if(!r) { - DEBUG_M("query_pool alloc\n"); -#if WORKLOAD==TPCC - TPCCQuery * qry = (TPCCQuery *) mem_allocator.alloc(sizeof(TPCCQuery)); - qry = new TPCCQuery(); -#elif WORKLOAD==PPS - PPSQuery * qry = (PPSQuery *) mem_allocator.alloc(sizeof(PPSQuery)); - qry = new PPSQuery(); -#elif WORKLOAD==YCSB - YCSBQuery * qry = NULL; - qry = (YCSBQuery *) mem_allocator.alloc(sizeof(YCSBQuery)); - qry = new YCSBQuery(); -#elif WORKLOAD==DA - DAQuery * qry = NULL; - qry = (DAQuery *) mem_allocator.alloc(sizeof(DAQuery)); - qry = new DAQuery(); -#endif - qry->init(); - item = (BaseQuery*)qry; - } - DEBUG_R("get 0x%lx\n",(uint64_t)item); -} - -void QryPool::put(uint64_t thd_id, BaseQuery * item) { - assert(item); -#if WORKLOAD == YCSB - ((YCSBQuery*)item)->reset(); -#elif WORKLOAD == TPCC - ((TPCCQuery*)item)->reset(); -#elif WORKLOAD == PPS - ((PPSQuery*)item)->reset(); -#endif - //DEBUG_M("put 0x%lx\n",(uint64_t)item); - DEBUG_R("put 0x%lx\n",(uint64_t)item); - //mem_allocator.free(item,sizeof(item)); - int tries = 0; -#if CC_ALG == CALVIN - while (!pool->push(item) && tries++ < TRY_LIMIT) { - } -#else - while (!pool[thd_id]->push(item) && tries++ < TRY_LIMIT) { - } -#endif - if(tries >= TRY_LIMIT) { -#if WORKLOAD == YCSB - ((YCSBQuery*)item)->release(); -#elif WORKLOAD == TPCC - ((TPCCQuery*)item)->release(); -#elif WORKLOAD == PPS - ((PPSQuery*)item)->release(); -#endif - mem_allocator.free(item,sizeof(BaseQuery)); - } -} - -void QryPool::free_all() { - BaseQuery * item; - DEBUG_M("query_pool free\n"); - for(uint64_t thd_id = 0; thd_id < g_total_thread_cnt; thd_id++) { -#if CC_ALG == CALVIN - while(pool->pop(item)) { -#else - while(pool[thd_id]->pop(item)) { -#endif - mem_allocator.free(item,sizeof(item)); - } - } -} - - -void AccessPool::init(Workload * wl, uint64_t size) { - _wl = wl; - pool = new boost::lockfree::queue * [g_total_thread_cnt]; - DEBUG_M("AccessPool alloc init\n"); - for(uint64_t thd_id = 0; thd_id < g_total_thread_cnt; thd_id++) { - pool[thd_id] = new boost::lockfree::queue (size); - for(uint64_t i = 0; i < size; i++) { - Access * item = (Access*)mem_allocator.alloc(sizeof(Access)); - put(thd_id,item); - } - } -} - -void AccessPool::get(uint64_t thd_id, Access *& item) { - //bool r = pool->pop(item); - bool r = pool[thd_id]->pop(item); - if(!r) { - DEBUG_M("access_pool alloc\n"); - item = (Access*)mem_allocator.alloc(sizeof(Access)); - item->orig_row = NULL; - item->data = NULL; - item->orig_data = NULL; - #if CC_ALG == SUNDIAL - item->orig_rts = 0; - item->orig_wts = 0; - item->locked = false; - #endif - } -} - -void AccessPool::put(uint64_t thd_id, Access * item) { - pool[thd_id]->push(item); - /* - int tries = 0; - while(!pool->push(item) && tries++ < TRY_LIMIT) { } - if(tries >= TRY_LIMIT) { - mem_allocator.free(item,sizeof(Access)); - } - */ -} - -void AccessPool::free_all() { - Access * item; - DEBUG_M("access_pool free\n"); - //while(pool->pop(item)) { - for(uint64_t thd_id = 0; thd_id < g_total_thread_cnt; thd_id++) { - while(pool[thd_id]->pop(item)) { - mem_allocator.free(item,sizeof(item)); - } - } -} - -void TxnTablePool::init(Workload * wl, uint64_t size) { - _wl = wl; - pool = new boost::lockfree::queue * [g_total_thread_cnt]; - DEBUG_M("TxnTablePool alloc init\n"); - for(uint64_t thd_id = 0; thd_id < g_total_thread_cnt; thd_id++) { - pool[thd_id] = new boost::lockfree::queue (size); - for(uint64_t i = 0; i < size; i++) { - txn_node * t_node = (txn_node *) mem_allocator.align_alloc(sizeof(struct txn_node)); - //put(new txn_node()); - put(thd_id,t_node); - } - } -} - -void TxnTablePool::get(uint64_t thd_id, txn_node *& item) { - bool r = pool[thd_id]->pop(item); - if(!r) { - DEBUG_M("txn_table_pool alloc\n"); - item = (txn_node *) mem_allocator.align_alloc(sizeof(struct txn_node)); - } -} - -void TxnTablePool::put(uint64_t thd_id, txn_node * item) { - int tries = 0; - while (!pool[thd_id]->push(item) && tries++ < TRY_LIMIT) { - } - if(tries >= TRY_LIMIT) { - mem_allocator.free(item,sizeof(txn_node)); - } -} - -void TxnTablePool::free_all() { - txn_node * item; - DEBUG_M("txn_table_pool free\n"); - for(uint64_t thd_id = 0; thd_id < g_total_thread_cnt; thd_id++) { - while(pool[thd_id]->pop(item)) { - mem_allocator.free(item,sizeof(item)); - } - } -} -void MsgPool::init(Workload * wl, uint64_t size) { - _wl = wl; - pool = new boost::lockfree::queue (size); - msg_entry* entry; - DEBUG_M("MsgPool alloc init\n"); - for(uint64_t i = 0; i < size; i++) { - entry = (msg_entry*) mem_allocator.alloc(sizeof(struct msg_entry)); - put(entry); - } -} - -void MsgPool::get(msg_entry* & item) { - bool r = pool->pop(item); - if(!r) { - DEBUG_M("msg_pool alloc\n"); - item = (msg_entry*) mem_allocator.alloc(sizeof(struct msg_entry)); - } -} - -void MsgPool::put(msg_entry* item) { - item->msg = NULL; - item->dest = UINT64_MAX; - item->starttime = UINT64_MAX; - int tries = 0; - while (!pool->push(item) && tries++ < TRY_LIMIT) { - } - if(tries >= TRY_LIMIT) { - mem_allocator.free(item,sizeof(msg_entry)); - } -} - -void MsgPool::free_all() { - msg_entry * item; - DEBUG_M("msg_pool free\n"); - while(pool->pop(item)) { - mem_allocator.free(item,sizeof(item)); - } -} - -void RowPool::init(Workload * wl, uint64_t size) { - _wl = wl; - pool = new boost::lockfree::queue * [g_total_thread_cnt]; - row_t* entry; - DEBUG_M("RowPool alloc init\n"); - for(uint64_t thd_id = 0; thd_id < g_total_thread_cnt; thd_id++) { - pool[thd_id] = new boost::lockfree::queue (size); - for(uint64_t i = 0; i < size; i++) { - entry = (row_t*) mem_allocator.alloc(sizeof(struct row_t)); - put(thd_id,entry); - } - } -} - -void RowPool::get(uint64_t thd_id, row_t* & item) { - bool r = pool[thd_id]->pop(item); - if(!r) { - DEBUG_M("msg_pool alloc\n"); - item = (row_t*) mem_allocator.alloc(sizeof(struct row_t)); - } -} - -void RowPool::put(uint64_t thd_id, row_t* item) { - int tries = 0; - while (!pool[thd_id]->push(item) && tries++ < TRY_LIMIT) { - } - if(tries >= TRY_LIMIT) { - mem_allocator.free(item,sizeof(row_t)); - } -} - -void RowPool::free_all() { - row_t * item; - for(uint64_t thd_id = 0; thd_id < g_total_thread_cnt; thd_id++) { - while(pool[thd_id]->pop(item)) { - DEBUG_M("row_pool free\n"); - mem_allocator.free(item,sizeof(row_t)); - } - } -} - diff --git a/contrib/deneva/system/pool.h b/contrib/deneva/system/pool.h deleted file mode 100644 index c12bc4d0..00000000 --- a/contrib/deneva/system/pool.h +++ /dev/null @@ -1,142 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _TXN_POOL_H_ -#define _TXN_POOL_H_ - - -#include "global.h" -#include "helper.h" -#include -#include "concurrentqueue.h" - -class TxnManager; -class BaseQuery; -class Workload; -struct msg_entry; -struct txn_node; -class Access; -class Transaction; -class row_t; - - -class TxnManPool { -public: - void init(Workload * wl, uint64_t size); - void get(uint64_t thd_id, TxnManager *& item); - void put(uint64_t thd_id, TxnManager * items); - void free_all(); - -private: -#if CC_ALG == CALVIN - boost::lockfree::queue * pool; -#else - boost::lockfree::queue ** pool; -#endif - Workload * _wl; - -}; - - -class TxnPool { -public: - void init(Workload * wl, uint64_t size); - void get(uint64_t thd_id, Transaction *& item); - void put(uint64_t thd_id,Transaction * items); - void free_all(); - -private: -#if CC_ALG == CALVIN - boost::lockfree::queue * pool; -#else - boost::lockfree::queue ** pool; -#endif - Workload * _wl; - -}; - -class QryPool { -public: - void init(Workload * wl, uint64_t size); - void get(uint64_t thd_id, BaseQuery *& item); - void put(uint64_t thd_id, BaseQuery * items); - void free_all(); - -private: -#if CC_ALG == CALVIN - boost::lockfree::queue * pool; -#else - boost::lockfree::queue ** pool; -#endif - Workload * _wl; - -}; - - -class AccessPool { -public: - void init(Workload * wl, uint64_t size); - void get(uint64_t thd_id, Access *& item); - void put(uint64_t thd_id, Access * items); - void free_all(); - -private: - boost::lockfree::queue ** pool; - Workload * _wl; - -}; - - -class TxnTablePool { -public: - void init(Workload * wl, uint64_t size); - void get(uint64_t thd_id, txn_node *& item); - void put(uint64_t thd_id, txn_node * items); - void free_all(); - -private: - boost::lockfree::queue ** pool; - Workload * _wl; - -}; -class MsgPool { -public: - void init(Workload * wl, uint64_t size); - void get(msg_entry *& item); - void put(msg_entry * items); - void free_all(); - -private: - boost::lockfree::queue * pool; - Workload * _wl; - -}; - -class RowPool { -public: - void init(Workload * wl, uint64_t size); - void get(uint64_t thd_id, row_t *& item); - void put(uint64_t thd_id, row_t * items); - void free_all(); - -private: - boost::lockfree::queue ** pool; - Workload * _wl; - -}; - - -#endif diff --git a/contrib/deneva/system/query.cpp b/contrib/deneva/system/query.cpp deleted file mode 100644 index 648cda72..00000000 --- a/contrib/deneva/system/query.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "query.h" -#include "mem_alloc.h" -#include "wl.h" -#include "table.h" -#include "ycsb_query.h" -#include "tpcc_query.h" -#include "pps_query.h" -#include "da_query.h" - -/*************************************************/ -// class Query_queue -/*************************************************/ - -void Query_queue::init(Workload *h_wl) { - all_queries = new Query_thd * [g_thread_cnt]; - _wl = h_wl; - for (UInt32 tid = 0; tid < g_thread_cnt; tid++) init(tid); -} - -void Query_queue::init(int thread_id) { - all_queries[thread_id] = (Query_thd *) mem_allocator.alloc(sizeof(Query_thd)); - all_queries[thread_id]->init(_wl, thread_id); -} - -BaseQuery *Query_queue::get_next_query(uint64_t thd_id) { - BaseQuery * query = all_queries[thd_id]->get_next_query(); - return query; -} - -void Query_thd::init(Workload *h_wl, int thread_id) { - uint64_t request_cnt; - q_idx = 0; - request_cnt = WARMUP / g_thread_cnt + MAX_TXN_PER_PART + 4; -#if WORKLOAD == YCSB - queries = (YCSBQuery *)mem_allocator.alloc(sizeof(YCSBQuery) * request_cnt); -#elif WORKLOAD == TPCC - queries = (TPCCQuery *)mem_allocator.alloc(sizeof(TPCCQuery) * request_cnt); -#elif WORKLOAD == PPS - queries = (PPSQuery *)mem_allocator.alloc(sizeof(PPSQuery) * request_cnt); -#endif - for (UInt32 qid = 0; qid < request_cnt; qid ++) { -#if WORKLOAD == YCSB - new(&queries[qid]) YCSBQuery(); -#elif WORKLOAD == TPCC - new(&queries[qid]) TPCCQuery(); -#elif WORKLOAD == PPS - new(&queries[qid]) PPSQuery(); -#elif WORKLOAD == DA - new(&queries[qid]) DAQuery(); -#endif - queries[qid].init(thread_id, h_wl); - } -} - -BaseQuery *Query_thd::get_next_query() { - BaseQuery * query = &queries[q_idx++]; - return query; -} - -void BaseQuery::init() { - DEBUG_M("BaseQuery::init array partitions\n"); - partitions.init(g_part_cnt); - DEBUG_M("BaseQuery::init array partitions_touched\n"); - partitions_touched.init(g_part_cnt); - DEBUG_M("BaseQuery::init array active_nodes\n"); - active_nodes.init(g_node_cnt); - DEBUG_M("BaseQuery::init array participant_nodes\n"); - participant_nodes.init(g_node_cnt); -} - -void BaseQuery::clear() { - partitions.clear(); - partitions_touched.clear(); - active_nodes.clear(); - participant_nodes.clear(); -} - -void BaseQuery::release() { - partitions.release(); - partitions_touched.release(); - active_nodes.release(); - participant_nodes.release(); -} diff --git a/contrib/deneva/system/query.h b/contrib/deneva/system/query.h deleted file mode 100644 index d893082a..00000000 --- a/contrib/deneva/system/query.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _QUERY_H_ -#define _QUERY_H_ - -#include "global.h" -#include "helper.h" -#include "array.h" - -class Workload; -class YCSBQuery; -class TPCCQuery; -class PPSQuery; - -class BaseQuery { -public: - virtual ~BaseQuery() {} - virtual bool readonly() = 0; - virtual void print() = 0; - virtual void init(); - uint64_t waiting_time; - void clear(); - void release(); - virtual bool isReconQuery() {return false;} - - // Prevent unnecessary remote messages - Array partitions; - Array partitions_touched; - Array active_nodes; - Array participant_nodes; - -}; - -class QueryGenerator { -public: - virtual ~QueryGenerator() {} - virtual BaseQuery * create_query(Workload * h_wl, uint64_t home_partition_id) = 0; -}; - -// All the queries for a particular thread. -class Query_thd { -public: - void init(Workload * h_wl, int thread_id); - BaseQuery * get_next_query(); - int q_idx; -#if WORKLOAD == YCSB - YCSBQuery * queries; -#elif WORKLOAD == TPCC - TPCCQuery * queries; -#elif WORKLOAD == PPS - PPSQuery * queries; -#elif WORKLOAD == DA - DAQuery * queries; -#endif - char pad[CL_SIZE - sizeof(void *) - sizeof(int)]; -}; - -class Query_queue { -public: - void init(Workload * h_wl); - void init(int thread_id); - BaseQuery * get_next_query(uint64_t thd_id); - -private: - Query_thd ** all_queries; - Workload * _wl; -}; - -#endif diff --git a/contrib/deneva/system/sequencer.cpp b/contrib/deneva/system/sequencer.cpp deleted file mode 100644 index 75681dc2..00000000 --- a/contrib/deneva/system/sequencer.cpp +++ /dev/null @@ -1,328 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "global.h" -#include "sequencer.h" -#include "ycsb_query.h" -#include "da_query.h" -#include "tpcc_query.h" -#include "pps_query.h" -#include "mem_alloc.h" -#include "transport.h" -#include "wl.h" -#include "helper.h" -#include "msg_queue.h" -#include "msg_thread.h" -#include "work_queue.h" -#include "message.h" -#include "stats.h" -#include - -void Sequencer::init(Workload * wl) { - next_txn_id = 0; - rsp_cnt = g_node_cnt + g_client_node_cnt; - _wl = wl; - last_time_batch = 0; - wl_head = NULL; - wl_tail = NULL; - fill_queue = new boost::lockfree::queue > [g_node_cnt]; -} - -// Assumes 1 thread does sequencer work -void Sequencer::process_ack(Message * msg, uint64_t thd_id) { - qlite_ll * en = wl_head; - while(en != NULL && en->epoch != msg->get_batch_id()) { - en = en->next; - } - assert(en); - qlite * wait_list = en->list; - assert(wait_list != NULL); - assert(en->txns_left > 0); - - uint64_t id = msg->get_txn_id() / g_node_cnt; - uint64_t prof_stat = get_sys_clock(); - assert(wait_list[id].server_ack_cnt > 0); - - // Decrement the number of acks needed for this txn - uint32_t query_acks_left = ATOM_SUB_FETCH(wait_list[id].server_ack_cnt, 1); - - if (wait_list[id].skew_startts == 0) { - wait_list[id].skew_startts = get_sys_clock(); - } - - if (query_acks_left == 0) { - en->txns_left--; - ATOM_FETCH_ADD(total_txns_finished,1); - INC_STATS(thd_id,seq_txn_cnt,1); - // free msg, queries -#if WORKLOAD == YCSB - YCSBClientQueryMessage* cl_msg = (YCSBClientQueryMessage*)wait_list[id].msg; - for(uint64_t i = 0; i < cl_msg->requests.size(); i++) { - DEBUG_M("Sequencer::process_ack() ycsb_request free\n"); - mem_allocator.free(cl_msg->requests[i],sizeof(ycsb_request)); - } -#elif WORKLOAD == TPCC - TPCCClientQueryMessage* cl_msg = (TPCCClientQueryMessage*)wait_list[id].msg; - if(cl_msg->txn_type == TPCC_NEW_ORDER) { - for(uint64_t i = 0; i < cl_msg->items.size(); i++) { - DEBUG_M("Sequencer::process_ack() items free\n"); - mem_allocator.free(cl_msg->items[i],sizeof(Item_no)); - } - } -#elif WORKLOAD == PPS - PPSClientQueryMessage* cl_msg = (PPSClientQueryMessage*)wait_list[id].msg; - -#elif WORKLOAD == DA - DAClientQueryMessage* cl_msg = (DAClientQueryMessage*)wait_list[id].msg; -#endif -#if WORKLOAD == PPS - if (WORKLOAD == PPS && CC_ALG == CALVIN && - ((cl_msg->txn_type == PPS_GETPARTBYSUPPLIER) || - (cl_msg->txn_type == PPS_GETPARTBYPRODUCT) || (cl_msg->txn_type == PPS_ORDERPRODUCT)) && - (cl_msg->recon || ((AckMessage *)msg)->rc == Abort)) { - int abort_cnt = wait_list[id].abort_cnt; - if (cl_msg->recon) { - // Copy over part keys - cl_msg->part_keys.copy( ((AckMessage*)msg)->part_keys); - DEBUG("Finished RECON (%ld,%ld)\n",msg->get_txn_id(),msg->get_batch_id()); - } else { - uint64_t timespan = get_sys_clock() - wait_list[id].seq_startts; - if (warmup_done) { - INC_STATS_ARR(0,start_abort_commit_latency, timespan); - } - cl_msg->part_keys.clear(); - DEBUG("Aborted (%ld,%ld)\n",msg->get_txn_id(),msg->get_batch_id()); - INC_STATS(0,total_txn_abort_cnt,1); - abort_cnt++; - } - - cl_msg->return_node_id = wait_list[id].client_id; - wait_list[id].total_batch_time += en->batch_send_time - wait_list[id].seq_startts; - // restart - process_txn(cl_msg, thd_id, wait_list[id].seq_first_startts, wait_list[id].seq_startts, - wait_list[id].total_batch_time, abort_cnt); - } else { -#endif - uint64_t curr_clock = get_sys_clock(); - uint64_t timespan = curr_clock - wait_list[id].seq_first_startts; - uint64_t timespan2 = curr_clock - wait_list[id].seq_startts; - uint64_t skew_timespan = get_sys_clock() - wait_list[id].skew_startts; - wait_list[id].total_batch_time += en->batch_send_time - wait_list[id].seq_startts; - if (warmup_done) { - INC_STATS_ARR(0,first_start_commit_latency, timespan); - INC_STATS_ARR(0,last_start_commit_latency, timespan2); - INC_STATS_ARR(0,start_abort_commit_latency, timespan2); - } - if (wait_list[id].abort_cnt > 0) { - INC_STATS(0,unique_txn_abort_cnt,1); - } - - INC_STATS(0,lat_l_loc_msg_queue_time,wait_list[id].total_batch_time); - INC_STATS(0,lat_l_loc_process_time,skew_timespan); - - INC_STATS(0,lat_short_work_queue_time,msg->lat_work_queue_time); - INC_STATS(0,lat_short_msg_queue_time,msg->lat_msg_queue_time); - INC_STATS(0,lat_short_cc_block_time,msg->lat_cc_block_time); - INC_STATS(0,lat_short_cc_time,msg->lat_cc_time); - INC_STATS(0,lat_short_process_time,msg->lat_process_time); - - if (msg->return_node_id != g_node_id) { - /* - if (msg->lat_network_time/BILLION > 1.0) { - printf("%ld %d %ld -> %d: %f %f\n",msg->txn_id, msg->rtype, - msg->return_node_id,g_node_id ,msg->lat_network_time/BILLION, - msg->lat_other_time/BILLION); - } - */ - INC_STATS(0,lat_short_network_time,msg->lat_network_time); - } - INC_STATS(0,lat_short_batch_time,wait_list[id].total_batch_time); - - PRINT_LATENCY("lat_l_seq %ld %ld %d %f %f %f\n", msg->get_txn_id(), msg->get_batch_id(), - wait_list[id].abort_cnt, (double)timespan / BILLION, - (double)skew_timespan / BILLION, - (double)wait_list[id].total_batch_time / BILLION); - - cl_msg->release(); - - ClientResponseMessage *rsp_msg = - (ClientResponseMessage *)Message::create_message(msg->get_txn_id(), CL_RSP); - rsp_msg->client_startts = wait_list[id].client_startts; - msg_queue.enqueue(thd_id,rsp_msg,wait_list[id].client_id); -#if WORKLOAD == PPS - } -#endif - - INC_STATS(thd_id,seq_complete_cnt,1); - - } - - // If we have all acks for this batch, send qry responses to all clients - if (en->txns_left == 0) { - DEBUG("FINISHED BATCH %ld\n",en->epoch); - LIST_REMOVE_HT(en,wl_head,wl_tail); - mem_allocator.free(en->list,sizeof(qlite) * en->max_size); - mem_allocator.free(en,sizeof(qlite_ll)); - } - INC_STATS(thd_id,seq_ack_time,get_sys_clock() - prof_stat); -} - -// Assumes 1 thread does sequencer work -void Sequencer::process_txn(Message *msg, uint64_t thd_id, uint64_t early_start, - uint64_t last_start, uint64_t wait_time, uint32_t abort_cnt) { - - uint64_t starttime = get_sys_clock(); - DEBUG("SEQ Processing msg\n"); - qlite_ll * en = wl_tail; - - // LL is potentially a bottleneck here - if(!en || en->epoch != simulation->get_seq_epoch()+1) { - DEBUG("SEQ new wait list for epoch %ld\n",simulation->get_seq_epoch()+1); - // First txn of new wait list - en = (qlite_ll *) mem_allocator.alloc(sizeof(qlite_ll)); - en->epoch = simulation->get_seq_epoch()+1; - en->max_size = 1000; - en->size = 0; - en->txns_left = 0; - en->list = (qlite *) mem_allocator.alloc(sizeof(qlite) * en->max_size); - LIST_PUT_TAIL(wl_head,wl_tail,en) - } - if(en->size == en->max_size) { - en->max_size *= 2; - en->list = (qlite *) mem_allocator.realloc(en->list,sizeof(qlite) * en->max_size); - } - - txnid_t txn_id = g_node_id + g_node_cnt * next_txn_id; - next_txn_id++; - uint64_t id = txn_id / g_node_cnt; - msg->batch_id = en->epoch; - msg->txn_id = txn_id; - assert(txn_id != UINT64_MAX); - -#if WORKLOAD == YCSB - std::set participants = YCSBQuery::participants(msg,_wl); -#elif WORKLOAD == TPCC - std::set participants = TPCCQuery::participants(msg,_wl); -#elif WORKLOAD == PPS - std::set participants = PPSQuery::participants(msg,_wl); -#elif WORKLOAD == DA - std::set participants = DAQuery::participants(msg,_wl); -#endif - uint32_t server_ack_cnt = participants.size(); - assert(server_ack_cnt > 0); - assert(ISCLIENTN(msg->get_return_id())); - en->list[id].client_id = msg->get_return_id(); - en->list[id].client_startts = ((ClientQueryMessage*)msg)->client_startts; - //en->list[id].seq_startts = get_sys_clock(); - - en->list[id].total_batch_time = wait_time; - en->list[id].abort_cnt = abort_cnt; - en->list[id].skew_startts = 0; - en->list[id].server_ack_cnt = server_ack_cnt; - en->list[id].msg = msg; - en->size++; - en->txns_left++; - // Note: Modifying msg! - msg->return_node_id = g_node_id; - msg->lat_network_time = 0; - msg->lat_other_time = 0; -#if CC_ALG == CALVIN && WORKLOAD == PPS - PPSClientQueryMessage* cl_msg = (PPSClientQueryMessage*) msg; - if (cl_msg->txn_type == PPS_GETPARTBYSUPPLIER || cl_msg->txn_type == PPS_GETPARTBYPRODUCT || - cl_msg->txn_type == PPS_ORDERPRODUCT) { - if (cl_msg->part_keys.size() == 0) { - cl_msg->recon = true; - en->list[id].seq_startts = get_sys_clock(); - } else { - cl_msg->recon = false; - en->list[id].seq_startts = last_time; - } - - } else { - cl_msg->recon = false; - en->list[id].seq_startts = get_sys_clock(); - } -#else - en->list[id].seq_startts = get_sys_clock(); -#endif - if (early_start == 0) { - en->list[id].seq_first_startts = en->list[id].seq_startts; - } else { - en->list[id].seq_first_startts = early_start; - } - assert(en->size == en->txns_left); - assert(en->size <= ((uint64_t)g_inflight_max * g_node_cnt)); - - // Add new txn to fill queue - for(auto participant = participants.begin(); participant != participants.end(); participant++) { - DEBUG("SEQ adding (%ld,%ld) to fill queue (recon: %d)\n", msg->get_txn_id(), - msg->get_batch_id(), ((PPSClientQueryMessage *)msg)->recon); - while (!fill_queue[*participant].push(msg) && !simulation->is_done()) { - } - } - - INC_STATS(thd_id,seq_process_cnt,1); - INC_STATS(thd_id,seq_process_time,get_sys_clock() - starttime); - ATOM_ADD(total_txns_received,1); -} - -// Assumes 1 thread does sequencer work -void Sequencer::send_next_batch(uint64_t thd_id) { - uint64_t prof_stat = get_sys_clock(); - qlite_ll * en = wl_tail; - bool empty = true; - if(en && en->epoch == simulation->get_seq_epoch()) { - DEBUG("SEND NEXT BATCH %ld [%ld,%ld] %ld\n", thd_id, simulation->get_seq_epoch(), en->epoch, - en->size); - empty = false; - - en->batch_send_time = prof_stat; - } - - Message * msg; - for(uint64_t j = 0; j < g_node_cnt; j++) { - while(fill_queue[j].pop(msg)) { - if(j == g_node_id) { - work_queue.sched_enqueue(thd_id,msg); - } else { - msg_queue.enqueue(thd_id,msg,j); - } - } - if(!empty) { - DEBUG("Seq RDONE %ld\n",simulation->get_seq_epoch()) - } - msg = Message::create_message(RDONE); - msg->batch_id = simulation->get_seq_epoch(); - if(j == g_node_id) { - work_queue.sched_enqueue(thd_id,msg); - } else { - msg_queue.enqueue(thd_id,msg,j); - } - } - - if(last_time_batch > 0) { - INC_STATS(thd_id,seq_batch_time,get_sys_clock() - last_time_batch); - } - last_time_batch = get_sys_clock(); - - INC_STATS(thd_id,seq_batch_cnt,1); - if(!empty) { - INC_STATS(thd_id,seq_full_batch_cnt,1); - } - INC_STATS(thd_id,seq_prep_time,get_sys_clock() - prof_stat); - next_txn_id = 0; -} - diff --git a/contrib/deneva/system/sequencer.h b/contrib/deneva/system/sequencer.h deleted file mode 100644 index a85420c1..00000000 --- a/contrib/deneva/system/sequencer.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _SEQUENCER_H_ -#define _SEQUENCER_H_ - -#include "global.h" -#include "query.h" -#include - -class Workload; -class BaseQuery; -class Message; - -typedef struct qlite_entry { - BaseQuery * qry; - uint32_t client_id; - uint64_t client_startts; - uint64_t seq_startts; - uint64_t seq_first_startts; - uint64_t skew_startts; - uint64_t total_batch_time; - uint32_t server_ack_cnt; - uint32_t abort_cnt; - Message * msg; -} qlite; - -typedef struct qlite_ll_entry { - qlite * list; - uint64_t size; - uint32_t max_size; - uint32_t txns_left; - uint64_t epoch; - uint64_t batch_send_time; - qlite_ll_entry * next; - qlite_ll_entry * prev; -} qlite_ll; - -class Sequencer { - public: - void init(Workload * wl); - void process_ack(Message * msg, uint64_t thd_id); - void process_txn(Message* msg, uint64_t thd_id, uint64_t early_start, uint64_t last_start, - uint64_t wait_time, uint32_t abort_cnt); - void send_next_batch(uint64_t thd_id); - - private: - void reset_participating_nodes(bool * part_nodes); - - boost::lockfree::queue > * fill_queue; -#if WORKLOAD == YCSB - YCSBQuery* node_queries; -#elif WORKLOAD == TPCC - TPCCQuery* node_queries; -#elif WORKLOAD == PPS - PPSQuery* node_queries; -#endif - volatile uint64_t total_txns_finished; - volatile uint64_t total_txns_received; - volatile uint32_t rsp_cnt; - uint64_t last_time_batch; - qlite_ll * wl_head; // list of txns in batch being executed - qlite_ll * wl_tail; // list of txns in batch being executed - volatile uint32_t next_txn_id; - Workload * _wl; -}; - -class Seq_thread_t { -public: - uint64_t _thd_id; - uint64_t _node_id; - Workload * _wl; - - uint64_t get_thd_id(); - uint64_t get_node_id(); - - - void init(uint64_t thd_id, uint64_t node_id, Workload * workload); - // the following function must be in the form void* (*)(void*) - // to run with pthread. - // conversion is done within the function. - RC run_remote(); - RC run_recv(); - RC run_send(); -}; -#endif diff --git a/contrib/deneva/system/sim_manager.cpp b/contrib/deneva/system/sim_manager.cpp deleted file mode 100644 index 7464329e..00000000 --- a/contrib/deneva/system/sim_manager.cpp +++ /dev/null @@ -1,143 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "global.h" -#include "helper.h" -#include "sim_manager.h" - -void SimManager::init() { - sim_done = false; - warmup = false; - warmup_end_time = 0; - start_set = false; - sim_init_done = false; - txn_cnt = 0; - inflight_cnt = 0; - epoch_txn_cnt = 0; - worker_epoch = 1; - seq_epoch = 0; - rsp_cnt = g_total_node_cnt - 1; - -#if TIME_ENABLE - run_starttime = get_sys_clock(); - last_da_query_time = get_sys_clock(); -#else - run_starttime = get_wall_clock(); -#endif - last_worker_epoch_time = run_starttime; - last_seq_epoch_time = get_wall_clock(); -} - -void SimManager::set_starttime(uint64_t starttime) { - if(ATOM_CAS(start_set, false, true)) { - run_starttime = starttime; - last_da_query_time = starttime; - last_worker_epoch_time = starttime; - sim_done = false; - printf("Starttime set to %ld\n",run_starttime); - } -} -bool SimManager::timeout() { -#if TIME_ENABLE - #if WORKLOAD == DA - uint64_t t=last_da_query_time; - uint64_t now=get_sys_clock(); - if(now= (g_done_timer + g_warmup_timer)/12) - &&((now - t) >= (g_done_timer + g_warmup_timer)/6); - if (res) { - printf("123\n"); - } - return res; - #else - return (get_sys_clock() - run_starttime) >= g_done_timer + g_warmup_timer; - #endif -#else - return (get_wall_clock() - run_starttime) >= g_done_timer + g_warmup_timer; -#endif -} - -bool SimManager::is_done() { - bool done = sim_done || timeout(); - if(done && !sim_done) { - set_done(); - } - return done; -} - -bool SimManager::is_warmup_done() { - #if WORKLOAD == DA - return true; - #endif - if(warmup) - return true; - bool done = ((get_sys_clock() - run_starttime) >= g_warmup_timer); - if(done) { - ATOM_CAS(warmup_end_time,0,get_sys_clock()); - ATOM_CAS(warmup,false,true); - } - return done; -} -bool SimManager::is_setup_done() { return sim_init_done; } - -void SimManager::set_setup_done() { ATOM_CAS(sim_init_done, false, true); } - -void SimManager::set_done() { - if(ATOM_CAS(sim_done, false, true)) { - if (warmup_end_time == 0) warmup_end_time = run_starttime; - SET_STATS(0, total_runtime, get_sys_clock() - warmup_end_time); - } - printf("set done\n"); - fflush(stdout); -} - -void SimManager::process_setup_msg() { - uint64_t rsp_left = ATOM_SUB_FETCH(rsp_cnt,1); - if(rsp_left == 0) { - set_setup_done(); - } -} - -void SimManager::inc_txn_cnt() { ATOM_ADD(txn_cnt, 1); } - -void SimManager::inc_inflight_cnt() { ATOM_ADD(inflight_cnt, 1); } - -void SimManager::dec_inflight_cnt() { ATOM_SUB(inflight_cnt, 1); } - -void SimManager::inc_epoch_txn_cnt() { ATOM_ADD(epoch_txn_cnt, 1); } - -void SimManager::decr_epoch_txn_cnt() { ATOM_SUB(epoch_txn_cnt, 1); } - -uint64_t SimManager::get_seq_epoch() { return seq_epoch; } - -void SimManager::advance_seq_epoch() { - ATOM_ADD(seq_epoch,1); - last_seq_epoch_time += g_seq_batch_time_limit; -} - -uint64_t SimManager::get_worker_epoch() { return worker_epoch; } - -void SimManager::next_worker_epoch() { - last_worker_epoch_time = get_sys_clock(); - ATOM_ADD(worker_epoch,1); -} - -double SimManager::seconds_from_start(uint64_t time) { - return (double)(time - run_starttime) / BILLION; -} diff --git a/contrib/deneva/system/sim_manager.h b/contrib/deneva/system/sim_manager.h deleted file mode 100644 index 2789dbf9..00000000 --- a/contrib/deneva/system/sim_manager.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _SIMMAN_H_ -#define _SIMMAN_H_ - -#include "global.h" - -class SimManager { -public: - volatile bool sim_init_done; - volatile bool warmup; - volatile uint64_t warmup_end_time; - bool start_set; - volatile bool sim_done; - uint64_t run_starttime; - uint64_t rsp_cnt; - uint64_t seq_epoch; - uint64_t worker_epoch; - uint64_t last_worker_epoch_time; - uint64_t last_seq_epoch_time; - int64_t epoch_txn_cnt; - uint64_t txn_cnt; - uint64_t inflight_cnt; - uint64_t last_da_query_time; - - void init(); - bool is_setup_done(); - bool is_done(); - bool is_warmup_done(); - void set_setup_done(); - void set_done(); - bool timeout(); - void set_starttime(uint64_t starttime); - void process_setup_msg(); - void inc_txn_cnt(); - void inc_inflight_cnt(); - void dec_inflight_cnt(); - uint64_t get_worker_epoch(); - void next_worker_epoch(); - uint64_t get_seq_epoch(); - void advance_seq_epoch(); - void inc_epoch_txn_cnt(); - void decr_epoch_txn_cnt(); - double seconds_from_start(uint64_t time); -}; - -#endif diff --git a/contrib/deneva/system/thread.cpp b/contrib/deneva/system/thread.cpp deleted file mode 100644 index 714b9f36..00000000 --- a/contrib/deneva/system/thread.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "thread.h" - -#include "global.h" -#include "helper.h" -#include "manager.h" -#include "math.h" -#include "message.h" -#include "msg_queue.h" -#include "query.h" -#include "txn.h" -#include "wl.h" - -void Thread::heartbeat() { - /* -#if TIME_ENABLE - uint64_t now_time = get_sys_clock(); -#else - uint64_t now_time = get_wall_clock(); -#endif - if (now_time - heartbeat_time >= g_prog_timer) { - printf("Heartbeat %ld %f\n",_thd_id,simulation->seconds_from_start(now_time)); - heartbeat_time = now_time; - } - */ - -} - -void Thread::send_init_done_to_all_nodes() { - for(uint64_t i = 0; i < g_total_node_cnt; i++) { - if(i != g_node_id) { - printf("Send INIT_DONE to %ld\n",i); - msg_queue.enqueue(get_thd_id(),Message::create_message(INIT_DONE),i); - } - } -} - -void Thread::init(uint64_t thd_id, uint64_t node_id, Workload * workload) { - _thd_id = thd_id; - _node_id = node_id; - _wl = workload; - rdm.init(_thd_id); -} - -uint64_t Thread::get_thd_id() { return _thd_id; } -uint64_t Thread::get_node_id() { return _node_id; } - -void Thread::tsetup() { - printf("Setup %ld:%ld\n",_node_id, _thd_id); - fflush(stdout); - pthread_barrier_wait( &warmup_bar ); - - setup(); - - printf("Running %ld:%ld\n",_node_id, _thd_id); - fflush(stdout); - pthread_barrier_wait( &warmup_bar ); - -#if TIME_ENABLE - run_starttime = get_sys_clock(); -#else - run_starttime = get_wall_clock(); -#endif - simulation->set_starttime(run_starttime); - prog_time = run_starttime; - heartbeat_time = run_starttime; - pthread_barrier_wait( &warmup_bar ); - - -} - -void Thread::progress_stats() { - if(get_thd_id() == 0) { -#if TIME_ENABLE - uint64_t now_time = get_sys_clock(); -#else - uint64_t now_time = get_wall_clock(); -#endif - if (now_time - prog_time >= g_prog_timer) { - prog_time = now_time; - SET_STATS(get_thd_id(), total_runtime, prog_time - simulation->run_starttime); - - if(ISCLIENT) { - // stats.print_client(true); - } else { - // stats.print(true); - } - } - } -} diff --git a/contrib/deneva/system/thread.h b/contrib/deneva/system/thread.h deleted file mode 100644 index 4cb50ed0..00000000 --- a/contrib/deneva/system/thread.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _THREAD_H_ -#define _THREAD_H_ - -#include "global.h" - -class Workload; - -class Thread { -public: - virtual ~Thread() {} - void send_init_done_to_all_nodes(); - void progress_stats(); - void heartbeat(); - uint64_t _thd_id; - uint64_t _node_id; - Workload * _wl; - myrand rdm; - uint64_t run_starttime; - - uint64_t get_thd_id(); - uint64_t get_node_id(); - void tsetup(); - - void init(uint64_t thd_id, uint64_t node_id, Workload * workload); - // the following function must be in the form void* (*)(void*) - // to run with pthread. - // conversion is done within the function. - virtual RC run() = 0; - virtual void setup() = 0; - -private: - uint64_t prog_time; - uint64_t heartbeat_time; -}; - -#endif diff --git a/contrib/deneva/system/txn.cpp b/contrib/deneva/system/txn.cpp deleted file mode 100644 index bc976fc7..00000000 --- a/contrib/deneva/system/txn.cpp +++ /dev/null @@ -1,1163 +0,0 @@ -/* - Tencent is pleased to support the open source community by making 3TS available. - - Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - Tencent Modifications are Copyright (C) THL A29 Limited. - - Author: hongyaozhao@ruc.edu.cn - - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "helper.h" -#include "txn.h" -#include "row.h" -#include "wl.h" -#include "query.h" -#include "thread.h" -#include "mem_alloc.h" -#include "occ.h" -#include "occ_critical_section.h" -#include "focc.h" -#include "bocc.h" -#include "row_occ.h" -#include "table.h" -#include "catalog.h" -#include "index_btree.h" -#include "index_hash.h" -#include "maat.h" -#include "manager.h" -#include "mem_alloc.h" -#include "message.h" -#include "msg_queue.h" -#include "occ.h" -#include "pool.h" -#include "message.h" -#include "ycsb_query.h" -#include "tpcc_query.h" -#include "pps_query.h" -#include "array.h" -#include "maat.h" -#include "sundial.h" -#include "ssi.h" -#include "wsi.h" -#include "manager.h" - -void TxnStats::init() { - starttime=0; - wait_starttime=get_sys_clock(); - total_process_time=0; - process_time=0; - total_local_wait_time=0; - local_wait_time=0; - total_remote_wait_time=0; - remote_wait_time=0; - total_twopc_time=0; - twopc_time=0; - write_cnt = 0; - abort_cnt = 0; - - total_work_queue_time = 0; - work_queue_time = 0; - total_cc_block_time = 0; - cc_block_time = 0; - total_cc_time = 0; - cc_time = 0; - total_work_queue_cnt = 0; - work_queue_cnt = 0; - total_msg_queue_time = 0; - msg_queue_time = 0; - total_abort_time = 0; - - clear_short(); -} - -void TxnStats::clear_short() { - - work_queue_time_short = 0; - cc_block_time_short = 0; - cc_time_short = 0; - msg_queue_time_short = 0; - process_time_short = 0; - network_time_short = 0; -} - -void TxnStats::reset() { - wait_starttime=get_sys_clock(); - total_process_time += process_time; - process_time = 0; - total_local_wait_time += local_wait_time; - local_wait_time = 0; - total_remote_wait_time += remote_wait_time; - remote_wait_time = 0; - total_twopc_time += twopc_time; - twopc_time = 0; - write_cnt = 0; - - total_work_queue_time += work_queue_time; - work_queue_time = 0; - total_cc_block_time += cc_block_time; - cc_block_time = 0; - total_cc_time += cc_time; - cc_time = 0; - total_work_queue_cnt += work_queue_cnt; - work_queue_cnt = 0; - total_msg_queue_time += msg_queue_time; - msg_queue_time = 0; - - clear_short(); - -} - -void TxnStats::abort_stats(uint64_t thd_id) { - total_process_time += process_time; - total_local_wait_time += local_wait_time; - total_remote_wait_time += remote_wait_time; - total_twopc_time += twopc_time; - total_work_queue_time += work_queue_time; - total_msg_queue_time += msg_queue_time; - total_cc_block_time += cc_block_time; - total_cc_time += cc_time; - total_work_queue_cnt += work_queue_cnt; - assert(total_process_time >= process_time); - - INC_STATS(thd_id,lat_s_rem_work_queue_time,total_work_queue_time); - INC_STATS(thd_id,lat_s_rem_msg_queue_time,total_msg_queue_time); - INC_STATS(thd_id,lat_s_rem_cc_block_time,total_cc_block_time); - INC_STATS(thd_id,lat_s_rem_cc_time,total_cc_time); - INC_STATS(thd_id,lat_s_rem_process_time,total_process_time); -} - -void TxnStats::commit_stats(uint64_t thd_id, uint64_t txn_id, uint64_t batch_id, - uint64_t timespan_long, uint64_t timespan_short) { - total_process_time += process_time; - total_local_wait_time += local_wait_time; - total_remote_wait_time += remote_wait_time; - total_twopc_time += twopc_time; - total_work_queue_time += work_queue_time; - total_msg_queue_time += msg_queue_time; - total_cc_block_time += cc_block_time; - total_cc_time += cc_time; - total_work_queue_cnt += work_queue_cnt; - assert(total_process_time >= process_time); - -#if CC_ALG == CALVIN - - INC_STATS(thd_id,lat_s_loc_work_queue_time,work_queue_time); - INC_STATS(thd_id,lat_s_loc_msg_queue_time,msg_queue_time); - INC_STATS(thd_id,lat_s_loc_cc_block_time,cc_block_time); - INC_STATS(thd_id,lat_s_loc_cc_time,cc_time); - INC_STATS(thd_id,lat_s_loc_process_time,process_time); - // latency from start of transaction at this node - PRINT_LATENCY("lat_l %ld %ld %ld %f %f %f %f %f %f\n", txn_id, batch_id, total_work_queue_cnt, - (double)timespan_long / BILLION, (double)total_work_queue_time / BILLION, - (double)total_msg_queue_time / BILLION, (double)total_cc_block_time / BILLION, - (double)total_cc_time / BILLION, (double)total_process_time / BILLION); -#else - // latency from start of transaction - if (IS_LOCAL(txn_id)) { - INC_STATS(thd_id,lat_l_loc_work_queue_time,total_work_queue_time); - INC_STATS(thd_id,lat_l_loc_msg_queue_time,total_msg_queue_time); - INC_STATS(thd_id,lat_l_loc_cc_block_time,total_cc_block_time); - INC_STATS(thd_id,lat_l_loc_cc_time,total_cc_time); - INC_STATS(thd_id,lat_l_loc_process_time,total_process_time); - INC_STATS(thd_id,lat_l_loc_abort_time,total_abort_time); - - INC_STATS(thd_id,lat_s_loc_work_queue_time,work_queue_time); - INC_STATS(thd_id,lat_s_loc_msg_queue_time,msg_queue_time); - INC_STATS(thd_id,lat_s_loc_cc_block_time,cc_block_time); - INC_STATS(thd_id,lat_s_loc_cc_time,cc_time); - INC_STATS(thd_id,lat_s_loc_process_time,process_time); - - INC_STATS(thd_id,lat_short_work_queue_time,work_queue_time_short); - INC_STATS(thd_id,lat_short_msg_queue_time,msg_queue_time_short); - INC_STATS(thd_id,lat_short_cc_block_time,cc_block_time_short); - INC_STATS(thd_id,lat_short_cc_time,cc_time_short); - INC_STATS(thd_id,lat_short_process_time,process_time_short); - INC_STATS(thd_id,lat_short_network_time,network_time_short); - } else { - INC_STATS(thd_id,lat_l_rem_work_queue_time,total_work_queue_time); - INC_STATS(thd_id,lat_l_rem_msg_queue_time,total_msg_queue_time); - INC_STATS(thd_id,lat_l_rem_cc_block_time,total_cc_block_time); - INC_STATS(thd_id,lat_l_rem_cc_time,total_cc_time); - INC_STATS(thd_id,lat_l_rem_process_time,total_process_time); - } - if (IS_LOCAL(txn_id)) { - PRINT_LATENCY("lat_s %ld %ld %f %f %f %f %f %f\n", txn_id, work_queue_cnt, - (double)timespan_short / BILLION, (double)work_queue_time / BILLION, - (double)msg_queue_time / BILLION, (double)cc_block_time / BILLION, - (double)cc_time / BILLION, (double)process_time / BILLION); - /* - PRINT_LATENCY("lat_l %ld %ld %ld %f %f %f %f %f %f %f\n" - , txn_id - , total_work_queue_cnt - , abort_cnt - , (double) timespan_long / BILLION - , (double) total_work_queue_time / BILLION - , (double) total_msg_queue_time / BILLION - , (double) total_cc_block_time / BILLION - , (double) total_cc_time / BILLION - , (double) total_process_time / BILLION - , (double) total_abort_time / BILLION - ); - */ - } else { - PRINT_LATENCY("lat_rs %ld %ld %f %f %f %f %f %f\n", txn_id, work_queue_cnt, - (double)timespan_short / BILLION, (double)total_work_queue_time / BILLION, - (double)total_msg_queue_time / BILLION, (double)total_cc_block_time / BILLION, - (double)total_cc_time / BILLION, (double)total_process_time / BILLION); - } - /* - if (!IS_LOCAL(txn_id) || timespan_short < timespan_long) { - // latency from most recent start or restart of transaction - PRINT_LATENCY("lat_s %ld %ld %f %f %f %f %f %f\n" - , txn_id - , work_queue_cnt - , (double) timespan_short / BILLION - , (double) work_queue_time / BILLION - , (double) msg_queue_time / BILLION - , (double) cc_block_time / BILLION - , (double) cc_time / BILLION - , (double) process_time / BILLION - ); - } - */ -#endif - - if (!IS_LOCAL(txn_id)) { - return; - } - - INC_STATS(thd_id,txn_total_process_time,total_process_time); - INC_STATS(thd_id,txn_process_time,process_time); - INC_STATS(thd_id,txn_total_local_wait_time,total_local_wait_time); - INC_STATS(thd_id,txn_local_wait_time,local_wait_time); - INC_STATS(thd_id,txn_total_remote_wait_time,total_remote_wait_time); - INC_STATS(thd_id,txn_remote_wait_time,remote_wait_time); - INC_STATS(thd_id,txn_total_twopc_time,total_twopc_time); - INC_STATS(thd_id,txn_twopc_time,twopc_time); - if(write_cnt > 0) { - INC_STATS(thd_id,txn_write_cnt,1); - } - if(abort_cnt > 0) { - INC_STATS(thd_id,unique_txn_abort_cnt,1); - } - -} - - -void Transaction::init() { - timestamp = UINT64_MAX; - start_timestamp = UINT64_MAX; - end_timestamp = UINT64_MAX; - txn_id = UINT64_MAX; - batch_id = UINT64_MAX; - DEBUG_M("Transaction::init array insert_rows\n"); - insert_rows.init(g_max_items_per_txn + 10); - DEBUG_M("Transaction::reset array accesses\n"); - accesses.init(MAX_ROW_PER_TXN); - - reset(0); -} - -void Transaction::reset(uint64_t thd_id) { - release_accesses(thd_id); - accesses.clear(); - //release_inserts(thd_id); - insert_rows.clear(); - write_cnt = 0; - row_cnt = 0; - twopc_state = START; - rc = RCOK; -} - -void Transaction::release_accesses(uint64_t thd_id) { - for(uint64_t i = 0; i < accesses.size(); i++) { - access_pool.put(thd_id,accesses[i]); - } -} - -void Transaction::release_inserts(uint64_t thd_id) { - for(uint64_t i = 0; i < insert_rows.size(); i++) { - row_t * row = insert_rows[i]; -#if CC_ALG != MAAT && CC_ALG != OCC && \ - CC_ALG != SUNDIAL && CC_ALG != BOCC && CC_ALG != FOCC - DEBUG_M("TxnManager::cleanup row->manager free\n"); - mem_allocator.free(row->manager, 0); -#endif - row->free_row(); - DEBUG_M("Transaction::release insert_rows free\n") - row_pool.put(thd_id,row); - } -} - -void Transaction::release(uint64_t thd_id) { - DEBUG("Transaction release\n"); - release_accesses(thd_id); - DEBUG_M("Transaction::release array accesses free\n") - accesses.release(); - release_inserts(thd_id); - DEBUG_M("Transaction::release array insert_rows free\n") - insert_rows.release(); -} - -void TxnManager::init(uint64_t thd_id, Workload * h_wl) { - uint64_t prof_starttime = get_sys_clock(); - if(!txn) { - DEBUG_M("Transaction alloc\n"); - txn_pool.get(thd_id,txn); - - } - INC_STATS(get_thd_id(),mtx[15],get_sys_clock()-prof_starttime); - prof_starttime = get_sys_clock(); - //txn->init(); - if(!query) { - DEBUG_M("TxnManager::init Query alloc\n"); - qry_pool.get(thd_id,query); - } - INC_STATS(get_thd_id(),mtx[16],get_sys_clock()-prof_starttime); - //query->init(); - //reset(); - sem_init(&rsp_mutex, 0, 1); - return_id = UINT64_MAX; - - this->h_wl = h_wl; -#if CC_ALG == MAAT - uncommitted_writes = new std::set(); - uncommitted_writes_y = new std::set(); - uncommitted_reads = new std::set(); -#endif -#if CC_ALG == SUNDIAL - _is_sub_txn = true; - _min_commit_ts = glob_manager.get_max_cts();; - _num_lock_waits = 0; - _signal_abort = false; - _timestamp = glob_manager.get_ts(get_thd_id()); -#endif -#if CC_ALG == CALVIN - phase = CALVIN_RW_ANALYSIS; - locking_done = false; - calvin_locked_rows.init(MAX_ROW_PER_TXN); -#endif - -#if CC_ALG == SILO - _pre_abort = (g_params["pre_abort"] == "true"); - if (g_params["validation_lock"] == "no-wait") - _validation_no_wait = true; - else if (g_params["validation_lock"] == "waiting") - _validation_no_wait = false; - else - assert(false); - _cur_tid = 0; - num_locks = 0; - memset(write_set, 0, 100); - // write_set = (int *) mem_allocator.alloc(sizeof(int) * 100); -#endif - - registed_ = false; - txn_ready = true; - twopl_wait_start = 0; - - txn_stats.init(); -} - -// reset after abort -void TxnManager::reset() { - lock_ready = false; - lock_ready_cnt = 0; - locking_done = true; - - ready_part = 0; - rsp_cnt = 0; - aborted = false; - return_id = UINT64_MAX; - twopl_wait_start = 0; - - //ready = true; - - // MaaT - greatest_write_timestamp = 0; - greatest_read_timestamp = 0; - commit_timestamp = 0; -#if CC_ALG == MAAT - uncommitted_writes->clear(); - uncommitted_writes_y->clear(); - uncommitted_reads->clear(); -#endif - -#if CC_ALG == CALVIN - phase = CALVIN_RW_ANALYSIS; - locking_done = false; - calvin_locked_rows.clear(); -#endif - - assert(txn); - assert(query); - txn->reset(get_thd_id()); - - // Stats - txn_stats.reset(); -} - -void TxnManager::release() { - uint64_t prof_starttime = get_sys_clock(); - qry_pool.put(get_thd_id(),query); - INC_STATS(get_thd_id(),mtx[0],get_sys_clock()-prof_starttime); - query = NULL; - prof_starttime = get_sys_clock(); - txn_pool.put(get_thd_id(),txn); - INC_STATS(get_thd_id(),mtx[1],get_sys_clock()-prof_starttime); - txn = NULL; - -#if CC_ALG == MAAT - delete uncommitted_writes; - delete uncommitted_writes_y; - delete uncommitted_reads; -#endif - -#if CC_ALG == CALVIN - calvin_locked_rows.release(); -#endif -#if CC_ALG == SILO - num_locks = 0; - memset(write_set, 0, 100); - // mem_allocator.free(write_set, sizeof(int) * 100); -#endif - txn_ready = true; -} - -void TxnManager::reset_query() { -#if WORKLOAD == YCSB - ((YCSBQuery*)query)->reset(); -#elif WORKLOAD == TPCC - ((TPCCQuery*)query)->reset(); -#elif WORKLOAD == PPS - ((PPSQuery*)query)->reset(); -#endif -} - -RC TxnManager::commit() { - DEBUG("Commit %ld\n",get_txn_id()); - release_locks(RCOK); -#if CC_ALG == MAAT - time_table.release(get_thd_id(),get_txn_id()); -#endif - -#if CC_ALG == SUNDIAL - sundial_man.cleanup(RCOK, this); -#endif -#if CC_ALG == SSI - inout_table.set_commit_ts(get_thd_id(), get_txn_id(), get_commit_timestamp()); - inout_table.set_state(get_thd_id(), get_txn_id(), SSI_COMMITTED); -#endif - commit_stats(); -#if LOGGING - LogRecord * record = logger.createRecord(get_txn_id(),L_NOTIFY,0,0); - if(g_repl_cnt > 0) { - msg_queue.enqueue(get_thd_id(), Message::create_message(record, LOG_MSG), - g_node_id + g_node_cnt + g_client_node_cnt); - } - logger.enqueueRecord(record); - return WAIT; -#endif - return Commit; -} - -RC TxnManager::abort() { - if (aborted) return Abort; -#if CC_ALG == SSI - inout_table.set_state(get_thd_id(), get_txn_id(), SSI_ABORTED); - inout_table.clear_Conflict(get_thd_id(), get_txn_id()); -#endif - DEBUG("Abort %ld\n",get_txn_id()); - txn->rc = Abort; - INC_STATS(get_thd_id(),total_txn_abort_cnt,1); - txn_stats.abort_cnt++; - if(IS_LOCAL(get_txn_id())) { - INC_STATS(get_thd_id(), local_txn_abort_cnt, 1); - } else { - INC_STATS(get_thd_id(), remote_txn_abort_cnt, 1); - txn_stats.abort_stats(get_thd_id()); - } - - aborted = true; - release_locks(Abort); -#if CC_ALG == MAAT - //assert(time_table.get_state(get_txn_id()) == MAAT_ABORTED); - time_table.release(get_thd_id(),get_txn_id()); -#endif - - uint64_t timespan = get_sys_clock() - txn_stats.restart_starttime; - if (IS_LOCAL(get_txn_id()) && warmup_done) { - INC_STATS_ARR(get_thd_id(),start_abort_commit_latency, timespan); - } - return Abort; -} - -RC TxnManager::start_abort() { - // ! trans process time - uint64_t prepare_start_time = get_sys_clock(); - txn_stats.prepare_start_time = prepare_start_time; - uint64_t process_time_span = prepare_start_time - txn_stats.restart_starttime; - INC_STATS(get_thd_id(), trans_process_time, process_time_span); - txn->rc = Abort; - DEBUG("%ld start_abort\n",get_txn_id()); - - uint64_t finish_start_time = get_sys_clock(); - txn_stats.finish_start_time = finish_start_time; - uint64_t prepare_timespan = finish_start_time - txn_stats.prepare_start_time; - INC_STATS(get_thd_id(), trans_prepare_time, prepare_timespan); - if(query->partitions_touched.size() > 1) { - send_finish_messages(); - abort(); - return Abort; - } - return abort(); -} - -#ifdef NO_2PC -RC TxnManager::start_commit() { - RC rc = RCOK; - DEBUG("%ld start_commit RO?%d\n",get_txn_id(),query->readonly()); - _is_sub_txn = false; - - rc = validate(); - if(CC_ALG == SSI) { - ssi_man.gene_finish_ts(this); - } - if(CC_ALG == WSI) { - wsi_man.gene_finish_ts(this); - } - if(rc == RCOK) - rc = commit(); - else - start_abort(); - - return rc; -} -#else -RC TxnManager::start_commit() { - // ! trans process time - uint64_t prepare_start_time = get_sys_clock(); - txn_stats.prepare_start_time = prepare_start_time; - uint64_t process_time_span = prepare_start_time - txn_stats.restart_starttime; - INC_STATS(get_thd_id(), trans_process_time, process_time_span); - RC rc = RCOK; - DEBUG("%ld start_commit RO?%d\n",get_txn_id(),query->readonly()); - if(is_multi_part()) { - if(CC_ALG == SUNDIAL) { - rc = validate(); - if (rc != Abort) { - send_prepare_messages(); - rc = WAIT_REM; - } - } else if (!query->readonly() || CC_ALG == OCC || CC_ALG == MAAT || CC_ALG == SILO || CC_ALG == BOCC || CC_ALG == SSI) { - // send prepare messages -#if CC_ALG == FOCC - rc = focc_man.start_critical_section(this); - if (rc != RCOK) return rc; -#elif CC_ALG == BOCC - rc = bocc_man.start_critical_section(this); - if (rc != RCOK) return rc; -#endif - send_prepare_messages(); - rc = WAIT_REM; - } else { - uint64_t finish_start_time = get_sys_clock(); - txn_stats.finish_start_time = finish_start_time; - uint64_t prepare_timespan = finish_start_time - txn_stats.prepare_start_time; - INC_STATS(get_thd_id(), trans_prepare_time, prepare_timespan); - if(CC_ALG == WSI) { - wsi_man.gene_finish_ts(this); - } - send_finish_messages(); - rsp_cnt = 0; - rc = commit(); - } - } else { // is not multi-part -#if CC_ALG == FOCC - rc = focc_man.start_critical_section(this); - if (rc != RCOK) return rc; -#elif CC_ALG == BOCC - rc = bocc_man.start_critical_section(this); - if (rc != RCOK) return rc; -#endif - rc = validate(); - uint64_t finish_start_time = get_sys_clock(); - txn_stats.finish_start_time = finish_start_time; - uint64_t prepare_timespan = finish_start_time - txn_stats.prepare_start_time; - INC_STATS(get_thd_id(), trans_prepare_time, prepare_timespan); - if(CC_ALG == SSI) { - ssi_man.gene_finish_ts(this); - } - if(CC_ALG == WSI) { - wsi_man.gene_finish_ts(this); - } - if(rc == RCOK) - rc = commit(); - else { - txn->rc = Abort; - DEBUG("%ld start_abort\n",get_txn_id()); - if(query->partitions_touched.size() > 1) { - send_finish_messages(); - abort(); - rc = Abort; - } - rc = abort(); - } -#if CC_ALG == FOCC - focc_man.end_critical_section(this); -#elif CC_ALG == BOCC - bocc_man.end_critical_section(this); -#endif - } - return rc; -} -#endif -void TxnManager::send_prepare_messages() { - rsp_cnt = query->partitions_touched.size() - 1; - DEBUG("%ld Send PREPARE messages to %d\n",get_txn_id(),rsp_cnt); - for(uint64_t i = 0; i < query->partitions_touched.size(); i++) { - if(GET_NODE_ID(query->partitions_touched[i]) == g_node_id) { - continue; - } - msg_queue.enqueue(get_thd_id(), Message::create_message(this, RPREPARE), - GET_NODE_ID(query->partitions_touched[i])); - } -} - -void TxnManager::send_finish_messages() { - rsp_cnt = query->partitions_touched.size() - 1; - assert(IS_LOCAL(get_txn_id())); - DEBUG("%ld Send FINISH messages to %d\n",get_txn_id(),rsp_cnt); - for(uint64_t i = 0; i < query->partitions_touched.size(); i++) { - if(GET_NODE_ID(query->partitions_touched[i]) == g_node_id) { - continue; - } - msg_queue.enqueue(get_thd_id(), Message::create_message(this, RFIN), - GET_NODE_ID(query->partitions_touched[i])); - } -} - -int TxnManager::received_response(RC rc) { - assert(txn->rc == RCOK || txn->rc == Abort); - if (txn->rc == RCOK) txn->rc = rc; -#if CC_ALG == CALVIN - ++rsp_cnt; -#else - if (rsp_cnt > 0) { - --rsp_cnt; - } -#endif - return rsp_cnt; -} - -bool TxnManager::waiting_for_response() { return rsp_cnt > 0; } - -bool TxnManager::is_multi_part() { - return query->partitions_touched.size() > 1; - //return query->partitions.size() > 1; -} - -void TxnManager::commit_stats() { - uint64_t commit_time = get_sys_clock(); - uint64_t timespan_short = commit_time - txn_stats.restart_starttime; - uint64_t timespan_long = commit_time - txn_stats.starttime; - INC_STATS(get_thd_id(),total_txn_commit_cnt,1); - - uint64_t warmuptime = get_sys_clock() - simulation->run_starttime; - DEBUG("Commit_stats execute_time %ld warmup_time %ld\n",warmuptime,g_warmup_timer); - if (simulation->is_warmup_done()) - DEBUG("Commit_stats total_txn_commit_cnt %ld\n",stats._stats[get_thd_id()]->total_txn_commit_cnt); - if(!IS_LOCAL(get_txn_id()) && CC_ALG != CALVIN) { - INC_STATS(get_thd_id(),remote_txn_commit_cnt,1); - txn_stats.commit_stats(get_thd_id(), get_txn_id(), get_batch_id(), timespan_long, - timespan_short); - return; - } - - - INC_STATS(get_thd_id(),txn_cnt,1); - INC_STATS(get_thd_id(),local_txn_commit_cnt,1); - INC_STATS(get_thd_id(), txn_run_time, timespan_long); - if(query->partitions_touched.size() > 1) { - INC_STATS(get_thd_id(),multi_part_txn_cnt,1); - INC_STATS(get_thd_id(),multi_part_txn_run_time,timespan_long); - } else { - INC_STATS(get_thd_id(),single_part_txn_cnt,1); - INC_STATS(get_thd_id(),single_part_txn_run_time,timespan_long); - } - /*if(cflt) { - INC_STATS(get_thd_id(),cflt_cnt_txn,1); - }*/ - txn_stats.commit_stats(get_thd_id(),get_txn_id(),get_batch_id(),timespan_long, timespan_short); - #if CC_ALG == CALVIN - return; - #endif - - INC_STATS_ARR(get_thd_id(),start_abort_commit_latency, timespan_short); - INC_STATS_ARR(get_thd_id(),last_start_commit_latency, timespan_short); - INC_STATS_ARR(get_thd_id(),first_start_commit_latency, timespan_long); - - assert(query->partitions_touched.size() > 0); - INC_STATS(get_thd_id(),parts_touched,query->partitions_touched.size()); - INC_STATS(get_thd_id(),part_cnt[query->partitions_touched.size()-1],1); - for(uint64_t i = 0 ; i < query->partitions_touched.size(); i++) { - INC_STATS(get_thd_id(),part_acc[query->partitions_touched[i]],1); - } -} - -void TxnManager::register_thread(Thread * h_thd) { - this->h_thd = h_thd; -#if CC_ALG == HSTORE || CC_ALG == HSTORE_SPEC - this->active_part = GET_PART_ID_FROM_IDX(get_thd_id()); -#endif -} - -void TxnManager::set_txn_id(txnid_t txn_id) { txn->txn_id = txn_id; } - -txnid_t TxnManager::get_txn_id() { return txn->txn_id; } - -Workload *TxnManager::get_wl() { return h_wl; } - -uint64_t TxnManager::get_thd_id() { - if(h_thd) return h_thd->get_thd_id(); - else return 0; -} - -BaseQuery *TxnManager::get_query() { return query; } -void TxnManager::set_query(BaseQuery *qry) { query = qry; } - -void TxnManager::set_timestamp(ts_t timestamp) { txn->timestamp = timestamp; } - -ts_t TxnManager::get_timestamp() { return txn->timestamp; } - -void TxnManager::set_start_timestamp(uint64_t start_timestamp) { - txn->start_timestamp = start_timestamp; -} - -ts_t TxnManager::get_start_timestamp() { return txn->start_timestamp; } - -uint64_t TxnManager::incr_lr() { - //ATOM_ADD(this->rsp_cnt,i); - uint64_t result; - sem_wait(&rsp_mutex); - result = ++this->lock_ready_cnt; - sem_post(&rsp_mutex); - return result; -} - -uint64_t TxnManager::decr_lr() { - //ATOM_SUB(this->rsp_cnt,i); - uint64_t result; - sem_wait(&rsp_mutex); - result = --this->lock_ready_cnt; - sem_post(&rsp_mutex); - return result; -} -uint64_t TxnManager::incr_rsp(int i) { - //ATOM_ADD(this->rsp_cnt,i); - uint64_t result; - sem_wait(&rsp_mutex); - result = ++this->rsp_cnt; - sem_post(&rsp_mutex); - return result; -} - -uint64_t TxnManager::decr_rsp(int i) { - //ATOM_SUB(this->rsp_cnt,i); - uint64_t result; - sem_wait(&rsp_mutex); - result = --this->rsp_cnt; - sem_post(&rsp_mutex); - return result; -} - -void TxnManager::release_last_row_lock() { - assert(txn->row_cnt > 0); - row_t * orig_r = txn->accesses[txn->row_cnt-1]->orig_row; - access_t type = txn->accesses[txn->row_cnt-1]->type; - orig_r->return_row(RCOK, type, this, NULL); - //txn->accesses[txn->row_cnt-1]->orig_row = NULL; -} - -void TxnManager::cleanup_row(RC rc, uint64_t rid) { - access_t type = txn->accesses[rid]->type; - if (type == WR && rc == Abort && CC_ALG != MAAT) { - type = XP; - } - - uint64_t version = 0; - // Handle calvin elsewhere - -#if CC_ALG != CALVIN -#if ISOLATION_LEVEL != READ_UNCOMMITTED - row_t * orig_r = txn->accesses[rid]->orig_row; - if (ROLL_BACK && type == XP && - (CC_ALG == DL_DETECT || CC_ALG == NO_WAIT || CC_ALG == WAIT_DIE || CC_ALG == HSTORE || - CC_ALG == HSTORE_SPEC)) { - orig_r->return_row(rc,type, this, txn->accesses[rid]->orig_data); - } else { -#if ISOLATION_LEVEL == READ_COMMITTED - if(type == WR) { - version = orig_r->return_row(rc, type, this, txn->accesses[rid]->data); - } -#else - version = orig_r->return_row(rc, type, this, txn->accesses[rid]->data); -#endif - } -#endif - -#if ROLL_BACK && \ - (CC_ALG == NO_WAIT || CC_ALG == WAIT_DIE || CC_ALG == HSTORE || CC_ALG == HSTORE_SPEC) - if (type == WR) { - //printf("free 10 %ld\n",get_txn_id()); - txn->accesses[rid]->orig_data->free_row(); - DEBUG_M("TxnManager::cleanup row_t free\n"); - row_pool.put(get_thd_id(),txn->accesses[rid]->orig_data); - if(rc == RCOK) { - INC_STATS(get_thd_id(),record_write_cnt,1); - ++txn_stats.write_cnt; - } - } -#endif -#endif - if (type == WR) txn->accesses[rid]->version = version; -#if CC_ALG == SUNDIAL - if (_min_commit_ts > glob_manager.get_max_cts()) - glob_manager.set_max_cts(_min_commit_ts); -#endif - -#if CC_ALG != SILO - txn->accesses[rid]->data = NULL; -#endif -} - -void TxnManager::cleanup(RC rc) { -#if CC_ALG == SILO - finish(rc); -#endif -#if CC_ALG == OCC && MODE == NORMAL_MODE - occ_man.finish(rc,this); -#endif -#if CC_ALG == BOCC && MODE == NORMAL_MODE - bocc_man.finish(rc,this); -#endif -#if CC_ALG == FOCC && MODE == NORMAL_MODE - focc_man.finish(rc,this); -#endif -#if (CC_ALG == WSI) && MODE == NORMAL_MODE - wsi_man.finish(rc,this); -#endif - ts_t starttime = get_sys_clock(); - uint64_t row_cnt = txn->accesses.get_count(); - assert(txn->accesses.get_count() == txn->row_cnt); - // assert((WORKLOAD == YCSB && row_cnt <= g_req_per_query) || (WORKLOAD == TPCC && row_cnt <= - // g_max_items_per_txn*2 + 3)); - - DEBUG("Cleanup %ld %ld\n",get_txn_id(),row_cnt); - for (int rid = row_cnt - 1; rid >= 0; rid --) { - cleanup_row(rc,rid); - } - -#if CC_ALG == CALVIN - // cleanup locked rows - for (uint64_t i = 0; i < calvin_locked_rows.size(); i++) { - row_t * row = calvin_locked_rows[i]; - row->return_row(rc,RD,this,row); - } -#endif - - if (rc == Abort) { - txn->release_inserts(get_thd_id()); - txn->insert_rows.clear(); - - INC_STATS(get_thd_id(), abort_time, get_sys_clock() - starttime); - } -} - -RC TxnManager::get_lock(row_t * row, access_t type) { - if (calvin_locked_rows.contains(row)) { - return RCOK; - } - calvin_locked_rows.add(row); - RC rc = row->get_lock(type, this); - if(rc == WAIT) { - INC_STATS(get_thd_id(), txn_wait_cnt, 1); - } - return rc; -} - -RC TxnManager::get_row(row_t * row, access_t type, row_t *& row_rtn) { - uint64_t starttime = get_sys_clock(); - uint64_t timespan; - RC rc = RCOK; - DEBUG_M("TxnManager::get_row access alloc\n"); - Access * access = NULL; - this->last_row = row; - this->last_type = type; - -#if CC_ALG == SUNDIAL - bool isexist = false; - uint64_t size = get_write_set_size(); - size += get_read_set_size(); - - for (uint64_t i = 0; i < size; i++) { - if (txn->accesses[i]->orig_row == row) { - access = txn->accesses[i]; - access->orig_row->get_ts(access->orig_wts, access->orig_rts); - isexist = true; - break; - } - } - if (!access) { - access_pool.get(get_thd_id(),access); - rc = row->get_row(type, this, access->data, access->orig_wts, access->orig_rts); - if (!OCC_WAW_LOCK || type == RD) { - _min_commit_ts = _min_commit_ts > access->orig_wts ? _min_commit_ts : access->orig_wts; - } else { - if (rc == WAIT) ATOM_ADD_FETCH(_num_lock_waits, 1); - if (rc == Abort || rc == WAIT) return rc; - } - } - if (!OCC_WAW_LOCK || type == RD) { - access->locked = false; - } else { - _min_commit_ts = _min_commit_ts > access->orig_rts + 1 ? _min_commit_ts : access->orig_rts + 1; - access->locked = true; - } -#else - access_pool.get(get_thd_id(),access); -#endif - -#if CC_ALG != SUNDIAL - rc = row->get_row(type, this, access); -#endif -#if CC_ALG == FOCC - focc_man.active_storage(type, this, access); -#endif - if (rc == Abort || rc == WAIT) { - row_rtn = NULL; - DEBUG_M("TxnManager::get_row(abort) access free\n"); - access_pool.put(get_thd_id(),access); - timespan = get_sys_clock() - starttime; - INC_STATS(get_thd_id(), txn_manager_time, timespan); - INC_STATS(get_thd_id(), txn_conflict_cnt, 1); - -#if DEBUG_TIMELINE - printf("CONFLICT %ld %ld\n",get_txn_id(),get_sys_clock()); -#endif - return rc; - } - access->type = type; - access->orig_row = row; -#if CC_ALG == SILO - access->tid = last_tid; -#endif - -#if ROLL_BACK && (CC_ALG == DL_DETECT || CC_ALG == NO_WAIT || CC_ALG == WAIT_DIE || \ - CC_ALG == HSTORE || CC_ALG == HSTORE_SPEC) - if (type == WR) { - - uint64_t part_id = row->get_part_id(); - DEBUG_M("TxnManager::get_row row_t alloc\n") - row_pool.get(get_thd_id(),access->orig_data); - access->orig_data->init(row->get_table(), part_id, 0); - access->orig_data->copy(row); - assert(access->orig_data->get_schema() == row->get_schema()); - - // ARIES-style physiological logging -#if LOGGING - LogRecord *record = logger.createRecord( - get_txn_id(), L_UPDATE, row->get_table()->get_table_id(), row->get_primary_key()); - if(g_repl_cnt > 0) { - msg_queue.enqueue(get_thd_id(), Message::create_message(record, LOG_MSG), - g_node_id + g_node_cnt + g_client_node_cnt); - } - logger.enqueueRecord(record); -#endif - } -#endif - -#if CC_ALG == SUNDIAL - if (!isexist) { - ++txn->row_cnt; - if (type == WR) ++txn->write_cnt; - txn->accesses.add(access); - } -#else - ++txn->row_cnt; - if (type == WR) ++txn->write_cnt; - txn->accesses.add(access); -#endif - - timespan = get_sys_clock() - starttime; - INC_STATS(get_thd_id(), txn_manager_time, timespan); - row_rtn = access->data; - - if (CC_ALG == HSTORE || CC_ALG == HSTORE_SPEC || CC_ALG == CALVIN) assert(rc == RCOK); - assert(rc == RCOK); - return rc; -} - -RC TxnManager::get_row_post_wait(row_t *& row_rtn) { - assert(CC_ALG != HSTORE && CC_ALG != HSTORE_SPEC); - - uint64_t starttime = get_sys_clock(); - row_t * row = this->last_row; - access_t type = this->last_type; - assert(row != NULL); - DEBUG_M("TxnManager::get_row_post_wait access alloc\n") - Access * access; - access_pool.get(get_thd_id(),access); - - row->get_row_post_wait(type,this,access->data); - - access->type = type; - access->orig_row = row; -#if ROLL_BACK && (CC_ALG == DL_DETECT || CC_ALG == NO_WAIT || CC_ALG == WAIT_DIE) - if (type == WR) { - uint64_t part_id = row->get_part_id(); - DEBUG_M("TxnManager::get_row_post_wait row_t alloc\n") - row_pool.get(get_thd_id(),access->orig_data); - access->orig_data->init(row->get_table(), part_id, 0); - access->orig_data->copy(row); - } -#endif - - ++txn->row_cnt; - if (type == WR) ++txn->write_cnt; - txn->accesses.add(access); - uint64_t timespan = get_sys_clock() - starttime; - INC_STATS(get_thd_id(), txn_manager_time, timespan); - this->last_row_rtn = access->data; - row_rtn = access->data; - return RCOK; -} - -// This function is useless -void TxnManager::insert_row(row_t * row, table_t * table) { - if (CC_ALG == HSTORE || CC_ALG == HSTORE_SPEC) return; - assert(txn->insert_rows.size() < MAX_ROW_PER_TXN); - txn->insert_rows.add(row); -} - -itemid_t *TxnManager::index_read(INDEX *index, idx_key_t key, int part_id) { - uint64_t starttime = get_sys_clock(); - - itemid_t * item; - index->index_read(key, item, part_id, get_thd_id()); - - uint64_t t = get_sys_clock() - starttime; - INC_STATS(get_thd_id(), txn_index_time, t); - - return item; -} - -itemid_t *TxnManager::index_read(INDEX *index, idx_key_t key, int part_id, int count) { - uint64_t starttime = get_sys_clock(); - - itemid_t * item; - index->index_read(key, count, item, part_id); - - uint64_t t = get_sys_clock() - starttime; - INC_STATS(get_thd_id(), txn_index_time, t); - - return item; -} - -RC TxnManager::validate() { -#if MODE != NORMAL_MODE - return RCOK; -#endif - if (CC_ALG != OCC && CC_ALG != MAAT && - CC_ALG != SUNDIAL && CC_ALG != BOCC && CC_ALG != FOCC && CC_ALG != WSI && - CC_ALG != SSI && CC_ALG != SILO) { - return RCOK; - } - RC rc = RCOK; - uint64_t starttime = get_sys_clock(); - if (CC_ALG == OCC && rc == RCOK) rc = occ_man.validate(this); - if(CC_ALG == BOCC && rc == RCOK) rc = bocc_man.validate(this); - if(CC_ALG == FOCC && rc == RCOK) rc = focc_man.validate(this); - if(CC_ALG == SSI && rc == RCOK) rc = ssi_man.validate(this); - if(CC_ALG == WSI && rc == RCOK) rc = wsi_man.validate(this); - if(CC_ALG == MAAT && rc == RCOK) { - rc = maat_man.validate(this); - // Note: home node must be last to validate - if(IS_LOCAL(get_txn_id()) && rc == RCOK) { - rc = maat_man.find_bound(this); - } - } - if(CC_ALG == SUNDIAL && rc == RCOK) { - rc = sundial_man.validate(this); - } -#if CC_ALG == SILO - if(CC_ALG == SILO && rc == RCOK) { - rc = validate_silo(); - if(IS_LOCAL(get_txn_id()) && rc == RCOK) { - _cur_tid ++; - commit_timestamp = _cur_tid; - DEBUG("Validate success: %ld, cts: %ld \n", get_txn_id(), commit_timestamp); - } - } -#endif - INC_STATS(get_thd_id(),txn_validate_time,get_sys_clock() - starttime); - INC_STATS(get_thd_id(),trans_validate_time,get_sys_clock() - starttime); - return rc; -} - -RC TxnManager::send_remote_reads() { - assert(CC_ALG == CALVIN); -#if !YCSB_ABORT_MODE && WORKLOAD == YCSB - return RCOK; -#endif - assert(query->active_nodes.size() == g_node_cnt); - for(uint64_t i = 0; i < query->active_nodes.size(); i++) { - if (i == g_node_id) continue; - if(query->active_nodes[i] == 1) { - DEBUG("(%ld,%ld) send_remote_read to %ld\n",get_txn_id(),get_batch_id(),i); - msg_queue.enqueue(get_thd_id(),Message::create_message(this,RFWD),i); - } - } - return RCOK; - -} - -bool TxnManager::calvin_exec_phase_done() { - bool ready = (phase == CALVIN_DONE) && (get_rc() != WAIT); - if(ready) { - DEBUG("(%ld,%ld) calvin exec phase done!\n",txn->txn_id,txn->batch_id); - } - return ready; -} - -bool TxnManager::calvin_collect_phase_done() { - bool ready = (phase == CALVIN_COLLECT_RD) && (get_rsp_cnt() == calvin_expected_rsp_cnt); - if(ready) { - DEBUG("(%ld,%ld) calvin collect phase done!\n",txn->txn_id,txn->batch_id); - } - return ready; -} - -void TxnManager::release_locks(RC rc) { - uint64_t starttime = get_sys_clock(); - - cleanup(rc); - - uint64_t timespan = (get_sys_clock() - starttime); - INC_STATS(get_thd_id(), txn_cleanup_time, timespan); -} diff --git a/contrib/deneva/system/txn.h b/contrib/deneva/system/txn.h deleted file mode 100644 index d8a8ddd4..00000000 --- a/contrib/deneva/system/txn.h +++ /dev/null @@ -1,324 +0,0 @@ -/* - Tencent is pleased to support the open source community by making 3TS available. - - Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - Tencent Modifications are Copyright (C) THL A29 Limited. - - Author: hongyaozhao@ruc.edu.cn - - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _TXN_H_ -#define _TXN_H_ - -#include "global.h" -#include "helper.h" -#include "semaphore.h" -#include "array.h" -#include "transport/message.h" -//#include "wl.h" - -class Workload; -class Thread; -class row_t; -class table_t; -class BaseQuery; -class INDEX; -class TxnQEntry; -class YCSBQuery; -class TPCCQuery; -//class r_query; - -enum TxnState {START,INIT,EXEC,PREP,FIN,DONE}; - -class Access { -public: - access_t type; - row_t * orig_row; - row_t * data; - row_t * orig_data; - uint64_t version; -#if CC_ALG == SUNDIAL - uint64_t orig_wts; - uint64_t orig_rts; - bool locked; -#endif -#if CC_ALG == SILO - ts_t tid; - // ts_t epoch; -#endif - void cleanup(); -}; - -class Transaction { -public: - void init(); - void reset(uint64_t thd_id); - void release_accesses(uint64_t thd_id); - void release_inserts(uint64_t thd_id); - void release(uint64_t thd_id); - //vector accesses; - Array accesses; - uint64_t timestamp; - // For OCC and SSI - uint64_t start_timestamp; - uint64_t end_timestamp; - - uint64_t write_cnt; - uint64_t row_cnt; - // Internal state - TxnState twopc_state; - Array insert_rows; - txnid_t txn_id; - uint64_t batch_id; - RC rc; -}; - -class TxnStats { -public: - void init(); - void clear_short(); - void reset(); - void abort_stats(uint64_t thd_id); - void commit_stats(uint64_t thd_id, uint64_t txn_id, uint64_t batch_id, uint64_t timespan_long, - uint64_t timespan_short); - uint64_t starttime; - uint64_t restart_starttime; - uint64_t wait_starttime; - uint64_t write_cnt; - uint64_t abort_cnt; - uint64_t prepare_start_time; - uint64_t finish_start_time; - double total_process_time; - double process_time; - double total_local_wait_time; - double local_wait_time; - double total_remote_wait_time; // time waiting for a remote response, to help calculate network - // time - double remote_wait_time; - double total_twopc_time; - double twopc_time; - double total_abort_time; // time spent in aborted query land - double total_msg_queue_time; // time spent on outgoing queue - double msg_queue_time; - double total_work_queue_time; // time spent on work queue - double work_queue_time; - double total_cc_block_time; // time spent blocking on a cc resource - double cc_block_time; - double total_cc_time; // time spent actively doing cc - double cc_time; - uint64_t total_work_queue_cnt; - uint64_t work_queue_cnt; - - // short stats - double work_queue_time_short; - double cc_block_time_short; - double cc_time_short; - double msg_queue_time_short; - double process_time_short; - double network_time_short; - - double lat_network_time_start; - double lat_other_time_start; -}; - -/* - Execution of transactions - Manipulates/manages Transaction (contains txn-specific data) - Maintains BaseQuery (contains input args, info about query) - */ -class TxnManager { -public: - virtual ~TxnManager() {} - virtual void init(uint64_t thd_id,Workload * h_wl); - virtual void reset(); - void clear(); - void reset_query(); - void release(); - Thread * h_thd; - Workload * h_wl; - - virtual RC run_txn() = 0; - virtual RC run_txn_post_wait() = 0; - virtual RC run_calvin_txn() = 0; - virtual RC acquire_locks() = 0; - void register_thread(Thread * h_thd); - uint64_t get_thd_id(); - Workload * get_wl(); - void set_txn_id(txnid_t txn_id); - txnid_t get_txn_id(); - void set_query(BaseQuery * qry); - BaseQuery * get_query(); - bool is_done(); - void commit_stats(); - bool is_multi_part(); - - void set_timestamp(ts_t timestamp); - ts_t get_timestamp(); - void set_start_timestamp(uint64_t start_timestamp); - ts_t get_start_timestamp(); - uint64_t get_rsp_cnt() {return rsp_cnt;} - uint64_t incr_rsp(int i); - uint64_t decr_rsp(int i); - uint64_t incr_lr(); - uint64_t decr_lr(); - - RC commit(); - RC start_commit(); - RC start_abort(); - RC abort(); - - void release_locks(RC rc); - bool isRecon() { - assert(CC_ALG == CALVIN || !recon); - return recon; - }; - bool recon; - - row_t * volatile cur_row; - // [DL_DETECT, NO_WAIT, WAIT_DIE] - int volatile lock_ready; - // [TIMESTAMP, MVCC] - bool volatile ts_ready; - // [HSTORE, HSTORE_SPEC] - int volatile ready_part; - int volatile ready_ulk; - -#if CC_ALG == SILO - ts_t last_tid; - ts_t max_tid; - uint64_t num_locks; - // int* write_set; - int write_set[100]; - int* read_set; - RC find_tid_silo(ts_t max_tid); - RC finish(RC rc); -#endif - - bool aborted; - uint64_t return_id; - RC validate(); - void cleanup(RC rc); - void cleanup_row(RC rc,uint64_t rid); - void release_last_row_lock(); - RC send_remote_reads(); - void set_end_timestamp(uint64_t timestamp) {txn->end_timestamp = timestamp;} - uint64_t get_end_timestamp() {return txn->end_timestamp;} - uint64_t get_access_cnt() {return txn->row_cnt;} - uint64_t get_write_set_size() {return txn->write_cnt;} - uint64_t get_read_set_size() {return txn->row_cnt - txn->write_cnt;} - access_t get_access_type(uint64_t access_id) {return txn->accesses[access_id]->type;} - uint64_t get_access_version(uint64_t access_id) { return txn->accesses[access_id]->version; } - row_t * get_access_original_row(uint64_t access_id) {return txn->accesses[access_id]->orig_row;} - void swap_accesses(uint64_t a, uint64_t b) { txn->accesses.swap(a, b); } - uint64_t get_batch_id() {return txn->batch_id;} - void set_batch_id(uint64_t batch_id) {txn->batch_id = batch_id;} - - // For MaaT - uint64_t commit_timestamp; - uint64_t get_commit_timestamp() {return commit_timestamp;} - void set_commit_timestamp(uint64_t timestamp) {commit_timestamp = timestamp;} - uint64_t greatest_write_timestamp; - uint64_t greatest_read_timestamp; - std::set * uncommitted_reads; - std::set * uncommitted_writes; - std::set * uncommitted_writes_y; - - uint64_t twopl_wait_start; - - // For Sundial - uint64_t _min_commit_ts; - uint64_t _max_commit_ts; - volatile uint32_t _num_lock_waits; - bool _signal_abort; - bool _is_sub_txn; - - uint64_t _timestamp; - uint64_t get_priority() { return _timestamp; } - // debug time - uint64_t _start_wait_time; - uint64_t _lock_acquire_time; - uint64_t _lock_acquire_time_commit; - uint64_t _lock_acquire_time_abort; - //////////////////////////////// - // LOGGING - //////////////////////////////// - // void gen_log_entry(int &length, void * log); - bool log_flushed; - bool repl_finished; - Transaction * txn; - BaseQuery * query; - uint64_t client_startts; - uint64_t client_id; - uint64_t get_abort_cnt() {return abort_cnt;} - uint64_t abort_cnt; - int received_response(RC rc); - bool waiting_for_response(); - RC get_rc() {return txn->rc;} - void set_rc(RC rc) {txn->rc = rc;} - //void send_rfin_messages(RC rc) {assert(false);} - void send_finish_messages(); - void send_prepare_messages(); - - TxnStats txn_stats; - - bool set_ready() {return ATOM_CAS(txn_ready,0,1);} - bool unset_ready() {return ATOM_CAS(txn_ready,1,0);} - bool is_ready() {return txn_ready == true;} - volatile int txn_ready; - // Calvin - uint32_t lock_ready_cnt; - uint32_t calvin_expected_rsp_cnt; - bool locking_done; - CALVIN_PHASE phase; - Array calvin_locked_rows; - bool calvin_exec_phase_done(); - bool calvin_collect_phase_done(); - - int last_batch_id; - int last_txn_id; - Message* last_msg; - - -protected: - - int rsp_cnt; - void insert_row(row_t * row, table_t * table); - - itemid_t * index_read(INDEX * index, idx_key_t key, int part_id); - itemid_t * index_read(INDEX * index, idx_key_t key, int part_id, int count); - RC get_lock(row_t * row, access_t type); - RC get_row(row_t * row, access_t type, row_t *& row_rtn); - RC get_row_post_wait(row_t *& row_rtn); - - // For Waiting - row_t * last_row; - row_t * last_row_rtn; - access_t last_type; - - sem_t rsp_mutex; - bool registed_; -#if CC_ALG == SILO - bool _pre_abort; - bool _validation_no_wait; - ts_t _cur_tid; - RC validate_silo(); -#endif -}; - -#endif - diff --git a/contrib/deneva/system/txn_table.cpp b/contrib/deneva/system/txn_table.cpp deleted file mode 100644 index 584a01d4..00000000 --- a/contrib/deneva/system/txn_table.cpp +++ /dev/null @@ -1,251 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "txn_table.h" - -#include "global.h" -#include "mem_alloc.h" -#include "message.h" -#include "pool.h" -#include "query.h" -#include "row.h" -#include "tpcc.h" -#include "tpcc_query.h" -#include "txn.h" -#include "work_queue.h" -#include "ycsb.h" -#include "ycsb_query.h" - -void TxnTable::init() { - //pool_size = g_inflight_max * g_node_cnt * 2 + 1; - pool_size = g_inflight_max + 1; - DEBUG_M("TxnTable::init pool_node alloc\n"); - pool = (pool_node **) mem_allocator.align_alloc(sizeof(pool_node*) * pool_size); - for(uint32_t i = 0; i < pool_size;i++) { - pool[i] = (pool_node *) mem_allocator.align_alloc(sizeof(struct pool_node)); - pool[i]->head = NULL; - pool[i]->tail = NULL; - pool[i]->cnt = 0; - pool[i]->modify = false; - pool[i]->min_ts = UINT64_MAX; - } -} - -void TxnTable::dump() { - for(uint64_t i = 0; i < pool_size;i++) { - if (pool[i]->cnt == 0) continue; - txn_node_t t_node = pool[i]->head; - - while (t_node != NULL) { - printf("TT (%ld,%ld)\n", t_node->txn_man->get_txn_id(), t_node->txn_man->get_batch_id()); - t_node = t_node->next; - } - } -} - -bool TxnTable::is_matching_txn_node(txn_node_t t_node, uint64_t txn_id, uint64_t batch_id){ - assert(t_node); -#if CC_ALG == CALVIN - return (t_node->txn_man->get_txn_id() == txn_id && t_node->txn_man->get_batch_id() == batch_id); -#else - return (t_node->txn_man->get_txn_id() == txn_id); -#endif -} - -void TxnTable::update_min_ts(uint64_t thd_id, uint64_t txn_id,uint64_t batch_id,uint64_t ts){ - uint64_t pool_id = txn_id % pool_size; - while (!ATOM_CAS(pool[pool_id]->modify, false, true)) { - }; - if (ts < pool[pool_id]->min_ts) pool[pool_id]->min_ts = ts; - ATOM_CAS(pool[pool_id]->modify,true,false); -} - -TxnManager * TxnTable::get_transaction_manager(uint64_t thd_id, uint64_t txn_id,uint64_t batch_id){ - DEBUG("TxnTable::get_txn_manager %ld / %ld\n",txn_id,pool_size); - uint64_t starttime = get_sys_clock(); - uint64_t pool_id = txn_id % pool_size; - - uint64_t mtx_starttime = starttime; - // set modify bit for this pool: txn_id % pool_size - while (!ATOM_CAS(pool[pool_id]->modify, false, true)) { - }; - INC_STATS(thd_id,mtx[7],get_sys_clock()-mtx_starttime); - - txn_node_t t_node = pool[pool_id]->head; - TxnManager * txn_man = NULL; - - uint64_t prof_starttime = get_sys_clock(); - while (t_node != NULL) { - if(is_matching_txn_node(t_node,txn_id,batch_id)) { - txn_man = t_node->txn_man; - break; - } - t_node = t_node->next; - } - INC_STATS(thd_id,mtx[20],get_sys_clock()-prof_starttime); - - - if(!txn_man) { - prof_starttime = get_sys_clock(); - - txn_table_pool.get(thd_id,t_node); - - INC_STATS(thd_id,mtx[21],get_sys_clock()-prof_starttime); - prof_starttime = get_sys_clock(); - - txn_man_pool.get(thd_id,txn_man); - - INC_STATS(thd_id,mtx[22],get_sys_clock()-prof_starttime); - prof_starttime = get_sys_clock(); - - txn_man->set_txn_id(txn_id); - txn_man->set_batch_id(batch_id); - t_node->txn_man = txn_man; - txn_man->txn_stats.starttime = get_sys_clock(); - txn_man->txn_stats.restart_starttime = txn_man->txn_stats.starttime; - LIST_PUT_TAIL(pool[pool_id]->head,pool[pool_id]->tail,t_node); - - INC_STATS(thd_id,mtx[23],get_sys_clock()-prof_starttime); - prof_starttime = get_sys_clock(); - - ++pool[pool_id]->cnt; - if(pool[pool_id]->cnt > 1) { - INC_STATS(thd_id,txn_table_cflt_cnt,1); - INC_STATS(thd_id,txn_table_cflt_size,pool[pool_id]->cnt-1); - } - INC_STATS(thd_id,txn_table_new_cnt,1); - INC_STATS(thd_id,mtx[24],get_sys_clock()-prof_starttime); - } - -#if CC_ALG == MVCC - if(txn_man->get_timestamp() < pool[pool_id]->min_ts) - pool[pool_id]->min_ts = txn_man->get_timestamp(); -#endif - - - // unset modify bit for this pool: txn_id % pool_size - ATOM_CAS(pool[pool_id]->modify,true,false); - - INC_STATS(thd_id,txn_table_get_time,get_sys_clock() - starttime); - INC_STATS(thd_id,txn_table_get_cnt,1); - return txn_man; -} - -void TxnTable::restart_txn(uint64_t thd_id, uint64_t txn_id,uint64_t batch_id){ - uint64_t pool_id = txn_id % pool_size; - // set modify bit for this pool: txn_id % pool_size - while (!ATOM_CAS(pool[pool_id]->modify, false, true)) { - }; - - txn_node_t t_node = pool[pool_id]->head; - - while (t_node != NULL) { - if(is_matching_txn_node(t_node,txn_id,batch_id)) { -#if CC_ALG == CALVIN - work_queue.enqueue(thd_id,Message::create_message(t_node->txn_man,RTXN),false); -#else - if(IS_LOCAL(txn_id)) - work_queue.enqueue(thd_id,Message::create_message(t_node->txn_man,RTXN_CONT),false); - else - work_queue.enqueue(thd_id,Message::create_message(t_node->txn_man,RQRY_CONT),false); -#endif - break; - } - t_node = t_node->next; - } - - // unset modify bit for this pool: txn_id % pool_size - ATOM_CAS(pool[pool_id]->modify,true,false); - -} - -void TxnTable::release_transaction_manager(uint64_t thd_id, uint64_t txn_id, uint64_t batch_id){ - uint64_t starttime = get_sys_clock(); - - uint64_t pool_id = txn_id % pool_size; - uint64_t mtx_starttime = starttime; - // set modify bit for this pool: txn_id % pool_size - while (!ATOM_CAS(pool[pool_id]->modify, false, true)) { - }; - INC_STATS(thd_id,mtx[8],get_sys_clock()-mtx_starttime); - - txn_node_t t_node = pool[pool_id]->head; - -#if CC_ALG == MVCC - uint64_t min_ts = UINT64_MAX; - txn_node_t saved_t_node = NULL; -#endif - - uint64_t prof_starttime = get_sys_clock(); - while (t_node != NULL) { - if(is_matching_txn_node(t_node,txn_id,batch_id)) { - LIST_REMOVE_HT(t_node,pool[txn_id % pool_size]->head,pool[txn_id % pool_size]->tail); - --pool[pool_id]->cnt; -#if CC_ALG == MVCC - saved_t_node = t_node; - t_node = t_node->next; - continue; -#else - break; -#endif - } -#if CC_ALG == MVCC - if (t_node->txn_man->get_timestamp() < min_ts) min_ts = t_node->txn_man->get_timestamp(); -#endif - t_node = t_node->next; - } - INC_STATS(thd_id,mtx[25],get_sys_clock()-prof_starttime); - prof_starttime = get_sys_clock(); - -#if CC_ALG == MVCC - t_node = saved_t_node; - pool[pool_id]->min_ts = min_ts; -#endif - - // unset modify bit for this pool: txn_id % pool_size - ATOM_CAS(pool[pool_id]->modify,true,false); - - prof_starttime = get_sys_clock(); - assert(t_node); - assert(t_node->txn_man); - - txn_man_pool.put(thd_id,t_node->txn_man); - - INC_STATS(thd_id,mtx[26],get_sys_clock()-prof_starttime); - prof_starttime = get_sys_clock(); - - txn_table_pool.put(thd_id,t_node); - INC_STATS(thd_id,mtx[27],get_sys_clock()-prof_starttime); - - - INC_STATS(thd_id,txn_table_release_time,get_sys_clock() - starttime); - INC_STATS(thd_id,txn_table_release_cnt,1); - -} - -uint64_t TxnTable::get_min_ts(uint64_t thd_id) { - uint64_t starttime = get_sys_clock(); - uint64_t min_ts = UINT64_MAX; - for(uint64_t i = 0 ; i < pool_size; i++) { - uint64_t pool_min_ts = pool[i]->min_ts; - if (pool_min_ts < min_ts) min_ts = pool_min_ts; - } - - INC_STATS(thd_id,txn_table_min_ts_time,get_sys_clock() - starttime); - return min_ts; - -} - diff --git a/contrib/deneva/system/txn_table.h b/contrib/deneva/system/txn_table.h deleted file mode 100644 index bd12293a..00000000 --- a/contrib/deneva/system/txn_table.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _TXN_TABLE_H_ -#define _TXN_TABLE_H_ - -#include "global.h" -#include "helper.h" - -class TxnManager; -class BaseQuery; -class row_t; - -struct txn_node { - txn_node() { - next = NULL; - prev = NULL; - } - ~txn_node() {} - TxnManager * txn_man; - uint64_t return_id; // Client ID or Home partition ID - uint64_t client_startts; // For sequencer - uint64_t abort_penalty; - txn_node * next; - txn_node * prev; - -}; - -typedef txn_node * txn_node_t; - - -struct pool_node { -public: - txn_node_t head; - txn_node_t tail; - volatile bool modify; - uint64_t cnt; - uint64_t min_ts; - -}; -typedef pool_node * pool_node_t; - -class TxnTable { -public: - void init(); - TxnManager* get_transaction_manager(uint64_t thd_id, uint64_t txn_id,uint64_t batch_id); - void dump(); - void restart_txn(uint64_t thd_id, uint64_t txn_id,uint64_t batch_id); - void release_transaction_manager(uint64_t thd_id, uint64_t txn_id, uint64_t batch_id); - void update_min_ts(uint64_t thd_id, uint64_t txn_id,uint64_t batch_id,uint64_t ts); - uint64_t get_min_ts(uint64_t thd_id); - -private: - bool is_matching_txn_node(txn_node_t t_node, uint64_t txn_id, uint64_t batch_id); - - // TxnMap pool; - uint64_t pool_size; - pool_node ** pool; - -}; - -#endif diff --git a/contrib/deneva/system/wl.cpp b/contrib/deneva/system/wl.cpp deleted file mode 100644 index f326e46c..00000000 --- a/contrib/deneva/system/wl.cpp +++ /dev/null @@ -1,191 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "wl.h" -#include "config.h" -#include "catalog.h" -#include "global.h" -#include "helper.h" -#include "index_btree.h" -#include "index_hash.h" -#include "mem_alloc.h" -#include "row.h" -#include "table.h" - -RC Workload::init() { return RCOK; } - -RC Workload::init_schema(const char * schema_file) { - assert(sizeof(uint64_t) == 8); - assert(sizeof(double) == 8); - string line; - uint32_t id = 0; - ifstream fin(schema_file); - Catalog * schema; - while (getline(fin, line)) { - if (line.compare(0, 6, "TABLE=") == 0) { - string tname(&line[6]); - void * tmp = new char[CL_SIZE * 2 + sizeof(Catalog)]; - schema = (Catalog *) ((UInt64)tmp + CL_SIZE); - getline(fin, line); - cout<<"Init table "< lines; - while (line.length() > 1) { - lines.push_back(line); - cout<init( tname.c_str(), id++, lines.size() ); - for (UInt32 i = 0; i < lines.size(); i++) { - string line = lines[i]; - vector items; - - char * line_cstr = new char [line.length()+1]; - strcpy(line_cstr,line.c_str()); - int size = atoi(strtok(line_cstr,",")); - char * type = strtok(NULL,","); - char * name = strtok(NULL,","); - - schema->add_col(name, size, type); - col_count ++; - } - tmp = new char[CL_SIZE * 2 + sizeof(table_t)]; - table_t * cur_tab = (table_t *) ((UInt64)tmp + CL_SIZE); - cur_tab->init(schema); - tables[tname] = cur_tab; - } else if (!line.compare(0, 6, "INDEX=")) { - string iname(&line[6]); - getline(fin, line); - cout<<"Init index "< items; - string token; - size_t pos; - while (line.length() != 0) { - pos = line.find(","); // != std::string::npos) { - if (pos == string::npos) pos = line.length(); - token = line.substr(0, pos); - items.push_back(token); - line.erase(0, pos + 1); - cout<<"token "<init(1024, tables[tname], table_size); -#else - index->init(part_cnt, tables[tname]); -#endif - indexes[iname] = index; - printf("iname:%s init over\n",iname.c_str()); - } - } - fin.close(); - return RCOK; -} -//add by ym origin function mark -void Workload::index_delete_all() { - #if WORKLOAD ==DA - for (auto index :indexes) { - index.second->index_reset(); - } - #endif -} - -void Workload::index_insert(string index_name, uint64_t key, row_t * row) { - assert(false); - INDEX * index = (INDEX *) indexes[index_name]; - index_insert(index, key, row); -} - -void Workload::index_insert(INDEX * index, uint64_t key, row_t * row, int64_t part_id) { - uint64_t pid = part_id; - if (part_id == -1) pid = get_part_id(row); - itemid_t *m_item = (itemid_t *)mem_allocator.alloc(sizeof(itemid_t)); - m_item->init(); - m_item->type = DT_row; - m_item->location = row; - m_item->valid = true; - - assert(index); - assert( index->index_insert(key, m_item, pid) == RCOK ); -} - -void Workload::index_insert_nonunique(INDEX * index, uint64_t key, row_t * row, int64_t part_id) { - uint64_t pid = part_id; - if (part_id == -1) pid = get_part_id(row); - itemid_t *m_item = (itemid_t *)mem_allocator.alloc(sizeof(itemid_t)); - m_item->init(); - m_item->type = DT_row; - m_item->location = row; - m_item->valid = true; - - assert(index); - assert( index->index_insert_nonunique(key, m_item, pid) == RCOK ); -} diff --git a/contrib/deneva/system/wl.h b/contrib/deneva/system/wl.h deleted file mode 100644 index 21c03f9a..00000000 --- a/contrib/deneva/system/wl.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _WORKLOAD_H_ -#define _WORKLOAD_H_ - -#include "global.h" - -class row_t; -class table_t; -class IndexHash; -class index_btree; -class Catalog; -class lock_man; -class TxnManager; -class Thread; -class index_base; -class Timestamp; -class Mvcc; - -class Workload -{ -public: - // tables indexed by table name - map tables; - map indexes; - - void index_delete_all(); - - // FOR TPCC - // initialize the tables and indexes. - virtual RC init(); - virtual RC init_schema(const char * schema_file); - virtual RC init_table()=0; - virtual RC get_txn_man(TxnManager *& txn_manager)=0; - - uint64_t done_cnt; - uint64_t txn_cnt; -protected: - void index_insert(string index_name, uint64_t key, row_t * row); - void index_insert(INDEX * index, uint64_t key, row_t * row, int64_t part_id = -1); - void index_insert_nonunique(INDEX * index, uint64_t key, row_t * row, int64_t part_id = -1); -}; - -#endif diff --git a/contrib/deneva/system/work_queue.cpp b/contrib/deneva/system/work_queue.cpp deleted file mode 100644 index 70bb675d..00000000 --- a/contrib/deneva/system/work_queue.cpp +++ /dev/null @@ -1,540 +0,0 @@ -/* - Tencent is pleased to support the open source community by making 3TS available. - - Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - Tencent Modifications are Copyright (C) THL A29 Limited. - - Author: hongyaozhao@ruc.edu.cn - - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "work_queue.h" -#include "mem_alloc.h" -#include "query.h" -#include "message.h" -#include "client_query.h" -#include - -void QWorkQueue::init() { - - last_sched_dq = NULL; - sched_ptr = 0; -#ifdef NEW_WORK_QUEUE - work_queue.set_capacity(QUEUE_CAPACITY_NEW); - new_txn_queue.set_capacity(QUEUE_CAPACITY_NEW); - sem_init(&mt, 0, 1); - sem_init(&mw, 0, 1); -#else - seq_queue = new boost::lockfree::queue (0); - work_queue = new boost::lockfree::queue (0); - new_txn_queue = new boost::lockfree::queue(0); - sched_queue = new boost::lockfree::queue * [g_node_cnt]; - for ( uint64_t i = 0; i < g_node_cnt; i++) { - sched_queue[i] = new boost::lockfree::queue (0); - } -#endif - txn_queue_size = 0; - work_queue_size = 0; - - work_enqueue_size = 0; - work_dequeue_size = 0; - txn_enqueue_size = 0; - txn_dequeue_size = 0; - - sem_init(&_semaphore, 0, 1); - top_element=NULL; -} - -void QWorkQueue::sequencer_enqueue(uint64_t thd_id, Message * msg) { - uint64_t starttime = get_sys_clock(); - assert(msg); - DEBUG_M("SeqQueue::enqueue work_queue_entry alloc\n"); - work_queue_entry * entry = (work_queue_entry*)mem_allocator.align_alloc(sizeof(work_queue_entry)); - entry->msg = msg; - entry->rtype = msg->rtype; - entry->txn_id = msg->txn_id; - entry->batch_id = msg->batch_id; - entry->starttime = get_sys_clock(); - assert(ISSERVER); - - DEBUG("Seq Enqueue (%ld,%ld)\n",entry->txn_id,entry->batch_id); - while (!seq_queue->push(entry) && !simulation->is_done()) { - } - - INC_STATS(thd_id,seq_queue_enqueue_time,get_sys_clock() - starttime); - INC_STATS(thd_id,seq_queue_enq_cnt,1); - -} - -Message * QWorkQueue::sequencer_dequeue(uint64_t thd_id) { - uint64_t starttime = get_sys_clock(); - assert(ISSERVER); - Message * msg = NULL; - work_queue_entry * entry = NULL; - bool valid = seq_queue->pop(entry); - - if(valid) { - msg = entry->msg; - assert(msg); - DEBUG("Seq Dequeue (%ld,%ld)\n",entry->txn_id,entry->batch_id); - uint64_t queue_time = get_sys_clock() - entry->starttime; - INC_STATS(thd_id,seq_queue_wait_time,queue_time); - INC_STATS(thd_id,seq_queue_cnt,1); - DEBUG_M("SeqQueue::dequeue work_queue_entry free\n"); - mem_allocator.free(entry,sizeof(work_queue_entry)); - INC_STATS(thd_id,seq_queue_dequeue_time,get_sys_clock() - starttime); - } - - return msg; - -} - -void QWorkQueue::sched_enqueue(uint64_t thd_id, Message * msg) { - assert(CC_ALG == CALVIN); - assert(msg); - assert(ISSERVERN(msg->return_node_id)); - uint64_t starttime = get_sys_clock(); - - DEBUG_M("QWorkQueue::sched_enqueue work_queue_entry alloc\n"); - work_queue_entry * entry = (work_queue_entry*)mem_allocator.alloc(sizeof(work_queue_entry)); - entry->msg = msg; - entry->rtype = msg->rtype; - entry->txn_id = msg->txn_id; - entry->batch_id = msg->batch_id; - entry->starttime = get_sys_clock(); - - DEBUG("Sched Enqueue (%ld,%ld)\n",entry->txn_id,entry->batch_id); - uint64_t mtx_time_start = get_sys_clock(); - while (!sched_queue[msg->get_return_id()]->push(entry) && !simulation->is_done()) { - } - INC_STATS(thd_id,mtx[37],get_sys_clock() - mtx_time_start); - - INC_STATS(thd_id,sched_queue_enqueue_time,get_sys_clock() - starttime); - INC_STATS(thd_id,sched_queue_enq_cnt,1); -} - -Message * QWorkQueue::sched_dequeue(uint64_t thd_id) { - uint64_t starttime = get_sys_clock(); - - assert(CC_ALG == CALVIN); - Message * msg = NULL; - work_queue_entry * entry = NULL; - - bool valid = sched_queue[sched_ptr]->pop(entry); - - if(valid) { - msg = entry->msg; - DEBUG("Sched Dequeue (%ld,%ld)\n",entry->txn_id,entry->batch_id); - - uint64_t queue_time = get_sys_clock() - entry->starttime; - INC_STATS(thd_id,sched_queue_wait_time,queue_time); - INC_STATS(thd_id,sched_queue_cnt,1); - - DEBUG_M("QWorkQueue::sched_enqueue work_queue_entry free\n"); - mem_allocator.free(entry,sizeof(work_queue_entry)); - - if(msg->rtype == RDONE) { - // Advance to next queue or next epoch - DEBUG("Sched RDONE %ld %ld\n",sched_ptr,simulation->get_worker_epoch()); - assert(msg->get_batch_id() == simulation->get_worker_epoch()); - if(sched_ptr == g_node_cnt - 1) { - INC_STATS(thd_id,sched_epoch_cnt,1); - INC_STATS(thd_id,sched_epoch_diff,get_sys_clock()-simulation->last_worker_epoch_time); - simulation->next_worker_epoch(); - } - sched_ptr = (sched_ptr + 1) % g_node_cnt; - msg->release(); - msg = NULL; - - } else { - simulation->inc_epoch_txn_cnt(); - DEBUG("Sched msg dequeue %ld (%ld,%ld) %ld\n", sched_ptr, msg->txn_id, msg->batch_id, - simulation->get_worker_epoch()); - assert(msg->batch_id == simulation->get_worker_epoch()); - } - - INC_STATS(thd_id,sched_queue_dequeue_time,get_sys_clock() - starttime); - } - - return msg; -} - - -#ifdef NEW_WORK_QUEUE -void QWorkQueue::enqueue(uint64_t thd_id, Message * msg,bool busy) { - uint64_t starttime = get_sys_clock(); - assert(msg); - DEBUG_M("QWorkQueue::enqueue work_queue_entry alloc\n"); - work_queue_entry * entry = (work_queue_entry*)mem_allocator.align_alloc(sizeof(work_queue_entry)); - entry->msg = msg; - entry->rtype = msg->rtype; - entry->txn_id = msg->txn_id; - entry->batch_id = msg->batch_id; - entry->starttime = get_sys_clock(); - assert(ISSERVER || ISREPLICA); - DEBUG("Work Enqueue (%ld,%ld) %d\n",entry->txn_id,entry->batch_id,entry->rtype); - - uint64_t mtx_wait_starttime = get_sys_clock(); - if(msg->rtype == CL_QRY) { - sem_wait(&mt); - new_txn_queue.push_back(entry); - sem_post(&mt); - - sem_wait(&_semaphore); - txn_queue_size ++; - txn_enqueue_size ++; - sem_post(&_semaphore); - } else { - sem_wait(&mw); - work_queue.push_back(entry); - sem_post(&mw); - - sem_wait(&_semaphore); - work_queue_size ++; - work_enqueue_size ++; - sem_post(&_semaphore); - } - INC_STATS(thd_id,mtx[13],get_sys_clock() - mtx_wait_starttime); - - if(busy) { - INC_STATS(thd_id,work_queue_conflict_cnt,1); - } - INC_STATS(thd_id,work_queue_enqueue_time,get_sys_clock() - starttime); - INC_STATS(thd_id,work_queue_enq_cnt,1); -} - -Message * QWorkQueue::dequeue(uint64_t thd_id) { - uint64_t starttime = get_sys_clock(); - assert(ISSERVER || ISREPLICA); - Message * msg = NULL; - work_queue_entry * entry = NULL; - uint64_t mtx_wait_starttime = get_sys_clock(); - bool valid = false; - - sem_wait(&mw); - valid = work_queue.size() > 0; - if (valid) { - entry = work_queue[0]; - work_queue.pop_front(); - } - sem_post(&mw); - - if(!valid) { -#if SERVER_GENERATE_QUERIES - if(ISSERVER) { - BaseQuery * m_query = client_query_queue.get_next_query(thd_id,thd_id); - if(m_query) { - assert(m_query); - msg = Message::create_message((BaseQuery*)m_query,CL_QRY); - } - } -#else - sem_wait(&mt); - valid = new_txn_queue.size() > 0; - if (valid) { - entry = new_txn_queue[0]; - new_txn_queue.pop_front(); - } - sem_post(&mt); - -#endif - } - INC_STATS(thd_id,mtx[14],get_sys_clock() - mtx_wait_starttime); - - if(valid) { - msg = entry->msg; - assert(msg); - - uint64_t queue_time = get_sys_clock() - entry->starttime; - INC_STATS(thd_id,work_queue_wait_time,queue_time); - INC_STATS(thd_id,work_queue_cnt,1); - if(msg->rtype == CL_QRY) { - sem_wait(&_semaphore); - txn_queue_size --; - txn_dequeue_size ++; - sem_post(&_semaphore); - INC_STATS(thd_id,work_queue_new_wait_time,queue_time); - INC_STATS(thd_id,work_queue_new_cnt,1); - } else { - sem_wait(&_semaphore); - work_queue_size --; - work_dequeue_size ++; - sem_post(&_semaphore); - INC_STATS(thd_id,work_queue_old_wait_time,queue_time); - INC_STATS(thd_id,work_queue_old_cnt,1); - } - msg->wq_time = queue_time; - - DEBUG("Work Dequeue (%ld,%ld)\n",entry->txn_id,entry->batch_id); - DEBUG_M("QWorkQueue::dequeue work_queue_entry free\n"); - - INC_STATS(thd_id,work_queue_dequeue_time,get_sys_clock() - starttime); - } - -#if SERVER_GENERATE_QUERIES - if(msg && msg->rtype == CL_QRY) { - INC_STATS(thd_id,work_queue_new_wait_time,get_sys_clock() - starttime); - INC_STATS(thd_id,work_queue_new_cnt,1); - } -#endif - return msg; -} - -//elioyan TODO -Message * QWorkQueue::queuetop(uint64_t thd_id) -{ - uint64_t starttime = get_sys_clock(); - assert(ISSERVER || ISREPLICA); - Message * msg = NULL; - work_queue_entry * entry = NULL; - uint64_t mtx_wait_starttime = get_sys_clock(); - bool valid = false; - sem_wait(&mw); - valid = work_queue.size() > 0; - if (valid) { - entry = work_queue[0]; - work_queue.pop_front(); - } - sem_post(&mw); - if(!valid) { -#if SERVER_GENERATE_QUERIES - if(ISSERVER) { - BaseQuery * m_query = client_query_queue.get_next_query(thd_id,thd_id); - if(m_query) { - assert(m_query); - msg = Message::create_message((BaseQuery*)m_query,CL_QRY); - } - } -#else - sem_wait(&mt); - valid = new_txn_queue.size() > 0; - if (valid) { - entry = new_txn_queue[0]; - new_txn_queue.pop_front(); - } - sem_post(&mt); -#endif - } - INC_STATS(thd_id,mtx[14],get_sys_clock() - mtx_wait_starttime); - - if(valid) { - msg = entry->msg; - assert(msg); - uint64_t queue_time = get_sys_clock() - entry->starttime; - INC_STATS(thd_id,work_queue_wait_time,queue_time); - INC_STATS(thd_id,work_queue_cnt,1); - if(msg->rtype == CL_QRY) { - sem_wait(&_semaphore); - txn_queue_size --; - txn_dequeue_size ++; - sem_post(&_semaphore); - INC_STATS(thd_id,work_queue_new_wait_time,queue_time); - INC_STATS(thd_id,work_queue_new_cnt,1); - } else { - sem_wait(&_semaphore); - work_queue_size --; - work_dequeue_size ++; - sem_post(&_semaphore); - INC_STATS(thd_id,work_queue_old_wait_time,queue_time); - INC_STATS(thd_id,work_queue_old_cnt,1); - } - msg->wq_time = queue_time; - DEBUG("Work Dequeue (%ld,%ld)\n",entry->txn_id,entry->batch_id); - DEBUG_M("QWorkQueue::dequeue work_queue_entry free\n"); - mem_allocator.free(entry,sizeof(work_queue_entry)); - INC_STATS(thd_id,work_queue_dequeue_time,get_sys_clock() - starttime); - } - -#if SERVER_GENERATE_QUERIES - if(msg && msg->rtype == CL_QRY) { - INC_STATS(thd_id,work_queue_new_wait_time,get_sys_clock() - starttime); - INC_STATS(thd_id,work_queue_new_cnt,1); - } -#endif - return msg; -} - -#else -void QWorkQueue::enqueue(uint64_t thd_id, Message * msg,bool busy) { - uint64_t starttime = get_sys_clock(); - assert(msg); - DEBUG_M("QWorkQueue::enqueue work_queue_entry alloc\n"); - work_queue_entry * entry = (work_queue_entry*)mem_allocator.align_alloc(sizeof(work_queue_entry)); - entry->msg = msg; - entry->rtype = msg->rtype; - entry->txn_id = msg->txn_id; - entry->batch_id = msg->batch_id; - entry->starttime = get_sys_clock(); - assert(ISSERVER || ISREPLICA); - DEBUG("Work Enqueue (%ld,%ld) %d\n",entry->txn_id,entry->batch_id,entry->rtype); - - uint64_t mtx_wait_starttime = get_sys_clock(); - if(msg->rtype == CL_QRY) { - while (!new_txn_queue->push(entry) && !simulation->is_done()) { - } - sem_wait(&_semaphore); - txn_queue_size ++; - txn_enqueue_size ++; - sem_post(&_semaphore); - } else { - while (!work_queue->push(entry) && !simulation->is_done()) { - } - sem_wait(&_semaphore); - work_queue_size ++; - work_enqueue_size ++; - sem_post(&_semaphore); - } - INC_STATS(thd_id,mtx[13],get_sys_clock() - mtx_wait_starttime); - - if(busy) { - INC_STATS(thd_id,work_queue_conflict_cnt,1); - } - INC_STATS(thd_id,work_queue_enqueue_time,get_sys_clock() - starttime); - INC_STATS(thd_id,work_queue_enq_cnt,1); -} - -Message * QWorkQueue::dequeue(uint64_t thd_id) { - uint64_t starttime = get_sys_clock(); - assert(ISSERVER || ISREPLICA); - Message * msg = NULL; - work_queue_entry * entry = NULL; - uint64_t mtx_wait_starttime = get_sys_clock(); - bool valid = false; - - double x = (double)(rand() % 10000) / 10000; - if (x > TXN_QUEUE_PERCENT) - valid = work_queue->pop(entry); - else - valid = new_txn_queue->pop(entry); - if(!valid) { -#if SERVER_GENERATE_QUERIES - if(ISSERVER) { - BaseQuery * m_query = client_query_queue.get_next_query(thd_id,thd_id); - if(m_query) { - assert(m_query); - msg = Message::create_message((BaseQuery*)m_query,CL_QRY); - } - } -#else - if (x > TXN_QUEUE_PERCENT) - valid = new_txn_queue->pop(entry); - else - valid = work_queue->pop(entry); -#endif - } - INC_STATS(thd_id,mtx[14],get_sys_clock() - mtx_wait_starttime); - - if(valid) { - msg = entry->msg; - assert(msg); - uint64_t queue_time = get_sys_clock() - entry->starttime; - INC_STATS(thd_id,work_queue_wait_time,queue_time); - INC_STATS(thd_id,work_queue_cnt,1); - if(msg->rtype == CL_QRY) { - sem_wait(&_semaphore); - txn_queue_size --; - txn_dequeue_size ++; - sem_post(&_semaphore); - INC_STATS(thd_id,work_queue_new_wait_time,queue_time); - INC_STATS(thd_id,work_queue_new_cnt,1); - } else { - sem_wait(&_semaphore); - txn_queue_size --; - txn_dequeue_size ++; - sem_post(&_semaphore); - INC_STATS(thd_id,work_queue_old_wait_time,queue_time); - INC_STATS(thd_id,work_queue_old_cnt,1); - } - msg->wq_time = queue_time; - DEBUG("Work Dequeue (%ld,%ld)\n",entry->txn_id,entry->batch_id); - DEBUG_M("QWorkQueue::dequeue work_queue_entry free\n"); - mem_allocator.free(entry,sizeof(work_queue_entry)); - INC_STATS(thd_id,work_queue_dequeue_time,get_sys_clock() - starttime); - } - -#if SERVER_GENERATE_QUERIES - if(msg && msg->rtype == CL_QRY) { - INC_STATS(thd_id,work_queue_new_wait_time,get_sys_clock() - starttime); - INC_STATS(thd_id,work_queue_new_cnt,1); - } -#endif - return msg; -} - - -//elioyan TODO -Message * QWorkQueue::queuetop(uint64_t thd_id) -{ - uint64_t starttime = get_sys_clock(); - assert(ISSERVER || ISREPLICA); - Message * msg = NULL; - work_queue_entry * entry = NULL; - uint64_t mtx_wait_starttime = get_sys_clock(); - bool valid = work_queue->pop(entry); - if(!valid) { -#if SERVER_GENERATE_QUERIES - if(ISSERVER) { - BaseQuery * m_query = client_query_queue.get_next_query(thd_id,thd_id); - if(m_query) { - assert(m_query); - msg = Message::create_message((BaseQuery*)m_query,CL_QRY); - } - } -#else - valid = new_txn_queue->pop(entry); -#endif - } - INC_STATS(thd_id,mtx[14],get_sys_clock() - mtx_wait_starttime); - - if(valid) { - msg = entry->msg; - assert(msg); - uint64_t queue_time = get_sys_clock() - entry->starttime; - INC_STATS(thd_id,work_queue_wait_time,queue_time); - INC_STATS(thd_id,work_queue_cnt,1); - if(msg->rtype == CL_QRY) { - sem_wait(&_semaphore); - txn_queue_size --; - txn_dequeue_size ++; - sem_post(&_semaphore); - INC_STATS(thd_id,work_queue_new_wait_time,queue_time); - INC_STATS(thd_id,work_queue_new_cnt,1); - } else { - sem_wait(&_semaphore); - work_queue_size --; - work_dequeue_size ++; - sem_post(&_semaphore); - INC_STATS(thd_id,work_queue_old_wait_time,queue_time); - INC_STATS(thd_id,work_queue_old_cnt,1); - } - msg->wq_time = queue_time; - DEBUG("Work Dequeue (%ld,%ld)\n",entry->txn_id,entry->batch_id); - DEBUG_M("QWorkQueue::dequeue work_queue_entry free\n"); - mem_allocator.free(entry,sizeof(work_queue_entry)); - INC_STATS(thd_id,work_queue_dequeue_time,get_sys_clock() - starttime); - } - -#if SERVER_GENERATE_QUERIES - if(msg && msg->rtype == CL_QRY) { - INC_STATS(thd_id,work_queue_new_wait_time,get_sys_clock() - starttime); - INC_STATS(thd_id,work_queue_new_cnt,1); - } -#endif - return msg; -} - -#endif diff --git a/contrib/deneva/system/work_queue.h b/contrib/deneva/system/work_queue.h deleted file mode 100644 index 7807771c..00000000 --- a/contrib/deneva/system/work_queue.h +++ /dev/null @@ -1,135 +0,0 @@ -/* - Tencent is pleased to support the open source community by making 3TS available. - - Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - Tencent Modifications are Copyright (C) THL A29 Limited. - - Author: hongyaozhao@ruc.edu.cn - - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _WORK_QUEUE_H_ -#define _WORK_QUEUE_H_ - -#include "global.h" -#include "helper.h" -#include -#include -#include -#include "semaphore.h" -//#include "message.h" - -class BaseQuery; -class Workload; -class Message; - -struct work_queue_entry { - Message * msg; - uint64_t batch_id; - uint64_t txn_id; - RemReqType rtype; - uint64_t starttime; -}; - -struct CompareSchedEntry { - bool operator()(const work_queue_entry* lhs, const work_queue_entry* rhs) { - if (lhs->batch_id == rhs->batch_id) return lhs->starttime > rhs->starttime; - return lhs->batch_id < rhs->batch_id; - } -}; -struct CompareWQEntry { -#if PRIORITY == PRIORITY_FCFS - bool operator()(const work_queue_entry* lhs, const work_queue_entry* rhs) { - return lhs->starttime < rhs->starttime; - } -#elif PRIORITY == PRIORITY_ACTIVE - bool operator()(const work_queue_entry* lhs, const work_queue_entry* rhs) { - if (lhs->rtype == CL_QRY && rhs->rtype != CL_QRY) return true; - if (rhs->rtype == CL_QRY && lhs->rtype != CL_QRY) return false; - return lhs->starttime < rhs->starttime; - } -#elif PRIORITY == PRIORITY_HOME - bool operator()(const work_queue_entry* lhs, const work_queue_entry* rhs) { - if (ISLOCAL(lhs->txn_id) && !ISLOCAL(rhs->txn_id)) return true; - if (ISLOCAL(rhs->txn_id) && !ISLOCAL(lhs->txn_id)) return false; - return lhs->starttime < rhs->starttime; - } -#endif -}; -typedef boost::circular_buffer WCircularBuffer; -class QWorkQueue { -public: - void init(); - void enqueue(uint64_t thd_id,Message * msg,bool busy); - Message * dequeue(uint64_t thd_id); - Message * queuetop(uint64_t thd_id); - void sched_enqueue(uint64_t thd_id, Message * msg); - Message * sched_dequeue(uint64_t thd_id); - void sequencer_enqueue(uint64_t thd_id, Message * msg); - Message * sequencer_dequeue(uint64_t thd_id); - - uint64_t get_cnt() {return get_wq_cnt() + get_rem_wq_cnt() + get_new_wq_cnt();} - uint64_t get_wq_cnt() {return 0;} - //uint64_t get_wq_cnt() {return work_queue.size();} - uint64_t get_txn_cnt() {return txn_queue_size;} - - uint64_t get_enwq_cnt() {return work_enqueue_size;} - uint64_t get_dewq_cnt() {return work_dequeue_size;} - uint64_t get_entxn_cnt() {return txn_enqueue_size;} - uint64_t get_detxn_cnt() {return txn_dequeue_size;} - - void set_enwq_cnt() { work_enqueue_size = 0;} - void set_dewq_cnt() { work_dequeue_size = 0;} - void set_entxn_cnt() { txn_enqueue_size = 0;} - void set_detxn_cnt() { txn_dequeue_size = 0;} - uint64_t get_sched_wq_cnt() {return 0;} - uint64_t get_rem_wq_cnt() {return 0;} - uint64_t get_new_wq_cnt() {return 0;} - // DA - Message* top_element; - - -private: -#ifdef NEW_WORK_QUEUE - WCircularBuffer work_queue; - WCircularBuffer new_txn_queue; - - sem_t mw; - sem_t mt; -#else - boost::lockfree::queue * work_queue; - boost::lockfree::queue * new_txn_queue; -#endif - boost::lockfree::queue * seq_queue; - boost::lockfree::queue ** sched_queue; - - uint64_t sched_ptr; - BaseQuery * last_sched_dq; - uint64_t curr_epoch; - - sem_t _semaphore; - volatile uint64_t work_queue_size; - volatile uint64_t txn_queue_size; - - uint64_t work_enqueue_size; - uint64_t work_dequeue_size; - uint64_t txn_enqueue_size; - uint64_t txn_dequeue_size; -}; - - -#endif diff --git a/contrib/deneva/system/worker_thread.cpp b/contrib/deneva/system/worker_thread.cpp deleted file mode 100644 index 17cd9042..00000000 --- a/contrib/deneva/system/worker_thread.cpp +++ /dev/null @@ -1,907 +0,0 @@ -/* - Tencent is pleased to support the open source community by making 3TS available. - - Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - Tencent Modifications are Copyright (C) THL A29 Limited. - - Author: hongyaozhao@ruc.edu.cn - - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "worker_thread.h" - -#include "abort_queue.h" -#include "global.h" -#include "helper.h" -#include "logger.h" -#include "maat.h" -#include "manager.h" -#include "math.h" -#include "message.h" -#include "msg_queue.h" -#include "msg_thread.h" -#include "query.h" -#include "tpcc_query.h" -#include "txn.h" -#include "wl.h" -#include "work_queue.h" -#include "ycsb_query.h" -#include "maat.h" -#include "sundial.h" -#include "wsi.h" -#include "ssi.h" -#include "focc.h" -#include "bocc.h" - -void WorkerThread::setup() { - if( get_thd_id() == 0) { - send_init_done_to_all_nodes(); - } - _thd_txn_id = 0; -} - -void WorkerThread::fakeprocess(Message * msg) { - RC rc __attribute__ ((unused)); - - DEBUG("%ld Processing %ld %d\n",get_thd_id(),msg->get_txn_id(),msg->get_rtype()); - assert(msg->get_rtype() == CL_QRY || msg->get_txn_id() != UINT64_MAX); - uint64_t starttime = get_sys_clock(); - switch(msg->get_rtype()) { - case RPASS: - //rc = process_rpass(msg); - break; - case RPREPARE: - rc = RCOK; - txn_man->set_rc(rc); - msg_queue.enqueue(get_thd_id(),Message::create_message(txn_man,RACK_PREP),msg->return_node_id); - break; - case RFWD: - rc = process_rfwd(msg); - break; - case RQRY: - rc = RCOK; - txn_man->set_rc(rc); - msg_queue.enqueue(get_thd_id(),Message::create_message(txn_man,RQRY_RSP),msg->return_node_id); - break; - case RQRY_CONT: - rc = RCOK; - txn_man->set_rc(rc); - msg_queue.enqueue(get_thd_id(),Message::create_message(txn_man,RQRY_RSP),msg->return_node_id); - break; - case RQRY_RSP: - rc = process_rqry_rsp(msg); - break; - case RFIN: - rc = RCOK; - txn_man->set_rc(rc); - if(!((FinishMessage*)msg)->readonly || CC_ALG == MAAT || CC_ALG == OCC || CC_ALG == SUNDIAL || CC_ALG == BOCC || CC_ALG == SSI) - - msg_queue.enqueue(get_thd_id(),Message::create_message(txn_man,RACK_FIN),GET_NODE_ID(msg->get_txn_id())); - break; - case RACK_PREP: - rc = process_rack_prep(msg); - break; - case RACK_FIN: - rc = process_rack_rfin(msg); - break; - case RTXN_CONT: - rc = process_rtxn_cont(msg); - break; - case CL_QRY: - case RTXN: -#if CC_ALG == CALVIN - rc = process_calvin_rtxn(msg); -#else - rc = process_rtxn(msg); -#endif - break; - case LOG_FLUSHED: - rc = process_log_flushed(msg); - break; - case LOG_MSG: - rc = process_log_msg(msg); - break; - case LOG_MSG_RSP: - rc = process_log_msg_rsp(msg); - break; - default: - printf("Msg: %d\n",msg->get_rtype()); - fflush(stdout); - assert(false); - break; - } - uint64_t timespan = get_sys_clock() - starttime; - INC_STATS(get_thd_id(),worker_process_cnt,1); - INC_STATS(get_thd_id(),worker_process_time,timespan); - INC_STATS(get_thd_id(),worker_process_cnt_by_type[msg->rtype],1); - INC_STATS(get_thd_id(),worker_process_time_by_type[msg->rtype],timespan); - DEBUG("%ld EndProcessing %d %ld\n",get_thd_id(),msg->get_rtype(),msg->get_txn_id()); -} - -void WorkerThread::process(Message * msg) { - RC rc __attribute__ ((unused)); - - DEBUG("%ld Processing %ld %d\n",get_thd_id(),msg->get_txn_id(),msg->get_rtype()); - assert(msg->get_rtype() == CL_QRY || msg->get_txn_id() != UINT64_MAX); - uint64_t starttime = get_sys_clock(); - switch(msg->get_rtype()) { - case RPASS: - break; - case RPREPARE: - rc = process_rprepare(msg); - break; - case RFWD: - rc = process_rfwd(msg); - break; - case RQRY: - rc = process_rqry(msg); - break; - case RQRY_CONT: - rc = process_rqry_cont(msg); - break; - case RQRY_RSP: - rc = process_rqry_rsp(msg); - break; - case RFIN: - rc = process_rfin(msg); - break; - case RACK_PREP: - rc = process_rack_prep(msg); - break; - case RACK_FIN: - rc = process_rack_rfin(msg); - break; - case RTXN_CONT: - rc = process_rtxn_cont(msg); - break; - case CL_QRY: - case RTXN: -#if CC_ALG == CALVIN - rc = process_calvin_rtxn(msg); -#else - rc = process_rtxn(msg); -#endif - break; - case LOG_FLUSHED: - rc = process_log_flushed(msg); - break; - case LOG_MSG: - rc = process_log_msg(msg); - break; - case LOG_MSG_RSP: - rc = process_log_msg_rsp(msg); - break; - default: - printf("Msg: %d\n",msg->get_rtype()); - fflush(stdout); - assert(false); - break; - } - uint64_t timespan = get_sys_clock() - starttime; - INC_STATS(get_thd_id(),worker_process_cnt,1); - INC_STATS(get_thd_id(),worker_process_time,timespan); - INC_STATS(get_thd_id(),worker_process_cnt_by_type[msg->rtype],1); - INC_STATS(get_thd_id(),worker_process_time_by_type[msg->rtype],timespan); - DEBUG("%ld EndProcessing %d %ld\n",get_thd_id(),msg->get_rtype(),msg->get_txn_id()); -} - -void WorkerThread::check_if_done(RC rc) { - if (txn_man->waiting_for_response()) return; - if (rc == Commit) { - txn_man->txn_stats.finish_start_time = get_sys_clock(); - commit(); - } - if (rc == Abort) { - txn_man->txn_stats.finish_start_time = get_sys_clock(); - abort(); - } -} - -void WorkerThread::release_txn_man() { - txn_table.release_transaction_manager(get_thd_id(), txn_man->get_txn_id(), - txn_man->get_batch_id()); - txn_man = NULL; -} - -void WorkerThread::calvin_wrapup() { - txn_man->release_locks(RCOK); - txn_man->commit_stats(); - DEBUG("(%ld,%ld) calvin ack to %ld\n", txn_man->get_txn_id(), txn_man->get_batch_id(), - txn_man->return_id); - if(txn_man->return_id == g_node_id) { - work_queue.sequencer_enqueue(_thd_id,Message::create_message(txn_man,CALVIN_ACK)); - } else { - msg_queue.enqueue(get_thd_id(), Message::create_message(txn_man, CALVIN_ACK), - txn_man->return_id); - } - release_txn_man(); -} - -// Can't use txn_man after this function -void WorkerThread::commit() { - assert(txn_man); - assert(IS_LOCAL(txn_man->get_txn_id())); - - uint64_t timespan = get_sys_clock() - txn_man->txn_stats.starttime; - DEBUG("COMMIT %ld %f -- %f\n", txn_man->get_txn_id(), - simulation->seconds_from_start(get_sys_clock()), (double)timespan / BILLION); - - // ! trans total time - uint64_t end_time = get_sys_clock(); - uint64_t timespan_short = end_time - txn_man->txn_stats.restart_starttime; - uint64_t two_pc_timespan = end_time - txn_man->txn_stats.prepare_start_time; - uint64_t finish_timespan = end_time - txn_man->txn_stats.finish_start_time; - INC_STATS(get_thd_id(), trans_2pc_time, two_pc_timespan); - INC_STATS(get_thd_id(), trans_finish_time, finish_timespan); - INC_STATS(get_thd_id(), trans_commit_time, finish_timespan); - INC_STATS(get_thd_id(), trans_total_run_time, timespan_short); - - // Send result back to client -#if !SERVER_GENERATE_QUERIES - msg_queue.enqueue(get_thd_id(),Message::create_message(txn_man,CL_RSP),txn_man->client_id); -#endif - // remove txn from pool - release_txn_man(); - // Do not use txn_man after this -} - -void WorkerThread::abort() { - DEBUG("ABORT %ld -- %f\n", txn_man->get_txn_id(), - (double)get_sys_clock() - run_starttime / BILLION); - // TODO: TPCC Rollback here - - ++txn_man->abort_cnt; - txn_man->reset(); - - uint64_t end_time = get_sys_clock(); - uint64_t timespan_short = end_time - txn_man->txn_stats.restart_starttime; - uint64_t two_pc_timespan = end_time - txn_man->txn_stats.prepare_start_time; - uint64_t finish_timespan = end_time - txn_man->txn_stats.finish_start_time; - INC_STATS(get_thd_id(), trans_2pc_time, two_pc_timespan); - INC_STATS(get_thd_id(), trans_finish_time, finish_timespan); - INC_STATS(get_thd_id(), trans_abort_time, finish_timespan); - INC_STATS(get_thd_id(), trans_total_run_time, timespan_short); - #if WORKLOAD != DA //actually DA do not need real abort. Just count it and do not send real abort msg. - uint64_t penalty = - abort_queue.enqueue(get_thd_id(), txn_man->get_txn_id(), txn_man->get_abort_cnt()); - - txn_man->txn_stats.total_abort_time += penalty; - #endif -} - -TxnManager * WorkerThread::get_transaction_manager(Message * msg) { -#if CC_ALG == CALVIN - TxnManager* local_txn_man = - txn_table.get_transaction_manager(get_thd_id(), msg->get_txn_id(), msg->get_batch_id()); -#else - TxnManager * local_txn_man = txn_table.get_transaction_manager(get_thd_id(),msg->get_txn_id(),0); -#endif - return local_txn_man; -} - -char type2char(DATxnType txn_type) -{ - switch (txn_type) - { - case DA_READ: - return 'R'; - case DA_WRITE: - return 'W'; - case DA_COMMIT: - return 'C'; - case DA_ABORT: - return 'A'; - case DA_SCAN: - return 'S'; - default: - return 'U'; - } -} - -RC WorkerThread::run() { - tsetup(); - printf("Running WorkerThread %ld\n",_thd_id); - - uint64_t ready_starttime; - uint64_t idle_starttime = 0; - - while(!simulation->is_done()) { - txn_man = NULL; - heartbeat(); - - progress_stats(); - Message* msg; - -#ifdef TEST_MSG_order - while(1) - { - msg = work_queue.dequeue(get_thd_id()); - if (!msg) { - if (idle_starttime == 0) idle_starttime = get_sys_clock(); - continue; - } - printf("s seq_id:%lu type:%c trans_id:%lu item:%c state:%lu next_state:%lu\n", - ((DAClientQueryMessage*)msg)->seq_id, - type2char(((DAClientQueryMessage*)msg)->txn_type), - ((DAClientQueryMessage*)msg)->trans_id, - static_cast('x'+((DAClientQueryMessage*)msg)->item_id), - ((DAClientQueryMessage*)msg)->state, - (((DAClientQueryMessage*)msg)->next_state)); - fflush(stdout); - } -#endif - - msg = work_queue.dequeue(get_thd_id()); - if(!msg) { - if (idle_starttime == 0) idle_starttime = get_sys_clock(); - continue; - } - simulation->last_da_query_time = get_sys_clock(); -#if WORKLOAD == DA - printf("thd_id:%lu stxn_id:%lu batch_id:%lu seq_id:%lu type:%c rtype:%d trans_id:%lu item:%c laststate:%lu state:%lu next_state:%lu\n", - this->_thd_id, - ((DAClientQueryMessage*)msg)->txn_id, - ((DAClientQueryMessage*)msg)->batch_id, - ((DAClientQueryMessage*)msg)->seq_id, - type2char(((DAClientQueryMessage*)msg)->txn_type), - ((DAClientQueryMessage*)msg)->rtype, - ((DAClientQueryMessage*)msg)->trans_id, - static_cast('x'+((DAClientQueryMessage*)msg)->item_id), - ((DAClientQueryMessage*)msg)->last_state, - ((DAClientQueryMessage*)msg)->state, - ((DAClientQueryMessage*)msg)->next_state); - fflush(stdout); -#endif - if(idle_starttime > 0) { - INC_STATS(_thd_id,worker_idle_time,get_sys_clock() - idle_starttime); - idle_starttime = 0; - } - - if(msg->rtype != CL_QRY || CC_ALG == CALVIN) { - txn_man = get_transaction_manager(msg); - - if (CC_ALG != CALVIN && IS_LOCAL(txn_man->get_txn_id())) { - if (msg->rtype != RTXN_CONT && - ((msg->rtype != RACK_PREP) || (txn_man->get_rsp_cnt() == 1))) { - txn_man->txn_stats.work_queue_time_short += msg->lat_work_queue_time; - txn_man->txn_stats.cc_block_time_short += msg->lat_cc_block_time; - txn_man->txn_stats.cc_time_short += msg->lat_cc_time; - txn_man->txn_stats.msg_queue_time_short += msg->lat_msg_queue_time; - txn_man->txn_stats.process_time_short += msg->lat_process_time; - txn_man->txn_stats.network_time_short += msg->lat_network_time; - } - } else { - txn_man->txn_stats.clear_short(); - } - if (CC_ALG != CALVIN) { - txn_man->txn_stats.lat_network_time_start = msg->lat_network_time; - txn_man->txn_stats.lat_other_time_start = msg->lat_other_time; - } - txn_man->txn_stats.msg_queue_time += msg->mq_time; - txn_man->txn_stats.msg_queue_time_short += msg->mq_time; - msg->mq_time = 0; - txn_man->txn_stats.work_queue_time += msg->wq_time; - txn_man->txn_stats.work_queue_time_short += msg->wq_time; - //txn_man->txn_stats.network_time += msg->ntwk_time; - msg->wq_time = 0; - txn_man->txn_stats.work_queue_cnt += 1; - - - ready_starttime = get_sys_clock(); - bool ready = txn_man->unset_ready(); - INC_STATS(get_thd_id(),worker_activate_txn_time,get_sys_clock() - ready_starttime); - if(!ready) { - // Return to work queue, end processing - work_queue.enqueue(get_thd_id(),msg,true); - continue; - } - txn_man->register_thread(this); - } -#ifdef FAKE_PROCESS - fakeprocess(msg); -#else - process(msg); -#endif - - ready_starttime = get_sys_clock(); - if(txn_man) { - bool ready = txn_man->set_ready(); - assert(ready); - } - INC_STATS(get_thd_id(),worker_deactivate_txn_time,get_sys_clock() - ready_starttime); - - ready_starttime = get_sys_clock(); -#if CC_ALG != CALVIN - msg->release(); -#endif - INC_STATS(get_thd_id(),worker_release_msg_time,get_sys_clock() - ready_starttime); - } - printf("FINISH %ld:%ld\n",_node_id,_thd_id); - fflush(stdout); - return FINISH; -} - -RC WorkerThread::process_rfin(Message * msg) { - DEBUG("RFIN %ld\n",msg->get_txn_id()); - assert(CC_ALG != CALVIN); - - M_ASSERT_V(!IS_LOCAL(msg->get_txn_id()), "RFIN local: %ld %ld/%d\n", msg->get_txn_id(), - msg->get_txn_id() % g_node_cnt, g_node_id); -#if CC_ALG == MAAT || CC_ALG == SILO - txn_man->set_commit_timestamp(((FinishMessage*)msg)->commit_timestamp); -#endif - - if(((FinishMessage*)msg)->rc == Abort) { - txn_man->abort(); - txn_man->reset(); - txn_man->reset_query(); - msg_queue.enqueue(get_thd_id(), Message::create_message(txn_man, RACK_FIN), - GET_NODE_ID(msg->get_txn_id())); - return Abort; - } - txn_man->commit(); - - if (!((FinishMessage*)msg)->readonly || CC_ALG == MAAT || CC_ALG == OCC || CC_ALG == SUNDIAL || - CC_ALG == BOCC || CC_ALG == SSI || CC_ALG == SILO) - msg_queue.enqueue(get_thd_id(), Message::create_message(txn_man, RACK_FIN), - GET_NODE_ID(msg->get_txn_id())); - release_txn_man(); - - return RCOK; -} - -RC WorkerThread::process_rack_prep(Message * msg) { - DEBUG("RPREP_ACK %ld\n",msg->get_txn_id()); - - RC rc = RCOK; - - int responses_left = txn_man->received_response(((AckMessage*)msg)->rc); - assert(responses_left >=0); -#if CC_ALG == MAAT - // Integrate bounds - uint64_t lower = ((AckMessage*)msg)->lower; - uint64_t upper = ((AckMessage*)msg)->upper; - if(lower > time_table.get_lower(get_thd_id(),msg->get_txn_id())) { - time_table.set_lower(get_thd_id(),msg->get_txn_id(),lower); - } - if(upper < time_table.get_upper(get_thd_id(),msg->get_txn_id())) { - time_table.set_upper(get_thd_id(),msg->get_txn_id(),upper); - } - DEBUG("%ld bound set: [%ld,%ld] -> [%ld,%ld]\n", msg->get_txn_id(), lower, upper, - time_table.get_lower(get_thd_id(), msg->get_txn_id()), - time_table.get_upper(get_thd_id(), msg->get_txn_id())); - if(((AckMessage*)msg)->rc != RCOK) { - time_table.set_state(get_thd_id(),msg->get_txn_id(),MAAT_ABORTED); - } -#endif - -#if CC_ALG == SILO - uint64_t max_tid = ((AckMessage*)msg)->max_tid; - txn_man->find_tid_silo(max_tid); -#endif - - if (responses_left > 0) return WAIT; - - // Done waiting - if(txn_man->get_rc() == RCOK) { - if (CC_ALG == SUNDIAL) rc = RCOK; - else rc = txn_man->validate(); - } - uint64_t finish_start_time = get_sys_clock(); - txn_man->txn_stats.finish_start_time = finish_start_time; - uint64_t prepare_timespan = finish_start_time - txn_man->txn_stats.prepare_start_time; - INC_STATS(get_thd_id(), trans_prepare_time, prepare_timespan); - if(rc == Abort || txn_man->get_rc() == Abort) { - txn_man->txn->rc = Abort; - rc = Abort; - } - if(CC_ALG == SSI) { - ssi_man.gene_finish_ts(txn_man); - } - if(CC_ALG == WSI) { - wsi_man.gene_finish_ts(txn_man); - } - txn_man->send_finish_messages(); - if(rc == Abort) { - txn_man->abort(); - } else { - txn_man->commit(); - } - - return rc; -} - -RC WorkerThread::process_rack_rfin(Message * msg) { - DEBUG("RFIN_ACK %ld\n",msg->get_txn_id()); - - RC rc = RCOK; - - int responses_left = txn_man->received_response(((AckMessage*)msg)->rc); - assert(responses_left >=0); - if (responses_left > 0) return WAIT; - - // Done waiting - txn_man->txn_stats.twopc_time += get_sys_clock() - txn_man->txn_stats.wait_starttime; -#if CC_ALG == FOCC - focc_man.end_critical_section(txn_man); -#elif CC_ALG == BOCC - bocc_man.end_critical_section(txn_man); -#endif - if(txn_man->get_rc() == RCOK) { - commit(); - } else { - abort(); - } - - return rc; -} - -RC WorkerThread::process_rqry_rsp(Message * msg) { - DEBUG("RQRY_RSP %ld\n",msg->get_txn_id()); - assert(IS_LOCAL(msg->get_txn_id())); - - txn_man->txn_stats.remote_wait_time += get_sys_clock() - txn_man->txn_stats.wait_starttime; - - if(((QueryResponseMessage*)msg)->rc == Abort) { - txn_man->start_abort(); - return Abort; - } -#if CC_ALG == SUNDIAL - // Integrate bounds - TxnManager * txn_man = txn_table.get_transaction_manager(get_thd_id(),msg->get_txn_id(),0); - QueryResponseMessage* qmsg = (QueryResponseMessage*)msg; - txn_man->_min_commit_ts = txn_man->_min_commit_ts > qmsg->_min_commit_ts ? - txn_man->_min_commit_ts : qmsg->_min_commit_ts; -#endif - RC rc = txn_man->run_txn(); - check_if_done(rc); - return rc; -} - -RC WorkerThread::process_rqry(Message * msg) { - DEBUG("RQRY %ld\n",msg->get_txn_id()); - M_ASSERT_V(!IS_LOCAL(msg->get_txn_id()), "RQRY local: %ld %ld/%d\n", msg->get_txn_id(), - msg->get_txn_id() % g_node_cnt, g_node_id); - assert(!IS_LOCAL(msg->get_txn_id())); - RC rc = RCOK; - - msg->copy_to_txn(txn_man); - -#if CC_ALG == MVCC - txn_table.update_min_ts(get_thd_id(),txn_man->get_txn_id(),0,txn_man->get_timestamp()); -#endif -#if CC_ALG == WSI || CC_ALG == SSI - txn_table.update_min_ts(get_thd_id(),txn_man->get_txn_id(),0,txn_man->get_start_timestamp()); -#endif -#if CC_ALG == MAAT - time_table.init(get_thd_id(),txn_man->get_txn_id()); -#endif - rc = txn_man->run_txn(); - - // Send response - if(rc != WAIT) { - msg_queue.enqueue(get_thd_id(),Message::create_message(txn_man,RQRY_RSP),txn_man->return_id); - } - return rc; -} - -RC WorkerThread::process_rqry_cont(Message * msg) { - DEBUG("RQRY_CONT %ld\n",msg->get_txn_id()); - assert(!IS_LOCAL(msg->get_txn_id())); - RC rc = RCOK; -#if CC_ALG != FOCC && CC_ALG != BOCC - txn_man->run_txn_post_wait(); -#endif - rc = txn_man->run_txn(); - - // Send response - if(rc != WAIT) { - msg_queue.enqueue(get_thd_id(),Message::create_message(txn_man,RQRY_RSP),txn_man->return_id); - } - return rc; -} - - -RC WorkerThread::process_rtxn_cont(Message * msg) { - DEBUG("RTXN_CONT %ld\n",msg->get_txn_id()); - assert(IS_LOCAL(msg->get_txn_id())); - - txn_man->txn_stats.local_wait_time += get_sys_clock() - txn_man->txn_stats.wait_starttime; -#if CC_ALG != FOCC && CC_ALG != BOCC - txn_man->run_txn_post_wait(); -#endif - RC rc = txn_man->run_txn(); - check_if_done(rc); - return RCOK; -} - -RC WorkerThread::process_rprepare(Message * msg) { - DEBUG("RPREP %ld\n",msg->get_txn_id()); - RC rc = RCOK; - -#if CC_ALG == SUNDIAL - // Integrate bounds - TxnManager * txn_man = txn_table.get_transaction_manager(get_thd_id(),msg->get_txn_id(),0); - PrepareMessage* pmsg = (PrepareMessage*)msg; - txn_man->_min_commit_ts = pmsg->_min_commit_ts; -#endif - // Validate transaction - rc = txn_man->validate(); - txn_man->set_rc(rc); - msg_queue.enqueue(get_thd_id(),Message::create_message(txn_man,RACK_PREP),msg->return_node_id); - // Clean up as soon as abort is possible - if(rc == Abort) { - txn_man->abort(); - } - - return rc; -} - -uint64_t WorkerThread::get_next_txn_id() { - uint64_t txn_id = - (get_node_id() + get_thd_id() * g_node_cnt) + (g_thread_cnt * g_node_cnt * _thd_txn_id); - ++_thd_txn_id; - return txn_id; -} - -RC WorkerThread::process_rtxn(Message * msg) { - RC rc = RCOK; - uint64_t txn_id = UINT64_MAX; - - if(msg->get_rtype() == CL_QRY) { - // This is a new transaction - // Only set new txn_id when txn first starts - #if WORKLOAD == DA - msg->txn_id=((DAClientQueryMessage*)msg)->trans_id; - txn_id=((DAClientQueryMessage*)msg)->trans_id; - #else - txn_id = get_next_txn_id(); - msg->txn_id = txn_id; - #endif - // Put txn in txn_table - txn_man = txn_table.get_transaction_manager(get_thd_id(),txn_id,0); - txn_man->register_thread(this); - uint64_t ready_starttime = get_sys_clock(); - bool ready = txn_man->unset_ready(); - INC_STATS(get_thd_id(),worker_activate_txn_time,get_sys_clock() - ready_starttime); - assert(ready); - if (CC_ALG == WAIT_DIE) { - #if WORKLOAD == DA //mvcc use timestamp - if (da_stamp_tab.count(txn_man->get_txn_id())==0) - { - da_stamp_tab[txn_man->get_txn_id()]=get_next_ts(); - txn_man->set_timestamp(da_stamp_tab[txn_man->get_txn_id()]); - } - else - txn_man->set_timestamp(da_stamp_tab[txn_man->get_txn_id()]); - #else - txn_man->set_timestamp(get_next_ts()); - #endif - } - txn_man->txn_stats.starttime = get_sys_clock(); - txn_man->txn_stats.restart_starttime = txn_man->txn_stats.starttime; - msg->copy_to_txn(txn_man); - DEBUG("START %ld %f %lu\n", txn_man->get_txn_id(), - simulation->seconds_from_start(get_sys_clock()), txn_man->txn_stats.starttime); - #if WORKLOAD==DA - if(da_start_trans_tab.count(txn_man->get_txn_id())==0) - { - da_start_trans_tab.insert(txn_man->get_txn_id()); - INC_STATS(get_thd_id(),local_txn_start_cnt,1); - } - #else - INC_STATS(get_thd_id(), local_txn_start_cnt, 1); - #endif - - } else { - txn_man->txn_stats.restart_starttime = get_sys_clock(); - DEBUG("RESTART %ld %f %lu\n", txn_man->get_txn_id(), - simulation->seconds_from_start(get_sys_clock()), txn_man->txn_stats.starttime); - } - // Get new timestamps - if(is_cc_new_timestamp()) { - #if WORKLOAD==DA //mvcc use timestamp - if(da_stamp_tab.count(txn_man->get_txn_id())==0) - { - da_stamp_tab[txn_man->get_txn_id()]=get_next_ts(); - txn_man->set_timestamp(da_stamp_tab[txn_man->get_txn_id()]); - } - else - txn_man->set_timestamp(da_stamp_tab[txn_man->get_txn_id()]); - #else - txn_man->set_timestamp(get_next_ts()); - #endif - } - -#if CC_ALG == MVCC - txn_table.update_min_ts(get_thd_id(),txn_id,0,txn_man->get_timestamp()); -#endif -#if CC_ALG == WSI || CC_ALG == SSI - txn_table.update_min_ts(get_thd_id(),txn_id,0,txn_man->get_start_timestamp()); -#endif -#if CC_ALG == OCC || CC_ALG == FOCC || CC_ALG == BOCC || CC_ALG == SSI || CC_ALG == WSI - #if WORKLOAD==DA - if(da_start_stamp_tab.count(txn_man->get_txn_id())==0) - { - da_start_stamp_tab[txn_man->get_txn_id()]=get_next_ts(); - txn_man->set_start_timestamp(da_start_stamp_tab[txn_man->get_txn_id()]); - } - else - txn_man->set_start_timestamp(da_start_stamp_tab[txn_man->get_txn_id()]); - #else - txn_man->set_start_timestamp(get_next_ts()); - #endif -#endif -#if CC_ALG == MAAT - #if WORKLOAD==DA - if(da_start_stamp_tab.count(txn_man->get_txn_id())==0) - { - da_start_stamp_tab[txn_man->get_txn_id()]=1; - time_table.init(get_thd_id(), txn_man->get_txn_id()); - assert(time_table.get_lower(get_thd_id(), txn_man->get_txn_id()) == 0); - assert(time_table.get_upper(get_thd_id(), txn_man->get_txn_id()) == UINT64_MAX); - assert(time_table.get_state(get_thd_id(), txn_man->get_txn_id()) == MAAT_RUNNING); - } - #else - time_table.init(get_thd_id(),txn_man->get_txn_id()); - assert(time_table.get_lower(get_thd_id(),txn_man->get_txn_id()) == 0); - assert(time_table.get_upper(get_thd_id(),txn_man->get_txn_id()) == UINT64_MAX); - assert(time_table.get_state(get_thd_id(),txn_man->get_txn_id()) == MAAT_RUNNING); - #endif -#endif - - rc = init_phase(); - if (rc != RCOK) return rc; - - // Execute transaction - rc = txn_man->run_txn(); - check_if_done(rc); - return rc; -} - -RC WorkerThread::init_phase() { - RC rc = RCOK; - return rc; -} - - -RC WorkerThread::process_log_msg(Message * msg) { - assert(ISREPLICA); - DEBUG("REPLICA PROCESS %ld\n",msg->get_txn_id()); - LogRecord * record = logger.createRecord(&((LogMessage*)msg)->record); - logger.enqueueRecord(record); - return RCOK; -} - -RC WorkerThread::process_log_msg_rsp(Message * msg) { - DEBUG("REPLICA RSP %ld\n",msg->get_txn_id()); - txn_man->repl_finished = true; - if (txn_man->log_flushed) commit(); - return RCOK; -} - -RC WorkerThread::process_log_flushed(Message * msg) { - DEBUG("LOG FLUSHED %ld\n",msg->get_txn_id()); - if(ISREPLICA) { - msg_queue.enqueue(get_thd_id(), Message::create_message(msg->txn_id, LOG_MSG_RSP), - GET_NODE_ID(msg->txn_id)); - return RCOK; - } - - txn_man->log_flushed = true; - if (g_repl_cnt == 0 || txn_man->repl_finished) commit(); - return RCOK; -} - -RC WorkerThread::process_rfwd(Message * msg) { - DEBUG("RFWD (%ld,%ld)\n",msg->get_txn_id(),msg->get_batch_id()); - txn_man->txn_stats.remote_wait_time += get_sys_clock() - txn_man->txn_stats.wait_starttime; - assert(CC_ALG == CALVIN); - int responses_left = txn_man->received_response(((ForwardMessage*)msg)->rc); - assert(responses_left >=0); - if(txn_man->calvin_collect_phase_done()) { - assert(ISSERVERN(txn_man->return_id)); - RC rc = txn_man->run_calvin_txn(); - if(rc == RCOK && txn_man->calvin_exec_phase_done()) { - calvin_wrapup(); - return RCOK; - } - } - return WAIT; -} - -RC WorkerThread::process_calvin_rtxn(Message * msg) { - DEBUG("START %ld %f %lu\n", txn_man->get_txn_id(), - simulation->seconds_from_start(get_sys_clock()), txn_man->txn_stats.starttime); - assert(ISSERVERN(txn_man->return_id)); - txn_man->txn_stats.local_wait_time += get_sys_clock() - txn_man->txn_stats.wait_starttime; - // Execute - RC rc = txn_man->run_calvin_txn(); - - if(rc == RCOK && txn_man->calvin_exec_phase_done()) { - calvin_wrapup(); - } - return RCOK; -} - -bool WorkerThread::is_cc_new_timestamp() { - return (CC_ALG == MVCC || CC_ALG == TIMESTAMP); -} - -ts_t WorkerThread::get_next_ts() { - if (g_ts_batch_alloc) { - if (_curr_ts % g_ts_batch_num == 0) { - _curr_ts = glob_manager.get_ts(get_thd_id()); - _curr_ts ++; - } else { - _curr_ts ++; - } - return _curr_ts - 1; - } else { - _curr_ts = glob_manager.get_ts(get_thd_id()); - return _curr_ts; - } -} - -bool WorkerThread::is_mine(Message* msg) { //TODO:have some problems! - if (((DAQueryMessage*)msg)->trans_id == get_thd_id()) { - return true; - } - return false; -} - -void WorkerNumThread::setup() { -} - -RC WorkerNumThread::run() { - tsetup(); - printf("Running WorkerNumThread %ld\n",_thd_id); - - // uint64_t idle_starttime = 0; - int i = 0; - while(!simulation->is_done()) { - progress_stats(); - - uint64_t wq_size = work_queue.get_wq_cnt(); - uint64_t tx_size = work_queue.get_txn_cnt(); - uint64_t ewq_size = work_queue.get_enwq_cnt(); - uint64_t dwq_size = work_queue.get_dewq_cnt(); - - uint64_t etx_size = work_queue.get_entxn_cnt(); - uint64_t dtx_size = work_queue.get_detxn_cnt(); - - work_queue.set_detxn_cnt(); - work_queue.set_dewq_cnt(); - work_queue.set_entxn_cnt(); - work_queue.set_enwq_cnt(); - - INC_STATS(_thd_id,work_queue_wq_cnt[i],wq_size); - INC_STATS(_thd_id,work_queue_tx_cnt[i],tx_size); - - INC_STATS(_thd_id,work_queue_ewq_cnt[i],ewq_size); - INC_STATS(_thd_id,work_queue_dwq_cnt[i],dwq_size); - - INC_STATS(_thd_id,work_queue_etx_cnt[i],etx_size); - INC_STATS(_thd_id,work_queue_dtx_cnt[i],dtx_size); - i++; - sleep(1); - - } - printf("FINISH %ld:%ld\n",_node_id,_thd_id); - fflush(stdout); - return FINISH; -} diff --git a/contrib/deneva/system/worker_thread.h b/contrib/deneva/system/worker_thread.h deleted file mode 100644 index b2dafdef..00000000 --- a/contrib/deneva/system/worker_thread.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - Tencent is pleased to support the open source community by making 3TS available. - - Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - Tencent Modifications are Copyright (C) THL A29 Limited. - - Author: hongyaozhao@ruc.edu.cn - - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _WORKERTHREAD_H_ -#define _WORKERTHREAD_H_ - -#include "global.h" -#include "thread.h" -class Workload; -class Message; - -class WorkerThread : public Thread { -public: - RC run(); - void setup(); - void process(Message * msg); - void fakeprocess(Message * msg); - void check_if_done(RC rc); - void release_txn_man(); - void commit(); - void abort(); - TxnManager * get_transaction_manager(Message * msg); - void calvin_wrapup(); - RC process_rfin(Message * msg); - RC process_rfwd(Message * msg); - RC process_rack_rfin(Message * msg); - RC process_rack_prep(Message * msg); - RC process_rqry_rsp(Message * msg); - RC process_rqry(Message * msg); - RC process_rqry_cont(Message * msg); - RC process_rinit(Message * msg); - RC process_rprepare(Message * msg); - RC process_rpass(Message * msg); - RC process_rtxn(Message * msg); - RC process_calvin_rtxn(Message * msg); - RC process_rtxn_cont(Message * msg); - RC process_log_msg(Message * msg); - RC process_log_msg_rsp(Message * msg); - RC process_log_flushed(Message * msg); - RC init_phase(); - uint64_t get_next_txn_id(); - bool is_cc_new_timestamp(); - bool is_mine(Message* msg); -private: - uint64_t _thd_txn_id; - ts_t _curr_ts; - ts_t get_next_ts(); - TxnManager * txn_man; -}; - -class WorkerNumThread : public Thread { -public: - RC run(); - void setup(); - -}; -#endif diff --git a/contrib/deneva/test.sh b/contrib/deneva/test.sh deleted file mode 100755 index a300816c..00000000 --- a/contrib/deneva/test.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -set -x - -#scripits to run -for concurrency_control in MVCC MAAT -do - #update CC_ALG - sed -i -e "/CC_ALG/d" -e "100a \#define CC_ALG ${concurrency_control}" config.h - #update compiling - make clean - make -j10 - echo "update of db success" -# for theta_value in 0.0 0.25 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.9 - for theta_value in 0.0 - do - ./rundb -nid0 -zipf${theta_value} & - #connect 146 - echo "trying to connect 147" -ssh -t -p22 root@10.77.110.147 << remotessh - cd /root/zzhdeneva - sed -i -e "/CC_ALG/d" -e "100a \#define CC_ALG ${concurrency_control}" config.h - make clean - make -j10 - ./runcl -nid1 -zipf${theta_value} > /root/zzhdeneva/test/output_${concurrency_control}_${theta_value}.txt - echo "test of ${concurrency_control} and ${theta_value} success" - exit -remotessh - # TODO: lsof -i 18000; kill this pid - sleep 10 - done - sleep 5 -done - -ssh -t -p22 root@10.77.110.147 << remotessh - cd /root/zzhdeneva/test - python output-gather.py > output.txt - exit -remotessh - diff --git a/contrib/deneva/transport/message.cpp b/contrib/deneva/transport/message.cpp deleted file mode 100644 index 3c071019..00000000 --- a/contrib/deneva/transport/message.cpp +++ /dev/null @@ -1,1876 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "mem_alloc.h" -#include "query.h" -#include "ycsb_query.h" -#include "ycsb.h" -#include "tpcc_query.h" -#include "tpcc.h" -#include "pps_query.h" -#include "pps.h" -#include "global.h" -#include "message.h" -#include "maat.h" -#include "da.h" -#include "da_query.h" -#include "sundial.h" - -std::vector * Message::create_messages(char * buf) { - std::vector * all_msgs = new std::vector; - char * data = buf; - uint64_t ptr = 0; - uint32_t dest_id; - uint32_t return_id; - uint32_t txn_cnt; - COPY_VAL(dest_id,data,ptr); - COPY_VAL(return_id,data,ptr); - COPY_VAL(txn_cnt,data,ptr); - assert(dest_id == g_node_id); - assert(return_id != g_node_id); - assert(ISCLIENTN(return_id) || ISSERVERN(return_id) || ISREPLICAN(return_id)); - while(txn_cnt > 0) { - Message * msg = create_message(&data[ptr]); - msg->return_node_id = return_id; - ptr += msg->get_size(); - all_msgs->push_back(msg); - --txn_cnt; - } - return all_msgs; -} - -Message * Message::create_message(char * buf) { - RemReqType rtype = NO_MSG; - uint64_t ptr = 0; - COPY_VAL(rtype,buf,ptr); - Message * msg = create_message(rtype); - fflush(stdout); - msg->copy_from_buf(buf); - return msg; -} - -Message * Message::create_message(TxnManager * txn, RemReqType rtype) { - Message * msg = create_message(rtype); - msg->mcopy_from_txn(txn); - msg->copy_from_txn(txn); - - // copy latency here - msg->lat_work_queue_time = txn->txn_stats.work_queue_time_short; - msg->lat_msg_queue_time = txn->txn_stats.msg_queue_time_short; - msg->lat_cc_block_time = txn->txn_stats.cc_block_time_short; - msg->lat_cc_time = txn->txn_stats.cc_time_short; - msg->lat_process_time = txn->txn_stats.process_time_short; - msg->lat_network_time = txn->txn_stats.lat_network_time_start; - msg->lat_other_time = txn->txn_stats.lat_other_time_start; - - return msg; -} - -Message * Message::create_message(LogRecord * record, RemReqType rtype) { - Message * msg = create_message(rtype); - ((LogMessage*)msg)->copy_from_record(record); - msg->txn_id = record->rcd.txn_id; - return msg; -} - - -Message * Message::create_message(BaseQuery * query, RemReqType rtype) { - assert(rtype == RQRY || rtype == CL_QRY); - Message * msg = create_message(rtype); -#if WORKLOAD == YCSB - ((YCSBClientQueryMessage*)msg)->copy_from_query(query); -#elif WORKLOAD == TPCC - ((TPCCClientQueryMessage*)msg)->copy_from_query(query); -#elif WORKLOAD == PPS - ((PPSClientQueryMessage*)msg)->copy_from_query(query); -#elif WORKLOAD == DA - ((DAClientQueryMessage*)msg)->copy_from_query(query); -#endif - return msg; -} - -Message * Message::create_message(uint64_t txn_id, RemReqType rtype) { - Message * msg = create_message(rtype); - msg->txn_id = txn_id; - return msg; -} - -Message * Message::create_message(uint64_t txn_id, uint64_t batch_id, RemReqType rtype) { - Message * msg = create_message(rtype); - msg->txn_id = txn_id; - msg->batch_id = batch_id; - return msg; -} - -Message * Message::create_message(RemReqType rtype) { - Message * msg; - switch(rtype) { - case INIT_DONE: - msg = new InitDoneMessage; - break; - case RQRY: - case RQRY_CONT: - #if WORKLOAD == YCSB - msg = new YCSBQueryMessage; - #elif WORKLOAD == TPCC - msg = new TPCCQueryMessage; - #elif WORKLOAD == PPS - msg = new PPSQueryMessage; - #elif WORKLOAD == DA - msg = new DAQueryMessage; - #endif - msg->init(); - break; - case RFIN: - msg = new FinishMessage; - break; - case RQRY_RSP: - msg = new QueryResponseMessage; - break; - case LOG_MSG: - msg = new LogMessage; - break; - case LOG_MSG_RSP: - msg = new LogRspMessage; - break; - case LOG_FLUSHED: - msg = new LogFlushedMessage; - break; - case CALVIN_ACK: - case RACK_PREP: - case RACK_FIN: - msg = new AckMessage; - break; - case CL_QRY: - case RTXN: - case RTXN_CONT: - #if WORKLOAD == YCSB - msg = new YCSBClientQueryMessage; - #elif WORKLOAD == TPCC - msg = new TPCCClientQueryMessage; - #elif WORKLOAD == PPS - msg = new PPSClientQueryMessage; - #elif WORKLOAD == DA - msg = new DAClientQueryMessage; - #endif - msg->init(); - break; - case RPREPARE: - msg = new PrepareMessage; - break; - case RFWD: - msg = new ForwardMessage; - break; - case RDONE: - msg = new DoneMessage; - break; - case CL_RSP: - msg = new ClientResponseMessage; - break; - default: - assert(false); - } - assert(msg); - msg->rtype = rtype; - msg->txn_id = UINT64_MAX; - msg->batch_id = UINT64_MAX; - msg->return_node_id = g_node_id; - msg->wq_time = 0; - msg->mq_time = 0; - msg->ntwk_time = 0; - - msg->lat_work_queue_time = 0; - msg->lat_msg_queue_time = 0; - msg->lat_cc_block_time = 0; - msg->lat_cc_time = 0; - msg->lat_process_time = 0; - msg->lat_network_time = 0; - msg->lat_other_time = 0; - - - return msg; -} - -uint64_t Message::mget_size() { - uint64_t size = 0; - size += sizeof(RemReqType); - size += sizeof(uint64_t); -#if CC_ALG == CALVIN - size += sizeof(uint64_t); -#endif - // for stats, send message queue time - size += sizeof(uint64_t); - - // for stats, latency - size += sizeof(uint64_t) * 7; - return size; -} - -void Message::mcopy_from_txn(TxnManager * txn) { - txn_id = txn->get_txn_id(); -#if CC_ALG == CALVIN - batch_id = txn->get_batch_id(); -#endif -} - -void Message::mcopy_to_txn(TxnManager* txn) { txn->return_id = return_node_id; } - -void Message::mcopy_from_buf(char * buf) { - uint64_t ptr = 0; - COPY_VAL(rtype,buf,ptr); - COPY_VAL(txn_id,buf,ptr); -#if CC_ALG == CALVIN - COPY_VAL(batch_id,buf,ptr); -#endif - COPY_VAL(mq_time,buf,ptr); - - COPY_VAL(lat_work_queue_time,buf,ptr); - COPY_VAL(lat_msg_queue_time,buf,ptr); - COPY_VAL(lat_cc_block_time,buf,ptr); - COPY_VAL(lat_cc_time,buf,ptr); - COPY_VAL(lat_process_time,buf,ptr); - COPY_VAL(lat_network_time,buf,ptr); - COPY_VAL(lat_other_time,buf,ptr); - if ((CC_ALG == CALVIN && rtype == CALVIN_ACK && txn_id % g_node_cnt == g_node_id) || - (CC_ALG != CALVIN && IS_LOCAL(txn_id))) { - lat_network_time = (get_sys_clock() - lat_network_time) - lat_other_time; - } else { - lat_other_time = get_sys_clock(); - } -} - -void Message::mcopy_to_buf(char * buf) { - uint64_t ptr = 0; - COPY_BUF(buf,rtype,ptr); - COPY_BUF(buf,txn_id,ptr); -#if CC_ALG == CALVIN - COPY_BUF(buf,batch_id,ptr); -#endif - COPY_BUF(buf,mq_time,ptr); - - COPY_BUF(buf,lat_work_queue_time,ptr); - COPY_BUF(buf,lat_msg_queue_time,ptr); - COPY_BUF(buf,lat_cc_block_time,ptr); - COPY_BUF(buf,lat_cc_time,ptr); - COPY_BUF(buf,lat_process_time,ptr); - if ((CC_ALG == CALVIN && rtype == CL_QRY && txn_id % g_node_cnt == g_node_id) || - (CC_ALG != CALVIN && IS_LOCAL(txn_id))) { - lat_network_time = get_sys_clock(); - } else { - lat_other_time = get_sys_clock() - lat_other_time; - } - - COPY_BUF(buf,lat_network_time,ptr); - COPY_BUF(buf,lat_other_time,ptr); -} - -void Message::release_message(Message * msg) { - switch(msg->rtype) { - case INIT_DONE: { - InitDoneMessage * m_msg = (InitDoneMessage*)msg; - m_msg->release(); - delete m_msg; - break; - } - case RQRY: - case RQRY_CONT: { - #if WORKLOAD == YCSB - YCSBQueryMessage * m_msg = (YCSBQueryMessage*)msg; - #elif WORKLOAD == TPCC - TPCCQueryMessage * m_msg = (TPCCQueryMessage*)msg; - #elif WORKLOAD == PPS - PPSQueryMessage * m_msg = (PPSQueryMessage*)msg; - #elif WORKLOAD == DA - DAQueryMessage* m_msg = (DAQueryMessage*)msg; - #endif - m_msg->release(); - delete m_msg; - break; - } - case RFIN: { - FinishMessage * m_msg = (FinishMessage*)msg; - m_msg->release(); - delete m_msg; - break; - } - case RQRY_RSP: { - QueryResponseMessage * m_msg = (QueryResponseMessage*)msg; - m_msg->release(); - delete m_msg; - break; - } - case LOG_MSG: { - LogMessage * m_msg = (LogMessage*)msg; - m_msg->release(); - delete m_msg; - break; - } - case LOG_MSG_RSP: { - LogRspMessage * m_msg = (LogRspMessage*)msg; - m_msg->release(); - delete m_msg; - break; - } - case LOG_FLUSHED: { - LogFlushedMessage * m_msg = (LogFlushedMessage*)msg; - m_msg->release(); - delete m_msg; - break; - } - case CALVIN_ACK: - case RACK_PREP: - case RACK_FIN: { - AckMessage * m_msg = (AckMessage*)msg; - m_msg->release(); - delete m_msg; - break; - } - case CL_QRY: - case RTXN: - case RTXN_CONT: { - #if WORKLOAD == YCSB - YCSBClientQueryMessage * m_msg = (YCSBClientQueryMessage*)msg; - #elif WORKLOAD == TPCC - TPCCClientQueryMessage * m_msg = (TPCCClientQueryMessage*)msg; - #elif WORKLOAD == PPS - PPSClientQueryMessage * m_msg = (PPSClientQueryMessage*)msg; - #elif WORKLOAD == DA - DAClientQueryMessage* m_msg = (DAClientQueryMessage*)msg; - #endif - m_msg->release(); - delete m_msg; - break; - } - case RPREPARE: { - PrepareMessage * m_msg = (PrepareMessage*)msg; - m_msg->release(); - delete m_msg; - break; - } - case RFWD: { - ForwardMessage * m_msg = (ForwardMessage*)msg; - m_msg->release(); - delete m_msg; - break; - } - case RDONE: { - DoneMessage * m_msg = (DoneMessage*)msg; - m_msg->release(); - delete m_msg; - break; - } - case CL_RSP: { - ClientResponseMessage * m_msg = (ClientResponseMessage*)msg; - m_msg->release(); - delete m_msg; - break; - } - default: { - assert(false); - } - } -} -/************************/ - -uint64_t QueryMessage::get_size() { - uint64_t size = Message::mget_size(); -#if CC_ALG == WAIT_DIE || CC_ALG == TIMESTAMP || CC_ALG == MVCC - size += sizeof(ts); -#endif -#if CC_ALG == OCC || CC_ALG == FOCC || CC_ALG == BOCC || CC_ALG == SSI || CC_ALG == WSI - size += sizeof(start_ts); -#endif - return size; -} - -void QueryMessage::copy_from_txn(TxnManager * txn) { - Message::mcopy_from_txn(txn); -#if CC_ALG == WAIT_DIE || CC_ALG == TIMESTAMP || CC_ALG == MVCC - ts = txn->get_timestamp(); - assert(ts != 0); -#endif -#if CC_ALG == OCC || CC_ALG == FOCC || CC_ALG == BOCC || CC_ALG == SSI || CC_ALG == WSI - start_ts = txn->get_start_timestamp(); -#endif -} - -void QueryMessage::copy_to_txn(TxnManager * txn) { - Message::mcopy_to_txn(txn); -#if CC_ALG == WAIT_DIE || CC_ALG == TIMESTAMP || CC_ALG == MVCC - assert(ts != 0); - txn->set_timestamp(ts); -#endif -#if CC_ALG == OCC || CC_ALG == FOCC || CC_ALG == BOCC || CC_ALG == SSI || CC_ALG == WSI - txn->set_start_timestamp(start_ts); -#endif -} - -void QueryMessage::copy_from_buf(char * buf) { - Message::mcopy_from_buf(buf); - uint64_t ptr __attribute__ ((unused)); - ptr = Message::mget_size(); -#if CC_ALG == WAIT_DIE || CC_ALG == TIMESTAMP || CC_ALG == MVCC - COPY_VAL(ts,buf,ptr); - assert(ts != 0); -#endif -#if CC_ALG == OCC || CC_ALG == FOCC || CC_ALG == BOCC || CC_ALG == SSI || CC_ALG == WSI - COPY_VAL(start_ts,buf,ptr); -#endif -} - -void QueryMessage::copy_to_buf(char * buf) { - Message::mcopy_to_buf(buf); - uint64_t ptr __attribute__ ((unused)); - ptr = Message::mget_size(); -#if CC_ALG == WAIT_DIE || CC_ALG == TIMESTAMP || CC_ALG == MVCC - COPY_BUF(buf,ts,ptr); - assert(ts != 0); -#endif -#if CC_ALG == OCC || CC_ALG == FOCC || CC_ALG == BOCC || CC_ALG == SSI || CC_ALG == WSI - COPY_BUF(buf,start_ts,ptr); -#endif -} - -/************************/ - -void YCSBClientQueryMessage::init() {} - -void YCSBClientQueryMessage::release() { - ClientQueryMessage::release(); - // Freeing requests is the responsibility of txn at commit time - requests.release(); -} - -uint64_t YCSBClientQueryMessage::get_size() { - uint64_t size = ClientQueryMessage::get_size(); - size += sizeof(size_t); - size += sizeof(ycsb_request) * requests.size(); - return size; -} - -void YCSBClientQueryMessage::copy_from_query(BaseQuery * query) { - ClientQueryMessage::copy_from_query(query); - - requests.copy(((YCSBQuery*)(query))->requests); -} - - -void YCSBClientQueryMessage::copy_from_txn(TxnManager * txn) { - ClientQueryMessage::mcopy_from_txn(txn); - - requests.copy(((YCSBQuery*)(txn->query))->requests); -} - -void YCSBClientQueryMessage::copy_to_txn(TxnManager * txn) { - // this only copies over the pointers, so if requests are freed, we'll lose the request data - ClientQueryMessage::copy_to_txn(txn); - // Copies pointers to txn - ((YCSBQuery*)(txn->query))->requests.append(requests); -} - -void YCSBClientQueryMessage::copy_from_buf(char * buf) { - ClientQueryMessage::copy_from_buf(buf); - uint64_t ptr = ClientQueryMessage::get_size(); - size_t size; - - COPY_VAL(size,buf,ptr); - requests.init(size); - - for(uint64_t i = 0 ; i < size;i++) { - DEBUG_M("YCSBClientQueryMessage::copy ycsb_request alloc\n"); - ycsb_request * req = (ycsb_request*)mem_allocator.alloc(sizeof(ycsb_request)); - COPY_VAL(*req,buf,ptr); - - assert(req->key < g_synth_table_size); - requests.add(req); - } - assert(ptr == get_size()); -} - -void YCSBClientQueryMessage::copy_to_buf(char * buf) { - ClientQueryMessage::copy_to_buf(buf); - uint64_t ptr = ClientQueryMessage::get_size(); - - size_t size = requests.size(); - COPY_BUF(buf,size,ptr); - - for(uint64_t i = 0; i < requests.size(); i++) { - ycsb_request * req = requests[i]; - assert(req->key < g_synth_table_size); - COPY_BUF(buf,*req,ptr); - - } - assert(ptr == get_size()); -} -/************************/ - -void TPCCClientQueryMessage::init() {} - -void TPCCClientQueryMessage::release() { - ClientQueryMessage::release(); - // Freeing requests is the responsibility of txn - - items.release(); -} - -uint64_t TPCCClientQueryMessage::get_size() { - uint64_t size = ClientQueryMessage::get_size(); - size += sizeof(uint64_t) * 10; - size += sizeof(char) * LASTNAME_LEN; - size += sizeof(bool) * 3; - size += sizeof(size_t); - size += sizeof(Item_no) * items.size(); - return size; -} - -void TPCCClientQueryMessage::copy_from_query(BaseQuery * query) { - ClientQueryMessage::copy_from_query(query); - TPCCQuery* tpcc_query = (TPCCQuery*)(query); - - txn_type = tpcc_query->txn_type; - // common txn input for both payment & new-order - w_id = tpcc_query->w_id; - d_id = tpcc_query->d_id; - c_id = tpcc_query->c_id; - - // payment - d_w_id = tpcc_query->d_w_id; - c_w_id = tpcc_query->c_w_id; - c_d_id = tpcc_query->c_d_id; - strcpy(c_last,tpcc_query->c_last); - h_amount = tpcc_query->h_amount; - by_last_name = tpcc_query->by_last_name; - - // new order - items.copy(tpcc_query->items); - rbk = tpcc_query->rbk; - remote = tpcc_query->remote; - ol_cnt = tpcc_query->ol_cnt; - o_entry_d = tpcc_query->o_entry_d; -} - - -void TPCCClientQueryMessage::copy_from_txn(TxnManager * txn) { - ClientQueryMessage::mcopy_from_txn(txn); - copy_from_query(txn->query); -} - -void TPCCClientQueryMessage::copy_to_txn(TxnManager * txn) { - ClientQueryMessage::copy_to_txn(txn); - TPCCQuery* tpcc_query = (TPCCQuery*)(txn->query); - - txn->client_id = return_node_id; - - - tpcc_query->txn_type = (TPCCTxnType)txn_type; - if(tpcc_query->txn_type == TPCC_PAYMENT) - ((TPCCTxnManager*)txn)->state = TPCC_PAYMENT0; - else if (tpcc_query->txn_type == TPCC_NEW_ORDER) - ((TPCCTxnManager*)txn)->state = TPCC_NEWORDER0; - // common txn input for both payment & new-order - tpcc_query->w_id = w_id; - tpcc_query->d_id = d_id; - tpcc_query->c_id = c_id; - - // payment - tpcc_query->d_w_id = d_w_id; - tpcc_query->c_w_id = c_w_id; - tpcc_query->c_d_id = c_d_id; - strcpy(tpcc_query->c_last,c_last); - tpcc_query->h_amount = h_amount; - tpcc_query->by_last_name = by_last_name; - - // new order - tpcc_query->items.append(items); - tpcc_query->rbk = rbk; - tpcc_query->remote = remote; - tpcc_query->ol_cnt = ol_cnt; - tpcc_query->o_entry_d = o_entry_d; - -} - -void TPCCClientQueryMessage::copy_from_buf(char * buf) { - ClientQueryMessage::copy_from_buf(buf); - uint64_t ptr = ClientQueryMessage::get_size(); - - COPY_VAL(txn_type,buf,ptr); - // common txn input for both payment & new-order - COPY_VAL(w_id,buf,ptr); - COPY_VAL(d_id,buf,ptr); - COPY_VAL(c_id,buf,ptr); - - // payment - COPY_VAL(d_w_id,buf,ptr); - COPY_VAL(c_w_id,buf,ptr); - COPY_VAL(c_d_id,buf,ptr); - COPY_VAL(c_last,buf,ptr); - COPY_VAL(h_amount,buf,ptr); - COPY_VAL(by_last_name,buf,ptr); - - // new order - size_t size; - COPY_VAL(size,buf,ptr); - items.init(size); - for(uint64_t i = 0 ; i < size;i++) { - DEBUG_M("TPCCClientQueryMessage::copy_from_buf item alloc\n"); - Item_no * item = (Item_no*)mem_allocator.alloc(sizeof(Item_no)); - COPY_VAL(*item,buf,ptr); - items.add(item); - } - - COPY_VAL(rbk,buf,ptr); - COPY_VAL(remote,buf,ptr); - COPY_VAL(ol_cnt,buf,ptr); - COPY_VAL(o_entry_d,buf,ptr); - - assert(ptr == get_size()); -} - -void TPCCClientQueryMessage::copy_to_buf(char * buf) { - ClientQueryMessage::copy_to_buf(buf); - uint64_t ptr = ClientQueryMessage::get_size(); - - COPY_BUF(buf,txn_type,ptr); - // common txn input for both payment & new-order - COPY_BUF(buf,w_id,ptr); - COPY_BUF(buf,d_id,ptr); - COPY_BUF(buf,c_id,ptr); - - // payment - COPY_BUF(buf,d_w_id,ptr); - COPY_BUF(buf,c_w_id,ptr); - COPY_BUF(buf,c_d_id,ptr); - COPY_BUF(buf,c_last,ptr); - COPY_BUF(buf,h_amount,ptr); - COPY_BUF(buf,by_last_name,ptr); - - size_t size = items.size(); - COPY_BUF(buf,size,ptr); - for(uint64_t i = 0; i < items.size(); i++) { - Item_no * item = items[i]; - COPY_BUF(buf,*item,ptr); - } - - COPY_BUF(buf,rbk,ptr); - COPY_BUF(buf,remote,ptr); - COPY_BUF(buf,ol_cnt,ptr); - COPY_BUF(buf,o_entry_d,ptr); - assert(ptr == get_size()); -} - -/************************/ - -/************************/ - -void PPSClientQueryMessage::init() {} - -void PPSClientQueryMessage::release() { ClientQueryMessage::release(); } - -uint64_t PPSClientQueryMessage::get_size() { - uint64_t size = ClientQueryMessage::get_size(); - size += sizeof(uint64_t); - size += sizeof(uint64_t)*3; - size += sizeof(size_t); - size += sizeof(uint64_t) * part_keys.size(); -#if CC_ALG == CALVIN - size += sizeof(bool); -#endif - return size; -} - -void PPSClientQueryMessage::copy_from_query(BaseQuery * query) { - ClientQueryMessage::copy_from_query(query); - PPSQuery* pps_query = (PPSQuery*)(query); - - txn_type = pps_query->txn_type; - - part_key = pps_query->part_key; - product_key = pps_query->product_key; - supplier_key = pps_query->supplier_key; - - part_keys.copy(pps_query->part_keys); - -} - - -void PPSClientQueryMessage::copy_from_txn(TxnManager * txn) { - ClientQueryMessage::mcopy_from_txn(txn); - copy_from_query(txn->query); -#if CC_ALG == CALVIN - recon = txn->isRecon(); -#endif -} - -void PPSClientQueryMessage::copy_to_txn(TxnManager * txn) { - ClientQueryMessage::copy_to_txn(txn); - PPSQuery* pps_query = (PPSQuery*)(txn->query); - - txn->client_id = return_node_id; - pps_query->txn_type = (PPSTxnType)txn_type; - if(pps_query->txn_type == PPS_GETPART) - ((PPSTxnManager*)txn)->state = PPS_GETPART0; - else if(pps_query->txn_type == PPS_GETPRODUCT) - ((PPSTxnManager*)txn)->state = PPS_GETPRODUCT0; - else if(pps_query->txn_type == PPS_GETSUPPLIER) - ((PPSTxnManager*)txn)->state = PPS_GETSUPPLIER0; - else if(pps_query->txn_type == PPS_GETPARTBYPRODUCT) - ((PPSTxnManager*)txn)->state = PPS_GETPARTBYPRODUCT0; - else if(pps_query->txn_type == PPS_GETPARTBYSUPPLIER) - ((PPSTxnManager*)txn)->state = PPS_GETPARTBYSUPPLIER0; - else if(pps_query->txn_type == PPS_ORDERPRODUCT) - ((PPSTxnManager*)txn)->state = PPS_ORDERPRODUCT0; - else if(pps_query->txn_type == PPS_UPDATEPRODUCTPART) - ((PPSTxnManager*)txn)->state = PPS_UPDATEPRODUCTPART0; - else if(pps_query->txn_type == PPS_UPDATEPART) - ((PPSTxnManager*)txn)->state = PPS_UPDATEPART0; - pps_query->part_key = part_key; - pps_query->product_key = product_key; - pps_query->supplier_key = supplier_key; - pps_query->part_keys.append(part_keys); - -#if CC_ALG == CALVIN - txn->recon = recon; -#endif -#if DEBUG_DISTR - std::cout << "PPSClient::copy_to_txn " - << "type " << (PPSTxnType)txn_type << " part_key " << part_key << " product_key " - << product_key << " supplier_key " << supplier_key << std::endl; -#endif -} - -void PPSClientQueryMessage::copy_from_buf(char * buf) { - ClientQueryMessage::copy_from_buf(buf); - uint64_t ptr = ClientQueryMessage::get_size(); - - COPY_VAL(txn_type,buf,ptr); - // common txn input for both payment & new-order - COPY_VAL(part_key,buf,ptr); - COPY_VAL(product_key,buf,ptr); - COPY_VAL(supplier_key,buf,ptr); - - size_t size; - COPY_VAL(size,buf,ptr); - part_keys.init(size); - for(uint64_t i = 0 ; i < size;i++) { - uint64_t item; - COPY_VAL(item,buf,ptr); - part_keys.add(item); - } - -#if CC_ALG == CALVIN - COPY_VAL(recon,buf,ptr); -#endif - - assert(ptr == get_size()); -#if DEBUG_DISTR - std::cout << "PPSClient::copy_from_buf " - << "type " << (PPSTxnType)txn_type << " part_key " << part_key << " product_key " - << product_key << " supplier_key " << supplier_key << std::endl; -#endif -} - -void PPSClientQueryMessage::copy_to_buf(char * buf) { - ClientQueryMessage::copy_to_buf(buf); - uint64_t ptr = ClientQueryMessage::get_size(); - - COPY_BUF(buf,txn_type,ptr); - // common txn input for both payment & new-order - COPY_BUF(buf,part_key,ptr); - COPY_BUF(buf,product_key,ptr); - COPY_BUF(buf,supplier_key,ptr); - - size_t size = part_keys.size(); - COPY_BUF(buf,size,ptr); - for(uint64_t i = 0; i < part_keys.size(); i++) { - uint64_t item = part_keys[i]; - COPY_BUF(buf,item,ptr); - } - -#if CC_ALG == CALVIN - COPY_BUF(buf,recon,ptr); -#endif - - assert(ptr == get_size()); -#if DEBUG_DISTR - std::cout << "PPSClient::copy_to_buf " - << "type " << (PPSTxnType)txn_type << " part_key " << part_key << " product_key " - << product_key << " supplier_key " << supplier_key << std::endl; -#endif -} - - -/***************DA zone*********/ -void DAClientQueryMessage::init() {} -void DAClientQueryMessage::copy_from_query(BaseQuery* query) { - ClientQueryMessage::copy_from_query(query); - DAQuery* da_query = (DAQuery*)(query); - - txn_type= da_query->txn_type; - trans_id= da_query->trans_id; - item_id= da_query->item_id; - seq_id= da_query->seq_id; - write_version=da_query->write_version; - state= da_query->state; - next_state= da_query->next_state; - last_state= da_query->last_state; -} -void DAClientQueryMessage::copy_to_buf(char* buf) { - ClientQueryMessage::copy_to_buf(buf); - uint64_t ptr = ClientQueryMessage::get_size(); - - COPY_BUF(buf, txn_type, ptr); - COPY_BUF(buf, trans_id, ptr); - COPY_BUF(buf, item_id, ptr); - COPY_BUF(buf, seq_id, ptr); - COPY_BUF(buf, write_version, ptr); - COPY_BUF(buf, state, ptr); - COPY_BUF(buf, next_state, ptr); - COPY_BUF(buf, last_state, ptr); - assert(ptr == get_size()); -} -void DAClientQueryMessage::copy_from_txn(TxnManager* txn) { - ClientQueryMessage::mcopy_from_txn(txn); - copy_from_query(txn->query); -} - -void DAClientQueryMessage::copy_from_buf(char* buf) { - ClientQueryMessage::copy_from_buf(buf); - uint64_t ptr = ClientQueryMessage::get_size(); - - COPY_VAL(txn_type, buf, ptr); - // common txn input for both payment & new-order - COPY_VAL(trans_id, buf, ptr); - COPY_VAL(item_id, buf, ptr); - COPY_VAL(seq_id, buf, ptr); - COPY_VAL(write_version, buf, ptr); - // payment - COPY_VAL(state, buf, ptr); - COPY_VAL(next_state, buf, ptr); - COPY_VAL(last_state, buf, ptr); - assert(ptr == get_size()); -} - -void DAClientQueryMessage::copy_to_txn(TxnManager* txn) { - ClientQueryMessage::copy_to_txn(txn); - DAQuery* da_query = (DAQuery*)(txn->query); - - - txn->client_id = return_node_id; - da_query->txn_type = (DATxnType)txn_type; - da_query->trans_id = trans_id; - da_query->item_id = item_id; - da_query->seq_id = seq_id; - da_query->write_version = write_version; - da_query->state = state; - da_query->next_state = next_state; - da_query->last_state = last_state; - -} - -uint64_t DAClientQueryMessage::get_size() { - uint64_t size = ClientQueryMessage::get_size(); - size += sizeof(DATxnType); - size += sizeof(uint64_t) * 7; - return size; - -} -void DAClientQueryMessage::release() { ClientQueryMessage::release(); } - -/************************/ - -void ClientQueryMessage::init() { first_startts = 0; } - -void ClientQueryMessage::release() { - partitions.release(); - first_startts = 0; -} - -uint64_t ClientQueryMessage::get_size() { - uint64_t size = Message::mget_size(); - size += sizeof(client_startts); - /* - uint64_t size = sizeof(ClientQueryMessage); - */ - size += sizeof(size_t); - size += sizeof(uint64_t) * partitions.size(); - return size; -} - -void ClientQueryMessage::copy_from_query(BaseQuery * query) { - partitions.clear(); - partitions.copy(query->partitions); -} - -void ClientQueryMessage::copy_from_txn(TxnManager * txn) { - Message::mcopy_from_txn(txn); - //ts = txn->txn->timestamp; - partitions.clear(); - partitions.copy(txn->query->partitions); - client_startts = txn->client_startts; -} - -void ClientQueryMessage::copy_to_txn(TxnManager * txn) { - Message::mcopy_to_txn(txn); - //txn->txn->timestamp = ts; - txn->query->partitions.clear(); - txn->query->partitions.append(partitions); - txn->client_startts = client_startts; - txn->client_id = return_node_id; -} - -void ClientQueryMessage::copy_from_buf(char * buf) { - Message::mcopy_from_buf(buf); - uint64_t ptr = Message::mget_size(); - //COPY_VAL(ts,buf,ptr); - COPY_VAL(client_startts,buf,ptr); - size_t size; - COPY_VAL(size,buf,ptr); - partitions.init(size); - for(uint64_t i = 0; i < size; i++) { - //COPY_VAL(partitions[i],buf,ptr); - uint64_t part; - COPY_VAL(part,buf,ptr); - partitions.add(part); - } -} - -void ClientQueryMessage::copy_to_buf(char * buf) { - Message::mcopy_to_buf(buf); - uint64_t ptr = Message::mget_size(); - //COPY_BUF(buf,ts,ptr); - COPY_BUF(buf,client_startts,ptr); - size_t size = partitions.size(); - COPY_BUF(buf,size,ptr); - for(uint64_t i = 0; i < size; i++) { - uint64_t part = partitions[i]; - COPY_BUF(buf,part,ptr); - } -} - -/************************/ - - -uint64_t ClientResponseMessage::get_size() { - uint64_t size = Message::mget_size(); - size += sizeof(uint64_t); - return size; -} - -void ClientResponseMessage::copy_from_txn(TxnManager * txn) { - Message::mcopy_from_txn(txn); - client_startts = txn->client_startts; -} - -void ClientResponseMessage::copy_to_txn(TxnManager * txn) { - Message::mcopy_to_txn(txn); - txn->client_startts = client_startts; -} - -void ClientResponseMessage::copy_from_buf(char * buf) { - Message::mcopy_from_buf(buf); - uint64_t ptr = Message::mget_size(); - COPY_VAL(client_startts,buf,ptr); - assert(ptr == get_size()); -} - -void ClientResponseMessage::copy_to_buf(char * buf) { - Message::mcopy_to_buf(buf); - uint64_t ptr = Message::mget_size(); - COPY_BUF(buf,client_startts,ptr); - assert(ptr == get_size()); -} - -/************************/ - -uint64_t DoneMessage::get_size() { - uint64_t size = Message::mget_size(); - return size; -} - -void DoneMessage::copy_from_txn(TxnManager* txn) { Message::mcopy_from_txn(txn); } - -void DoneMessage::copy_to_txn(TxnManager* txn) { Message::mcopy_to_txn(txn); } - -void DoneMessage::copy_from_buf(char * buf) { - Message::mcopy_from_buf(buf); - uint64_t ptr = Message::mget_size(); - assert(ptr == get_size()); -} - -void DoneMessage::copy_to_buf(char * buf) { - Message::mcopy_to_buf(buf); - uint64_t ptr = Message::mget_size(); - assert(ptr == get_size()); -} - -/************************/ - - -uint64_t ForwardMessage::get_size() { - uint64_t size = Message::mget_size(); - size += sizeof(RC); -#if WORKLOAD == TPCC - size += sizeof(uint64_t); -#endif - return size; -} - -void ForwardMessage::copy_from_txn(TxnManager * txn) { - Message::mcopy_from_txn(txn); - rc = txn->get_rc(); -#if WORKLOAD == TPCC - o_id = ((TPCCQuery*)txn->query)->o_id; -#endif -} - -void ForwardMessage::copy_to_txn(TxnManager * txn) { - // Don't copy return ID - //Message::mcopy_to_txn(txn); -#if WORKLOAD == TPCC - ((TPCCQuery*)txn->query)->o_id = o_id; -#endif -} - -void ForwardMessage::copy_from_buf(char * buf) { - Message::mcopy_from_buf(buf); - uint64_t ptr = Message::mget_size(); - COPY_VAL(rc,buf,ptr); -#if WORKLOAD == TPCC - COPY_VAL(o_id,buf,ptr); -#endif - assert(ptr == get_size()); -} - -void ForwardMessage::copy_to_buf(char * buf) { - Message::mcopy_to_buf(buf); - uint64_t ptr = Message::mget_size(); - COPY_BUF(buf,rc,ptr); -#if WORKLOAD == TPCC - COPY_BUF(buf,o_id,ptr); -#endif - assert(ptr == get_size()); -} - -/************************/ - -uint64_t PrepareMessage::get_size() { - uint64_t size = Message::mget_size(); -#if CC_ALG == SUNDIAL - size += sizeof(uint64_t); -#endif - return size; -} - -void PrepareMessage::copy_from_txn(TxnManager * txn) { - Message::mcopy_from_txn(txn); -#if CC_ALG == SUNDIAL - _min_commit_ts = txn->_min_commit_ts; -#endif -} -void PrepareMessage::copy_to_txn(TxnManager * txn) { - Message::mcopy_to_txn(txn); -} -void PrepareMessage::copy_from_buf(char * buf) { - Message::mcopy_from_buf(buf); - uint64_t ptr = Message::mget_size(); -#if CC_ALG == SUNDIAL - COPY_VAL(_min_commit_ts,buf,ptr); -#endif - assert(ptr == get_size()); -} - -void PrepareMessage::copy_to_buf(char * buf) { - Message::mcopy_to_buf(buf); - uint64_t ptr = Message::mget_size(); -#if CC_ALG == SUNDIAL - COPY_BUF(buf,_min_commit_ts,ptr); -#endif - assert(ptr == get_size()); -} - -/************************/ - -uint64_t AckMessage::get_size() { - uint64_t size = Message::mget_size(); - size += sizeof(RC); -#if CC_ALG == MAAT - size += sizeof(uint64_t) * 2; -#endif -#if CC_ALG == SILO - size += sizeof(uint64_t); -#endif -#if WORKLOAD == PPS && CC_ALG == CALVIN - size += sizeof(size_t); - size += sizeof(uint64_t) * part_keys.size(); -#endif - return size; -} - -void AckMessage::copy_from_txn(TxnManager * txn) { - Message::mcopy_from_txn(txn); - rc = txn->get_rc(); -#if CC_ALG == MAAT - lower = time_table.get_lower(txn->get_thd_id(),txn->get_txn_id()); - upper = time_table.get_upper(txn->get_thd_id(),txn->get_txn_id()); -#endif -#if CC_ALG == SILO - max_tid = txn->max_tid; -#endif - -#if WORKLOAD == PPS && CC_ALG == CALVIN - PPSQuery* pps_query = (PPSQuery*)(txn->query); - part_keys.copy(pps_query->part_keys); -#endif -} - -void AckMessage::copy_to_txn(TxnManager * txn) { - Message::mcopy_to_txn(txn); -#if WORKLOAD == PPS && CC_ALG == CALVIN - - PPSQuery* pps_query = (PPSQuery*)(txn->query); - pps_query->part_keys.append(part_keys); -#endif -} - -void AckMessage::copy_from_buf(char * buf) { - Message::mcopy_from_buf(buf); - uint64_t ptr = Message::mget_size(); - COPY_VAL(rc,buf,ptr); -#if CC_ALG == MAAT - COPY_VAL(lower,buf,ptr); - COPY_VAL(upper,buf,ptr); -#endif -#if CC_ALG == SILO - COPY_VAL(max_tid,buf,ptr); -#endif -#if WORKLOAD == PPS && CC_ALG == CALVIN - - size_t size; - COPY_VAL(size,buf,ptr); - part_keys.init(size); - for(uint64_t i = 0 ; i < size;i++) { - uint64_t item; - COPY_VAL(item,buf,ptr); - part_keys.add(item); - } -#endif - assert(ptr == get_size()); -} - -void AckMessage::copy_to_buf(char * buf) { - Message::mcopy_to_buf(buf); - uint64_t ptr = Message::mget_size(); - COPY_BUF(buf,rc,ptr); -#if CC_ALG == MAAT - COPY_BUF(buf,lower,ptr); - COPY_BUF(buf,upper,ptr); -#endif -#if CC_ALG == SILO - COPY_BUF(buf,max_tid,ptr); -#endif -#if WORKLOAD == PPS && CC_ALG == CALVIN - - size_t size = part_keys.size(); - COPY_BUF(buf,size,ptr); - for(uint64_t i = 0; i < part_keys.size(); i++) { - uint64_t item = part_keys[i]; - COPY_BUF(buf,item,ptr); - } -#endif - assert(ptr == get_size()); -} -/************************/ - -uint64_t QueryResponseMessage::get_size() { - uint64_t size = Message::mget_size(); - size += sizeof(RC); -#if CC_ALG == SUNDIAL - size += sizeof(uint64_t); -#endif - return size; -} - -void QueryResponseMessage::copy_from_txn(TxnManager * txn) { - Message::mcopy_from_txn(txn); - rc = txn->get_rc(); -#if CC_ALG == SUNDIAL - _min_commit_ts = txn->_min_commit_ts; -#endif -} - -void QueryResponseMessage::copy_to_txn(TxnManager * txn) { - Message::mcopy_to_txn(txn); - //query->rc = rc; -} - -void QueryResponseMessage::copy_from_buf(char * buf) { - Message::mcopy_from_buf(buf); - uint64_t ptr = Message::mget_size(); - COPY_VAL(rc,buf,ptr); -#if CC_ALG == SUNDIAL - COPY_VAL(_min_commit_ts,buf,ptr); -#endif - - assert(ptr == get_size()); -} - -void QueryResponseMessage::copy_to_buf(char * buf) { - Message::mcopy_to_buf(buf); - uint64_t ptr = Message::mget_size(); - COPY_BUF(buf,rc,ptr); -#if CC_ALG == SUNDIAL - COPY_BUF(buf,_min_commit_ts,ptr); -#endif - assert(ptr == get_size()); -} - -/************************/ - -uint64_t FinishMessage::get_size() { - uint64_t size = Message::mget_size(); - size += sizeof(uint64_t); - size += sizeof(RC); - size += sizeof(bool); -#if CC_ALG == MAAT || CC_ALG == SSI || CC_ALG == WSI || CC_ALG == SILO - size += sizeof(uint64_t); -#endif - return size; -} - -void FinishMessage::copy_from_txn(TxnManager * txn) { - Message::mcopy_from_txn(txn); - rc = txn->get_rc(); - readonly = txn->query->readonly(); - -#if CC_ALG == MAAT || CC_ALG == SSI || CC_ALG == WSI || CC_ALG == SILO - commit_timestamp = txn->get_commit_timestamp(); -#endif -} - -void FinishMessage::copy_to_txn(TxnManager * txn) { - Message::mcopy_to_txn(txn); - -#if CC_ALG == MAAT || CC_ALG == SSI || CC_ALG == WSI || CC_ALG == SILO - txn->commit_timestamp = commit_timestamp; -#endif -} - -void FinishMessage::copy_from_buf(char * buf) { - Message::mcopy_from_buf(buf); - uint64_t ptr = Message::mget_size(); - COPY_VAL(pid,buf,ptr); - COPY_VAL(rc,buf,ptr); - COPY_VAL(readonly,buf,ptr); -#if CC_ALG == MAAT || CC_ALG == SSI || CC_ALG == WSI || CC_ALG == SILO - COPY_VAL(commit_timestamp,buf,ptr); -#endif - assert(ptr == get_size()); -} - -void FinishMessage::copy_to_buf(char * buf) { - Message::mcopy_to_buf(buf); - uint64_t ptr = Message::mget_size(); - COPY_BUF(buf,pid,ptr); - COPY_BUF(buf,rc,ptr); - COPY_BUF(buf,readonly,ptr); -#if CC_ALG == MAAT || CC_ALG == SSI || CC_ALG == WSI || CC_ALG == SILO - COPY_BUF(buf,commit_timestamp,ptr); -#endif - - assert(ptr == get_size()); -} - -/************************/ - -void LogMessage::release() { -} - -uint64_t LogMessage::get_size() { - uint64_t size = Message::mget_size(); - - return size; -} - -void LogMessage::copy_from_txn(TxnManager* txn) { Message::mcopy_from_txn(txn); } - -void LogMessage::copy_to_txn(TxnManager* txn) { Message::mcopy_to_txn(txn); } - -void LogMessage::copy_from_record(LogRecord* record) { this->record.copyRecord(record); } - -void LogMessage::copy_from_buf(char * buf) { - Message::mcopy_from_buf(buf); - uint64_t ptr = Message::mget_size(); - COPY_VAL(record,buf,ptr); - assert(ptr == get_size()); -} - -void LogMessage::copy_to_buf(char * buf) { - Message::mcopy_to_buf(buf); - uint64_t ptr = Message::mget_size(); - COPY_BUF(buf,record,ptr); - assert(ptr == get_size()); -} - -/************************/ - -uint64_t LogRspMessage::get_size() { - uint64_t size = Message::mget_size(); - return size; -} - -void LogRspMessage::copy_from_txn(TxnManager* txn) { Message::mcopy_from_txn(txn); } - -void LogRspMessage::copy_to_txn(TxnManager* txn) { Message::mcopy_to_txn(txn); } - -void LogRspMessage::copy_from_buf(char * buf) { - Message::mcopy_from_buf(buf); -} - -void LogRspMessage::copy_to_buf(char * buf) { - Message::mcopy_to_buf(buf); - -} - - - -/************************/ - -uint64_t InitDoneMessage::get_size() { - uint64_t size = Message::mget_size(); - return size; -} - -void InitDoneMessage::copy_from_txn(TxnManager* txn) {} - -void InitDoneMessage::copy_to_txn(TxnManager* txn) { Message::mcopy_to_txn(txn); } - -void InitDoneMessage::copy_from_buf(char* buf) { Message::mcopy_from_buf(buf); } - -void InitDoneMessage::copy_to_buf(char* buf) { Message::mcopy_to_buf(buf); } - -/************************/ - -void YCSBQueryMessage::init() {} - -void YCSBQueryMessage::release() { - QueryMessage::release(); - // Freeing requests is the responsibility of txn - - requests.release(); -} - -uint64_t YCSBQueryMessage::get_size() { - uint64_t size = QueryMessage::get_size(); - size += sizeof(size_t); - size += sizeof(ycsb_request) * requests.size(); - return size; -} - -void YCSBQueryMessage::copy_from_txn(TxnManager * txn) { - QueryMessage::copy_from_txn(txn); - requests.init(g_req_per_query); - ((YCSBTxnManager*)txn)->copy_remote_requests(this); - -} - -void YCSBQueryMessage::copy_to_txn(TxnManager * txn) { - QueryMessage::copy_to_txn(txn); - -#if CC_ALG==SUNDIAL - ((YCSBQuery*)(txn->query))->requests.clear(); -#endif - ((YCSBQuery*)(txn->query))->requests.append(requests); - ((YCSBQuery*)(txn->query))->orig_request = &requests; -} - -void YCSBQueryMessage::copy_from_buf(char * buf) { - QueryMessage::copy_from_buf(buf); - uint64_t ptr = QueryMessage::get_size(); - size_t size; - COPY_VAL(size,buf,ptr); - assert(size<=g_req_per_query); - requests.init(size); - for(uint64_t i = 0 ; i < size;i++) { - DEBUG_M("YCSBQueryMessage::copy ycsb_request alloc\n"); - ycsb_request * req = (ycsb_request*)mem_allocator.alloc(sizeof(ycsb_request)); - COPY_VAL(*req,buf,ptr); - ASSERT(req->key < g_synth_table_size); - requests.add(req); - } - assert(ptr == get_size()); -} - -void YCSBQueryMessage::copy_to_buf(char * buf) { - QueryMessage::copy_to_buf(buf); - uint64_t ptr = QueryMessage::get_size(); - size_t size = requests.size(); - COPY_BUF(buf,size,ptr); - for(uint64_t i = 0; i < requests.size(); i++) { - ycsb_request * req = requests[i]; - COPY_BUF(buf,*req,ptr); - } - assert(ptr == get_size()); -} -/************************/ - -void TPCCQueryMessage::init() {} - -void TPCCQueryMessage::release() { - QueryMessage::release(); - // Freeing items is the responsibility of txn - - items.release(); -} - -uint64_t TPCCQueryMessage::get_size() { - uint64_t size = QueryMessage::get_size(); - - size += sizeof(uint64_t); //txn_type - size += sizeof(uint64_t); //state - size += sizeof(uint64_t) * 3; // w_id, d_id, c_id - - // Payment - if(txn_type == TPCC_PAYMENT) { - - size += sizeof(uint64_t) * 4; // d_w_id, c_w_id, c_d_id;, h_amount - size += sizeof(char) * LASTNAME_LEN; // c_last[LASTNAME_LEN] - size += sizeof(bool); // by_last_name - - } - - // New Order - if(txn_type == TPCC_NEW_ORDER) { - size += sizeof(uint64_t) * 2; // ol_cnt, o_entry_d, - size += sizeof(bool) * 2; // rbk, remote - size += sizeof(Item_no) * items.size(); - size += sizeof(uint64_t); // items size - } - - return size; -} - -void TPCCQueryMessage::copy_from_txn(TxnManager * txn) { - QueryMessage::copy_from_txn(txn); - TPCCQuery* tpcc_query = (TPCCQuery*)(txn->query); - - txn_type = tpcc_query->txn_type; - state = (uint64_t)((TPCCTxnManager*)txn)->state; - // common txn input for both payment & new-order - w_id = tpcc_query->w_id; - d_id = tpcc_query->d_id; - c_id = tpcc_query->c_id; - - // payment - if(txn_type == TPCC_PAYMENT) { - d_w_id = tpcc_query->d_w_id; - c_w_id = tpcc_query->c_w_id; - c_d_id = tpcc_query->c_d_id; - strcpy(c_last,tpcc_query->c_last); - h_amount = tpcc_query->h_amount; - by_last_name = tpcc_query->by_last_name; - } - - // new order - //items.copy(tpcc_query->items); - if(txn_type == TPCC_NEW_ORDER) { - ((TPCCTxnManager*)txn)->copy_remote_items(this); - rbk = tpcc_query->rbk; - remote = tpcc_query->remote; - ol_cnt = tpcc_query->ol_cnt; - o_entry_d = tpcc_query->o_entry_d; - } - -} - -void TPCCQueryMessage::copy_to_txn(TxnManager * txn) { - QueryMessage::copy_to_txn(txn); - - TPCCQuery* tpcc_query = (TPCCQuery*)(txn->query); - - tpcc_query->txn_type = (TPCCTxnType)txn_type; - ((TPCCTxnManager*)txn)->state = (TPCCRemTxnType)state; - // common txn input for both payment & new-order - tpcc_query->w_id = w_id; - tpcc_query->d_id = d_id; - tpcc_query->c_id = c_id; - - // payment - if(txn_type == TPCC_PAYMENT) { - tpcc_query->d_w_id = d_w_id; - tpcc_query->c_w_id = c_w_id; - tpcc_query->c_d_id = c_d_id; - strcpy(tpcc_query->c_last,c_last); - tpcc_query->h_amount = h_amount; - tpcc_query->by_last_name = by_last_name; - } - - // new order - if(txn_type == TPCC_NEW_ORDER) { -#if CC_ALG==SUNDIAL - tpcc_query->items.clear(); -#endif - tpcc_query->items.append(items); - tpcc_query->rbk = rbk; - tpcc_query->remote = remote; - tpcc_query->ol_cnt = ol_cnt; - tpcc_query->o_entry_d = o_entry_d; - } - - -} - - -void TPCCQueryMessage::copy_from_buf(char * buf) { - QueryMessage::copy_from_buf(buf); - uint64_t ptr = QueryMessage::get_size(); - - COPY_VAL(txn_type,buf,ptr); - assert(txn_type == TPCC_PAYMENT || txn_type == TPCC_NEW_ORDER); - COPY_VAL(state,buf,ptr); - // common txn input for both payment & new-order - COPY_VAL(w_id,buf,ptr); - COPY_VAL(d_id,buf,ptr); - COPY_VAL(c_id,buf,ptr); - - // payment - if(txn_type == TPCC_PAYMENT) { - COPY_VAL(d_w_id,buf,ptr); - COPY_VAL(c_w_id,buf,ptr); - COPY_VAL(c_d_id,buf,ptr); - COPY_VAL(c_last,buf,ptr); - COPY_VAL(h_amount,buf,ptr); - COPY_VAL(by_last_name,buf,ptr); - } - - // new order - if(txn_type == TPCC_NEW_ORDER) { - size_t size; - COPY_VAL(size,buf,ptr); - items.init(size); - for(uint64_t i = 0 ; i < size;i++) { - DEBUG_M("TPCCQueryMessage::copy item alloc\n"); - Item_no * item = (Item_no*)mem_allocator.alloc(sizeof(Item_no)); - COPY_VAL(*item,buf,ptr); - items.add(item); - } - - COPY_VAL(rbk,buf,ptr); - COPY_VAL(remote,buf,ptr); - COPY_VAL(ol_cnt,buf,ptr); - COPY_VAL(o_entry_d,buf,ptr); - } - - assert(ptr == get_size()); - -} - -void TPCCQueryMessage::copy_to_buf(char * buf) { - QueryMessage::copy_to_buf(buf); - uint64_t ptr = QueryMessage::get_size(); - - COPY_BUF(buf,txn_type,ptr); - COPY_BUF(buf,state,ptr); - // common txn input for both payment & new-order - COPY_BUF(buf,w_id,ptr); - COPY_BUF(buf,d_id,ptr); - COPY_BUF(buf,c_id,ptr); - - // payment - if(txn_type == TPCC_PAYMENT) { - COPY_BUF(buf,d_w_id,ptr); - COPY_BUF(buf,c_w_id,ptr); - COPY_BUF(buf,c_d_id,ptr); - COPY_BUF(buf,c_last,ptr); - COPY_BUF(buf,h_amount,ptr); - COPY_BUF(buf,by_last_name,ptr); - } - - if(txn_type == TPCC_NEW_ORDER) { - size_t size = items.size(); - COPY_BUF(buf,size,ptr); - for(uint64_t i = 0; i < items.size(); i++) { - Item_no * item = items[i]; - COPY_BUF(buf,*item,ptr); - } - - COPY_BUF(buf,rbk,ptr); - COPY_BUF(buf,remote,ptr); - COPY_BUF(buf,ol_cnt,ptr); - COPY_BUF(buf,o_entry_d,ptr); - } - assert(ptr == get_size()); -} -/************************/ - -void PPSQueryMessage::init() {} - -void PPSQueryMessage::release() { QueryMessage::release(); } - -uint64_t PPSQueryMessage::get_size() { - uint64_t size = QueryMessage::get_size(); - - size += sizeof(uint64_t); // txn_type - size += sizeof(uint64_t); // state - size += sizeof(uint64_t); // part/product/supply key - size += sizeof(size_t); - size += sizeof(uint64_t) * part_keys.size(); - return size; -} - -void PPSQueryMessage::copy_from_txn(TxnManager * txn) { - QueryMessage::copy_from_txn(txn); - PPSQuery* pps_query = (PPSQuery*)(txn->query); - - txn_type = pps_query->txn_type; - state = (uint64_t)((PPSTxnManager*)txn)->state; - - if (txn_type == PPS_GETPART) { - part_key = pps_query->part_key; - } - if (txn_type == PPS_GETPRODUCT) { - product_key = pps_query->product_key; - } - if (txn_type == PPS_GETSUPPLIER) { - supplier_key = pps_query->supplier_key; - } - if (txn_type == PPS_GETPARTBYPRODUCT) { - //product_key = pps_query->product_key; - part_key = pps_query->part_key; - } - if (txn_type == PPS_GETPARTBYSUPPLIER) { - //supplier_key = pps_query->supplier_key; - part_key = pps_query->part_key; - } - if (txn_type == PPS_ORDERPRODUCT) { - part_key = pps_query->part_key; - } - if (txn_type == PPS_UPDATEPRODUCTPART) { - product_key = pps_query->product_key; - } - if (txn_type == PPS_UPDATEPART) { - part_key = pps_query->part_key; - } - - part_keys.copy(pps_query->part_keys); - -} - -void PPSQueryMessage::copy_to_txn(TxnManager * txn) { - QueryMessage::copy_to_txn(txn); - - PPSQuery* pps_query = (PPSQuery*)(txn->query); - - pps_query->txn_type = (PPSTxnType)txn_type; - ((PPSTxnManager*)txn)->state = (PPSRemTxnType)state; - - if (txn_type == PPS_GETPART) { - pps_query->part_key = part_key; - } - if (txn_type == PPS_GETPRODUCT) { - pps_query->product_key = product_key; - } - if (txn_type == PPS_GETSUPPLIER) { - pps_query->supplier_key = supplier_key; - } - if (txn_type == PPS_GETPARTBYPRODUCT) { - //pps_query->product_key = product_key; - pps_query->part_key = part_key; - } - if (txn_type == PPS_GETPARTBYSUPPLIER) { - //pps_query->supplier_key = supplier_key; - pps_query->part_key = part_key; - } - if (txn_type == PPS_ORDERPRODUCT) { - //pps_query->product_key = product_key; - pps_query->part_key = part_key; - } - if (txn_type == PPS_UPDATEPRODUCTPART) { - pps_query->product_key = product_key; - } - if (txn_type == PPS_UPDATEPART) { - pps_query->part_key = part_key; - } - pps_query->part_keys.append(part_keys); - -} - - -void PPSQueryMessage::copy_from_buf(char * buf) { - QueryMessage::copy_from_buf(buf); - uint64_t ptr = QueryMessage::get_size(); - - COPY_VAL(txn_type,buf,ptr); - COPY_VAL(state,buf,ptr); - if (txn_type == PPS_GETPART) { - COPY_VAL(part_key,buf,ptr); - } - if (txn_type == PPS_GETPRODUCT) { - COPY_VAL(product_key,buf,ptr); - } - if (txn_type == PPS_GETSUPPLIER) { - COPY_VAL(supplier_key,buf,ptr); - } - if (txn_type == PPS_GETPARTBYPRODUCT) { - //COPY_VAL(product_key,buf,ptr); - COPY_VAL(part_key,buf,ptr); - } - if (txn_type == PPS_GETPARTBYSUPPLIER) { - //COPY_VAL(supplier_key,buf,ptr); - COPY_VAL(part_key,buf,ptr); - } - if (txn_type == PPS_ORDERPRODUCT) { - //COPY_VAL(product_key,buf,ptr); - COPY_VAL(part_key,buf,ptr); - } - if (txn_type == PPS_UPDATEPRODUCTPART) { - COPY_VAL(product_key,buf,ptr); - } - if (txn_type == PPS_UPDATEPART) { - COPY_VAL(part_key,buf,ptr); - } - - size_t size; - COPY_VAL(size,buf,ptr); - part_keys.init(size); - for(uint64_t i = 0 ; i < size;i++) { - uint64_t item; - COPY_VAL(item,buf,ptr); - part_keys.add(item); - } - - assert(ptr == get_size()); - -} - -void PPSQueryMessage::copy_to_buf(char * buf) { - QueryMessage::copy_to_buf(buf); - uint64_t ptr = QueryMessage::get_size(); - - COPY_BUF(buf,txn_type,ptr); - COPY_BUF(buf,state,ptr); - - if (txn_type == PPS_GETPART) { - COPY_BUF(buf,part_key,ptr); - } - if (txn_type == PPS_GETPRODUCT) { - COPY_BUF(buf,product_key,ptr); - } - if (txn_type == PPS_GETSUPPLIER) { - COPY_BUF(buf,supplier_key,ptr); - } - if (txn_type == PPS_GETPARTBYPRODUCT) { - //COPY_BUF(buf,product_key,ptr); - COPY_BUF(buf,part_key,ptr); - } - if (txn_type == PPS_GETPARTBYSUPPLIER) { - //COPY_BUF(buf,supplier_key,ptr); - COPY_BUF(buf,part_key,ptr); - } - if (txn_type == PPS_ORDERPRODUCT) { - //COPY_BUF(buf,product_key,ptr); - COPY_BUF(buf,part_key,ptr); - } - if (txn_type == PPS_UPDATEPRODUCTPART) { - //COPY_BUF(buf,product_key,ptr); - COPY_BUF(buf,product_key,ptr); - } - if (txn_type == PPS_UPDATEPART) { - //COPY_BUF(buf,product_key,ptr); - COPY_BUF(buf,part_key,ptr); - } - - size_t size = part_keys.size(); - COPY_BUF(buf,size,ptr); - for(uint64_t i = 0; i < part_keys.size(); i++) { - uint64_t item = part_keys[i]; - COPY_BUF(buf,item,ptr); - } - - assert(ptr == get_size()); -} -//---DAquerymessage zone------------ - -void DAQueryMessage::init() {} - -void DAQueryMessage::copy_to_buf(char* buf) { - QueryMessage::copy_to_buf(buf); - uint64_t ptr = QueryMessage::get_size(); - - COPY_BUF(buf, txn_type, ptr); - COPY_BUF(buf, trans_id, ptr); - COPY_BUF(buf, item_id, ptr); - COPY_BUF(buf, seq_id, ptr); - COPY_BUF(buf, write_version, ptr); - COPY_BUF(buf, state, ptr); - COPY_BUF(buf, next_state, ptr); - COPY_BUF(buf, last_state, ptr); - -} -void DAQueryMessage::copy_from_txn(TxnManager* txn) { - QueryMessage::mcopy_from_txn(txn); - DAQuery* da_query = (DAQuery*)(txn->query); - - txn_type = da_query->txn_type; - trans_id = da_query->trans_id; - item_id = da_query->item_id; - seq_id = da_query->seq_id; - write_version = da_query->write_version; - state = da_query->state; - next_state = da_query->next_state; - last_state = da_query->last_state; -} - -void DAQueryMessage::copy_from_buf(char* buf) { - QueryMessage::copy_from_buf(buf); - uint64_t ptr = QueryMessage::get_size(); - - COPY_VAL(txn_type, buf, ptr); - // common txn input for both payment & new-order - COPY_VAL(trans_id, buf, ptr); - COPY_VAL(item_id, buf, ptr); - COPY_VAL(seq_id, buf, ptr); - COPY_VAL(write_version, buf, ptr); - // payment - COPY_VAL(state, buf, ptr); - COPY_VAL(next_state, buf, ptr); - COPY_VAL(last_state, buf, ptr); - assert(ptr == get_size()); -} - -void DAQueryMessage::copy_to_txn(TxnManager* txn) { - QueryMessage::copy_to_txn(txn); - DAQuery* da_query = (DAQuery*)(txn->query); - - - txn->client_id = return_node_id; - da_query->txn_type = (DATxnType)txn_type; - da_query->trans_id = trans_id; - da_query->item_id = item_id; - da_query->seq_id = seq_id; - da_query->write_version = write_version; - da_query->state = state; - da_query->next_state = next_state; - da_query->last_state = last_state; - -} - -uint64_t DAQueryMessage::get_size() { - uint64_t size = QueryMessage::get_size(); - size += sizeof(DATxnType); - size += sizeof(uint64_t) * 7; - return size; -} -void DAQueryMessage::release() { QueryMessage::release(); } diff --git a/contrib/deneva/transport/message.h b/contrib/deneva/transport/message.h deleted file mode 100644 index f7276d1c..00000000 --- a/contrib/deneva/transport/message.h +++ /dev/null @@ -1,484 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _MESSAGE_H_ -#define _MESSAGE_H_ - -#include "global.h" -#include "helper.h" -#include "logger.h" -#include "array.h" - -class ycsb_request; -class LogRecord; -struct Item_no; - -class Message { -public: - virtual ~Message(){} - static Message * create_message(char * buf); - static Message * create_message(BaseQuery * query, RemReqType rtype); - static Message * create_message(TxnManager * txn, RemReqType rtype); - static Message * create_message(uint64_t txn_id, RemReqType rtype); - static Message * create_message(uint64_t txn_id,uint64_t batch_id, RemReqType rtype); - static Message * create_message(LogRecord * record, RemReqType rtype); - static Message * create_message(RemReqType rtype); - static std::vector * create_messages(char * buf); - static void release_message(Message * msg); - RemReqType rtype; - uint64_t txn_id; - uint64_t batch_id; - uint64_t return_node_id; - - uint64_t wq_time; - uint64_t mq_time; - uint64_t ntwk_time; - - // Collect other stats - double lat_work_queue_time; - double lat_msg_queue_time; - double lat_cc_block_time; - double lat_cc_time; - double lat_process_time; - double lat_network_time; - double lat_other_time; - - uint64_t mget_size(); - uint64_t get_txn_id() {return txn_id;} - uint64_t get_batch_id() {return batch_id;} - uint64_t get_return_id() {return return_node_id;} - void mcopy_from_buf(char * buf); - void mcopy_to_buf(char * buf); - void mcopy_from_txn(TxnManager * txn); - void mcopy_to_txn(TxnManager * txn); - RemReqType get_rtype() {return rtype;} - - virtual uint64_t get_size() = 0; - virtual void copy_from_buf(char * buf) = 0; - virtual void copy_to_buf(char * buf) = 0; - virtual void copy_to_txn(TxnManager * txn) = 0; - virtual void copy_from_txn(TxnManager * txn) = 0; - virtual void init() = 0; - virtual void release() = 0; -}; - -// Message types -class InitDoneMessage : public Message { -public: - void copy_from_buf(char * buf); - void copy_to_buf(char * buf); - void copy_from_txn(TxnManager * txn); - void copy_to_txn(TxnManager * txn); - uint64_t get_size(); - void init() {} - void release() {} -}; - -class FinishMessage : public Message { -public: - void copy_from_buf(char * buf); - void copy_to_buf(char * buf); - void copy_from_txn(TxnManager * txn); - void copy_to_txn(TxnManager * txn); - uint64_t get_size(); - void init() {} - void release() {} - bool is_abort() { return rc == Abort;} - - uint64_t pid; - RC rc; - - bool readonly; -#if CC_ALG == MAAT || CC_ALG == SSI || CC_ALG == WSI || CC_ALG == SILO - uint64_t commit_timestamp; -#endif -}; - -class LogMessage : public Message { -public: - void copy_from_buf(char * buf); - void copy_to_buf(char * buf); - void copy_from_txn(TxnManager * txn); - void copy_to_txn(TxnManager * txn); - uint64_t get_size(); - void init() {} - void release(); - void copy_from_record(LogRecord * record); - - LogRecord record; -}; - -class LogRspMessage : public Message { -public: - void copy_from_buf(char * buf); - void copy_to_buf(char * buf); - void copy_from_txn(TxnManager * txn); - void copy_to_txn(TxnManager * txn); - uint64_t get_size(); - void init() {} - void release() {} -}; - -class LogFlushedMessage : public Message { -public: - void copy_from_buf(char * buf) {} - void copy_to_buf(char * buf) {} - void copy_from_txn(TxnManager * txn) {} - void copy_to_txn(TxnManager * txn) {} - uint64_t get_size() {return sizeof(LogFlushedMessage);} - void init() {} - void release() {} - -}; - - -class QueryResponseMessage : public Message { -public: - void copy_from_buf(char * buf); - void copy_to_buf(char * buf); - void copy_from_txn(TxnManager * txn); - void copy_to_txn(TxnManager * txn); - uint64_t get_size(); - void init() {} - void release() {} - - RC rc; - uint64_t pid; -#if CC_ALG == SUNDIAL - uint64_t _min_commit_ts; -#endif -}; - -class AckMessage : public Message { -public: - void copy_from_buf(char * buf); - void copy_to_buf(char * buf); - void copy_from_txn(TxnManager * txn); - void copy_to_txn(TxnManager * txn); - uint64_t get_size(); - void init() {} - void release() {} - - RC rc; -#if CC_ALG == MAAT - uint64_t lower; - uint64_t upper; -#endif -#if CC_ALG == SILO - uint64_t max_tid; -#endif - - // For Calvin PPS: part keys from secondary lookup for sequencer response - Array part_keys; -}; - -class PrepareMessage : public Message { -public: - void copy_from_buf(char * buf); - void copy_to_buf(char * buf); - void copy_from_txn(TxnManager * txn); - void copy_to_txn(TxnManager * txn); - uint64_t get_size(); - void init() {} - void release() {} - - uint64_t pid; - RC rc; -#if CC_ALG == SUNDIAL - uint64_t _min_commit_ts; -#endif - uint64_t txn_id; -}; - -class ForwardMessage : public Message { -public: - void copy_from_buf(char * buf); - void copy_to_buf(char * buf); - void copy_from_txn(TxnManager * txn); - void copy_to_txn(TxnManager * txn); - uint64_t get_size(); - void init() {} - void release() {} - - RC rc; -#if WORKLOAD == TPCC - uint64_t o_id; -#endif -}; - - -class DoneMessage : public Message { -public: - void copy_from_buf(char * buf); - void copy_to_buf(char * buf); - void copy_from_txn(TxnManager * txn); - void copy_to_txn(TxnManager * txn); - uint64_t get_size(); - void init() {} - void release() {} - uint64_t batch_id; -}; - -class ClientResponseMessage : public Message { -public: - void copy_from_buf(char * buf); - void copy_to_buf(char * buf); - void copy_from_txn(TxnManager * txn); - void copy_to_txn(TxnManager * txn); - uint64_t get_size(); - void init() {} - void release() {} - - RC rc; - uint64_t client_startts; -}; - -class ClientQueryMessage : public Message { -public: - void copy_from_buf(char * buf); - void copy_to_buf(char * buf); - void copy_from_query(BaseQuery * query); - void copy_from_txn(TxnManager * txn); - void copy_to_txn(TxnManager * txn); - uint64_t get_size(); - void init(); - void release(); - - uint64_t pid; - uint64_t ts; -#if CC_ALG == CALVIN - uint64_t batch_id; - uint64_t txn_id; -#endif - uint64_t client_startts; - uint64_t first_startts; - Array partitions; -}; - -class YCSBClientQueryMessage : public ClientQueryMessage { -public: - void copy_from_buf(char * buf); - void copy_to_buf(char * buf); - void copy_from_query(BaseQuery * query); - void copy_from_txn(TxnManager * txn); - void copy_to_txn(TxnManager * txn); - uint64_t get_size(); - void init(); - void release(); - - Array requests; - -}; - -class TPCCClientQueryMessage : public ClientQueryMessage { -public: - void copy_from_buf(char * buf); - void copy_to_buf(char * buf); - void copy_from_query(BaseQuery * query); - void copy_from_txn(TxnManager * txn); - void copy_to_txn(TxnManager * txn); - uint64_t get_size(); - void init(); - void release(); - - uint64_t txn_type; - // common txn input for both payment & new-order - uint64_t w_id; - uint64_t d_id; - uint64_t c_id; - - // payment - uint64_t d_w_id; - uint64_t c_w_id; - uint64_t c_d_id; - char c_last[LASTNAME_LEN]; - uint64_t h_amount; - bool by_last_name; - - // new order - Array items; - bool rbk; - bool remote; - uint64_t ol_cnt; - uint64_t o_entry_d; - -}; - -class PPSClientQueryMessage : public ClientQueryMessage { -public: - void copy_from_buf(char * buf); - void copy_to_buf(char * buf); - void copy_from_query(BaseQuery * query); - void copy_from_txn(TxnManager * txn); - void copy_to_txn(TxnManager * txn); - uint64_t get_size(); - void init(); - void release(); - - uint64_t txn_type; - - // getparts - uint64_t part_key; - // getproducts / getpartbyproduct - uint64_t product_key; - // getsuppliers / getpartbysupplier - uint64_t supplier_key; - - // part keys from secondary lookup - Array part_keys; - - bool recon; -}; -class DAClientQueryMessage : public ClientQueryMessage { - public: - void copy_from_buf(char* buf);//ok - void copy_to_buf(char* buf);//ok - void copy_from_query(BaseQuery* query);//ok - void copy_from_txn(TxnManager* txn);//ok - void copy_to_txn(TxnManager* txn); - uint64_t get_size(); - void init(); - void release(); - - DATxnType txn_type; - uint64_t trans_id; - uint64_t item_id; - uint64_t seq_id; - uint64_t write_version; - uint64_t state; - uint64_t next_state; - uint64_t last_state; -}; - -class QueryMessage : public Message { -public: - void copy_from_buf(char * buf); - void copy_to_buf(char * buf); - void copy_from_txn(TxnManager * txn); - void copy_to_txn(TxnManager * txn); - uint64_t get_size(); - void init() {} - void release() {} - - uint64_t pid; -#if CC_ALG == WAIT_DIE || CC_ALG == TIMESTAMP || CC_ALG == MVCC - uint64_t ts; -#endif -#if CC_ALG == MVCC - uint64_t thd_id; -#endif -#if CC_ALG == OCC || CC_ALG == FOCC || CC_ALG == BOCC || CC_ALG == SSI || CC_ALG == WSI - uint64_t start_ts; -#endif -#if MODE==QRY_ONLY_MODE - uint64_t max_access; -#endif -}; - -class YCSBQueryMessage : public QueryMessage { -public: - void copy_from_buf(char * buf); - void copy_to_buf(char * buf); - void copy_from_txn(TxnManager * txn); - void copy_to_txn(TxnManager * txn); - uint64_t get_size(); - void init(); - void release(); - - Array requests; - -}; - -class TPCCQueryMessage : public QueryMessage { -public: - void copy_from_buf(char * buf); - void copy_to_buf(char * buf); - void copy_from_txn(TxnManager * txn); - void copy_to_txn(TxnManager * txn); - uint64_t get_size(); - void init(); - void release(); - - uint64_t txn_type; - uint64_t state; - - // common txn input for both payment & new-order - uint64_t w_id; - uint64_t d_id; - uint64_t c_id; - - // payment - uint64_t d_w_id; - uint64_t c_w_id; - uint64_t c_d_id; - char c_last[LASTNAME_LEN]; - uint64_t h_amount; - bool by_last_name; - - // new order - Array items; - bool rbk; - bool remote; - uint64_t ol_cnt; - uint64_t o_entry_d; - -}; - -class PPSQueryMessage : public QueryMessage { -public: - void copy_from_buf(char * buf); - void copy_to_buf(char * buf); - void copy_from_txn(TxnManager * txn); - void copy_to_txn(TxnManager * txn); - uint64_t get_size(); - void init(); - void release(); - - uint64_t txn_type; - uint64_t state; - - // getparts - uint64_t part_key; - // getproducts / getpartbyproduct - uint64_t product_key; - // getsuppliers / getpartbysupplier - uint64_t supplier_key; - - // part keys from secondary lookup - Array part_keys; -}; - -class DAQueryMessage : public QueryMessage { -public: - void copy_from_buf(char* buf); - void copy_to_buf(char* buf); - void copy_from_txn(TxnManager* txn); - void copy_to_txn(TxnManager* txn); - uint64_t get_size(); - void init(); - void release(); - - DATxnType txn_type; - uint64_t trans_id; - uint64_t item_id; - uint64_t seq_id; - uint64_t write_version; - uint64_t state; - uint64_t next_state; - uint64_t last_state; -}; - -#endif diff --git a/contrib/deneva/transport/msg_thread.cpp b/contrib/deneva/transport/msg_thread.cpp deleted file mode 100644 index ba656b97..00000000 --- a/contrib/deneva/transport/msg_thread.cpp +++ /dev/null @@ -1,148 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "msg_thread.h" -#include "msg_queue.h" -#include "message.h" -#include "mem_alloc.h" -#include "transport.h" -#include "query.h" -#include "ycsb_query.h" -#include "tpcc_query.h" -#include "pool.h" -#include "global.h" - -void MessageThread::init(uint64_t thd_id) { - buffer_cnt = g_total_node_cnt; -#if CC_ALG == CALVIN - buffer_cnt++; -#endif - DEBUG_M("MessageThread::init buffer[] alloc\n"); - buffer = (mbuf **) mem_allocator.align_alloc(sizeof(mbuf*) * buffer_cnt); - for(uint64_t n = 0; n < buffer_cnt; n++) { - DEBUG_M("MessageThread::init mbuf alloc\n"); - buffer[n] = (mbuf *)mem_allocator.align_alloc(sizeof(mbuf)); - buffer[n]->init(n); - buffer[n]->reset(n); - } - _thd_id = thd_id; -} - -void MessageThread::check_and_send_batches() { - uint64_t starttime = get_sys_clock(); - for(uint64_t dest_node_id = 0; dest_node_id < buffer_cnt; dest_node_id++) { - if(buffer[dest_node_id]->ready()) { - send_batch(dest_node_id); - } - } - INC_STATS(_thd_id,mtx[11],get_sys_clock() - starttime); -} - -void MessageThread::send_batch(uint64_t dest_node_id) { - uint64_t starttime = get_sys_clock(); - mbuf * sbuf = buffer[dest_node_id]; - assert(sbuf->cnt > 0); - ((uint32_t*)sbuf->buffer)[2] = sbuf->cnt; - INC_STATS(_thd_id,mbuf_send_intv_time,get_sys_clock() - sbuf->starttime); - - DEBUG("Send batch of %ld msgs to %ld\n",sbuf->cnt,dest_node_id); - fflush(stdout); - tport_man.send_msg(_thd_id,dest_node_id,sbuf->buffer,sbuf->ptr); - INC_STATS(_thd_id,msg_batch_size_msgs,sbuf->cnt); - INC_STATS(_thd_id,msg_batch_size_bytes,sbuf->ptr); - if(ISSERVERN(dest_node_id)) { - INC_STATS(_thd_id,msg_batch_size_bytes_to_server,sbuf->ptr); - } else if (ISCLIENTN(dest_node_id)){ - INC_STATS(_thd_id,msg_batch_size_bytes_to_client,sbuf->ptr); - } - INC_STATS(_thd_id,msg_batch_cnt,1); - sbuf->reset(dest_node_id); - INC_STATS(_thd_id,mtx[12],get_sys_clock() - starttime); -} -char type2char1(DATxnType txn_type) -{ - switch (txn_type) - { - case DA_READ: - return 'R'; - case DA_WRITE: - return 'W'; - case DA_COMMIT: - return 'C'; - case DA_ABORT: - return 'A'; - case DA_SCAN: - return 'S'; - default: - return 'U'; - } -} - -void MessageThread::run() { - - uint64_t starttime = get_sys_clock(); - Message * msg = NULL; - uint64_t dest_node_id; - mbuf * sbuf; - - - dest_node_id = msg_queue.dequeue(get_thd_id(), msg); - if(!msg) { - check_and_send_batches(); - INC_STATS(_thd_id,mtx[9],get_sys_clock() - starttime); - return; - } - assert(msg); - assert(dest_node_id < g_total_node_cnt); - assert(dest_node_id != g_node_id); - - sbuf = buffer[dest_node_id]; - - if(!sbuf->fits(msg->get_size())) { - assert(sbuf->cnt > 0); - send_batch(dest_node_id); - } - -#if WORKLOAD == DA - if(!is_server&&false) - printf("cl seq_id:%lu type:%c trans_id:%lu item:%c state:%lu next_state:%lu\n", - ((DAClientQueryMessage*)msg)->seq_id, - type2char1(((DAClientQueryMessage*)msg)->txn_type), - ((DAClientQueryMessage*)msg)->trans_id, - static_cast('x'+((DAClientQueryMessage*)msg)->item_id), - ((DAClientQueryMessage*)msg)->state, - (((DAClientQueryMessage*)msg)->next_state)); - fflush(stdout); -#endif - - uint64_t copy_starttime = get_sys_clock(); - msg->copy_to_buf(&(sbuf->buffer[sbuf->ptr])); - INC_STATS(_thd_id,msg_copy_output_time,get_sys_clock() - copy_starttime); - DEBUG("%ld Buffered Msg %d, (%ld,%ld) to %ld\n", _thd_id, msg->rtype, msg->txn_id, msg->batch_id, - dest_node_id); - sbuf->cnt += 1; - sbuf->ptr += msg->get_size(); - // Free message here, no longer needed unless CALVIN sequencer - if(CC_ALG != CALVIN) { - Message::release_message(msg); - } - if (sbuf->starttime == 0) sbuf->starttime = get_sys_clock(); - - check_and_send_batches(); - INC_STATS(_thd_id,mtx[10],get_sys_clock() - starttime); - -} - diff --git a/contrib/deneva/transport/msg_thread.h b/contrib/deneva/transport/msg_thread.h deleted file mode 100644 index a7bebe48..00000000 --- a/contrib/deneva/transport/msg_thread.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _MSG_THREAD_H_ -#define _MSG_THREAD_H_ - -#include "global.h" -#include "helper.h" -#include "nn.hpp" - -struct mbuf { - char * buffer; - uint64_t starttime; - uint64_t ptr; - uint64_t cnt; - bool wait; - - void init(uint64_t dest_id) { buffer = (char *)nn_allocmsg(g_msg_size, 0); } - void reset(uint64_t dest_id) { - - starttime = 0; - cnt = 0; - wait = false; - ((uint32_t*)buffer)[0] = dest_id; - ((uint32_t*)buffer)[1] = g_node_id; - ptr = sizeof(uint32_t) * 3; - } - void copy(char * p, uint64_t s) { - assert(ptr + s <= g_msg_size); - if (cnt == 0) starttime = get_sys_clock(); - COPY_BUF_SIZE(buffer,p,ptr,s); - } - bool fits(uint64_t s) { return (ptr + s) <= g_msg_size; } - bool ready() { - if (cnt == 0) return false; - if ((get_sys_clock() - starttime) >= g_msg_time_limit) return true; - return false; - } -}; - -class MessageThread { -public: - void init(uint64_t thd_id); - void run(); - void check_and_send_batches(); - void send_batch(uint64_t dest_node_id); - void copy_to_buffer(mbuf * sbuf, RemReqType type, BaseQuery * qry); - uint64_t get_msg_size(RemReqType type, BaseQuery * qry); - void rack( mbuf * sbuf,BaseQuery * qry); - void rprepare( mbuf * sbuf,BaseQuery * qry); - void rfin( mbuf * sbuf,BaseQuery * qry); - void cl_rsp(mbuf * sbuf, BaseQuery *qry); - void log_msg(mbuf * sbuf, BaseQuery *qry); - void log_msg_rsp(mbuf * sbuf, BaseQuery *qry); - void rinit(mbuf * sbuf,BaseQuery * qry); - void rqry( mbuf * sbuf, BaseQuery *qry); - void rfwd( mbuf * sbuf, BaseQuery *qry); - void rdone( mbuf * sbuf, BaseQuery *qry); - void rqry_rsp( mbuf * sbuf, BaseQuery *qry); - void rtxn(mbuf * sbuf, BaseQuery *qry); - void rtxn_seq(mbuf * sbuf, BaseQuery *qry); - uint64_t get_thd_id() { return _thd_id;} -private: - mbuf ** buffer; - uint64_t buffer_cnt; - uint64_t _thd_id; - -}; - -#endif diff --git a/contrib/deneva/transport/nn.hpp b/contrib/deneva/transport/nn.hpp deleted file mode 100755 index 9c5fd4ae..00000000 --- a/contrib/deneva/transport/nn.hpp +++ /dev/null @@ -1,205 +0,0 @@ -/* - Copyright (c) 2013 250bpm s.r.o. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom - the Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE SOFTWARE. -*/ - -#ifndef NN_HPP_INCLUDED -#define NN_HPP_INCLUDED - -#include -#include - -#include -#include -#include -#include - -#if defined __GNUC__ -#define nn_slow(x) __builtin_expect ((x), 0) -#else -#define nn_slow(x) (x) -#endif - -namespace nn -{ - - class exception : public std::exception - { - public: - - exception () : err (nn_errno ()) {} - - virtual const char *what () const throw () - { - return nn_strerror (err); - } - - int num () const - { - return err; - } - - private: - - int err; - }; - - inline const char *symbol (int i, int *value) - { - return nn_symbol (i, value); - } - - inline void *allocmsg (size_t size, int type) - { - void *msg = nn_allocmsg (size, type); - if (nn_slow (!msg)) - throw nn::exception (); - return msg; - } - - inline int freemsg (void *msg) - { - int rc = nn_freemsg (msg); - if (nn_slow (rc != 0)) - throw nn::exception (); - return rc; - } - - class socket - { - public: - - inline socket (int domain, int protocol) - { - s = nn_socket (domain, protocol); - if (nn_slow (s < 0)) - throw nn::exception (); - } - - inline ~socket () - { - int rc = nn_close (s); - assert (rc == 0); - } - - inline void setsockopt (int level, int option, const void *optval, - size_t optvallen) - { - int rc = nn_setsockopt (s, level, option, optval, optvallen); - if (nn_slow (rc != 0)) - throw nn::exception (); - } - - inline void getsockopt (int level, int option, void *optval, - size_t *optvallen) - { - int rc = nn_getsockopt (s, level, option, optval, optvallen); - if (nn_slow (rc != 0)) - throw nn::exception (); - } - - inline int bind (const char *addr) - { - int rc = nn_bind (s, addr); - if (nn_slow (rc < 0)) - throw nn::exception (); - return rc; - } - - inline int connect (const char *addr) - { - int rc = nn_connect (s, addr); - if (nn_slow (rc < 0)) - throw nn::exception (); - return rc; - } - - inline void shutdown (int how) - { - int rc = nn_shutdown (s, how); - if (nn_slow (rc != 0)) - throw nn::exception (); - } - - inline int send (const void *buf, size_t len, int flags) - { - int rc = nn_send (s, buf, len, flags); - if (nn_slow (rc < 0)) { - if (nn_slow (nn_errno () != EAGAIN)) - throw nn::exception (); - return -1; - } - return rc; - } - - inline int recv (void *buf, size_t len, int flags) - { - int rc = nn_recv (s, buf, len, flags); - if (nn_slow (rc < 0)) { - if (nn_slow (nn_errno () != EAGAIN)) - throw nn::exception (); - return -1; - } - return rc; - } - - inline int sendmsg (const struct nn_msghdr *msghdr, int flags) - { - int rc = nn_sendmsg (s, msghdr, flags); - if (nn_slow (rc < 0)) { - if (nn_slow (nn_errno () != EAGAIN)) - throw nn::exception (); - return -1; - } - return rc; - } - - inline int recvmsg (struct nn_msghdr *msghdr, int flags) - { - int rc = nn_recvmsg (s, msghdr, flags); - if (nn_slow (rc < 0)) { - if (nn_slow (nn_errno () != EAGAIN)) - throw nn::exception (); - return -1; - } - return rc; - } - - private: - - int s; - - /* Prevent making copies of the socket by accident. */ - socket (const socket&); - void operator = (const socket&); - }; - - inline void term () - { - nn_term (); - } - -} - -#undef nn_slow - -#endif - - diff --git a/contrib/deneva/transport/transport.cpp b/contrib/deneva/transport/transport.cpp deleted file mode 100644 index 8fb9c241..00000000 --- a/contrib/deneva/transport/transport.cpp +++ /dev/null @@ -1,323 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -#include "transport.h" - -#include - -#include - -#include "global.h" -#include "manager.h" -#include "message.h" -#include "nn.hpp" -#include "query.h" -#include "tpcc_query.h" -#include -#include -#include "global.h" -#include "manager.h" -#include "transport.h" -#include "nn.hpp" -#include "tpcc_query.h" -#include "query.h" -#include "message.h" - - -#define MAX_IFADDR_LEN 20 // max # of characters in name of address - -void Transport::read_ifconfig(const char * ifaddr_file) { - - ifaddr = new char *[g_total_node_cnt]; - - uint64_t cnt = 0; - printf("Reading ifconfig file: %s\n",ifaddr_file); - ifstream fin(ifaddr_file); - string line; - while (getline(fin, line)) { - //memcpy(ifaddr[cnt],&line[0],12); - ifaddr[cnt] = new char[line.length()+1]; - strcpy(ifaddr[cnt],&line[0]); - printf("%ld: %s\n",cnt,ifaddr[cnt]); - cnt++; - } - printf("%lu %u\n", cnt, g_total_node_cnt); - assert(cnt == g_total_node_cnt); -} - -uint64_t Transport::get_socket_count() { - uint64_t sock_cnt = 0; - if(ISCLIENT) - sock_cnt = (g_total_node_cnt)*2 + g_client_send_thread_cnt * g_servers_per_client; - else - sock_cnt = (g_total_node_cnt)*2 + g_client_send_thread_cnt; - return sock_cnt; -} - -string Transport::get_path() { - string path; -#if SHMEM_ENV - path = "/dev/shm/"; -#else - char * cpath; - cpath = getenv("SCHEMA_PATH"); - if(cpath == NULL) - path = "./"; - else - path = string(cpath); -#endif - path += "ifconfig.txt"; - return path; - -} - -Socket * Transport::get_socket() { - //Socket * socket = new Socket; - Socket * socket = (Socket*) mem_allocator.align_alloc(sizeof(Socket)); - new(socket) Socket(); - int timeo = 1000; // timeout in ms - int stimeo = 1000; // timeout in ms - int opt = 0; - socket->sock.setsockopt(NN_SOL_SOCKET,NN_RCVTIMEO,&timeo,sizeof(timeo)); - socket->sock.setsockopt(NN_SOL_SOCKET,NN_SNDTIMEO,&stimeo,sizeof(stimeo)); - // NN_TCP_NODELAY doesn't cause TCP_NODELAY to be set -- nanomsg issue #118 - socket->sock.setsockopt(NN_SOL_SOCKET,NN_TCP_NODELAY,&opt,sizeof(opt)); - return socket; -} - -uint64_t Transport::get_port_id(uint64_t src_node_id, uint64_t dest_node_id) { - uint64_t port_id = TPORT_PORT; - port_id += g_total_node_cnt * dest_node_id; - port_id += src_node_id; - DEBUG("Port ID: %ld -> %ld : %ld\n",src_node_id,dest_node_id,port_id); - return port_id; -} - -#if NETWORK_DELAY_TEST || !ENVIRONMENT_EC2 -uint64_t Transport::get_port_id(uint64_t src_node_id, uint64_t dest_node_id, - uint64_t send_thread_id) { - uint64_t port_id = 0; - DEBUG("Calc port id %ld %ld %ld\n",src_node_id,dest_node_id,send_thread_id); - port_id += g_total_node_cnt * dest_node_id; - DEBUG("%ld\n",port_id); - port_id += src_node_id; - DEBUG("%ld\n",port_id); - // uint64_t max_send_thread_cnt = g_send_thread_cnt > g_client_send_thread_cnt ? - // g_send_thread_cnt : g_client_send_thread_cnt; - // port_id *= max_send_thread_cnt; - port_id += send_thread_id * g_total_node_cnt * g_total_node_cnt; - DEBUG("%ld\n",port_id); - port_id += TPORT_PORT; - DEBUG("%ld\n",port_id); - printf("Port ID: %ld, %ld -> %ld : %ld\n",send_thread_id,src_node_id,dest_node_id,port_id); - return port_id; -} -#else - -uint64_t Transport::get_port_id(uint64_t src_node_id, uint64_t dest_node_id, - uint64_t send_thread_id) { - uint64_t port_id = 0; - DEBUG("Calc port id %ld %ld %ld\n",src_node_id,dest_node_id,send_thread_id); - port_id += dest_node_id + src_node_id; - DEBUG("%ld\n",port_id); - port_id += send_thread_id * g_total_node_cnt * 2; - DEBUG("%ld\n",port_id); - port_id += TPORT_PORT; - DEBUG("%ld\n",port_id); - printf("Port ID: %ld, %ld -> %ld : %ld\n",send_thread_id,src_node_id,dest_node_id,port_id); - return port_id; -} -#endif - - - -Socket * Transport::bind(uint64_t port_id) { - Socket * socket = get_socket(); - char socket_name[MAX_TPORT_NAME]; -#if TPORT_TYPE == IPC - sprintf(socket_name,"ipc://node_%ld.ipc",port_id); -#else - sprintf(socket_name,"tcp://%s:%ld",ifaddr[g_node_id],port_id); -#endif - printf("Sock Binding to %s %d\n",socket_name,g_node_id); - int rc = socket->sock.bind(socket_name); - if(rc < 0) { - printf("Bind Error: %d %s\n",errno,strerror(errno)); - assert(false); - } - return socket; -} - -Socket * Transport::connect(uint64_t dest_id,uint64_t port_id) { - Socket * socket = get_socket(); - char socket_name[MAX_TPORT_NAME]; -#if TPORT_TYPE == IPC - sprintf(socket_name,"ipc://node_%ld.ipc",port_id); -#else - sprintf(socket_name,"tcp://%s;%s:%ld",ifaddr[g_node_id],ifaddr[dest_id],port_id); -#endif - printf("Sock Connecting to %s %d -> %ld\n",socket_name,g_node_id,dest_id); - int rc = socket->sock.connect(socket_name); - if(rc < 0) { - printf("Connect Error: %d %s\n",errno,strerror(errno)); - assert(false); - } - return socket; -} - -void Transport::init() { - _sock_cnt = get_socket_count(); - - rr = 0; - printf("Tport Init %d: %ld\n",g_node_id,_sock_cnt); - - string path = get_path(); - read_ifconfig(path.c_str()); - - for(uint64_t node_id = 0; node_id < g_total_node_cnt; node_id++) { - if (node_id == g_node_id) continue; - // Listening ports - if(ISCLIENTN(node_id)) { - for (uint64_t client_thread_id = g_client_thread_cnt + g_client_rem_thread_cnt; - client_thread_id < - g_client_thread_cnt + g_client_rem_thread_cnt + g_client_send_thread_cnt; - client_thread_id++) { - uint64_t port_id = - get_port_id(node_id, g_node_id, client_thread_id % g_client_send_thread_cnt); - Socket * sock = bind(port_id); - recv_sockets.push_back(sock); - DEBUG("Socket insert: {%ld}: %ld\n",node_id,(uint64_t)sock); - } - } else { - for (uint64_t server_thread_id = g_thread_cnt + g_rem_thread_cnt; - server_thread_id < g_thread_cnt + g_rem_thread_cnt + g_send_thread_cnt; - server_thread_id++) { - uint64_t port_id = get_port_id(node_id,g_node_id,server_thread_id % g_send_thread_cnt); - Socket * sock = bind(port_id); - recv_sockets.push_back(sock); - DEBUG("Socket insert: {%ld}: %ld\n",node_id,(uint64_t)sock); - } - } - // Sending ports - if(ISCLIENTN(g_node_id)) { - for (uint64_t client_thread_id = g_client_thread_cnt + g_client_rem_thread_cnt; - client_thread_id < - g_client_thread_cnt + g_client_rem_thread_cnt + g_client_send_thread_cnt; - client_thread_id++) { - uint64_t port_id = - get_port_id(g_node_id, node_id, client_thread_id % g_client_send_thread_cnt); - std::pair sender = std::make_pair(node_id,client_thread_id); - Socket * sock = connect(node_id,port_id); - send_sockets.insert(std::make_pair(sender,sock)); - DEBUG("Socket insert: {%ld,%ld}: %ld\n",node_id,client_thread_id,(uint64_t)sock); - } - } else { - for (uint64_t server_thread_id = g_thread_cnt + g_rem_thread_cnt; - server_thread_id < g_thread_cnt + g_rem_thread_cnt + g_send_thread_cnt; - server_thread_id++) { - uint64_t port_id = get_port_id(g_node_id,node_id,server_thread_id % g_send_thread_cnt); - std::pair sender = std::make_pair(node_id,server_thread_id); - Socket * sock = connect(node_id,port_id); - send_sockets.insert(std::make_pair(sender,sock)); - DEBUG("Socket insert: {%ld,%ld}: %ld\n",node_id,server_thread_id,(uint64_t)sock); - } - } - } - - - fflush(stdout); -} - -// rename sid to send thread id -void Transport::send_msg(uint64_t send_thread_id, uint64_t dest_node_id, void * sbuf,int size) { - uint64_t starttime = get_sys_clock(); - - Socket * socket = send_sockets.find(std::make_pair(dest_node_id,send_thread_id))->second; - // Copy messages to nanomsg buffer - void * buf = nn_allocmsg(size,0); - memcpy(buf,sbuf,size); - DEBUG("%ld Sending batch of %d bytes to node %ld on socket %ld\n", send_thread_id, size, - dest_node_id, (uint64_t)socket); - - int rc = -1; - while (rc < 0 && (!simulation->is_setup_done() || - (simulation->is_setup_done() && !simulation->is_done()))) { - rc= socket->sock.send(&buf,NN_MSG,NN_DONTWAIT); - } - //nn_freemsg(sbuf); - DEBUG("%ld Batch of %d bytes sent to node %ld\n",send_thread_id,size,dest_node_id); - - INC_STATS(send_thread_id,msg_send_time,get_sys_clock() - starttime); - INC_STATS(send_thread_id,msg_send_cnt,1); -} - -// Listens to sockets for messages from other nodes -std::vector * Transport::recv_msg(uint64_t thd_id) { - int bytes = 0; - void * buf; - uint64_t starttime = get_sys_clock(); - std::vector * msgs = NULL; - //uint64_t ctr = starttime % recv_sockets.size(); - uint64_t rand = (starttime % recv_sockets.size()) / g_this_rem_thread_cnt; - // uint64_t ctr = ((thd_id % g_this_rem_thread_cnt) % recv_sockets.size()) + rand * - // g_this_rem_thread_cnt; - uint64_t ctr = thd_id % g_this_rem_thread_cnt; - if (ctr >= recv_sockets.size()) return msgs; - if(g_this_rem_thread_cnt < g_total_node_cnt) { - ctr += rand * g_this_rem_thread_cnt; - while(ctr >= recv_sockets.size()) { - ctr -= g_this_rem_thread_cnt; - } - } - assert(ctr < recv_sockets.size()); - uint64_t start_ctr = ctr; - - while (bytes <= 0 && (!simulation->is_setup_done() || - (simulation->is_setup_done() && !simulation->is_done()))) { - Socket * socket = recv_sockets[ctr]; - bytes = socket->sock.recv(&buf, NN_MSG, NN_DONTWAIT); - //++ctr; - ctr = (ctr + g_this_rem_thread_cnt); - - if (ctr >= recv_sockets.size()) ctr = (thd_id % g_this_rem_thread_cnt) % recv_sockets.size(); - if (ctr == start_ctr) break; - - if(bytes <= 0 && errno != 11) { - printf("Recv Error %d %s\n",errno,strerror(errno)); - nn::freemsg(buf); - } - - if (bytes > 0) break; - } - - if(bytes <= 0 ) { - INC_STATS(thd_id,msg_recv_idle_time, get_sys_clock() - starttime); - return msgs; - } - - INC_STATS(thd_id,msg_recv_time, get_sys_clock() - starttime); - INC_STATS(thd_id,msg_recv_cnt,1); - - starttime = get_sys_clock(); - - msgs = Message::create_messages((char*)buf); - DEBUG("Batch of %d bytes recv from node %ld; Time: %f\n", bytes, msgs->front()->return_node_id, - simulation->seconds_from_start(get_sys_clock())); - - nn::freemsg(buf); - - INC_STATS(thd_id,msg_unpack_time,get_sys_clock()-starttime); - return msgs; -} diff --git a/contrib/deneva/transport/transport.h b/contrib/deneva/transport/transport.h deleted file mode 100644 index 2fe0c37b..00000000 --- a/contrib/deneva/transport/transport.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - Copyright 2016 Massachusetts Institute of Technology - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _TRANSPORT_H_ -#define _TRANSPORT_H_ -#include "global.h" -#include "nn.hpp" -#include -#include -#include "query.h" - -class Workload; -class Message; - -/* - Message format: -Header: 4 Byte receiver ID - 4 Byte sender ID - 4 Byte # of bytes in msg -Data: MSG_SIZE - HDR_SIZE bytes - */ - -#define GET_RCV_NODE_ID(b) ((uint32_t*)b)[0] - -class Socket { -public: - Socket () : sock(AF_SP,NN_PAIR) {} - ~Socket () { delete &sock;} - char _pad1[CL_SIZE]; - nn::socket sock; - char _pad[CL_SIZE - sizeof(nn::socket)]; -}; - -class Transport { -public: - void read_ifconfig(const char * ifaddr_file); - void init(); - void shutdown(); - uint64_t get_socket_count(); - string get_path(); - Socket * get_socket(); - uint64_t get_port_id(uint64_t src_node_id, uint64_t dest_node_id); - uint64_t get_port_id(uint64_t src_node_id, uint64_t dest_node_id, uint64_t send_thread_id); - Socket * bind(uint64_t port_id); - Socket * connect(uint64_t dest_id,uint64_t port_id); - void send_msg(uint64_t send_thread_id, uint64_t dest_node_id, void * sbuf,int size); - std::vector * recv_msg(uint64_t thd_id); - void simple_send_msg(int size); - uint64_t simple_recv_msg(); - -private: - uint64_t rr; - std::map, Socket*> send_sockets; // dest_node_id,send_thread_id : - // socket - std::vector recv_sockets; - - uint64_t _node_cnt; - uint64_t _sock_cnt; - uint64_t _s_cnt; - char ** ifaddr; - int * endpoint_id; - -}; - -#endif diff --git a/doc/en/setup_db_environment b/doc/en/setup_db_environment new file mode 100644 index 00000000..4e7960cb --- /dev/null +++ b/doc/en/setup_db_environment @@ -0,0 +1,22 @@ +# Database environment + +We are using Unix ODBC to connect databases. The following are the general steps to set up the environment for successfully connecting to databases. + + +0. Setup database service (e.g., by docker) +1. Install the UnixODBC +2. Install the ODBC driver for specific databases +3. Configure unixODBC by /etc/odbc.ini (e.g., ip, port, username, password, database name) and /etc/odbcinst.ini (e.g., drivers) +4. Test isql connection + + +The following are examples we set up databases (Oracle 12c, PostgreSQL, SQL Server, Oceanbase, CockroachDB, TiDB, MySQL) by dockers in Centos systems. + + +====== Copyright && Authorship ====== + +Original from farrisli at Tencent Inc. Check it out the Chinese version: by fishheader from JianShu, link: https://www.jianshu.com/u/e9202bc75c4e + +Author: axingguchen at Tencent Inc. + + diff --git a/doc/en/setup_db_postgresql b/doc/en/setup_db_postgresql new file mode 100644 index 00000000..3672d094 --- /dev/null +++ b/doc/en/setup_db_postgresql @@ -0,0 +1,101 @@ +# Setup PostgreSQL 12.4 + +0. Download and install PostgreSQL + + +We refer to a decent document for detailed setups as follows. +https://www.cnblogs.com/kcxg/p/10718211.html + + +Remember to setup the environment: +``` +// edit /etc/profile if root user, or edit ~/.bash_profile if other suers +export PGHOME=/usr/local/pgsql/ +export PGUSER=test123 +export PGPORT=5432 +export PGDATA=$PGHOME/data +export PATH=$PGHOME/bin:$PATH:$HOME/bin +export LD_LIBRARY_PATH=$PGHOME/lib:$LD_LIBRARY_PATH +// Source it +source /etc/profile +``` + + +1. install UnixODBC + +Once database is up, we also need to install client to connect databases. The typical clients are sqlplus and isql(odbc-oracle), we will deploy the latter one in our tests. + +``` +// install UnixODBC +yum install unixODBC +yum install unixODBC-devel + +// to check out the installed rpm package +rpm -qa | grep unixodbc + +// find the installed location +rpm -ql [rpm_package_name] + + +// add it to enviroments at /etc/profile if root user, otherwise edit ~/.bash_profile +export ODBCSYSINI=/etc +export ODBCINI=/etc/odbc.ini + +// make it work: +source /etc/profile +``` + + +2. install odbc-pg + +Download site: http://rpmfind.net/linux/rpm2html/search.php?query=postgresql-odbc(x86-64) +Here is the example package name: postgresql-odbc-10.03.0000-2.el8.x86_64.rpm + + +``` +// yum install for rpm package +yum install postgresql-odbc-10.03.0000-2.el8.x86_64 + +// set up environment +// edit /etc/profile if root user, ~/.bash_profile if other users +ORACLE_HOME=/usr/lib/oracle/21/client64 +export ORACLE_HOME +TNS_ADMIN=/usr/lib/oracle/21/client64/network/admin +export TNS_ADMIN +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH: /usr/lib/oracle/21/client64/lib + +// source it: +source /etc/profile + +// // to check out the installed rpm package +rpm -qa | grep [rpm_name] + +// find the installed location +rpm -ql [rpm_package_name] +``` + +3. configure unixODBC + +``` +// /etc/odbc.ini +[pg] +Driver=PG +USER=test123 +Password=[your_password_here] +PORT=5432 +SERVER=[your_pg_service_ip_address] + +// /etc/odbcinst.ini +[PG] +Description=ODBC for PostgreSQL +Driver=/usr/lib64/psqlodbcw.so +Setup=/usr/lib64/psqlodbcw.so +FileUsage=1 +``` + +4. Test isql connection + +``` +isql pg -v +``` +You will connect to SQL command line once succeed. \ No newline at end of file diff --git a/doc/zh/func_doc.md b/doc/zh/func_doc.md new file mode 100644 index 00000000..637c9d66 --- /dev/null +++ b/doc/zh/func_doc.md @@ -0,0 +1,64 @@ +# 功能文档 + +## 代码框架 + +源代码编译运行后会生成三个可执行文件,分别为静态测试文件 `3ts_dbtest`、动态测试 文件 `3ts_dbtest_v2` 和键值数据库测试文件 `3ts_kvtest`,因此可以据此划分并阅读源代码。 + +除核心源代码外,`src` 文件夹还包含一些脚本文件、配置文件和测试用例文件。其中脚 本文件 `auto_test_all.sh` 用于自动化全部测试用例,而 `auto_test.sh` 用于自动化某些测试 用例;配置文件 `CMakeLists.txt` 用于 `CMake` 项目构建;`do_test_list.txt` 包含一些测试用 例文件的列表;`t` 目录包含所有静态测试用例文件。 + +## 总体流程图 + +以静态/动态测试为例,给出如下总体流程图。 + +![image-20230921143844936](../../assets/overflow.png) + +## 静态测试 + + 静态测试包含 `33` 个测试用例,其测试文件在 `p` 文件夹下,不需要生成测试文件。源文件包括:`common.cc`、`case_cntl.cc`、`sql_cntl.cc`、`sqltest.cc` 以及对应的头文件,生成的可执行文件名为 `3ts_dbtest`。 + +### 源文件分析: + +- `common.cc` 包含常用的函数和操作,比如将给定的字符串按照分隔符进行分割以及移 除空白字符或者引号字符等; +- `case_cntl.cc` 实现了测试用例控制功能,包含从测试文件中读取数据库配置、`sql` 语句 以及预期结果,验证处理实际结果和预期结果的区别,输出比对结果到指定文件夹等功能; +- `sql_cntl.cc` 涉及 `SQL` 控制或操作的代码。即实现了与 `ODBC` 数据库的接口功能。包 含设置数据库隔离级别、开始事务、执行增删改查等功能、处理 `SQL` 返回值并获取错 误信息、结束事务或回滚事务等功能。 +- `sqltest.cc` 涉及 `SQL` 测试的代码,包含项目的主函数。该文件利用 `gflags` 库来实现命 令行参数解析,采用多线程编程,每个线程负责一组数据库语句的执行,并且通过子 线程不同的休眠时间实现程序代码按指定顺序运行。 + +### 重点类分析: + +`CaseReader` 用于读取和解析测试用例;`TestResultSet` 用于表示测试结果集;`TxnSql` 与事务 `SQL` 操作相关;`TestSequence` 表示测试序列;`ResultHandler` 用 于处理测试结果;`Outputter` 用于格式化和输出测试结果。 + +### 重点函数分析: + + `ExecTestSequence` 用于执行一个指定的测试序列;`ExecAllTestSequence` 利用多线程执行所有测试序列。 + +## 动态测试 + +动态测试需要通过 `python` 脚本文件动态生成测试文件。源文件包括:`common.cc`、`case_cntl_v2.cc`、`sql_cntl_v2.cc`、`sqltest_v2.cc`,生成的可执行文件名为 `3ts_dbtest_v2`。其中 `*_v2.cc` 为对应静态测试文件的另一个版本,大致功能相似。 + +较大的不同为动态测试中测试样例由 `python` 脚本文件生成,包含 `random_do_list.py`、 `mda_detect.py`、`mda_generate.py` 文件。其中 `random_do_list.py` 用于随机生成测试文件 列表;`mda_generate.py` 用于生成指定格式测试样例;`mda_detect.py`: 可能用于检测测试 结果是否出现异常现象。 + +### 源文件分析: + +- `random_do_list.py` 基于预定义的操作集随机生成一系列数据库操作,此外还要确保 生成的操作列表不含任何非法模式。此脚本文件会生成 `do_test_list.txt` 文件,该文件包含不同的测试模式,即具体测试文件列表。 +- `mda_generate.py` 从 `do_test_list.txt` 文件中读取所需的操作模式(例如 `RW-RR` 等), 针对每种操作模式生成一个测试用例文件,该文件包含初始化表、执行事务和验证的 `SQL` 语句。主要目的是为不同的操作模式自动生成数据库测试用例。 +- `mda_detect.py` 主要用于数据库事务的序列化调度检查。即读取事务,并构建一个图, 该图表示事务之间的依赖关系。然后,程序会检查这个图是否存在循环,从而判断事 务调度是否是序列化的。 + +## 键值数据库测试 + + 键值数据库测试源文件包括:`common.cc`、`case_cntl.cc`、`kv_cntl.cc` 和 `kvtest.cc` 文件, 生成的可执行文件名为 `3ts_kvtest`,其中 `kvtest.cc` 涉及键值数据库测试的代码。 + +## 功能扩展 + +即添加其他数据库测试结果,以 `MariaDB` 数据库为例。 + +**数据库连接** 在 `DBConnector` 类中添加 `MariaDB` 的连接代码,需要使用 `MariaDB` 的 `C` `API` 或其他库来实现。此外还需要安装和配置必要的 `MariaDB` 客户端库和头文件,确保它 们能在项目中被正确引用。 + +**配置文件** 重新配置文件来指定数据库连接信息(例如,数据库主机、用户名、密码等),确保添加对 `MariaDB` 相关配置的支持。 + +**`SQL` 语法** 虽然 `MariaDB` 基本上与 `MySQL`兼容,但还是可能存在一些语法上的差异。因此需要确保 `SQL` 语句和查询对 `MariaDB` 兼容。 + +**功能测试** 根据项目的结构和代码,需要在 `CaseReader` 或 `ResultHandler` 类中添加或修改 代码,以处理 `MariaDB` 的特定测试和结果。并且需要考虑添加 `MariaDB` 特有的功能和事务测试。 + +**错误处理** 更新错误处理代码以处理 `MariaDB` 特定的错误和异常。 + +**文档说明** 更新项目的 `README` 或其他文档,添加关于如何配置和运行针对 `MariaDB` 的 测试的说明。 \ No newline at end of file diff --git a/make.sh b/make.sh deleted file mode 100755 index 315923d4..00000000 --- a/make.sh +++ /dev/null @@ -1 +0,0 @@ -g++ -gdwarf-2 -std=c++17 -o 3ts $(cd "$(dirname "$0")";pwd)/src/3ts/backend/main.cc -lgflags -lpthread -lconfig++ diff --git a/src/3ts/backend/cca/algorithm.h b/src/3ts/backend/cca/algorithm.h deleted file mode 100644 index a5ccda60..00000000 --- a/src/3ts/backend/cca/algorithm.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: williamcliu@tencent.com - * - */ -#pragma once -#include - -#include "../util/generic.h" - -namespace ttts { - -#define TRY_LOG(os) \ - if ((os) != nullptr) *(os) - -class HistoryAlgorithm { - public: - HistoryAlgorithm(const std::string& name) : name_(name) {} - virtual ~HistoryAlgorithm() {} - - virtual bool Check(const History& history, std::ostream* const os = nullptr) const = 0; - std::string name() const { return name_; } - - const std::string name_; -}; - -class RollbackRateAlgorithm : public HistoryAlgorithm { - public: - RollbackRateAlgorithm(const std::string& name) : HistoryAlgorithm(name) {} - virtual ~RollbackRateAlgorithm() {} - - virtual bool Check(const History& history, std::ostream* const os = nullptr) const { - return RollbackNum(history, os).size() == 0; - } - virtual std::vector RollbackNum(const History& history, - std::ostream* const os = nullptr) const = 0; -}; -} // namespace ttts diff --git a/src/3ts/backend/cca/conflict_serializable_algorithm.h b/src/3ts/backend/cca/conflict_serializable_algorithm.h deleted file mode 100644 index 276223b2..00000000 --- a/src/3ts/backend/cca/conflict_serializable_algorithm.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: williamcliu@tencent.com - * - */ -#pragma once -#include "algorithm.h" - -namespace ttts { - -class ConflictGraphNode { - public: - ConflictGraphNode() : removed_(false) {} - ~ConflictGraphNode() {} - - bool HasNoPreTrans() const { return pre_trans_set_.empty(); } - void AddPreTrans(const uint64_t pre_trans_id) { pre_trans_set_.insert(pre_trans_id); } - void RemovePreTrans(const uint64_t pre_trans_id) { pre_trans_set_.erase(pre_trans_id); } - void Remove() { removed_ = true; } - bool IsRemoved() const { return removed_; } - - private: - std::set pre_trans_set_; - bool removed_; -}; - -class ConflictGraph { - public: - ConflictGraph(const uint64_t trans_num) : nodes_(trans_num) {} - - void Insert(const uint64_t pre_trans_id, const uint64_t trans_id) { - if (pre_trans_id == trans_id) { - return; - } - nodes_[trans_id].AddPreTrans(pre_trans_id); - } - - void Insert(const std::set& pre_trans_set, const uint64_t cur_trans_id) { - for (const uint64_t pre_trans : pre_trans_set) { - Insert(pre_trans, cur_trans_id); - } - } - - bool HasCycle() { - RemoveNodesNotInCycle(); - for (const ConflictGraphNode& node : nodes_) { - if (!node.HasNoPreTrans()) { - return true; - } - } - return false; - } - - private: - void RemoveNodesNotInCycle() { - bool found_no_pre_trans = false; - // A trans which did not have pretrans can not be a part of cycle. - do { - found_no_pre_trans = false; - for (uint64_t trans_id = 0; trans_id < nodes_.size(); ++trans_id) { - if (nodes_[trans_id].HasNoPreTrans() && !nodes_[trans_id].IsRemoved()) { - found_no_pre_trans = true; - nodes_[trans_id].Remove(); - for (ConflictGraphNode& node : nodes_) { - node.RemovePreTrans(trans_id); - } - } - } - } while (found_no_pre_trans); - } - - private: - std::vector nodes_; -}; - -class ConflictSerializableAlgorithm : public HistoryAlgorithm { - public: - ConflictSerializableAlgorithm() : HistoryAlgorithm("Conflict Serializable") {} - virtual ~ConflictSerializableAlgorithm() {} - - virtual bool Check(const History& history, std::ostream* const os) const override { - ConflictGraph graph(history.trans_num()); - std::vector> read_trans_set_for_items(history.item_num()); - std::vector> write_trans_set_for_items(history.item_num()); - std::vector> write_item_set_for_transs(history.trans_num()); - for (const Operation& operation : history.operations()) { - const uint64_t trans_id = operation.trans_id(); - if (operation.IsPointDML()) { - std::set& read_trans_set = read_trans_set_for_items[operation.item_id()]; - std::set& write_trans_set = write_trans_set_for_items[operation.item_id()]; - if (Operation::Type::READ == operation.type()) { - graph.Insert(write_trans_set, trans_id); - read_trans_set.insert(trans_id); - } else if (Operation::Type::WRITE == operation.type()) { - graph.Insert(read_trans_set, trans_id); - graph.Insert(write_trans_set, trans_id); - write_trans_set.insert(trans_id); - write_item_set_for_transs[trans_id].insert(operation.item_id()); // record for abort - } - } else if (Operation::Type::SCAN_ODD == operation.type()) { - // TODO: realize scan odd - } else if (Operation::Type::ABORT == operation.type()) { - for (const uint64_t write_item : write_item_set_for_transs[trans_id]) { - // restore all items has been written - graph.Insert(read_trans_set_for_items[write_item], trans_id); - graph.Insert(write_trans_set_for_items[write_item], trans_id); - } - } - } - return !graph.HasCycle(); - } - - private: - struct ReadWriteSet { - std::set reads_; - std::set writes_; - }; -}; - -} // namespace ttts diff --git a/src/3ts/backend/cca/occ_algorithm/env/rc_env.h b/src/3ts/backend/cca/occ_algorithm/env/rc_env.h deleted file mode 100644 index 8ac299fb..00000000 --- a/src/3ts/backend/cca/occ_algorithm/env/rc_env.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: williamcliu@tencent.com - * - */ -#pragma once -#include "occ_algorithm.h" - -namespace ttts { -namespace occ_algorithm { - -template class EnvDesc, typename AnomalyType> -class TransactionDesc : public TransactionDescBase { - public: - using TransactionDescBase::TransactionDescBase; - virtual std::optional CheckConflict() = 0; - virtual std::optional Commit() { - THROW_ANOMALY(CheckConflict()); - TransactionDescBase::Commit(); - return {}; - } -}; - -template -class EnvironmentDesc : public EnvironmentBase { - static_assert( - std::is_base_of_v, TransDesc>, - "TransDesc with EnvironmentDesc should base of TransactionDesc"); - - private: - using EnvironmentBase::item_vers_; - using EnvironmentBase::history_; - using EnvironmentBase::os_; - - public: - using trans_desc_type = TransDesc; - EnvironmentDesc(const History& history, std::ostream* const os) - : EnvironmentBase(history, os), transs_(history.trans_num()) { - // initial first version - for (uint64_t item_id = 0; item_id < history_.item_num(); ++item_id) { - this->CommitVersion(item_id, nullptr); - } - for (uint64_t trans_id = 0; trans_id < history_.trans_num(); ++trans_id) { - transs_[trans_id] = std::make_unique(trans_id, *this); - } - } - - uint32_t DoCheck() { - uint32_t anomaly_count = 0; - for (const Operation& op : history_.operations()) { - auto& trans = *transs_[op.trans_id()]; - switch (op.type()) { - case Operation::Type::READ: - trans.Read(op.item_id()); - break; - case Operation::Type::WRITE: - trans.Write(op.item_id()); - break; - case Operation::Type::COMMIT: { - std::optional a = trans.Commit(); - if (a.has_value()) { - TRY_LOG(os_) << a.value() << " " << op.trans_id() << std::endl; - ++anomaly_count; - trans.Abort(); - } - break; - } - case Operation::Type::ABORT: - trans.Abort(); - break; - default: - assert(false); - } - } - return anomaly_count; - } - - std::vector> transs_; - - virtual uint64_t GetVisiableVersion(const uint64_t item_id, TransDesc* const r_trans) { - return item_vers_[item_id].size() - 1; - } -}; - -} // namespace occ_algorithm -} // namespace ttts diff --git a/src/3ts/backend/cca/occ_algorithm/env/ru_env.h b/src/3ts/backend/cca/occ_algorithm/env/ru_env.h deleted file mode 100644 index 451df534..00000000 --- a/src/3ts/backend/cca/occ_algorithm/env/ru_env.h +++ /dev/null @@ -1,181 +0,0 @@ -#pragma once -#include "../occ_algorithm.h" - -namespace ttts { -namespace occ_algorithm { - -template class EnvDesc, typename AnomalyType> -class RUTransactionDesc : public TransactionDescBase { - public: - using TransactionDescBase::TransactionDescBase; - using env_desc_type = EnvDesc; - using TransactionDescBase::env_desc_; - using RU_set_type = std::unordered_map*>>; - RUTransactionDesc(const uint64_t trans_id, const uint64_t start_ts, env_desc_type& env_desc) - : TransactionDescBase(trans_id, env_desc), - start_ts_(start_ts), - commit_ts_(0), - last_op_ts_(0), - unrepeatable_read(false), - intermediate_read(false) {} - virtual std::optional CheckConflict(const uint64_t commit_ts) = 0; - - virtual void Write(const uint64_t item_id) { - RU_w_items_[item_id].push_back(&env_desc_.CommitVersion( - item_id, static_cast(this))); - } - - virtual void Read(const uint64_t item_id, std::function&& predicate = {}) { - const uint64_t version = env_desc_.GetVisiableVersion(item_id, static_cast(this)); - if (!predicate || predicate(version)) { // without predicate || predicate satisfied - RU_r_items_[item_id].push_back( - &env_desc_.ReadVersion(item_id, version, static_cast(this))); - } - } - void set_last_op_ts(const uint64_t last_op_ts) { last_op_ts_ = last_op_ts; } - virtual std::optional Commit(const uint64_t commit_ts) { - commit_ts_ = commit_ts; - THROW_ANOMALY(CheckConflict(commit_ts)); - TransactionDescBase::Commit(); - return {}; - } - - uint64_t get_start_ts() const { return start_ts_; } - - uint64_t get_last_op_ts() const { return last_op_ts_; } - - bool unrepeatable_read; - bool intermediate_read; - virtual const RU_set_type& RU_r_items() const { return RU_r_items_; } - virtual const RU_set_type& RU_w_items() const { return RU_w_items_; } - - protected: - const uint64_t start_ts_; - uint64_t commit_ts_; - uint64_t last_op_ts_; - RU_set_type RU_r_items_; - RU_set_type RU_w_items_; -}; - -template -class RUEnvironmentDesc : public EnvironmentBase { - static_assert( - std::is_base_of_v, TransDesc>, - "TransDesc with EnvironmentDesc should base of RUTransactionDesc"); - - private: - using EnvironmentBase::item_vers_; - using EnvironmentBase::history_; - using EnvironmentBase::os_; - - public: - using trans_desc_type = TransDesc; - RUEnvironmentDesc(const History& history, std::ostream* const os) - : EnvironmentBase(history, os) { - // initial first version - for (uint64_t item_id = 0; item_id < history_.item_num(); ++item_id) { - this->CommitVersion(item_id, nullptr); - } - } - - std::vector DoCheck() { - std::vector ret_anomally; - - for (const Operation& op : history_.operations()) { - // std::cout << op << " "; - if (abort_trans_.count(op.trans_id())) continue; - if (active_trans_.count(op.trans_id()) == 0) { - active_trans_[op.trans_id()] = std::make_unique(op.trans_id(), act_cnt_, *this); - } - auto& trans = *active_trans_[op.trans_id()]; - switch (op.type()) { - case Operation::Type::READ: - trans.Read(op.item_id()); - trans.set_last_op_ts(act_cnt_); - break; - case Operation::Type::WRITE: - trans.Write(op.item_id()); - trans.set_last_op_ts(act_cnt_); - break; - case Operation::Type::SCAN_ODD: { - for (uint64_t item_id = 0; item_id < item_vers_.size(); ++item_id) { - trans.Read(item_id); - } - break; - } - case Operation::Type::COMMIT: { - if (std::optional a = trans.Commit(act_cnt_); a.has_value()) { - TRY_LOG(os_) << a.value() << " " << op.trans_id() << std::endl; - ret_anomally.push_back( - a.value()); // add by ym : TODO we do not check what anomaly it is, yet. - trans.Abort(); - abort_trans_[op.trans_id()] = std::move(active_trans_[op.trans_id()]); - active_trans_.erase(op.trans_id()); - } else { - commit_order_.push_back(op.trans_id()); - commit_trans_[op.trans_id()] = std::move(active_trans_[op.trans_id()]); - active_trans_.erase(op.trans_id()); - } - break; - } - case Operation::Type::ABORT: { - if (std::optional a = trans.Abort(); a.has_value()) { - TRY_LOG(os_) << a.value() << " " << op.trans_id() << std::endl; - ret_anomally.push_back( - a.value()); // add by ym : TODO we do not check what anomaly it is, yet. - } - abort_trans_[op.trans_id()] = std::move(active_trans_[op.trans_id()]); - active_trans_.erase(op.trans_id()); - break; - } - default: - assert(false); - } - ++act_cnt_; - } - return ret_anomally; - ; - } - - virtual ItemVersionDesc& ReadVersion(const uint64_t item_id, const uint64_t version, - TransDesc* const r_trans) { - const auto& r_ver = item_vers_[item_id][version]; - uint64_t nc_version = version; - if (r_ver->w_trans_ != nullptr && abort_trans_.count(r_ver->w_trans_->trans_id()) > 0) { - bool find_version = true; - while (find_version) { - const auto& r_ver_loop = item_vers_[item_id][--nc_version]; - if (r_ver_loop->w_trans_ == nullptr) { - r_ver_loop->r_transs_.emplace(r_trans->trans_id(), r_trans); - return *r_ver_loop; - } else if (abort_trans_.count(r_ver_loop->w_trans_->trans_id()) == 0) { - find_version = false; - r_ver_loop->r_transs_.emplace(r_trans->trans_id(), r_trans); - return *r_ver_loop; - } - } - } else { - r_ver->r_transs_.emplace(r_trans->trans_id(), r_trans); - } - - return *r_ver; - } - - // actually we do not need to alter here. - virtual uint64_t GetVisiableVersion(const uint64_t item_id, TransDesc* const r_trans) { - return item_vers_[item_id].size() - 1; - } - - public: - std::map> active_trans_; - std::map> commit_trans_; - std::map> abort_trans_; - std::vector commit_order_; - - private: - uint64_t act_cnt_; - std::map latest_commit_time_; -}; - -} // namespace occ_algorithm -} // namespace ttts diff --git a/src/3ts/backend/cca/occ_algorithm/env/si_env.h b/src/3ts/backend/cca/occ_algorithm/env/si_env.h deleted file mode 100644 index 3476d36a..00000000 --- a/src/3ts/backend/cca/occ_algorithm/env/si_env.h +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: williamcliu@tencent.com - * - */ -#pragma once -#include - -#include "../occ_algorithm.h" - -namespace ttts { -namespace occ_algorithm { -struct Snapshot { - uint64_t t_min; - uint64_t t_max; - uint64_t t_id; - std::set t_active_id; -}; - -template class EnvDesc, typename AnomalyType> -class SITransactionDesc : public TransactionDescBase { - public: - using env_desc_type = EnvDesc; - SITransactionDesc(const uint64_t trans_id, const uint64_t start_ts, Snapshot&& snapshot, - env_desc_type& env_desc) - : TransactionDescBase(trans_id, env_desc), - start_ts_(start_ts), - commit_ts_(0), - back_check_(false), - snapshot_(snapshot) {} - virtual std::optional CheckConflict(const uint64_t commit_ts) = 0; - virtual std::optional Commit(const uint64_t commit_ts) { - commit_ts_ = commit_ts; - THROW_ANOMALY(CheckConflict(commit_ts)); - TransactionDescBase::Commit(); - return {}; - } - const Snapshot& snapshot() const { return snapshot_; } - uint64_t start_ts() const { return start_ts_; } - uint64_t commit_ts() const { return commit_ts_; } - void set_back_check() { back_check_ = true; }; - bool back_check() { return back_check_; } - - private: - const uint64_t start_ts_; - uint64_t commit_ts_; - bool back_check_; // used by focc, active trans r_set is not complete. so we re-check it later by - const Snapshot snapshot_; -}; - -template -class SIEnvironmentDesc : public EnvironmentBase { - static_assert( - std::is_base_of_v, TransDesc>, - "TransDesc with SIEnvironmentDesc should base of SITransactionDesc"); - - public: - using EnvironmentBase::item_vers_; - using EnvironmentBase::history_; - using EnvironmentBase::os_; - - public: - using trans_desc_type = TransDesc; - - SIEnvironmentDesc(const History& history, std::ostream* const os) - : EnvironmentBase(history, os), trans_id_cnt_(1), act_cnt_(1) {} - - Snapshot valueSnapShot(const uint64_t trans_id) const { - Snapshot res; - res.t_min = active_trans_.empty() ? 0 : active_trans_.begin()->first; - res.t_max = commit_trans_.empty() ? 0 : commit_trans_.rbegin()->first + 1; - res.t_id = trans_id; - for (const auto& i : active_trans_) { - res.t_active_id.insert(i.first); - } - return res; - } - uint64_t valueRealTransId(const uint64_t trans_id) { - if (!real_tran_id_.count(trans_id)) { - real_tran_id_[trans_id] = trans_id_cnt_; - ++trans_id_cnt_; - } - return real_tran_id_[trans_id]; - } - std::vector DoCheck() { - // initial first version. - // add by ym: In SI we init first version here. And in RC, we init it at construction. - const uint64_t id = valueRealTransId(history_.trans_num() + 1); - commit_trans_[id] = std::make_unique(id, act_cnt_, valueSnapShot(id), *this); - for (uint64_t item_id = 0; item_id < history_.item_num(); ++item_id) { - this->CommitVersion(item_id, commit_trans_[id].get()); - ++act_cnt_; - } - commit_trans_[id]->Commit(act_cnt_); - ++act_cnt_; - // uint32_t anomaly_count = 0; - std::vector ret_anomally; - for (const Operation& op : history_.operations()) { - const uint64_t real_id = valueRealTransId(op.trans_id()); - if (abort_trans_.count(real_id)) continue; - if (active_trans_.count(real_id) == 0) { - active_trans_[real_id] = - std::make_unique(real_id, act_cnt_, valueSnapShot(real_id), *this); - } - auto& trans = *active_trans_[real_id]; - switch (op.type()) { - case Operation::Type::READ: { - trans.Read(op.item_id()); - break; - } - case Operation::Type::WRITE: { - trans.Write(op.item_id()); - break; - } - case Operation::Type::SCAN_ODD: { - for (uint64_t item_id = 0; item_id < item_vers_.size(); ++item_id) { - trans.Read(item_id, [](const uint64_t version) { return version % 2 == 0; }); - } - break; - } - case Operation::Type::COMMIT: { - if (std::optional a = trans.Commit(act_cnt_); a.has_value()) { - ret_anomally.push_back(a.value()); - TRY_LOG(os_) << a.value() << " " << op.trans_id() << std::endl; - //++anomaly_count; - trans.Abort(); - abort_trans_[real_id] = std::move(active_trans_[real_id]); - active_trans_.erase(real_id); - } else { - commit_trans_[real_id] = std::move(active_trans_[real_id]); - active_trans_.erase(real_id); - } - break; - } - case Operation::Type::ABORT: { - trans.Abort(); - abort_trans_[real_id] = std::move(active_trans_[real_id]); - active_trans_.erase(real_id); - break; - } - default: - assert(false); - } - ++act_cnt_; - } - return ret_anomally; - } - - virtual uint64_t GetVisiableVersion(const uint64_t item_id, TransDesc* const r_trans) { - for (auto it = item_vers_[item_id].rbegin(); it != item_vers_[item_id].rend(); ++it) { - if (TupleSatisfiesMVCC(*it, r_trans->snapshot())) { - return (*it)->version_; - } - } - assert(false); - return 0; - } - - std::optional GetLatestCommitTime(const uint64_t item_id) const { - const auto it = latest_commit_time_.find(item_id); - return it == latest_commit_time_.end() ? std::optional() - : std::optional(it->second); - } - void UpdateCommitTime(const uint64_t item_id, uint64_t ts) { latest_commit_time_[item_id] = ts; } - static bool TupleSatisfiesMVCC(std::unique_ptr>& tuple, - const Snapshot& snapshot) { - if (tuple->w_trans_->is_aborted()) { - return false; - } - if (tuple->w_trans_->is_committed()) { - if (tuple->w_trans_->trans_id() < snapshot.t_min) return true; - if (tuple->w_trans_->trans_id() >= snapshot.t_max) return false; - return snapshot.t_active_id.count(tuple->w_trans_->trans_id()) == 0; - } - return tuple->w_trans_->trans_id() == snapshot.t_id; - } - - public: - std::map> active_trans_; - std::map> commit_trans_; - std::map> abort_trans_; - - private: - uint64_t trans_id_cnt_; - uint64_t act_cnt_; - std::map real_tran_id_; // not assume that trans ids are incremental - std::map latest_commit_time_; -}; -} // namespace occ_algorithm -} // namespace ttts diff --git a/src/3ts/backend/cca/occ_algorithm/occ_algorithm.h b/src/3ts/backend/cca/occ_algorithm/occ_algorithm.h deleted file mode 100644 index 0bb75ff1..00000000 --- a/src/3ts/backend/cca/occ_algorithm/occ_algorithm.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: williamcliu@tencent.com - * - */ -#pragma once -#include "../algorithm.h" - -namespace ttts { -namespace occ_algorithm { - -template -struct ItemVersionDesc { - ItemVersionDesc(const uint64_t item_id, const uint64_t version, TransDesc* const w_trans) - : item_id_(item_id), version_(version), w_trans_(w_trans) {} - ItemVersionDesc(const ItemVersionDesc&) = delete; - ItemVersionDesc(ItemVersionDesc&&) = delete; - const uint64_t item_id_; - const uint64_t version_; - TransDesc* w_trans_; - std::unordered_map r_transs_; -}; - -#define THROW_ANOMALY(expression) \ - do { \ - const auto a = (expression); \ - if (a.has_value()) { \ - return a; \ - } \ - } while (0) - -template -bool Has(const Container& container, const typename Container::key_type& key) { - return container.find(key) != container.end(); -} - -template -typename Container::mapped_type AssertGet(const Container& container, - const typename Container::key_type& key) { - assert(Has(container, key)); - return container.find(key)->second; -} -template -class EnvironmentBase { - public: - EnvironmentBase(const History& history, std::ostream* const os) - : item_vers_(history.item_num()), history_(history), os_(os) {} - virtual ~EnvironmentBase() = default; - virtual std::vector DoCheck() = 0; - bool HasVersion(const uint64_t item_id, const uint64_t version) { - return item_vers_[item_id].size() > version; - } - - ItemVersionDesc& GetVersion(const uint64_t item_id, const uint64_t version) { - assert(HasVersion(item_id, version)); - return *item_vers_[item_id][version]; - } - // put an version in the item_vers_ - virtual ItemVersionDesc& CommitVersion(const uint64_t item_id, - TransDesc* const w_trans) { - const uint64_t version = item_vers_[item_id].size(); - item_vers_[item_id].push_back( - std::make_unique>(item_id, version, w_trans)); - return *item_vers_[item_id].back(); - } - - virtual uint64_t GetVisiableVersion(const uint64_t item_id, TransDesc* const r_trans) = 0; - - virtual ItemVersionDesc& ReadVersion(const uint64_t item_id, const uint64_t version, - TransDesc* const r_trans) { - const auto& r_ver = item_vers_[item_id][version]; - r_ver->r_transs_.emplace(r_trans->trans_id(), r_trans); - assert(r_ver->version_ == version); - return *r_ver; - } - - protected: - std::vector>>> item_vers_; - const History& history_; - std::ostream* const os_; -}; - -template class EnvDesc, typename AnomalyType> -class TransactionDescBase { - public: - using item_type = ItemVersionDesc; - using env_desc_type = EnvDesc; - using set_type = std::unordered_map*>; - TransactionDescBase(const uint64_t trans_id, env_desc_type& env_desc) - : env_desc_(env_desc), trans_id_(trans_id), committed_() {} - virtual ~TransactionDescBase() {} - TransactionDescBase(const TransactionDescBase&) = default; - TransactionDescBase(TransactionDescBase&&) = delete; - - bool is_running() const { return !committed_.has_value(); } - bool is_committed() const { return committed_.has_value() && committed_.value(); } - bool is_aborted() const { return committed_.has_value() && !committed_.value(); } - uint64_t trans_id() const { return trans_id_; } - virtual const set_type& r_items() const { return r_items_; } - virtual const set_type& w_items() const { return w_items_; } - - virtual void Read(const uint64_t item_id, std::function&& predicate = {}) { - if (!Has(w_items_, item_id) && !Has(r_items_, item_id)) { - const uint64_t version = env_desc_.GetVisiableVersion(item_id, static_cast(this)); - if (!predicate /* without predicate */ || predicate(version) /* predicate satisfied */) { - r_items_[item_id] = &env_desc_.ReadVersion(item_id, version, static_cast(this)); - } - } - } - - virtual void Write(const uint64_t item_id) { - // std::cout<<"base write"; - w_items_[item_id] = nullptr; // occupy a location - } - - virtual std::optional Commit() { - for (auto& pair : - w_items_) { // add by ym : while using RU, w_items_ is empty. So jump this for-loop - pair.second = &env_desc_.CommitVersion( - pair.first, static_cast(this)); - } - committed_ = true; - return {}; - } - - virtual std::optional Abort() { - committed_ = false; - return {}; - } - - protected: - env_desc_type& env_desc_; - const uint64_t trans_id_; - std::optional committed_; - set_type r_items_; - set_type w_items_; -}; - -} // namespace occ_algorithm - -template -class OCCAlgorithm : public RollbackRateAlgorithm { - public: - OCCAlgorithm() : RollbackRateAlgorithm(TransDesc::name + " with OCC") {} - virtual ~OCCAlgorithm() {} - virtual bool Check(const History& history, std::ostream* const os) const override { - return RollbackNum(history, os).size() == 0; - } - std::vector RollbackNum(const History& history, std::ostream* const os = nullptr) const { - typename TransDesc::env_desc_type c(history, os); - std::vector ret_anomally = c.DoCheck(); - TRY_LOG(os) << "aborted: " << ret_anomally.size(); - return ret_anomally; - } -}; - -} // namespace ttts diff --git a/src/3ts/backend/cca/occ_algorithm/trans/bocc_trans.h b/src/3ts/backend/cca/occ_algorithm/trans/bocc_trans.h deleted file mode 100644 index f3cfa9f7..00000000 --- a/src/3ts/backend/cca/occ_algorithm/trans/bocc_trans.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: elioyan@tencent.com - * - */ -#pragma once -#include "../env/si_env.h" - -namespace ttts { -namespace occ_algorithm { -class BoccTransactionDesc - : public SITransactionDesc { - public: - static std::string name; - - BoccTransactionDesc(const uint64_t trans_id, const uint64_t start_ts, Snapshot&& snapshot, - env_desc_type& env_desc) - : SITransactionDesc(trans_id, start_ts, std::move(snapshot), env_desc) {} - virtual std::optional CheckConflict(const uint64_t commit_ts) override { - // History history_with_write_version = env_desc_.GetHistory(); - for (const auto& ptr : env_desc_.commit_trans_) { - if (ptr.second->commit_ts() > start_ts() && ptr.second->commit_ts() < this->commit_ts()) { - if (Intersect(r_items_, ptr.second->w_items_)) { - return Anomally::UNKNOWN; - } - } - } - return {}; - } - - private: - bool Intersect(set_type& left, set_type& right) { - for (auto& a : left) { - if (right.count(a.first) > 0) return true; - } - return false; - } -}; -std::string BoccTransactionDesc::name = "bocc algorithm"; - -} // namespace occ_algorithm -} // namespace ttts diff --git a/src/3ts/backend/cca/occ_algorithm/trans/focc_trans.h b/src/3ts/backend/cca/occ_algorithm/trans/focc_trans.h deleted file mode 100644 index fe87de9b..00000000 --- a/src/3ts/backend/cca/occ_algorithm/trans/focc_trans.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: elioyan@tencent.com - * - */ -#pragma once -#include "../env/si_env.h" - -namespace ttts { -namespace occ_algorithm { -class FoccTransactionDesc - : public SITransactionDesc { - public: - static std::string name; - - FoccTransactionDesc(const uint64_t trans_id, const uint64_t start_ts, Snapshot&& snapshot, - env_desc_type& env_desc) - : SITransactionDesc(trans_id, start_ts, std::move(snapshot), env_desc) {} - virtual std::optional CheckConflict(const uint64_t commit_ts) override { - // History history_with_write_version = env_desc_.GetHistory(); - for (const auto& ptr : env_desc_.active_trans_) { - if (ptr.second->start_ts() < this->commit_ts() && ptr.second->commit_ts() == 0) { - ptr.second->set_back_check(); - if (Intersect(w_items_, ptr.second->r_items_)) { - return Anomally::UNKNOWN; - } - } - } - for (const auto& ptr : env_desc_.commit_trans_) { - // if (ptr.second->commit_ts() > start_ts() && ptr.second->commit_ts() < this->commit_ts()) { - // once it - if (back_check()) { - if (Intersect(r_items_, ptr.second->w_items_)) { - return Anomally::UNKNOWN; - } - } - } - return {}; - } - - private: - bool Intersect(set_type& left, set_type& right) { - for (auto& a : left) { - if (right.count(a.first) > 0) return true; - } - return false; - } -}; -std::string FoccTransactionDesc::name = "FoccTransactionDesc"; - -} // namespace occ_algorithm -} // namespace ttts diff --git a/src/3ts/backend/cca/occ_algorithm/trans/ssi_trans.h b/src/3ts/backend/cca/occ_algorithm/trans/ssi_trans.h deleted file mode 100644 index 25d59394..00000000 --- a/src/3ts/backend/cca/occ_algorithm/trans/ssi_trans.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: moggma@tencent.com - * - */ -#pragma once - -#include "../env/si_env.h" - -namespace ttts { -namespace occ_algorithm { - -class SSITransactionDesc - : public SITransactionDesc { - public: - SSITransactionDesc(const uint64_t trans_id, const uint64_t start_ts, Snapshot&& snapshot, - env_desc_type& env_desc) - : SITransactionDesc( - trans_id, start_ts, std::move(snapshot), env_desc) {} - static std::string name; - std::optional CheckConflict(uint64_t commit_ts) { - std::optional a; - for (const auto& i : r_items_) { - a = ReadConflict(i.first, i.second->version_); - if (a.has_value()) return a; - } - for (const auto& i : w_items_) { - a = WriteConflict(i.first); - if (a.has_value()) return a; - } - if (!in_conflict().empty() && !out_conflict().empty()) { - return std::optional(Anomally::WRITE_SKEW); - } - for (const auto& i : w_items_) { - const auto tmp = env_desc_.GetLatestCommitTime(i.first); - if (tmp.has_value() && tmp.value() <= commit_ts && tmp.value() >= start_ts()) { - return std::optional(Anomally::WW_CONFLICT); - } - } - for (const auto& i : w_items_) { - env_desc_.UpdateCommitTime(i.first, commit_ts); - } - commit_ts_ = commit_ts; - return {}; - } - - std::optional ReadConflict(const uint64_t item_id, const uint64_t read_version) { - for (uint64_t version = 0; env_desc_.HasVersion(item_id, version); ++version) { - const auto& it = env_desc_.GetVersion(item_id, version); - if (it.w_trans_->trans_id() == trans_id()) continue; - if (it.w_trans_->is_running()) { - it.w_trans_->UpInConflict(this); - UpOutConflict(it.w_trans_); - } - if (version > read_version) { - if (it.w_trans_->is_committed() && !it.w_trans_->out_conflict().empty()) { - return std::optional(Anomally::WRITE_SKEW); - } - if (!it.w_trans_->is_aborted()) { - it.w_trans_->UpInConflict(this); - UpOutConflict(it.w_trans_); - } - } - } - return {}; - } - std::optional WriteConflict(const uint64_t item_id) { - for (uint64_t version = 0; env_desc_.HasVersion(item_id, version); ++version) { - const auto& it = env_desc_.GetVersion(item_id, version); - for (const auto& i : it.r_transs_) { - if (i.second->trans_id() == trans_id()) continue; - if (i.second->is_running() || - (i.second->is_committed() && i.second->commit_ts() > start_ts())) { - if (i.second->is_committed() && !i.second->in_conflict().empty()) { - return std::optional(Anomally::WRITE_SKEW); - } - i.second->UpOutConflict(this); - UpInConflict(i.second); - } - } - } - return {}; - } - - virtual std::optional Abort() override { - if (is_aborted()) return {}; - committed_ = false; - for (const auto& i : out_conflict()) { - i->DownInConflict(this); - } - for (const auto& i : in_conflict()) { - i->DownOutConflict(this); - } - return {}; - } - - void UpInConflict(SSITransactionDesc* trans_id) { in_conflict_.insert(trans_id); } - void UpOutConflict(SSITransactionDesc* trans_id) { out_conflict_.insert(trans_id); } - void DownInConflict(SSITransactionDesc* trans_id) { in_conflict_.erase(trans_id); } - void DownOutConflict(SSITransactionDesc* trans_id) { out_conflict_.erase(trans_id); } - const std::set& in_conflict() const { return in_conflict_; } - const std::set& out_conflict() const { return out_conflict_; } - uint64_t commit_ts() const { - assert(commit_ts_.has_value()); - return commit_ts_.value(); - } - - private: - std::optional commit_ts_; - std::set in_conflict_; - std::set out_conflict_; -}; - -std::string SSITransactionDesc::name = "SSI"; -} // namespace occ_algorithm -} // namespace ttts diff --git a/src/3ts/backend/cca/occ_algorithm/trans/wsi_trans.h b/src/3ts/backend/cca/occ_algorithm/trans/wsi_trans.h deleted file mode 100644 index 7226e73e..00000000 --- a/src/3ts/backend/cca/occ_algorithm/trans/wsi_trans.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: moggma@tencent.com - * - */ -#pragma once - -#include "../env/si_env.h" - -namespace ttts { -namespace occ_algorithm { - -class WSITransactionDesc - : public SITransactionDesc { - public: - WSITransactionDesc(const uint64_t trans_id, const uint64_t start_ts, Snapshot&& snapshot, - env_desc_type& env_desc) - : SITransactionDesc( - trans_id, start_ts, std::move(snapshot), env_desc) {} - static std::string name; - std::optional CheckConflict(uint64_t commit_ts) override { - if (!w_items_.empty()) - for (const auto& i : r_items_) { - const auto tmp = env_desc_.GetLatestCommitTime(i.first); - if (tmp.has_value() && tmp.value() <= commit_ts && tmp.value() >= start_ts()) { - return std::optional(Anomally::RW_CONFLICT); - } - } - for (const auto& i : w_items_) { - env_desc_.UpdateCommitTime(i.first, commit_ts); - } - return {}; - } -}; - -std::string WSITransactionDesc::name = "WSI"; -} // namespace occ_algorithm -} // namespace ttts diff --git a/src/3ts/backend/cca/serializable_algorithm.h b/src/3ts/backend/cca/serializable_algorithm.h deleted file mode 100644 index 4f7c28d4..00000000 --- a/src/3ts/backend/cca/serializable_algorithm.h +++ /dev/null @@ -1,418 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: williamcliu@tencent.com - * - */ -#pragma once -#include "algorithm.h" - -namespace ttts { - -enum class SerializeLevel { - ALL_SAME, // committed transactions and aborted transactions must read same versions - COMMIT_SAME, // only committed transactions must read same versions - FINAL_SAME // reading same is not necessary -}; - -template -std::string ToString(); -template -std::string ToString(); - -template <> -std::string ToString() { - return "ALL_SAME"; -} -template <> -std::string ToString() { - return "COMMIT_SAME"; -} -template <> -std::string ToString() { - return "FINAL_SAME"; -} -template <> -std::string ToString() { - return "UNCOMMITTED_READ"; -} -template <> -std::string ToString() { - return "COMMITTED_READ"; -} -template <> -std::string ToString() { - return "REPEATABLE_READ"; -} -template <> -std::string ToString() { - return "SI_READ"; -} - -// The executing result of one history. The history is serializable if the two results of original -// history and serialized history are same. -// The history result contains each transaction's read result and each item's final version. -class HistoryResult { - public: - HistoryResult(const uint64_t trans_num) : trans_results_(trans_num) {} - HistoryResult(HistoryResult&&) = default; - ~HistoryResult() {} - HistoryResult& operator=(HistoryResult&&) = default; - - // Check if all transactions read the same versions - bool ReadEqual(const HistoryResult& result) const { - return trans_results_ == result.trans_results_; - } - - // Check if all committed transaction read the same versions, ignore aborted transactions - bool CommitReadEqual(const HistoryResult& result) const { - if (trans_results_.size() != result.trans_results_.size()) { - return false; - } - for (uint64_t trans_id = 0; trans_id < trans_results_.size(); ++trans_id) { - if ((trans_results_[trans_id].committed_ != - result.trans_results_[trans_id].committed_) || // different transaction status - (trans_results_[trans_id].committed_ && - trans_results_[trans_id].read_results_ != - result.trans_results_[trans_id].read_results_)) { - return false; - } // different read results - } - return true; - } - - // Check if the final versions of each item are same. - bool FinalEqual(const HistoryResult& result) const { - return item_final_versions_ == result.item_final_versions_; - } - - // Add version to read result to compare with other history results. - void PushTransReadResult(const uint64_t trans_id, const uint64_t item_id, - const uint64_t version) { - assert(trans_id < trans_results_.size()); - trans_results_[trans_id].read_results_.emplace_back( - std::vector>{{item_id, version}}); - } - - // Add versions to read result to compare with other history results. - void PushTransReadResult(const uint64_t trans_id, - std::vector>&& item_vers) { - assert(trans_id < trans_results_.size()); - trans_results_[trans_id].read_results_.emplace_back(std::move(item_vers)); - } - - // Mark transaction as committed transaction. - void SetTransCommitted(const uint64_t trans_id, const bool committed) { - assert(trans_id < trans_results_.size()); - trans_results_[trans_id].committed_ = committed; - } - - // Record the final version of each variables to compare with other history results. - void SetItemFinalVersions(std::vector&& versions) { - item_final_versions_ = std::move(versions); - } - - private: - // Record each version the transaction has been read and whether the transaction is committed or - // aborted. - struct TransResult { - bool operator==(const TransResult& result) const { - return read_results_ == result.read_results_ && committed_ == result.committed_; - } - std::vector>> read_results_; - bool committed_; - }; - - std::vector trans_results_; // size = trans_num - std::vector item_final_versions_; // size = item_num -}; - -// Traverse all serialized histories and pass each history to handle. Once handle returns true, then -// return true. -bool Serialize(const History& history, const std::function& handle) { - std::vector> trans_operations(history.trans_num()); - for (const Operation& operation : history.operations()) { - trans_operations[operation.trans_id()].push_back(operation); - } - std::vector trans_order; - for (uint64_t trans_id = 0; trans_id < history.trans_num(); ++trans_id) { - trans_order.push_back(trans_id); - } - do { - std::vector operations; - for (uint64_t trans_id : trans_order) - for (const Operation& operation : trans_operations[trans_id]) { - operations.push_back(operation); - } - if (handle(History(history.trans_num(), history.item_num(), std::move(operations)))) { - return true; - } - } while (std::next_permutation(trans_order.begin(), trans_order.end())); - return false; -} - -template -inline static bool ResultsEqual(const HistoryResult& _1, const HistoryResult& _2); - -template -inline static HistoryResult Result(const History& history); - -// Main entry of the algorithm. -template -class HistorySerializableAlgorithm : public HistoryAlgorithm { - public: - HistorySerializableAlgorithm() - : HistoryAlgorithm("Serialize " + ToString() + " " + ToString()) {} - virtual ~HistorySerializableAlgorithm() {} - - virtual bool Check(const History& history, std::ostream* const os) const override { - History history_with_write_version = history; - history_with_write_version.UpdateWriteVersions(); - const auto check_serial = [this, &history_with_write_version, &os](History&& serial_history) { - // Check if the result of original history is same as serialized history. - if (ResultsEqual(Result(history_with_write_version), Result(serial_history))) { - TRY_LOG(os) << serial_history; - return true; // break - } - return false; // continue - }; - return Serialize(history_with_write_version, check_serial); - } - - private: -}; - -template <> -bool ResultsEqual(const HistoryResult& _1, const HistoryResult& _2) { - return _1.ReadEqual(_2) && _1.FinalEqual(_2); -} - -template <> -bool ResultsEqual(const HistoryResult& _1, const HistoryResult& _2) { - return _1.CommitReadEqual(_2) && _1.FinalEqual(_2); -} - -template <> -bool ResultsEqual(const HistoryResult& _1, const HistoryResult& _2) { - return _1.FinalEqual(_2); -} - -// Call read_version for each item to determine which version to read and check whether is odd. -std::vector> ScanOdd( - const uint64_t item_num, const std::function& read_version) { - std::vector> scan_item_vers; - for (uint64_t item_id = 0; item_id < item_num; ++item_id) { - const uint64_t version = read_version(item_id); - if (version % 2 == 0) { - scan_item_vers.emplace_back(item_id, version); - } - } - return scan_item_vers; -} - -// Get result of the history with uncomitted read strategy. -// A write version wrote by an uncomitted write transaction, may be read by other read transactions. -// When a transaction writes a version, update the version to item_version_link directly and release -// the old version if the transaction has wrote twice to a same item. -// When a transaction aborts, release all versions the transaction has wrote. -template <> -HistoryResult Result(const History& history) { - HistoryResult result(history.trans_num()); - std::vector>> trans_write_item_versions( - history.trans_num(), std::vector>(history.item_num())); - std::vector>> item_version_link( - history.item_num(), {0}); /* 0 is always the first version */ - const auto latest_version = [&item_version_link](const uint64_t item_id) { - const std::vector>& version_link = item_version_link[item_id]; - uint64_t i = version_link.size() - 1; - for (; i >= 0 && !version_link[i].has_value(); --i) - ; - assert(i < version_link.size()); - return version_link[i].value(); - }; - const auto release_version = [&item_version_link](const uint64_t item_id, - const uint64_t version) { - for (std::optional& cur_version : item_version_link[item_id]) { - if (cur_version.has_value() && cur_version.value() == version) { - cur_version = {}; - return; - } - } - assert(false); // cannot found the version - }; - for (const Operation& operation : history.operations()) { - if (operation.type() == Operation::Type::READ) { - // we did not change version when resort operations, so we use latest version instead of - // operation.version() - result.PushTransReadResult(operation.trans_id(), operation.item_id(), - latest_version(operation.item_id())); - } else if (operation.type() == Operation::Type::SCAN_ODD) { - result.PushTransReadResult( - operation.trans_id(), - ScanOdd(history.item_num(), - [&latest_version](const uint64_t item_id) { return latest_version(item_id); })); - } else if (operation.type() == Operation::Type::WRITE) { - item_version_link[operation.item_id()].push_back(operation.version()); - std::optional& my_last_write_version = - trans_write_item_versions[operation.trans_id()][operation.item_id()]; - if (my_last_write_version.has_value()) { - release_version(operation.item_id(), my_last_write_version.value()); - } - my_last_write_version = operation.version(); - } else if (operation.type() == Operation::Type::ABORT) { - for (uint64_t item_id = 0; item_id < history.item_num(); ++item_id) { - const std::optional& my_last_write_version = - trans_write_item_versions[operation.trans_id()][item_id]; - if (my_last_write_version.has_value()) { - release_version(item_id, my_last_write_version.value()); - } - } - result.SetTransCommitted(operation.trans_id(), false); - } else if (operation.type() == Operation::Type::COMMIT) { - result.SetTransCommitted(operation.trans_id(), true); - } else { - throw "Unexpected operation type:" + std::to_string(static_cast(operation.type())); - } - } - - std::vector final_versions(history.item_num()); - for (uint64_t item_id = 0; item_id < history.item_num(); ++item_id) { - final_versions[item_id] = latest_version(item_id); - } - result.SetItemFinalVersions(std::move(final_versions)); - return result; -} - -// Get result of the history with at least committed read strategy. -// Which version to read depends on read_version callback. -// When a transaction writes a version, record the version to write set only. -// When a transaction commits, update all versions in write set to latest_versions then the versions -// can be seend by other read transactions. -template -HistoryResult ResultAtLeastCommittedRead(const History& history, ReadVersion&& read_version) { - HistoryResult result(history.trans_num()); - std::vector>> trans_write_item_versions( - history.trans_num(), std::vector>(history.item_num())); - std::vector latest_versions(history.item_num(), 0); - for (const Operation& operation : history.operations()) { - if (operation.type() == Operation::Type::READ) { - result.PushTransReadResult(operation.trans_id(), operation.item_id(), - read_version(operation.trans_id(), operation.item_id(), - trans_write_item_versions, latest_versions)); - } else if (operation.type() == Operation::Type::SCAN_ODD) { - result.PushTransReadResult( - operation.trans_id(), - ScanOdd(history.item_num(), - std::bind(read_version, operation.trans_id(), std::placeholders::_1, - trans_write_item_versions, latest_versions))); - } else if (operation.type() == Operation::Type::WRITE) { - trans_write_item_versions[operation.trans_id()][operation.item_id()] = operation.version(); - } else if (operation.type() == Operation::Type::ABORT) { - result.SetTransCommitted(operation.trans_id(), false); - } else if (operation.type() == Operation::Type::COMMIT) { - for (uint64_t item_id = 0; item_id < history.item_num(); item_id++) { - std::optional write_version = - trans_write_item_versions[operation.trans_id()][item_id]; - if (write_version.has_value()) { - latest_versions[item_id] = write_version.value(); - } - } - result.SetTransCommitted(operation.trans_id(), true); - } else { - throw "Unexpected operation type:" + std::to_string(static_cast(operation.type())); - } - } - result.SetItemFinalVersions(std::move(latest_versions)); - return result; -} - -// Get result of the history with committed read strategy. -// Always read the latest version. -template <> -HistoryResult Result(const History& history) { - return ResultAtLeastCommittedRead( - history, - [](const uint64_t trans_id, const uint64_t item_id, - const std::vector>>& trans_write_item_versions, - const std::vector& latest_versions) { - const std::optional& write_version = trans_write_item_versions[trans_id][item_id]; - if (write_version.has_value()) { // item has written - return write_version.value(); - } else { - return latest_versions[item_id]; - } - }); -} - -// Get result of the history with repeatable read strategy. -// Read the latest version only when the item has not been read or written. -template <> -HistoryResult Result(const History& history) { - std::vector>> trans_read_item_versions( - history.trans_num(), std::vector>(history.item_num())); - return ResultAtLeastCommittedRead( - history, - [&trans_read_item_versions]( - const uint64_t trans_id, const uint64_t item_id, - const std::vector>>& trans_write_item_versions, - const std::vector& latest_versions) { - const std::optional& write_version = trans_write_item_versions[trans_id][item_id]; - if (write_version.has_value()) { // item has written - return write_version.value(); - } else { - std::optional& read_version = trans_read_item_versions[trans_id][item_id]; - if (read_version.has_value()) { // item has read - read_version = latest_versions[item_id]; - } - return read_version.value(); - } - }); -} - -template <> -HistoryResult Result(const History& history) { - HistoryResult result(history.trans_num()); - std::vector latest_versions(history.item_num(), 0); - std::vector> trans_item_versions_backup(history.trans_num()); - std::vector> trans_item_versions_snapshot(history.trans_num()); - for (const Operation& operation : history.operations()) { - if (trans_item_versions_snapshot[operation.trans_id()].empty()) { - trans_item_versions_snapshot[operation.trans_id()] = latest_versions; - trans_item_versions_backup[operation.trans_id()] = latest_versions; - } - if (operation.type() == Operation::Type::READ) { - uint64_t read_version = - trans_item_versions_snapshot[operation.trans_id()][operation.item_id()]; - result.PushTransReadResult(operation.trans_id(), operation.item_id(), read_version); - } else if (operation.type() == Operation::Type::SCAN_ODD) { - result.PushTransReadResult( - operation.trans_id(), - ScanOdd(history.item_num(), [&trans_item_versions_snapshot, - trans_id = operation.trans_id()](const uint64_t item_id) { - return trans_item_versions_snapshot[trans_id][item_id]; - })); - } else if (operation.type() == Operation::Type::WRITE) { - trans_item_versions_snapshot[operation.trans_id()][operation.item_id()] = operation.version(); - } else if (operation.type() == Operation::Type::ABORT) { - result.SetTransCommitted(operation.trans_id(), false); - } else if (operation.type() == Operation::Type::COMMIT) { - for (uint64_t item_id = 0; item_id < history.item_num(); ++item_id) { - if (trans_item_versions_snapshot[operation.trans_id()][item_id] != - trans_item_versions_backup[operation.trans_id()][item_id]) { - latest_versions[item_id] = trans_item_versions_snapshot[operation.trans_id()][item_id]; - } - } - result.SetTransCommitted(operation.trans_id(), true); - } else { - throw "Unexpected operation type:" + std::to_string(static_cast(operation.type())); - } - } - - result.SetItemFinalVersions(std::move(latest_versions)); - return result; -} -} // namespace ttts diff --git a/src/3ts/backend/history/generator.h b/src/3ts/backend/history/generator.h deleted file mode 100644 index 0134d562..00000000 --- a/src/3ts/backend/history/generator.h +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: williamcliu@tencent.com - * - */ -#pragma once -#include - -#include "../util/generic.h" - -namespace ttts { - -class HistoryGenerator { - public: - HistoryGenerator() {} - ~HistoryGenerator() {} - virtual void DeliverHistories(const std::function &handle) const = 0; -}; - -class InputHistoryGenerator : public HistoryGenerator { - public: - InputHistoryGenerator(const std::string &path) : path_(path) {} - ~InputHistoryGenerator() {} - virtual void DeliverHistories(const std::function &handle) const override { - std::ifstream fs(path_); - if (!fs) { - std::cerr << "Open Operation Sequences File Failed" << std::endl; - return; - } - for (History history; fs >> history;) { - handle(std::move(history)); - } - } - - private: - const std::string path_; -}; - -class RandomHistoryGenerator : public HistoryGenerator { - public: - RandomHistoryGenerator(const Options &opt, const uint64_t history_num) - : trans_num_(opt.trans_num), - item_num_(opt.item_num), - dml_operation_num_(opt.max_dml), - history_num_(history_num), - with_abort_(opt.with_abort), - tail_tcl_(opt.tail_tcl), - rd_(), - gen_(rd_()), - rand_trans_id_(0, trans_num_ - 1), - rand_item_id_(0, item_num_ - 1), - rand_bool_(0.5) {} - - ~RandomHistoryGenerator() {} - - virtual void DeliverHistories(const std::function &handle) const { - for (uint64_t history_no = 0; history_no < history_num_; ++history_no) { - if (tail_tcl_) { - handle(MakeDMLHistory() + MakeTCLHistory()); - } else { - handle(ShuffleHistory(MakeDMLHistory() + MakeTCLHistory())); - } - } - } - - History ShuffleHistory(History &&history) const { - std::vector last_pos(trans_num_, -1); - for (uint64_t i = 0; i < dml_operation_num_; ++i) last_pos[history[i].trans_id()] = i; - uint64_t left = -1; - std::uniform_int_distribution rand_pos; - for (uint64_t i = dml_operation_num_; i < history.size(); ++i) { - left = std::max(left, last_pos[history[i].trans_id()]) + 1; - if (left >= i) { - break; - } - rand_pos = std::uniform_int_distribution(left, i); - left = rand_pos(gen_); - - for (uint64_t j = i - 1; j >= left; --j) { - last_pos[history[j].trans_id()] = std::max(j + 1, last_pos[history[j].trans_id()]); - std::swap(history[j], history[j + 1]); - } - } - return history; - } - - History MakeDMLHistory() const { - std::vector dml_acts; - int64_t max_trans_id = -1; - int64_t max_item_id = -1; - const auto gen_rand_id = [&gen = gen_](std::uniform_int_distribution &rand_id_dis, - int64_t &cur_max_id) { - const uint64_t rand_id = rand_id_dis(gen); - return ((int64_t)rand_id <= cur_max_id) ? rand_id : (++cur_max_id); - }; - for (uint64_t dml_operation_no = 0; dml_operation_no < dml_operation_num_; ++dml_operation_no) { - const Operation::Type dml_type = - rand_bool_(gen_) ? Operation::Type::WRITE : Operation::Type::READ; - const uint64_t trans_id = gen_rand_id(rand_trans_id_, max_trans_id); - const uint64_t item_id = gen_rand_id(rand_item_id_, max_item_id); - dml_acts.emplace_back(dml_type, trans_id, item_id); - } - return History(trans_num_, item_num_, dml_acts); - } - - History MakeTCLHistory() const { - std::vector dtl_acts; - uint64_t abort_trans_num; - for (uint64_t trans_id = 0; trans_id < trans_num_; ++trans_id) { - dtl_acts.emplace_back( - (with_abort_ && rand_bool_(gen_)) ? Operation::Type::ABORT : Operation::Type::COMMIT, - trans_id); - if (dtl_acts.back().type() == Operation::Type::ABORT) { - abort_trans_num++; - } - } - - std::shuffle(dtl_acts.begin(), dtl_acts.end(), gen_); - return History(trans_num_, item_num_, dtl_acts, abort_trans_num); - } - - private: - const uint64_t trans_num_; - const uint64_t item_num_; - const uint64_t dml_operation_num_; - const uint64_t history_num_; - const bool with_abort_; - const bool tail_tcl_; - mutable std::random_device rd_; - mutable std::mt19937 gen_; - mutable std::uniform_int_distribution rand_trans_id_; - mutable std::uniform_int_distribution rand_item_id_; - mutable std::bernoulli_distribution rand_bool_; -}; - -class TraversalHistoryGenerator : public HistoryGenerator { - public: - TraversalHistoryGenerator(const Options &opt) - : trans_num_(opt.trans_num), - item_num_(opt.item_num), - dml_operation_num_(opt.max_dml), - subtask_num_(opt.subtask_num), - dfs_cnt_(opt.subtask_num - opt.subtask_id), - with_abort_(opt.with_abort), - tail_tcl_(opt.tail_tcl), - allow_empty_trans_(opt.allow_empty_trans), - dynamic_history_len_(opt.dynamic_history_len) {} - - void DeliverHistories(const std::function &handle) const { - std::vector tmp_operations; - RecursiveFillDMLHistory( - [this, &handle](const History &dml_history, const uint64_t max_trans_id) { - HandleDMLHistory(handle, dml_history, max_trans_id); - }, - tmp_operations, 0, 0); - } - - static uint64_t cut_down_; - - private: - void HandleHistory(const std::function &handle, const History &history) const { - History history_copy = history; // copy History - handle(std::move(history_copy)); - } - - void HandleTCLHistory(const std::function &handle, const History &dml_history, - const History &dtl_history) const { - // Firstly, append every dml_history with dtl_history. - History history_tot = dml_history + dtl_history; - // Then move dtl_history at a suitable location, forward. - RecursiveMoveForwardTCLOperation( - [this, &handle](const History &history) { HandleHistory(handle, history); }, history_tot, - dml_history.size()); - } - - void HandleDMLHistory(const std::function &handle, const History &dml_history, - const uint64_t max_trans_id) const { - std::vector dtl_operation_types; - RecursiveFillTCLHistory( - [this, &handle, &dml_history](const History &dtl_history) { - HandleTCLHistory(handle, dml_history, dtl_history); - }, - dtl_operation_types, max_trans_id, 0); - } - - bool OnlyOneTrans(const std::vector &operations) const { - for (uint64_t i = 1; i < operations.size(); ++i) { - if (operations[i].trans_id() != operations[i - 1].trans_id()) { - return false; - } - } - return true; - } - - void RecursiveFillDMLHistory(const std::function &handle, - std::vector &operations, uint64_t max_trans_id, - uint64_t max_item_id) const { - size_t cur = operations.size(); - if (dynamic_history_len_ || cur == dml_operation_num_) { - if (dfs_cnt_ == subtask_num_) { - if (max_trans_id == trans_num_ || allow_empty_trans_) { - handle(History(max_trans_id, item_num_, operations), max_trans_id); - } else { - cut_down_++; - } - dfs_cnt_ -= subtask_num_; - } - ++dfs_cnt_; - } - if (cur != dml_operation_num_) { - // Make sure trans id is increment - for (uint64_t trans_id = 0; trans_id < std::min(max_trans_id + 1, trans_num_); ++trans_id) { - for (uint64_t item_id = 0; item_id < std::min(max_item_id + 1, item_num_); ++item_id) { - for (Operation::Type dml_operation_type : - {Operation::Type::READ, Operation::Type::WRITE}) { - // Continuous read in same transaction is meaningless - if (cur > 0 && dml_operation_type == Operation::Type::READ && - dml_operation_type == operations[cur - 1].type() && - trans_id == operations[cur - 1].trans_id() && - item_id == operations[cur - 1].item_id()) { - continue; - } - operations.emplace_back(dml_operation_type, trans_id, item_id); - RecursiveFillDMLHistory(handle, operations, std::max(trans_id + 1, max_trans_id), - std::max(item_id + 1, max_item_id)); - operations.pop_back(); - } - } - } - } - } - - void RecursiveFillTCLHistory(const std::function &handle, - std::vector &dtl_operation_types, - const uint64_t max_trans_id, uint64_t abort_trans_num) const { - if (!with_abort_) { - dtl_operation_types.assign(max_trans_id, Operation::Type::COMMIT); - } - if (dtl_operation_types.size() == max_trans_id) { - std::vector trans_order; - for (uint64_t trans_id = 0; trans_id < max_trans_id; ++trans_id) { - trans_order.push_back(trans_id); - } - do { - std::vector dtl_operations; - for (uint64_t trans_id : trans_order) { - dtl_operations.emplace_back(dtl_operation_types[trans_id], trans_id); - } - handle(History(max_trans_id, item_num_, dtl_operations, abort_trans_num)); - } while (std::next_permutation(trans_order.begin(), trans_order.end())); - } else { - for (Operation::Type dtl_operation_type : {Operation::Type::COMMIT, Operation::Type::ABORT}) { - dtl_operation_types.emplace_back(dtl_operation_type); - if (dtl_operation_type == Operation::Type::ABORT) { - ++abort_trans_num; - } - RecursiveFillTCLHistory(handle, dtl_operation_types, max_trans_id, abort_trans_num); - dtl_operation_types.pop_back(); - } - } - } - - void RecursiveMoveForwardTCLOperation(const std::function &handle, - History &history, const size_t pos) const { - if (pos == history.size() || tail_tcl_) { - handle(history); - } else { - RecursiveMoveForwardTCLOperation(handle, history, pos + 1); - size_t i = pos; - while (i > 0 && history[i - 1].trans_id() != history[i].trans_id() && - (history[i - 1].IsPointDML() || history[i - 1].type() == Operation::Type::SCAN_ODD)) { - std::swap(history[i - 1], history[i]); - RecursiveMoveForwardTCLOperation(handle, history, pos + 1); - --i; - } - while (i < pos) { - std::swap(history[i], history[i + 1]); - ++i; - } - } - } - - const uint64_t trans_num_; - const uint64_t item_num_; - const uint64_t dml_operation_num_; - const uint64_t subtask_num_; - mutable uint64_t dfs_cnt_; - const bool with_abort_; - const bool tail_tcl_; - const bool allow_empty_trans_; - const bool dynamic_history_len_; -}; -uint64_t TraversalHistoryGenerator::cut_down_ = 0; -} // namespace ttts diff --git a/src/3ts/backend/history/outputter.h b/src/3ts/backend/history/outputter.h deleted file mode 100644 index 3f97c5f4..00000000 --- a/src/3ts/backend/history/outputter.h +++ /dev/null @@ -1,350 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: williamcliu@tencent.com - * - */ -#pragma once -#include "../util/generic.h" -#include "generator.h" -namespace ttts { - -struct CheckResult { - CheckResult() = default; - CheckResult(const CheckResult&) = delete; - CheckResult(CheckResult&&) = default; - ~CheckResult() {} - bool ok_; - std::string algorithm_name_; - std::ostringstream info_; - std::optional> rollback_type_vec_; - std::optional time_compt_; -}; - -class Outputter { - public: - Outputter(const std::string& output_filename) : os_(output_filename) {} - virtual ~Outputter() {} - virtual void Output(const std::vector>& results, - const History& history) = 0; - virtual void ResultToFile(const std::string&) = 0; - - protected: - std::ofstream os_; -}; - -// Output rollback result -class RollbackRateOutputter : public Outputter { - public: - RollbackRateOutputter(const std::string& output_filename) : Outputter(output_filename) {} - virtual ~RollbackRateOutputter() { ResultToFile("finish success"); } - virtual void ResultToFile(const std::string& s) override { - os_ << s << std::endl; - for (const auto& i : tot_) { - os_ << ">>>>>> " << i.first << std::endl; - os_ << rollback_num_[i.first] << "/" << i.second << std::endl; - os_ << rollback_num_[i.first] * 100.0 / i.second << "%" << std::endl; - } - } - void Output(const std::vector>& results, const History& history) { - std::lock_guard lock(mutex_); - for (const std::unique_ptr& result : results) { - if (result->rollback_type_vec_.has_value() && result->rollback_type_vec_->size()) { - tot_[result->algorithm_name_] += history.trans_num(); - rollback_num_[result->algorithm_name_] += result->rollback_type_vec_->size(); - } - } - } - - private: - std::mutex mutex_; - std::map tot_; - std::map rollback_num_; -}; - -// Compare result with the 0th algorithm and calculate true/false rollback rate. -class DatumOutputter : public Outputter { - private: - struct Info { - Info() - : has_rollback_rate_(false), - time_consume_(0.0), - ok_count_(0), - ng_count_(0), - missed_judgement_count_(0), - wrong_judgement_count_(0), - commit_trans_num_(0), - rollback_trans_num_(0), // active_rollback_trans_num_ + passive_rollback_trans_num_ - passive_rollback_trans_num_(0), // true_rollback_trans_num_ + false_rollback_trans_num_ - true_rollback_trans_num_(0), - false_rollback_trans_num_(0) {} - - bool has_rollback_rate_; // the algorithm support collecting rollback rate statistic or not - double time_consume_; - - uint64_t ok_count_; - uint64_t ng_count_; - uint64_t missed_judgement_count_; - uint64_t wrong_judgement_count_; - - uint64_t commit_trans_num_; // number of transactions committing successful - uint64_t rollback_trans_num_; // number of transactions finally rollback - uint64_t passive_rollback_trans_num_; // number of transactions committing failed - uint64_t true_rollback_trans_num_; - uint64_t false_rollback_trans_num_; - - std::unordered_map anomally_type_num_; - }; - - public: - DatumOutputter(const std::string& output_filename) - : Outputter(output_filename), - history_count_(0), - trans_num_(0), - active_rollback_trans_num_(0), - try_commit_trans_num_(0) {} - virtual ~DatumOutputter() { ResultToFile("finish success"); } - virtual void ResultToFile(const std::string& s) override { - os_ << s << std::endl; - os_ << "Datum Algorithm: " << datum_algorithm_name_ << std::endl; - os_ << "Total Histories: " << history_count_ << std::endl; - os_ << "Total Transactions: " << trans_num_ << " (try commit: " << try_commit_trans_num_ << ")" - << std::endl; - os_ << std::endl; - - for (auto& [algorithm_name, info] : infos_) { - if (info.time_consume_ > 0) { - os_ << ">>>>>> " << algorithm_name << " (" << info.time_consume_ << "s)" << std::endl; - } else { - os_ << ">>>>>> " << algorithm_name << std::endl; - } - os_ << std::setiosflags(std::ios::fixed) << std::setprecision(3); - - os_ << "[ HISTORY LEVEL INFO ]" << std::endl; - os_ << "Total Histories: " << history_count_ << std::endl; - os_ << " ├ OK Histories: " << info.ok_count_ << " (" - << 100.0 * info.ok_count_ / history_count_ << "%)" << std::endl; - os_ << " | └ Missed Judgement Histories: " << info.missed_judgement_count_ << " (" - << 100.0 * info.missed_judgement_count_ / history_count_ << "%)" << std::endl; - os_ << " └ NG Histories: " << info.ng_count_ << " (" - << 100.0 * info.ng_count_ / history_count_ << "%)" << std::endl; - os_ << " └ Wrong Judgement Histories: " << info.wrong_judgement_count_ << " (" - << 100.0 * info.wrong_judgement_count_ / history_count_ << "%)" << std::endl; - - if (info.has_rollback_rate_) { - os_ << "[ TRANSACTION LEVEL INFO ]" << std::endl; - os_ << "Total Transactions: " << trans_num_ << " (try commit: " << try_commit_trans_num_ - << ")" << std::endl; - os_ << " ├ Commit Successfull Transactions: " << info.commit_trans_num_ << " (" - << 100.0 * info.commit_trans_num_ / trans_num_ << "%)" << std::endl; - os_ << " └ Rollback Transactions: " << info.rollback_trans_num_ << " (" - << 100.0 * info.rollback_trans_num_ / trans_num_ << "%)" << std::endl; - os_ << " ├ Active Rollback Transactions: " << active_rollback_trans_num_ << " (" - << 100.0 * active_rollback_trans_num_ / trans_num_ << "%)" << std::endl; - os_ << " └ Passive Rollback Transactions: " << info.passive_rollback_trans_num_ << " (" - << 100.0 * info.passive_rollback_trans_num_ / trans_num_ << "%)" << std::endl; - os_ << " ├ True Rollback Transactions: " << info.true_rollback_trans_num_ << " (" - << 100.0 * info.true_rollback_trans_num_ / trans_num_ << "%)" << std::endl; - os_ << " └ False Rollback Transactions: " << info.false_rollback_trans_num_ << " (" - << 100.0 * info.false_rollback_trans_num_ / trans_num_ << "%)" << std::endl; - os_ << "[ ANOMALY TYPE INFO ]" << std::endl; - for (auto ano_loop : Anomally2Name) { - os_ << ano_loop.second << ": " << info.anomally_type_num_[ano_loop.first] << std::endl; - } - } - - os_ << std::endl; - } - } - - void Output(const std::vector>& results, - const History& history) override { - std::lock_guard lock(mutex_); - - ++history_count_; - trans_num_ += history.trans_num(); - active_rollback_trans_num_ += history.abort_trans_num(); - try_commit_trans_num_ = trans_num_ - active_rollback_trans_num_; - - auto datum_ok = results[0]->ok_; // datum algorithm consider history has no anomalies - datum_algorithm_name_ = results[0]->algorithm_name_; - for (const auto& result : results) { - Info& info = infos_[result->algorithm_name_]; - if (result->time_compt_.has_value()) { - info.time_consume_ += result->time_compt_.value(); - } - - // history level info - info.missed_judgement_count_ += (!datum_ok && result->ok_); - info.wrong_judgement_count_ += (datum_ok && !result->ok_); - info.ok_count_ += result->ok_; - info.ng_count_ += !result->ok_; - - // transaction level info - if (info.has_rollback_rate_ = result->rollback_type_vec_.has_value()) { // do assignment - // TODO: A transaction plan to active rollback may be rollbacked by algorithm. In this case, - // the transactions is both count in abort_trans_num and rollback_type_vec_ - info.passive_rollback_trans_num_ += result->rollback_type_vec_->size(); - // TODO: All passive rollback in anomaly history will be considered as true rollback. - (datum_ok ? info.false_rollback_trans_num_ : info.true_rollback_trans_num_) += - result->rollback_type_vec_->size(); - info.commit_trans_num_ = try_commit_trans_num_ - info.passive_rollback_trans_num_; - info.rollback_trans_num_ = active_rollback_trans_num_ + info.passive_rollback_trans_num_; - for (const auto ano_type : result->rollback_type_vec_.value()) { - ++info.anomally_type_num_[ano_type]; - } - } - } - } - - private: - std::string datum_algorithm_name_; - uint64_t history_count_; - uint64_t trans_num_; - uint64_t active_rollback_trans_num_; - uint64_t try_commit_trans_num_; - std::mutex mutex_; - std::map infos_; -}; - -// Output detail infomation for each algorithm -class DetailOutputter : public Outputter { - public: - DetailOutputter(const std::string& output_filename) : Outputter(output_filename), no_(0) {} - virtual ~DetailOutputter() {} - virtual void ResultToFile(const std::string&) override {} - virtual void Output(const std::vector>& results, - const History& history) override { - std::stringstream ss; - ss << ">>>>>> {" << (++no_) << "} " << history << std::endl; - for (const std::unique_ptr& result : results) { - ss << "[ " << result->algorithm_name_ << " ] " << (result->ok_ ? "true" : "false") - << std::endl; - ss << result->info_.str() << std::endl; - } - std::lock_guard lock(mutex_); - os_ << ss.rdbuf() << std::endl; - } - - private: - std::mutex mutex_; - std::atomic no_; -}; - -// Compare each algorithm's result and do category -class CompareOutputter : public Outputter { - public: - CompareOutputter(const std::string& output_filename) - : Outputter(output_filename), inited_(false) {} - virtual ~CompareOutputter() { ResultToFile("finish success"); } - virtual void ResultToFile(const std::string& s) override { - os_ << s << std::endl; - for (std::unique_ptr& category : categories_) { - os_ << "[Counts:" << category->count_ << "] " << category->cate_name_ << std::endl; - category->temp_output_file_.close(); - if (std::ifstream temp_if(category->temp_output_filename_); - temp_if.peek() != std::ifstream::traits_type::eof()) { - os_ << temp_if.rdbuf(); - } - os_ << std::endl; - category.reset(); - } - } - virtual void Output(const std::vector>& results, - const History& history) override { - if (!inited_.load()) { - InitCategories(results); - } - OutputHistoryToTempFile(results, history); - } - - private: - struct CompareCategory { - CompareCategory(const std::string& cate_name, const std::string& temp_output_filename) - : cate_name_(cate_name), - temp_output_filename_(temp_output_filename), - temp_output_file_(temp_output_filename_), - count_(0) {} - ~CompareCategory() { std::remove(temp_output_filename_.c_str()); } - - const std::string cate_name_; - const std::string temp_output_filename_; - std::ofstream temp_output_file_; - uint64_t count_; - }; - - void InitCategories(const std::vector>& results) { - std::lock_guard lock(mutex_); - if (!categories_.empty()) { - return; /* inited */ - } - for (uint64_t i = 0; i < (static_cast(1) << results.size()); ++i) { - const std::string cate_name = CategoryName(results, Int2Bits(results.size(), i)); - const std::string temp_filename = - "__COMPARE_RESULT_OUTPUTTER_TEMP_FILE_" + std::to_string(i) + "__"; - categories_.emplace_back(new CompareCategory(cate_name, temp_filename)); - } - inited_ = true; - } - - void OutputHistoryToTempFile(const std::vector>& results, - const History& history) { - CompareCategory& category = *categories_[Bits2Int(ExtractOKs(results))]; - std::lock_guard lock(mutex_); - category.temp_output_file_ << history << std::endl; - ++category.count_; - } - - static std::string CategoryName(const std::vector>& results, - const std::vector& oks) { - std::ostringstream ss; - assert(results.size() == oks.size() && results.size() > 0); - const auto cat_name_f = [&ss, &results, &oks](const uint64_t index) { - if (!oks[index]) { - ss << "NOT "; - } - ss << results[index]->algorithm_name_; - }; - cat_name_f(0); - for (uint64_t i = 1; i < oks.size(); ++i) { - ss << " && "; - cat_name_f(i); - } - return ss.str(); - } - - static std::vector Int2Bits(const uint64_t len, uint64_t n) { - std::vector ret(len, false); - for (uint64_t i = len - 1; n > 0; --i) { - ret[i] = n - n / 2 * 2; - n /= 2; - } - return ret; - } - - static uint64_t Bits2Int(const std::vector& bits) { - uint64_t ret = 0; - for (const bool bit : bits) { - ret = ret * 2 + bit; - } - return ret; - } - - static std::vector ExtractOKs(const std::vector>& results) { - std::vector ret; - for (const std::unique_ptr& result : results) { - ret.push_back(result->ok_); - } - return ret; - } - - std::mutex mutex_; - std::atomic inited_; - std::vector> categories_; -}; - -} // namespace ttts diff --git a/src/3ts/backend/history/parse_config.h b/src/3ts/backend/history/parse_config.h deleted file mode 100644 index f0ecd4bd..00000000 --- a/src/3ts/backend/history/parse_config.h +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: elioyan@tencent.com - * williamcliu@tencent.com - * - */ -#pragma once -#include -#include "../cca/conflict_serializable_algorithm.h" -#include "../cca/occ_algorithm/occ_algorithm.h" -#include "../cca/occ_algorithm/trans/bocc_trans.h" -#include "../cca/occ_algorithm/trans/focc_trans.h" -#include "../cca/occ_algorithm/trans/ssi_trans.h" -#include "../cca/occ_algorithm/trans/wsi_trans.h" -#include "../cca/serializable_algorithm.h" -#include "../util/generic.h" -#include "generator.h" -#include "outputter.h" -#include "run.h" - -std::shared_ptr GeneratorParse(const libconfig::Config &cfg, - const std::string &name) { - try { - const libconfig::Setting &s = cfg.lookup(name); - std::shared_ptr res; - if (name == "InputGenerator") { - const std::string &file = s.lookup("file"); - res = std::make_shared(file); - } else { - ttts::Options opt; - opt.trans_num = s.lookup("trans_num"); - opt.item_num = s.lookup("item_num"); - opt.max_dml = s.lookup("max_dml"); - opt.with_abort = s.lookup("with_abort"); - opt.tail_tcl = s.lookup("tail_tcl"); - opt.dynamic_history_len = s.lookup("dynamic_history_len"); - opt.allow_empty_trans = s.lookup("allow_empty_trans"); - if (name == "TraversalGenerator") { - opt.subtask_num = s.lookup("subtask_num"); - opt.subtask_id = s.lookup("subtask_id"); - res = std::make_shared(opt); - } else { - uint64_t history_num = s.lookup("history_num"); - res = std::make_shared(opt, history_num); - } - } - - return res; - } catch (const libconfig::SettingNotFoundException &nfex) { - throw name + "setting " + std::string(nfex.getPath()) + " no found"; - } -} - -template -void AlgorithmParseInternal_(const libconfig::Config &cfg, const std::string &algorithm_name, - AddAlgorithm &&add_algorithm) { - if (algorithm_name == "SSI") { - add_algorithm(std::make_shared>()); - } else if (algorithm_name == "WSI") { - add_algorithm(std::make_shared>()); - } else if (algorithm_name == "BOCC") { - add_algorithm(std::make_shared>()); - } else if (algorithm_name == "FOCC") { - add_algorithm(std::make_shared>()); - } else if constexpr (only_rollback_rate) { - throw "Unknown algorithm name " + algorithm_name + - " in algorithms supporting rollback rate statistics"; - } else if (algorithm_name == "SerializableAlgorithm_ALL_SAME_RR") { - add_algorithm(std::make_shared>()); - } else if (algorithm_name == "SerializableAlgorithm_ALL_SAME_RC") { - add_algorithm(std::make_shared>()); - } else if (algorithm_name == "SerializableAlgorithm_ALL_SAME_RU") { - add_algorithm(std::make_shared>()); - } else if (algorithm_name == "SerializableAlgorithm_ALL_SAME_SI") { - add_algorithm( - std::make_shared>()); - } else if (algorithm_name == "SerializableAlgorithm_COMMIT_SAME_RR") { - add_algorithm(std::make_shared>()); - } else if (algorithm_name == "SerializableAlgorithm_COMMIT_SAME_RC") { - add_algorithm(std::make_shared>()); - } else if (algorithm_name == "SerializableAlgorithm_COMMIT_SAME_RU") { - add_algorithm(std::make_shared>()); - } else if (algorithm_name == "SerializableAlgorithm_COMMIT_SAME_SI") { - add_algorithm( - std::make_shared>()); - } else if (algorithm_name == "SerializableAlgorithm_FINAL_SAME_RR") { - add_algorithm(std::make_shared>()); - } else if (algorithm_name == "SerializableAlgorithm_FINAL_SAME_RC") { - add_algorithm(std::make_shared>()); - } else if (algorithm_name == "SerializableAlgorithm_FINAL_SAME_RU") { - add_algorithm(std::make_shared>()); - } else if (algorithm_name == "SerializableAlgorithm_FINAL_SAME_SI") { - add_algorithm( - std::make_shared>()); - } else if (algorithm_name == "ConflictSerializableAlgorithm") { - add_algorithm(std::make_shared()); - } else { - throw "Unknown algorithm name " + algorithm_name; - } -} - -#define CONSTEXPR_CONDITIONAL(cond, v1, v2) \ - [&]() -> decltype(auto) { \ - if constexpr ((cond)) { \ - return (v1); \ - } else { \ - return (v2); \ - } \ - }() -enum ParseAlgorithmType { ONLY_NORMAL_ALGS, ONLY_ROLLBACK_RATE_ALGS, MIXED_ALGS }; -template -using AutoAlgorithm = std::conditional_t< - parse_algorithm_type == MIXED_ALGS, - std::variant, std::shared_ptr>, - std::conditional_t, std::shared_ptr>>; -template -using AlgorithmList = std::vector, std::optional>, - AutoAlgorithm>>; - -// If parse_algorithm_type is set, algorithms will convert to RollbackRateAlgorithm if is base of. -// If enable_filter is set, a optional for each algorithm will be returned to show filter. -template -auto MultiAlgorithmParse(const libconfig::Config &cfg, const libconfig::Setting &s) { - AlgorithmList algorithms; - const int len = s.getLength(); - if (len == 0) { - throw "algorithm list is empty"; - } - for (int i = 0; i < len; i++) { - const std::string &algorithm_name = - CONSTEXPR_CONDITIONAL(enable_filter, s[i].lookup("name"), s[i]); - AlgorithmParseInternal_( - cfg, algorithm_name, [&s, i, &algorithms, &algorithm_name](auto &&algorithm) { - constexpr bool is_rollback_rate_algorithm = - std::is_base_of_v>; - using AlgorithmType = - std::shared_ptr>; - if (!is_rollback_rate_algorithm && parse_algorithm_type == ONLY_ROLLBACK_RATE_ALGS) { - throw algorithm_name + " does not support rollback rate statistic"; - } - if constexpr (enable_filter) { - std::optional filter; - try { - filter = s[i].lookup("filter"); - } catch (const libconfig::SettingNotFoundException &nfex) { - // If cannot find, it means we need not do filter, do nothing there - } - algorithms.emplace_back( - AutoAlgorithm(std::forward(algorithm)), - filter); - } else { - algorithms.emplace_back(std::forward(algorithm)); - } - }); - } - return algorithms; -} -#undef CONSTEXPR_CONDITIONAL - -auto OneAlgorithmParse(const libconfig::Config &cfg, const std::string &algorithm_name) { - std::shared_ptr algorithm_res; - AlgorithmParseInternal_( - cfg, algorithm_name, [&algorithm_res](auto &&algorithm) { - algorithm_res = std::forward>(algorithm); - }); - return algorithm_res; -} - -// if you want add outtputer, add here -std::vector> OutputterParse(const libconfig::Config &cfg, - const libconfig::Setting &s) { - std::vector> res; - try { - int len = s.getLength(); - for (int i = 0; i < len; i++) { - const std::string &outputter = s[i]; - const std::string &file = cfg.lookup(outputter).lookup("file"); - if (outputter == "RollbackRateOutputter") { - res.emplace_back(std::make_shared(file)); - } else if (outputter == "DetailOutputter") { - res.emplace_back(std::make_shared(file)); - } else if (outputter == "CompareOutputter") { - res.emplace_back(std::make_shared(file)); - } else if (outputter == "DatumOutputter") { - res.emplace_back(std::make_shared(file)); - } else { - throw "outputter name err"; - } - } - } catch (const libconfig::SettingNotFoundException &nfex) { - throw "Outputter setting " + std::string(nfex.getPath()) + " no found"; - } - return res; -} - -void FilterRunParse(const libconfig::Config &cfg) { - try { - const libconfig::Setting &s = cfg.lookup("FilterRun"); - auto generator = GeneratorParse(cfg, s.lookup("generator")); - auto algorithms = - MultiAlgorithmParse(cfg, s.lookup("algorithms")); - auto outputters = OutputterParse(cfg, s.lookup("outputters")); - const uint64_t thread_num = s.lookup("thread_num"); - FilterRun(generator, algorithms, outputters, thread_num); - } catch (const libconfig::SettingNotFoundException &nfex) { - throw "Func FilterRun setting " + std::string(nfex.getPath()) + " no found"; - } -} - -void BenchmarkRunParse(const libconfig::Config &cfg) { - try { - const libconfig::Setting &s = cfg.lookup("BenchmarkRun"); - auto algorithms = MultiAlgorithmParse( - cfg, s.lookup("algorithms")); - - std::vector trans_nums, item_nums; - const libconfig::Setting &trans_nums_ = s.lookup("trans_nums"); - const libconfig::Setting &item_nums_ = s.lookup("item_nums"); - int len = trans_nums_.getLength(); - if (len != item_nums_.getLength()) { - throw "BenchmarkRun trans num != item num"; - } - for (size_t i = 0; i < len; i++) { - trans_nums.emplace_back(trans_nums_[i]); - item_nums.emplace_back(item_nums_[i]); - } - - const uint64_t history_num = s.lookup("history_num"); - const std::string os = s.lookup("os"); - const bool with_abort = s.lookup("with_abort"); - const bool tail_tcl = s.lookup("tail_tcl"); - if (os == "cout") - BenchmarkRun(trans_nums, item_nums, history_num, algorithms, std::cout, with_abort, tail_tcl); - else - BenchmarkRun(trans_nums, item_nums, history_num, algorithms, std::ofstream(os), with_abort, - tail_tcl); - } catch (const libconfig::SettingNotFoundException &nfex) { - throw "Func BenchmarkRun setting " + std::string(nfex.getPath()) + " no found"; - } -} - -// if you want add func, add here and corresponding parser -void TargetParse(const libconfig::Config &cfg) { - try { - const libconfig::Setting &target = cfg.lookup("Target"); - int len = target.getLength(); - for (int i = 0; i < len; i++) { - const std::string &str = target[i]; - if (str == "FilterRun") { - FilterRunParse(cfg); - } else if (str == "BenchmarkRun") { - BenchmarkRunParse(cfg); - } else { - throw "func name err"; - } - } - } catch (const libconfig::SettingNotFoundException &nfex) { - throw "Target setting " + std::string(nfex.getPath()) + " no found"; - } -} - -void ReadAndRun(const std::string &conf_path) { - libconfig::Config cfg; - try { - cfg.readFile(conf_path.c_str()); - } catch (const libconfig::FileIOException &fioex) { - throw "I/O error while reading file."; - } catch (const libconfig::ParseException &pex) { - throw "Parse error"; - } - TargetParse(cfg); -} diff --git a/src/3ts/backend/history/run.h b/src/3ts/backend/history/run.h deleted file mode 100644 index f4ab037d..00000000 --- a/src/3ts/backend/history/run.h +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: williamcliu@tencent.com - * - */ -#pragma once -#include -#include - -#include "../cca/algorithm.h" -#include "../util/generic.h" -#include "../util/thread_pool.h" -#include "generator.h" -#include "outputter.h" -#define VEC_NUM 100 - -using namespace ttts; - -std::vector> outs; -void handler(int signum) { - for (auto &i : outs) { - i->ResultToFile("[WARNING] The test is uncompleted!"); - } - exit(0); -} - -// Pass each history created by generator to task and run task in a new thread. -// The function will not exit until all histories are checked. -void ThreadRunBase(const std::shared_ptr &generator, - const std::function &task, const uint32_t thread_num) { - ThreadPool thread_pool(thread_num); - generator->DeliverHistories([&thread_pool, &task](History &&history) { - thread_pool.PushTask([history_tmp = std::move(history), &task]() { task(history_tmp); }); - }); -} - -template -void SetCheckResult(Algorithm &&algorithm, const History &history, CheckResult &check_result) { - if constexpr (std::is_same_v> || - std::is_base_of_v>) { - check_result.rollback_type_vec_ = algorithm.RollbackNum(history, &check_result.info_); - check_result.ok_ = check_result.rollback_type_vec_->size() == 0; - } else { - check_result.ok_ = algorithm.Check(history, &check_result.info_); - } -} - -// Each algorithm check the history and determine whether output the result by each algorithm's -// filter. -void FilterRun( - const std::shared_ptr &generator, - const std::vector, std::shared_ptr>, - std::optional>> &algorithms, - const std::vector> &outputters, const uint64_t thread_num) { - // For each history, call task(history) - const auto task = [&algorithms, &outputters](const History &history) { - std::vector> check_results; // results of each algorithm - // For each algorithm, check the history - for (const auto &algorithm_and_filter : algorithms) { - const std::optional &filter = algorithm_and_filter.second; - if (!std::visit( - [&filter, &history, &check_results](auto &&algorithm) -> bool { - auto check_result = std::make_unique(); - const auto start_time = std::chrono::system_clock::now(); - SetCheckResult(*algorithm, history, *check_result); - check_result->time_compt_ = (std::chrono::system_clock::now() - start_time).count(); - check_result->algorithm_name_ = algorithm->name(); - // If filter == true, output only if check passes; - // If filter == false, output only if check not passes; - // If filter not has a value, output whether check passes or not - if (!filter.has_value() || check_result->ok_ == filter.value()) { - check_results.emplace_back(std::move(check_result)); - return true; // result satisfies filter, go to next algorithm - } else { - return false; // result not satisfies filter, cannot output result - } - }, - algorithm_and_filter.first)) { - return; // result not satisfies filter, cannot output result - } - } - // Each algorithm's result satisfies its filter, can output result - for (const std::shared_ptr &outputter : outputters) { - outputter->Output(check_results, history); - } - }; - - signal(SIGINT, handler); - signal(SIGTERM, handler); - outs = outputters; - ThreadRunBase(generator, task, thread_num); -} - -// Each algorithm check the histories and record the time cost. -template -void BenchmarkRun(const std::vector &histories, - const std::vector> &algorithms, OS &&os) { - for (const std::shared_ptr &algorithm : algorithms) { - auto start = std::chrono::system_clock::now(); - uint64_t ok_count = 0; - for (const History &history : histories) { - if (algorithm->Check(history)) { - ++ok_count; - } - } - std::chrono::duration diff = std::chrono::system_clock::now() - start; - os << "\'" << algorithm->name() << "\'" - << " ok histories: " << ok_count << " duration: " << diff.count() << "s" << std::endl; - } -} - -// Each algorithm check the histories and record the time cost. -template -void BenchmarkRun(const std::shared_ptr &generator, - const std::vector> &algorithms, OS &&os) { - std::vector histories; - generator->DeliverHistories( - [&histories](History &&history) { histories.emplace_back(std::move(history)); }); - BenchmarkRun(histories, algorithms, std::forward(os)); -} - -// Each algorithm check the histories and record the time cost. -template -void BenchmarkRun(const std::vector &trans_nums, const std::vector &item_nums, - const uint64_t num, - const std::vector> &algorithms, OS &&os, - const bool with_abort, const bool tail_tcl) { - Options opts; - opts.with_abort = with_abort; - opts.tail_tcl = tail_tcl; - for (const uint64_t trans_num : trans_nums) { - for (const uint64_t item_num : item_nums) { - const uint64_t dml_operation_num = trans_num * item_num / 4; - os << "====== trans_num: " << trans_num << " item_num: " << item_num - << " dml_operation_num: " << dml_operation_num << " ======" << std::endl; - opts.trans_num = trans_num; - opts.item_num = item_num; - opts.max_dml = dml_operation_num; - BenchmarkRun(std::make_shared(opts, num), algorithms, - std::forward(os)); - } - os << std::endl; - } -} diff --git a/src/3ts/backend/main.cc b/src/3ts/backend/main.cc deleted file mode 100644 index e46eaa6b..00000000 --- a/src/3ts/backend/main.cc +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: williamcliu@tencent.com - * - */ -#include - -#include - -#include "history/parse_config.h" - -DEFINE_string(conf_path, "config/config.cfg", "program configure file."); - -using namespace ttts; - -int main(int argc, char **argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); - std::cout << "FLAGS_conf_path:" << FLAGS_conf_path << std::endl; - - try { - ReadAndRun(FLAGS_conf_path); - } catch (const libconfig::SettingNotFoundException &nfex) { - std::cerr << "setting no found" << std::endl; - } catch (char const *str) { - std::cerr << str << std::endl; - } catch (std::string str) { - std::cerr << str << std::endl; - } catch (const std::exception& e) { - std::cerr << e.what() << std::endl; - } - - return 0; -} diff --git a/src/3ts/backend/util/generic.h b/src/3ts/backend/util/generic.h deleted file mode 100644 index 75f2961a..00000000 --- a/src/3ts/backend/util/generic.h +++ /dev/null @@ -1,356 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: williamcliu@tencent.com - * - */ -#pragma once -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace ttts { - -enum Anomally { - // I, II - DIRTY_WRITE, - EDGE_CROESS, - LOST_UPDATE, - READ_SKEW, - READ_WRITE_SKEW, - THREE_TRANS_WRITE_SKEW, - MULTI_TRANS_ANOMALY, - // WSI - WRITE_SKEW, - WW_CONFLICT, - // SSI - RW_CONFLICT, - // BOCC FOCC UNKNOWN - UNKNOWN -}; - -std::unordered_map Anomally2Name = { - // I, II - {DIRTY_WRITE, "DIRTY_WRITE"}, - {EDGE_CROESS, "EDGE_CROESS"}, - {LOST_UPDATE, "LOST_UPDATE"}, - {READ_SKEW, "READ_SKEW"}, - {READ_WRITE_SKEW, "READ_WRITE_SKEW"}, - {THREE_TRANS_WRITE_SKEW, "THREE_TRANS_WRITE_SKEW"}, - {MULTI_TRANS_ANOMALY, "MULTI_TRANS_ANOMALY"}, - // WSI - {WRITE_SKEW, "WRITE_SKEW"}, - {WW_CONFLICT, "WW_CONFLICT"}, - // SSI - {RW_CONFLICT, "RW_CONFLICT"}, - // BOCC FOCC UNKNOWN - {UNKNOWN, "UNKNOWN"}}; - -std::ostream& operator<<(std::ostream& os, const Anomally e) { - switch (e) { - case DIRTY_WRITE: - return os << "DIRTY_WRITE"; - case EDGE_CROESS: - return os << "EDGE_CROESS"; - case LOST_UPDATE: - return os << "LOST_UPDATE"; - case READ_SKEW: - return os << "READ_SKEW"; - case READ_WRITE_SKEW: - return os << "READ_WRITE_SKEW"; - case THREE_TRANS_WRITE_SKEW: - return os << "THREE_TRANS_WRITE_SKEW"; - case MULTI_TRANS_ANOMALY: - return os << "MULTI_TRANS_ANOMALY"; - case WRITE_SKEW: - return os << "WRITE_SKEW"; - case WW_CONFLICT: - return os << "WW_CONFLICT"; - case RW_CONFLICT: - return os << "RW_CONFLICT"; - default: - return os << "UNKNOWN"; - } -} - -enum class SerializeReadPolicy { UNCOMMITTED_READ, COMMITTED_READ, REPEATABLE_READ, SI_READ }; - -class Operation { - public: - enum class Type : char { - UNKNOWN = '?', - READ = 'R', - WRITE = 'W', - COMMIT = 'C', - ABORT = 'A', - SCAN_ODD = 'S' - }; - Operation() : type_(Type::UNKNOWN), trans_id_(0) {} - Operation(const Type dtl_type, const uint64_t trans_id) : type_(dtl_type), trans_id_(trans_id) { - if (!IsTCL()) { - throw std::to_string(static_cast(dtl_type)) + " is not a TCL Operation"; - } - } - Operation(const Type dml_type, const uint64_t trans_id, const uint64_t item_id, - const std::optional version = {}) - : type_(dml_type), trans_id_(trans_id), item_id_(item_id), version_(version) { - if (!IsPointDML()) { - throw std::to_string(static_cast(dml_type)) + " is not a Point DML Operation"; - } - } - Operation& operator=(const Operation& operation) = default; - virtual ~Operation() {} - - Type type() const { return type_; } - uint64_t trans_id() const { return trans_id_; } - uint64_t item_id() const { return item_id_.value(); } - uint64_t version() const { return version_.value(); } - void SetTransId(uint64_t trans_id) { trans_id_ = trans_id; } - void SetItemId(const uint64_t item_id) { - if (IsTCL()) { - throw "TCL operations update item id is meaningless"; - } - item_id_ = item_id; - } - void UpdateVersion(const uint64_t version) { - if (IsTCL()) { - throw "DML operations update version is meaningless"; - } - version_ = version; - } - - friend std::ostream& operator<<(std::ostream& os, const Operation& operation) { - os << static_cast(operation.type_) << operation.trans_id_; - if (operation.IsPointDML()) { - if (operation.item_id_.value() >= 26) { - throw "Not support item_id equal or larger than 26 yet"; - } - os << static_cast('a' + operation.item_id_.value()); - } - - return os; - } - - friend std::istream& operator>>(std::istream& is, Type& type) { - char c; - is >> c; - switch (c) { - case 'W': - type = Operation::Type::WRITE; - break; - case 'R': - type = Operation::Type::READ; - break; - case 'C': - type = Operation::Type::COMMIT; - break; - case 'A': - type = Operation::Type::ABORT; - break; - case 'S': - type = Operation::Type::SCAN_ODD; - break; - default: - type = Operation::Type::UNKNOWN; - is.setstate(std::ios::failbit); - } - return is; - } - - friend std::istream& operator>>(std::istream& is, Operation& operation) { - if (!(is >> operation.type_) || !(is >> operation.trans_id_)) { - return is; - } - if (char item_c; operation.type_ == Type::WRITE || operation.type_ == Type::READ) { - if (!(is >> item_c) || !std::islower(item_c)) { - is.setstate(std::ios::failbit); - return is; - } - operation.item_id_ = item_c - 'a'; - } - return is; - } - - bool IsPointDML() const { return IsPointDML(type_); } - bool IsTCL() const { return IsTCL(type_); } - static bool IsPointDML(const Type& type) { return type == Type::READ || type == Type::WRITE; } - static bool IsTCL(const Type& type) { return type == Type::COMMIT || type == Type::ABORT; } - // surport std::map - bool operator<(const Operation& r) const { - if (trans_id() == r.trans_id()) { - uint64_t l_item_id = item_id_.has_value() ? item_id() : -1; - uint64_t r_item_id = r.item_id_.has_value() ? r.item_id() : -1; - if (l_item_id == r_item_id) { - uint64_t l_version = version_.has_value() ? version() : -1; - uint64_t r_version = r.version_.has_value() ? r.version() : -1; - if (l_version == r_version) return type() < r.type(); - return l_version < r.version(); - } - return l_item_id < r_item_id; - } - return trans_id() < r.trans_id(); - } - - private: - Type type_; - uint64_t trans_id_; - std::optional item_id_; - std::optional version_; // version_ identify a unique version, but it CANNOT be - // compared to judge new or old -}; - -class History { - public: - History() : History(0, 0, {}) {} - History(const uint64_t trans_num, const uint64_t item_num, - const std::vector& operations) - : trans_num_(trans_num), - item_num_(item_num), - operations_(operations), - abort_trans_num_(0), - anomaly_name_("") {} - History(const uint64_t trans_num, const uint64_t item_num, std::vector&& operations) - : trans_num_(trans_num), - item_num_(item_num), - operations_(operations), - abort_trans_num_(0), - anomaly_name_("") {} - History(const uint64_t trans_num, const uint64_t item_num, - const std::vector& operations, const uint64_t abort_trans_num) - : trans_num_(trans_num), - item_num_(item_num), - operations_(operations), - abort_trans_num_(abort_trans_num), - anomaly_name_("") {} - History(History&& history) = default; - History(const History& history) = default; - ~History() {} - - History& operator=(History&& history) = default; - History operator+(const History& history) const { - if (trans_num_ != history.trans_num_ || item_num_ != history.item_num_) { - throw "History mismatch"; - } - std::vector new_operations = operations_; - for (const auto& operation : history.operations_) { - new_operations.push_back(operation); - } - return History(trans_num_, item_num_, std::move(new_operations), - abort_trans_num_ + history.abort_trans_num_); - } - std::vector& operations() { return operations_; } - const std::vector& operations() const { return operations_; } - uint64_t trans_num() const { return trans_num_; } - uint64_t abort_trans_num() const { return abort_trans_num_; } - uint64_t item_num() const { return item_num_; } - size_t size() const { return operations_.size(); } - void set_anomaly_name(const std::string& anomaly_name) { anomaly_name_ = anomaly_name; } - std::string anomaly_name() const { return anomaly_name_; } - friend std::ostream& operator<<(std::ostream& os, const History& history) { - for (const Operation& operation : history.operations_) { - os << operation << ' '; - } - return os; - } - - friend std::istream& operator>>(std::istream& is, History& history) { - std::string s; - if (std::getline(is, s)) { - std::stringstream ss(s); - std::vector operations; - std::set trans_num_set; - std::set item_num_set; - uint64_t trans_num = 0; - uint64_t item_num = 0; - for (std::stringstream ss(s); !ss.eof() && !ss.fail();) { - Operation operation; - if (Operation operation; ss >> operation) { - operations.emplace_back(operation); - trans_num_set.insert(operation.trans_id()); - if (operation.IsPointDML()) { - item_num_set.insert(operation.item_id()); - } - } - } - trans_num = trans_num_set.size(); - item_num = item_num_set.size(); - if (ss.fail()) { - std::cout << "Invalid history: \'" << s << "\'" << std::endl; - } else { - history = History(trans_num, item_num, operations); - } - } - return is; - } - - Operation& operator[](const size_t index) { return operations_[index]; } - - void UpdateWriteVersions() { - std::vector item_version(item_num_, 0); - for (Operation& operation : operations_) { - if (operation.type() == Operation::Type::WRITE) { - operation.UpdateVersion(++item_version[operation.item_id()]); - } - } - } - - // update write version, clean up read version - void FillWriteVersions() { - std::vector item_version(item_num_, 0); - for (Operation& operation : operations_) { - if (operation.type() == Operation::Type::WRITE) { - operation.UpdateVersion(++item_version[operation.item_id()]); - } else if (operation.type() == Operation::Type::READ) { - operation.UpdateVersion(-1); // clear read version as -1 - } - } - } - - private: - uint64_t trans_num_; - uint64_t abort_trans_num_; - uint64_t item_num_; - std::vector operations_; - std::string anomaly_name_; -}; - -struct Options { - uint64_t trans_num; - uint64_t item_num; - - uint64_t subtask_num; - uint64_t subtask_id; - uint64_t max_dml; - - bool with_abort; - bool tail_tcl; - bool allow_empty_trans; - bool dynamic_history_len; -}; - -} // namespace ttts diff --git a/src/3ts/backend/util/thread_pool.h b/src/3ts/backend/util/thread_pool.h deleted file mode 100644 index e232e910..00000000 --- a/src/3ts/backend/util/thread_pool.h +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: williamcliu@tencent.com - * - */ -#pragma once -#include -#include -#include -#include -#include - -#include "generic.h" - -// std::atomic> is not supported until C++20, so we use std::atomic instead -// here - -namespace ttts { - -template -class SpinLockQueue { - public: - void Push(T &&value) { - while (std::atomic_flag_test_and_set_explicit(&spin_lock_, std::memory_order_acquire)) - ; - queue_.emplace(std::move(value)); - std::atomic_flag_clear_explicit(&spin_lock_, std::memory_order_release); - } - - std::optional Pop() { - while (std::atomic_flag_test_and_set_explicit(&spin_lock_, std::memory_order_acquire)) - ; - std::optional value; - if (!queue_.empty()) { - value = queue_.front(); - queue_.pop(); - } - std::atomic_flag_clear_explicit(&spin_lock_, std::memory_order_release); - return value; - } - - bool IsEmpty() { - while (std::atomic_flag_test_and_set_explicit(&spin_lock_, std::memory_order_acquire)) - ; - const bool is_empty = queue_.empty(); - std::atomic_flag_clear_explicit(&spin_lock_, std::memory_order_release); - return is_empty; - } - - private: - std::atomic_flag spin_lock_ = ATOMIC_FLAG_INIT; - std::queue queue_; -}; - -class Semaphore { - private: - int cnt_; - std::mutex m_; - std::condition_variable c_; - - public: - Semaphore(int n) : cnt_(n) {} - - void Down() { - std::unique_lock lock(m_); - c_.wait(lock, [&] { return cnt_ > 0; }); - --cnt_; - } - - void Up() { - std::lock_guard lock(m_); - ++cnt_; - c_.notify_one(); - } -}; - -class ThreadPool { - public: - ThreadPool(const uint64_t size) - : is_over_(false), workers_(size), produce_conf_(buffer_size_), consumer_conf_(0) { - for (std::thread &worker : workers_) { - worker = std::thread(std::bind(&ThreadPool::WorkerThread, this)); - } - } - - ~ThreadPool() { - is_over_ = true; - for (std::thread &worker : workers_) { - if (worker.joinable()) { - consumer_conf_.Up(); - worker.join(); - } - } - } - - void PushTask(std::function &&f) { - produce_conf_.Down(); - task_queue_.Push(std::move(f)); - consumer_conf_.Up(); - } - - private: - void WorkerThread() { - while (!is_over_.load() || !task_queue_.IsEmpty()) { - consumer_conf_.Down(); - const std::optional> task = task_queue_.Pop(); - if (task.has_value()) { - task.value()(); - produce_conf_.Up(); - } else { - consumer_conf_.Up(); - } - } - } - - std::atomic is_over_; - SpinLockQueue> task_queue_; - std::vector workers_; - - static const uint64_t buffer_size_ = 1024; - Semaphore produce_conf_; - Semaphore consumer_conf_; -}; - -} // namespace ttts diff --git a/src/dbtest/3ts_kvtest b/src/dbtest/3ts_kvtest new file mode 100755 index 00000000..3048a821 Binary files /dev/null and b/src/dbtest/3ts_kvtest differ diff --git a/src/dbtest/CMakeLists.txt b/src/dbtest/CMakeLists.txt new file mode 100644 index 00000000..81c8ee02 --- /dev/null +++ b/src/dbtest/CMakeLists.txt @@ -0,0 +1,86 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +PROJECT(dbtest) + +set(CMAKE_BUILD_TYPE "Debug") +set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb") +set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall") +set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) +message("cmake moudle ${CMAKE_MODULE_PATH}") + +set(CMAKE_CXX_FLAGS "-std=c++17 ${CMAKE_CXX_FLAGS} -g -ftest-coverage -fprofile-arcs -Wno-deprecated -fopenmp -pthread -lpthread") + +# all .h file +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src) + +# ld:pthread gflags +list(APPEND THIRD_PARTIES pthread) + +find_package(gflags REQUIRED) +list(APPEND THIRD_PARTIES gflags) + +########### sql test V1 ############# +# static test with 33 test case +# all .cc files +list(APPEND SOURCE_FILES_SQL + "${CMAKE_CURRENT_SOURCE_DIR}/src/common.cc" + "${CMAKE_CURRENT_SOURCE_DIR}/src/case_cntl.cc" + "${CMAKE_CURRENT_SOURCE_DIR}/src/sql_cntl.cc" + "${CMAKE_CURRENT_SOURCE_DIR}/src/sqltest.cc" +) +# bin +add_executable(3ts_dbtest ${SOURCE_FILES_SQL}) +# ld:odbc +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/Modules/") +find_package(ODBC REQUIRED) +list(APPEND ODBC_LD odbc) +# link ld +target_link_libraries(3ts_dbtest ${THIRD_PARTIES}) +target_link_libraries(3ts_dbtest ${ODBC_LD}) + +########### sql test V2 ############# +# dynamic test with auto-gen test case +# all .cc files +list(APPEND SOURCE_FILES_SQL_v2 + "${CMAKE_CURRENT_SOURCE_DIR}/src/common.cc" + "${CMAKE_CURRENT_SOURCE_DIR}/src/case_cntl_v2.cc" + "${CMAKE_CURRENT_SOURCE_DIR}/src/sql_cntl_v2.cc" + "${CMAKE_CURRENT_SOURCE_DIR}/src/sqltest_v2.cc" +) +# bin +add_executable(3ts_dbtest_v2 ${SOURCE_FILES_SQL_v2}) +# ld:odbc +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/Modules/") +find_package(ODBC REQUIRED) +list(APPEND ODBC_LD odbc) +# link ld +target_link_libraries(3ts_dbtest_v2 ${THIRD_PARTIES}) +target_link_libraries(3ts_dbtest_v2 ${ODBC_LD}) + + +########### kv test ############## +# all .cc files +#list(APPEND SOURCE_FILES_KV +# "${CMAKE_CURRENT_SOURCE_DIR}/src/common.cc" +# "${CMAKE_CURRENT_SOURCE_DIR}/src/case_cntl.cc" +# "${CMAKE_CURRENT_SOURCE_DIR}/src/kv_cntl.cc" +# "${CMAKE_CURRENT_SOURCE_DIR}/src/kvtest.cc" +#) +# bin +#add_executable(3ts_kvtest ${SOURCE_FILES_KV}) +# ld:bson mongo +#find_package(bsoncxx REQUIRED) +#find_package(mongocxx REQUIRED) +#include_directories(${LIBMONGOCXX_INCLUDE_DIR}) +#include_directories(${LIBBSONCXX_INCLUDE_DIR}) +# link ld +#target_link_libraries(3ts_kvtest PRIVATE mongo::bsoncxx_shared) +#target_link_libraries(3ts_kvtest PRIVATE mongo::mongocxx_shared) +#target_link_libraries(3ts_kvtest PRIVATE ${THIRD_PARTIES}) +# third parties .h +#target_include_directories(3ts_kvtest PUBLIC +# "/usr/local/include/mongocxx/v_noabi" +# "/usr/local/include/bsoncxx/v_noabi" +# "/usr/local/include/libmongoc-1.0" +# "/usr/local/include/libbson-1.0" +# "/usr/local/lib" +# ) diff --git a/src/dbtest/auto_test.sh b/src/dbtest/auto_test.sh new file mode 100755 index 00000000..54894305 --- /dev/null +++ b/src/dbtest/auto_test.sh @@ -0,0 +1,45 @@ +#!/bin/bash +set -x +db=$1 +isolation=$2 +if [ $db == "sqlserver" ] +then + ./3ts_dbtest -isolation=$2 -db_type="sqlserver" -user="username" -passwd="password" -case_dir="sqlserver" +elif [ $db == "mysql" ] +then + ./3ts_dbtest -isolation=$2 -db_type="mysql" -user="username" -passwd="password" -case_dir="mysql" +elif [ $db == "myrocks" ] +then + ./3ts_dbtest -isolation=$2 -db_type="myrocks" -user="username" -passwd="password" -case_dir="myrocks" +elif [ $db == "tidb" ] +then + ./3ts_dbtest -isolation=$2 -db_type="tidb" -user="username" -passwd="password" -case_dir="tidb" +elif [ $db == "oracle" ] +then + ./3ts_dbtest -isolation=$2 -db_type="oracle" -user="username" -passwd="password" -case_dir="oracle" +elif [ $db == "pg" ] +then + #./3ts_dbtest -isolation=$2 -db_type="pg" -user="username" -passwd="password" -case_dir="pg" + ./3ts_dbtest -isolation=$2 -db_type="pg" -user="username" -passwd="password" -case_dir="pg" +elif [ $db == "ob" ] +then + #./3ts_dbtest -isolation=$2 -db_type="ob" -user="username" -passwd="" -case_dir="ob" + #./3ts_dbtest -isolation=$2 -db_type="ob" -user="username" -passwd="" -case_dir="ob" + #./3ts_dbtest -isolation=$2 -db_type="ob" -user="username" -passwd="" -case_dir="ob" + ./3ts_dbtest -isolation=$2 -db_type="ob" -user="username" -passwd="password" -case_dir="ob" +elif [ $db == "crdb" ] +then + ./3ts_dbtest -isolation=$2 -db_type="crdb" -user="username" -passwd="password" -case_dir="crdb" +elif [ $db == "mongodb" ] +then + ./3ts_dbtest -isolation=$2 -db_type="mongodb" -user="username" -passwd="password" -case_dir="mongodb" +elif [ $db == "mariadb" ] +then + ./3ts_dbtest -isolation=$2 -db_type="mariadb" -user="username" -passwd="password" -case_dir="mariadb" +elif [ $db == "cassandra" ] +then + ./3ts_dbtest -isolation=$2 -db_type="cassandra" -user="username" -passwd="password" -case_dir="cassandra" +elif [ $db == "yugabyte" ] +then + ./3ts_dbtest -isolation=$2 -db_type="yugabyte" -user="username" -passwd="password" -case_dir="yugabyte" +fi diff --git a/src/dbtest/auto_test_all.sh b/src/dbtest/auto_test_all.sh new file mode 100755 index 00000000..1ed8f507 --- /dev/null +++ b/src/dbtest/auto_test_all.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -x +./auto_test.sh "mysql" "read-uncommitted" +./auto_test.sh "mysql" "read-committed" +./auto_test.sh "mysql" "repeatable-read" +./auto_test.sh "mysql" "serializable" + +./auto_test.sh "sqlserver" "read-uncommitted" +./auto_test.sh "sqlserver" "read-committed" +./auto_test.sh "sqlserver" "repeatable-read" +./auto_test.sh "sqlserver" "serializable" + +./auto_test.sh "oracle" "read-committed" +./auto_test.sh "oracle" "serializable" + +./auto_test.sh "pg" "read-uncommitted" +./auto_test.sh "pg" "read-committed" +./auto_test.sh "pg" "repeatable-read" +./auto_test.sh "pg" "serializable" + +./auto_test.sh "tidb" "read-committed" +./auto_test.sh "tidb" "repeatable-read" + +./auto_test.sh "crdb" "serializable" + +./auto_test.sh "ob" "read-uncommitted" +./auto_test.sh "ob" "read-committed" +./auto_test.sh "ob" "repeatable-read" +./auto_test.sh "ob" "serializable" + +./auto_test.sh "mariadb" "read-uncommitted" +./auto_test.sh "mariadb" "read-committed" +./auto_test.sh "mariadb" "repeatable-read" +./auto_test.sh "mariadb" "serializable" + +./auto_test.sh "cassandra" "one" + +./auto_test.sh "yugabyte" "serializable" +./auto_test.sh "yugabyte" "snapshot" \ No newline at end of file diff --git a/src/dbtest/do_test_list.txt b/src/dbtest/do_test_list.txt new file mode 100644 index 00000000..1e171596 --- /dev/null +++ b/src/dbtest/do_test_list.txt @@ -0,0 +1,57 @@ +#### RAT +rat_sda_dirty_read +#rat_sda_non_repeatable_read +#rat_sda_intermediate_read +#rat_sda_intermediate_read_committed +#rat_sda_non_repeatable_read_predicate_based-phantom_delete +#rat_sda_non_repeatable_read_predicate_based-phantom_insert +#rat_sda_lost_self_update +#rat_dda_write_read_skew +#rat_dda_write_read_skew_committed +#rat_dda_double_write_skew1 +#rat_dda_double_write_skew1_committed +#rat_dda_double_write_skew2 +#rat_dda_read_skew +#rat_dda_read_skew_predicate_based_delete +#rat_dda_read_skew_predicate_based_insert +#rat_dda_read_skew2 +#rat_dda_read_skew2_committed +#rat_mda_step_rat +#rat_mda_step_rat_long_fork +#rat_mda_step_rat_predicate_based_delete +#rat_mda_step_rat_predicate_based_insert +#### WAT +#wat_sda_dirty_write_1abort +#wat_sda_dirty_write_2commit +#wat_sda_full_write +#wat_sda_full_write_committed +#wat_sda_lost_update_c1 +#wat_sda_lost_update_c2 +#wat_sda_lost_self_update_committed +#wat_dda_double_write_skew2_committed +#wat_dda_full_write_skew_c1 +#wat_dda_full_write_skew_c2 +#wat_dda_full_write_skew_committed +#wat_dda_read_write_skew1_c1 +#wat_dda_read_write_skew1_c2 +#wat_dda_read_write_skew2_c1 +#wat_dda_read_write_skew2_c2 +#wat_dda_read_write_skew2_committed +#wat_mda_step_wat_c1 +#wat_mda_step_wat_c2 +#### IAT +#iat_sda_non_repeatable_read_committed +#iat_sda_lost_update_committed +#iat_dda_read_skew_committed +#iat_dda_read_write_skew1_committed +#iat_dda_write_skew +#iat_dda_write_skew_predicate_based-intersecting_data +#iat_dda_write_skew_predicate_based-overdraft_protection +#iat_dda_write_skew_committed +#iat_mda_step_iat +#iat_mda_step_iat_predicate_based_delete +#iat_mda_step_iat_predicate_based_insert +#iat_mda_step_iat_uname_anomaly +#iat_mda_step_iat_cross_phenomenon +#iat_mda_step_iat_causality_violation_anomaly +#iat_mda_step_iat_read_only_transaction_anomaly \ No newline at end of file diff --git a/src/dbtest/sql2cql.py b/src/dbtest/sql2cql.py new file mode 100644 index 00000000..1236ae34 --- /dev/null +++ b/src/dbtest/sql2cql.py @@ -0,0 +1,122 @@ +# /* +# * Tencent is pleased to support the open source community by making 3TS available. +# * +# * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. The below software +# * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All +# * Tencent Modifications are Copyright (C) THL A29 Limited. +# * +# * Author: zhenhuazhuang (zhenhua.zhuang@qq.com) +# * +# */ + +# This Python script is designed to convert SQL statements to CQL (Cassandra Query Language) statements. +# It currently handles only the INSERT statements and converts them to the full INSERT INTO ... VALUES ... format. +# For example, it converts "INSERT INTO mytab VALUES (1, 20);" to "INSERT INTO mytab (k,v) VALUES (1, 20);" + +import os +import re + +""" +Extracts column names from a SQL column definition string. + +@param column_str The SQL column definition string. +@return A list of column names extracted from the input string. +""" +def extract_columns(column_str): + depth = 0 + start = 0 + columns = [] + + for i, c in enumerate(column_str): + if c == '(': + depth += 1 + elif c == ')': + depth -= 1 + elif c == ',' and depth == 0: + columns.append(column_str[start:i].strip()) + start = i + 1 + + # Add the last column name + columns.append(column_str[start:].strip()) + + # Extract column names from column definitions + column_names = [] + for column in columns: + if not column.lower().startswith(('primary key', 'key')): + column_name = column.split()[0] + column_names.append(column_name) + return column_names + +class SQLFileProcessor: + def __init__(self, input_dir, output_dir): + """ + Initializes the SQL file processor. + + :param input_dir: The path to the input directory. + :param output_dir: The path to the output directory. + """ + self.input_dir = input_dir + self.output_dir = output_dir + # Check and create the output folder if it doesn't exist + if not os.path.exists(output_dir): + os.makedirs(output_dir) + + def process_file(self, filename): + """ + Processes a single SQL file. + + :param filename: The name of the SQL file to process. + """ + input_filepath = os.path.join(self.input_dir, filename) + output_filepath = os.path.join(self.output_dir, filename) + + with open(input_filepath, "r") as file: + lines = file.readlines() + + table_columns = {} + # Process each line + for i, line in enumerate(lines): + line = line.strip() + parts = line.split('-') + if len(parts) >= 3: + actual_line = parts[2] + if actual_line.lower().startswith("create table"): + match = re.match(r"create table (\w+)\s?\((.+?)\)", actual_line, re.I) + current_table = match.group(1) + # Locate the positions of the first left parenthesis and the last right parenthesis + start_idx = actual_line.find('(') + end_idx = actual_line.rfind(')') + if start_idx != -1 and end_idx != -1 and start_idx < end_idx: + # Extract the string between them + columns_str = actual_line[start_idx + 1:end_idx] + table_name = actual_line[len("create table "):start_idx].strip() + columns = extract_columns(columns_str) + table_columns[current_table] = columns + elif actual_line.lower().startswith("insert into"): + match = re.match(r"insert into (\w+) values", actual_line, re.I) + if match: + table = match.group(1) + columns = table_columns.get(table, []) + columns_str = ",".join(columns) + if line.find("values") != -1: + new_line = line.replace("values", f"({columns_str}) values") + else: + new_line = line.replace("VALUES", f"({columns_str}) VALUES") + lines[i] = new_line + '\n' + + with open(output_filepath, "w") as file: + file.writelines(lines) + + def process_all_files(self): + """ + Processes all SQL files in the input directory. + """ + for filename in os.listdir(self.input_dir): + if filename.endswith(".txt"): + self.process_file(filename) + +input_directory = "t/pg_old" +output_directory = "t/pg" + +processor = SQLFileProcessor(input_directory, output_directory) +processor.process_all_files() diff --git a/src/dbtest/src/.vscode/c_cpp_properties.json b/src/dbtest/src/.vscode/c_cpp_properties.json new file mode 100644 index 00000000..e1b96491 --- /dev/null +++ b/src/dbtest/src/.vscode/c_cpp_properties.json @@ -0,0 +1,38 @@ +{ + "configurations": [ + { + "name": "Win32", + "includePath": [ + "${workspaceFolder}/**" + ], + "defines": [ + "_DEBUG", + "UNICODE", + "_UNICODE" + ] + }, + { + "name": "includePath", + "includePath": [ + "${workspaceFolder}/**" + ], + "defines": [ + "_DEBUG", + "UNICODE", + "_UNICODE" + ] + }, + { + "name": "gflags/gflags.h", + "includePath": [ + "${workspaceFolder}/**" + ], + "defines": [ + "_DEBUG", + "UNICODE", + "_UNICODE" + ] + } + ], + "version": 4 +} \ No newline at end of file diff --git a/src/dbtest/src/.vscode/settings.json b/src/dbtest/src/.vscode/settings.json new file mode 100644 index 00000000..70e34ecb --- /dev/null +++ b/src/dbtest/src/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "C_Cpp.errorSquiggles": "disabled" +} \ No newline at end of file diff --git a/src/dbtest/src/case_cntl.cc b/src/dbtest/src/case_cntl.cc new file mode 100644 index 00000000..f7def54d --- /dev/null +++ b/src/dbtest/src/case_cntl.cc @@ -0,0 +1,466 @@ +/* + * Tencent is pleased to support the open source community by making 3TS available. + * + * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software + * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All + * Tencent Modifications are Copyright (C) THL A29 Limited. + * + * Author: farrisli (farrisli@tencent.com) + * + */ +#include "case_cntl.h" +Outputter outputter; +ResultHandler result_handler; + +/** + * Parses a given line to extract the execution order ID, transaction ID, and SQL statement. + * + * The function expects the input line to be formatted with dashes ("-") separating the + * execution order ID, the transaction ID, and the SQL statement. If the format is not met, + * an error message is displayed. The function then returns a vector containing the extracted elements. + * + * @param line The input string containing the execution order ID, transaction ID, and SQL statement. + * @return A vector of strings where the first element is the execution order ID, + * the second is the transaction ID, and the third is the SQL statement. + */ +std::vector CaseReader::TxnIdAndSql(const std::string& line) { + std::vector txn_id_and_sql; + const auto index_first = line.find("-"); + const auto index_second = line.rfind("-"); + if (!line.empty()) { + if (index_first != line.npos && index_second != line.npos) { + txn_id_and_sql.push_back(line.substr(0, index_first)); + txn_id_and_sql.push_back(line.substr(index_first + 1, index_second - index_first - 1)); + txn_id_and_sql.push_back(line.substr(index_second + 1)); + } else { + std::cerr << "read txn_sql failed, please check format of test file. line:" + line << std::endl; + } + } + return txn_id_and_sql; +} + +/** + * Parses a given line to extract the SQL ID and its expected result. + * + * The function expects the input line to be formatted with a dash ("-") separating the + * SQL ID from the result. The result can be a space-separated list of values. The function + * will then return a pair where the first element is the SQL ID (as an integer) and the + * second element is the enhanced result string. Each value in the result is enclosed within + * parentheses, except for 'null' values. + * + * For example, given a line "9-0,1 1,1", the function will return a pair with 9 as the SQL ID + * and "(0,1) (1,1)" as the result. + * + * If the format is not met or there's an issue with the SQL ID, an appropriate message is displayed. + * + * @param line The input string containing the SQL ID and its expected result. + * @return A pair where the first element is the SQL ID and the second is the enhanced result string. + */ +std::pair CaseReader::SqlIdAndResult(const std::string& line) { + std::pair sql_id_and_result; + const auto index = line.find("-"); + if (index != line.npos) { + std::string sql_id = line.substr(0, index); + std::string result = line.substr(index + 1); + std::vector ret_list; + std::string result_enhance = ""; + split(result, ret_list, " "); + int i = 0; + for (auto row : ret_list) { + if (row == "null") { + result_enhance = row; + } else { + std::string r = "(" + row + ")"; + if (i != int(ret_list.size()) - 1) { + result_enhance += r + " "; + } else { + result_enhance += r; + } + } + i++; + } + if (!sql_id.empty()) { + sql_id_and_result.first = std::stoi(sql_id); + } else { + std::cout << "line: " << line << " please check case file, there is no sql_id" << std::endl; + } + sql_id_and_result.second = result_enhance; + } + return sql_id_and_result; +} + +/** + * Extracts the isolation level from the given line. + * + * The function expects the input line to contain an isolation level followed by + * a curly brace "{" character. It will extract and return everything before the + * curly brace as the isolation level. + * + * For example, given a line "serializable{...}", the function will return "serializable". + * + * @param line The input string containing the isolation level and subsequent data enclosed within curly braces. + * @return The extracted isolation level from the input string. + */ +std::string CaseReader::Isolation(const std::string& line) { + const auto index = line.find("{"); + return line.substr(0, index - 1); +} + +/** + * Parses the provided test file to extract both test sequences and their corresponding expected results. + * + * The function reads through the test file line by line to identify SQL transactions, their expected results, + * and additional information like the isolation level and parameter numbers. It constructs two main data structures: + * a TestSequence which represents the sequence of transactions, and a TestResultSet which represents the set + * of expected results for each transaction in the sequence. + * + * @param test_file Path to the test file to be read. + * @param db_type Database type identifier. + * + * Expected Format: + * - The file may contain lines starting with "#" which are treated as comments and ignored. + * - A line with "ParamNum" is used to set the number of parameters for the test sequence. + * - The isolation level is expected to be present in a line that contains a "{" character. + * - Each transaction's SQL and its expected result are parsed from lines without "{" or "}". + * - Each result row is defined between lines with "{" and "}". + * + * @return A pair containing the extracted TestSequence and TestResultSet from the test file. + */ +std::pair CaseReader::TestSequenceAndTestResultSetFromFile(const std::string& test_file, const std::string& db_type) { + std::pair test_sequence_and_result_set; + std::ifstream test_stream(test_file); + const auto index_second = test_file.rfind("/"); + const auto end = test_file.find("."); + std::string test_case = test_file.substr(index_second + 1, end - index_second - 1); + // std::string test_case_type = db_type + "_" + test_case; + std::string test_case_type = test_case; + std::string line; + TestSequence test_sequence(test_case_type); + TestResultSet test_result_set(test_case_type); + bool is_result_row = false; + int first_sql_id = -1; + std::unordered_map> sql_result_set; + if (test_stream) { + while (getline(test_stream, line)) { + if (!line.empty()) { + auto index_table_type = line.find("ParamNum"); + auto index_left = line.find("{"); + auto index_right = line.find("}"); + auto index_anno = line.find("#"); + // Skip comment lines (those starting with #) + if (index_anno != line.npos) { + continue; + } + // Retrieve and set the parameter count (if the line contains "ParamNum") + if (index_table_type != line.npos) { + auto start = line.find(":"); + std::string param_num_str = ""; + if (start != line.npos) { + param_num_str = line.substr(start + 1); + } + int param_num = 0; + if (!param_num_str.empty()) { + param_num = std::stoi(param_num_str); + } + test_sequence.SetParamNum(param_num); + } else if (index_left != line.npos) { + std::string isolation = CaseReader::Isolation(line); + test_result_set.SetIsolation(isolation); + is_result_row = true; + } else if (index_right != line.npos && is_result_row) { + /* + std::pair sql_id_and_result = CaseReader::SqlIdAndResult(line); + std::cout << sql_id_and_result.first << "222" << std::endl; + std::vector ret_list; + std::string result_str = sql_id_and_result.second; + split(result_str, ret_list, " "); + sql_result_set[sql_id_and_result.first] = ret_list; + */ + test_result_set.AddSqlResultSet(sql_result_set); + + is_result_row = false; + } else if (is_result_row) { + std::pair sql_id_and_result = CaseReader::SqlIdAndResult(line); + if (first_sql_id == -1) { + first_sql_id = sql_id_and_result.first; + } else if (first_sql_id == sql_id_and_result.first) { + test_result_set.AddSqlResultSet(sql_result_set); + sql_result_set.clear(); + } + std::vector ret_list; + std::string result_str = sql_id_and_result.second; + + split(result_str, ret_list, " "); + sql_result_set[sql_id_and_result.first] = ret_list; + } else if (!is_result_row) { + std::vector txn_id_and_sql = CaseReader::TxnIdAndSql(line); + int sql_id = 0; + int txn_id = 0; + std::string sql = ""; + if (!txn_id_and_sql[0].empty()) { + sql_id = std::stoi(txn_id_and_sql[0]); + } + if (!txn_id_and_sql[1].empty()) { + txn_id = std::stoi(txn_id_and_sql[1]); + } + if (!txn_id_and_sql[2].empty()) { + sql = txn_id_and_sql[2]; + } + TxnSql txn_sql(sql_id, txn_id, sql, test_case_type); + test_sequence.AddTxnSql(txn_sql); + } + } + } + test_sequence_and_result_set.first = test_sequence; + test_sequence_and_result_set.second = test_result_set; + } else { + //throw "test file not found"; + std::cerr << "test file: " + test_file + " not found" << std::endl; + } + return test_sequence_and_result_set; +} + +/** + * Initializes the lists of TestSequence and TestResultSet List based on a provided test path and database type. + * + * The function starts by reading the "do_test_list.txt" file. Each line in this file should represent + * a test case. The function will then, for each test case, retrieve the respective test sequence and + * test result set by reading the corresponding file named ".txt" located in the provided test path. + * + * Lines in the "do_test_list.txt" file starting with a '#' are considered comments and are skipped. + * If the required test file for a test case is successfully read and parsed, a success message is printed. + * + * @param test_path The path to the directory containing the test files. + * @param db_type The type of the database being tested (e.g., "MySQL"). + * @return true if the initialization is successful, false if the "do_test_list.txt" file is not found. + */ +bool CaseReader::InitTestSequenceAndTestResultSetList(const std::string& test_path, const std::string& db_type) { + std::cout << dash + "read test sequence and test result set start" + dash << std::endl; + std::ifstream do_test_stream("./do_test_list.txt"); + std::string test_case; + if (do_test_stream) { + while (getline(do_test_stream, test_case)) { + auto index = test_case.find("#"); + if (index != test_case.npos) { + continue; + } + if (!do_test_stream) { + continue; + } + std::string test_file_name = test_case + ".txt"; + std::string test_file = test_path + "/" + test_file_name; + std::pair test_sequence_and_result_set = CaseReader::TestSequenceAndTestResultSetFromFile(test_file, db_type); + TestSequence test_sequence = test_sequence_and_result_set.first; + TestResultSet test_result_set = test_sequence_and_result_set.second; + CaseReader::AddTestResultSet(test_result_set); + CaseReader::AddTestSequence(test_sequence); + std::cout << test_file + " read success" << std::endl; + } + return true; + } else { + //throw "do_test_list.txt not found"; + std::cerr << "do_test_list.txt not found" << std::endl; + return false; + } +} + +/** + * Compares the current SQL result with the expected SQL result. + * + * The function checks if the given current result (cur_result) matches the expected result (expected_result) for a specific SQL query. + * The comparison is done element-wise for each entry in the result vectors. If any entry is different, or the sizes of the two vectors + * differ, the function returns false, indicating the results are not as expected. Otherwise, it returns true. + * + * @param cur_result A vector containing the current SQL query result. + * @param expected_result A vector containing the expected SQL query result. + * @param sql_id The ID of the SQL statement being compared. + * @param sql The actual SQL statement string (currently not used in the function). + * @return true if the current result matches the expected result, false otherwise. + */ +bool ResultHandler::IsSqlExpectedResult(std::vector cur_result, std::vector expected_result, const int sql_id, const std::string& sql) { + if (cur_result.size() != expected_result.size()) { + //std::cout << "stmt_id:" << sql_id << " The number of data is different, cur_result:" << cur_result.size() << " expected_result: " << expected_result.size() << std::endl; + return false; + } + int len = cur_result.size(); + for (int i = 0; i < len; i++) { + std::string cur = cur_result[i]; + std::string expected = expected_result[i]; + if (cur != expected) { + return false; + } + } + return true; +} + +/** + * Compares the current test result with a set of expected test results. + * + * The function checks if the given current test result (cur_result) matches any of the expected results in the provided list of expected result sets. + * For each expected result set, it iteratively compares the results of individual SQL queries. If all queries' results in the current result match those + * in one of the expected result sets, the function returns true. If no such matching expected result set is found, it returns false. + * + * The function also appends the matching result information to a file specified by test_process_file. + * + * @param cur_result An unordered_map containing the current test results, where the key is the SQL ID and the value is the corresponding result vector. + * @param expected_result_set_list A vector containing multiple unordered_maps. Each unordered_map represents expected results for various SQL queries. + * @param sql_map An unordered_map associating each SQL ID with its actual SQL statement string. + * @param test_process_file The name of the file where matching result information will be appended. + * @return true if the current test result matches any of the expected result sets, false otherwise. + */ +bool ResultHandler::IsTestExpectedResult(std::unordered_map>& cur_result, + std::vector>> expected_result_set_list, + std::unordered_map sql_map, const std::string& test_process_file) { + int index = 1; + for (auto expected_result_set : expected_result_set_list) { + bool is_all_expected = true; + for (auto& result_map : expected_result_set) { + int sql_id = result_map.first; + std::vector sql_expected_result = result_map.second; + std::vector sql_cur_result = cur_result[sql_id]; + if (!IsSqlExpectedResult(sql_cur_result, sql_expected_result, sql_id, sql_map[sql_id])) { + is_all_expected = false; + break; + } + } + if (is_all_expected) { + std::ofstream test_process(test_process_file, std::ios::app); + if (test_process) { + std::string info = "\nThe current result is consistent with the [(" + std::to_string(index) + ") expected_result] of serial scheduling"; + std::cout << info << std::endl; + test_process << info << std::endl; + } + return true; + } + index += 1; + } + return false; +} + +/** + * Writes the summarized test results to a specified file. + * + * This function iterates through each TestResultSet in the given list and extracts the summarized test result for each set. + * It then writes each test case type and its corresponding result to the provided output file. + * Note that the detailed reasons for each result are stripped; only the core result is written. + * + * @param test_result_set_list A vector of TestResultSet objects, each representing the results of a test case. + * @param ret_file The path and filename where the summarized results should be written. + */ +void Outputter::WriteResultTotal(std::vector test_result_set_list, const std::string& ret_file) { + std::ofstream out(ret_file); + for (auto& test_result_set : test_result_set_list) { + // return result without reason + auto result = test_result_set.ResultType(); + result = result.substr(0, result.find("\n")); + out << test_result_set.TestCaseType() + ": " << result << std::endl << std::endl; + } + out.close(); +} + +/** + * Compares the current SQL result to a set of expected results, and outputs the comparison to both the console and a file. + * + * For each transaction or session, the function uses session_id to create a string "blank" which acts as an indentation for the output. + * The current SQL result and its corresponding expected results are then printed and written to the specified file, + * with the results that match being indicated with an asterisk (*) prefix. + * + * @param cur_result A vector containing the current SQL result. + * @param expected_result_set_list A vector of unordered maps, each representing a set of expected results indexed by SQL ID. + * @param sql_id The unique identifier for the SQL statement. + * @param sql The actual SQL statement string. + * @param session_id The identifier for the current session or transaction, used for output formatting. + * @param test_process_file The path to the file where results should be written. + * + * @return True if the results are successfully written to the file, otherwise false (e.g., if the file is not found). + */ +bool Outputter::PrintAndWriteTxnSqlResult(std::vector cur_result, + std::vector>> expected_result_set_list, + const int sql_id, const std::string& sql, const int session_id, const std::string& test_process_file) { + // blank ensures that each transaction or session has its specific indentation. + std::string blank(blank_base*(session_id - 1), ' '); + std::ofstream test_process(test_process_file, std::ios::app); + if (test_process) { + std::cout << blank + " current_result: " << std::endl; + std::cout << blank + " "; + std::copy(cur_result.begin(), cur_result.end(), std::ostream_iterator (std::cout, " ")); + std::cout << "" << std::endl; + //test_process << blank + "T" + std::to_string(session_id) + " sql_id: " + std::to_string(sql_id) + " sql: " + sql << std::endl; + test_process << blank + " current_result: " << std::endl; + test_process << blank + " "; + std::copy(cur_result.begin(), cur_result.end(), std::ostream_iterator (test_process, " ")); + test_process << "" << std::endl; + int idx = 1; + for (auto& expected_result_set : expected_result_set_list) { + std::vector sql_expected_result = expected_result_set[sql_id]; + int len = sql_expected_result.size(); + if (len == 0) { + std::cout << "[ERROR]" << "stmt_expected_result is empty, please check expected result. stmt_id: " << sql_id << " stmt: " << sql << std::endl; + } + if (result_handler.IsSqlExpectedResult(cur_result, sql_expected_result, sql_id, sql)) { + std::cout << blank + " *(" + std::to_string(idx) + ") " + "expected_result: " << std::endl; + std::cout << blank + " "; + std::copy(sql_expected_result.begin(), sql_expected_result.end(), std::ostream_iterator (std::cout, " ")); + std::cout << "" << std::endl; + test_process << blank + " *(" + std::to_string(idx) + ") " + "expected_result: " << std::endl; + test_process << blank + " "; + std::copy(sql_expected_result.begin(), sql_expected_result.end(), std::ostream_iterator (test_process, " ")); + test_process << "" << std::endl; + } else { + std::cout << blank + " (" + std::to_string(idx) + ") " + "expected_result: " << std::endl; + std::cout << blank + " "; + std::copy(sql_expected_result.begin(), sql_expected_result.end(), std::ostream_iterator (std::cout, " ")); + std::cout << "" << std::endl; + test_process << blank + " (" + std::to_string(idx) + ") " + "expected_result: " << std::endl; + test_process << blank + " "; + std::copy(sql_expected_result.begin(), sql_expected_result.end(), std::ostream_iterator (test_process, " ")); + test_process << "" << std::endl; + } + idx++; + } + test_process << "" << std::endl; + return true; + } else { + std::cerr << test_process_file + "has not found" << std::endl; + return false; + } +} + +/** + * Appends the given test case type to a specified file. + * The test case type is formatted with dashes before and after it. + * + * @param test_case_type The type of the test case to be written. + * @param test_process_file The file to which the test case type will be appended. + * @return Returns true if the write operation is successful; otherwise returns false. + */ +bool Outputter::WriteTestCaseTypeToFile(const std::string& test_case_type, const std::string& test_process_file) { + std::ofstream test_process(test_process_file, std::ios::app); + if (test_process) { + test_process << dash + test_case_type + dash << std::endl; + return true; + } else { + std::cerr << test_process_file + "has not found" << std::endl; + return false; + } +} + +/** + * Appends the given result type to a specified file. + * The result type is prefixed with "Test Result:" for clarity. + * + * @param result_type The result type to be written. + * @param test_process_file The file to which the result type will be appended. + * @return Returns true if the write operation is successful; otherwise returns false. + */ +bool Outputter::WriteResultType(const std::string& result_type, const std::string& test_process_file) { + std::ofstream test_process(test_process_file, std::ios::app); + if (test_process) { + test_process << "\nTest Result: " + result_type << std::endl; + test_process << "" << std::endl; + return true; + } else { + std::cerr << test_process_file + "has not found" << std::endl; + return false; + } +} diff --git a/src/dbtest/src/case_cntl.h b/src/dbtest/src/case_cntl.h new file mode 100644 index 00000000..8dd50a80 --- /dev/null +++ b/src/dbtest/src/case_cntl.h @@ -0,0 +1,142 @@ +/* + * Tencent is pleased to support the open source community by making 3TS available. + * + * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software + * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All + * Tencent Modifications are Copyright (C) THL A29 Limited. + * + * Author: farrisli (farrisli@tencent.com) + * + */ +#include "common.h" + +class TestResultSet { +private: + // Type of the test cases + std::string test_case_type_; + // Transaction isolation level + std::string isolation_; + // Test result type + std::string result_type_; + // Expected result set list + std::vector>> expected_result_set_list_; +public: + TestResultSet() {}; + TestResultSet(const std::string& test_case_type) {test_case_type_ = test_case_type;}; + + void SetResultType(const std::string& result_type) {result_type_ = result_type;}; + void SetIsolation(const std::string& isolation) {isolation_ = isolation;}; + + std::string TestCaseType() {return test_case_type_;}; + std::string Isolation() {return isolation_;}; + std::string ResultType() {return result_type_;}; + std::vector>> ExpectedResultSetList() { + return expected_result_set_list_; + }; + + void AddSqlResultSet(std::unordered_map> sql_result_set) { + expected_result_set_list_.push_back(sql_result_set); + }; +}; + +// The sql with txn_id in test case +class TxnSql { +private: + // Transaction ID + int txn_id_; + // ID of the SQL statement + int sql_id_; + // SQL statement + std::string sql_; + // Type of the test case + std::string test_case_type_; +public: + TxnSql(const int sql_id, const int txn_id, const std::string& sql, + const std::string& test_case_type):txn_id_(txn_id), + sql_id_(sql_id), sql_(sql), test_case_type_(test_case_type) {}; + + int TxnId() {return txn_id_;}; + int SqlId() {return sql_id_;}; + std::string Sql() {return sql_;}; + std::string TestCaseType() {return test_case_type_;}; +}; + +// TestSequence->exception test case, include a series of TxnSql +class TestSequence { +private: + // Type of the test cases, such as mysql_dirty-read + std::string test_case_type_; + // List of test sequences + std::vector txn_sql_list_; + // The number of columns in the result set. + int param_num_; +public: + TestSequence() {}; + TestSequence(const std::string& test_case_type):test_case_type_(test_case_type) {}; + + std::string TestCaseType() {return test_case_type_;}; + std::vector TxnSqlList() {return txn_sql_list_;}; + int ParamNum() {return param_num_;}; + + void AddTxnSql(TxnSql txn_sql) {txn_sql_list_.push_back(txn_sql);}; + void SetParamNum(const int param_num) {param_num_ = param_num;}; +}; + +//read and parse sql from file +class CaseReader { +private: + // Store test sequences read from the file + std::vector test_sequence_list_; + // Store the expected test results read from the file + std::vector test_result_set_list_; +public: + bool InitTestSequenceAndTestResultSetList(const std::string& test_path, const std::string& db_type); + + void AddTestSequence(TestSequence test_sequence) { + test_sequence_list_.push_back(test_sequence); + }; + void AddTestResultSet(TestResultSet test_result_set) { + test_result_set_list_.push_back(test_result_set); + }; + + std::pair TestSequenceAndTestResultSetFromFile(const std::string& test_file, const std::string& db_type); + + // Parse execution order ID, transaction ID and SQL from the given line + std::vector TxnIdAndSql(const std::string& line); + // Parse SQL ID and result from the given line + std::pair SqlIdAndResult(const std::string& line); + // Parse isolation level from the given line + std::string Isolation(const std::string& line); + + std::vector TestSequenceList() {return test_sequence_list_;}; + std::vector TestResultSetList() {return test_result_set_list_;}; +}; + +// Process and validate the expected test results +class ResultHandler { +public: + // Compare the current result of a single SQL query with its expected result + bool IsSqlExpectedResult(std::vector cur_result, std::vector expected_result, const int sql_id, const std::string& sql); + // Verify if the current result set of SQL queries matches any of the expected results in the result set list + bool IsTestExpectedResult(std::unordered_map>& cur_result, + std::vector>> expected_result_set_list, + std::unordered_map sql_map, const std::string& test_process_file); +}; + +class Outputter { +public: + // Write the overall test results to the specified file + void WriteResultTotal(std::vector test_result_set_list, const std::string& ret_file); + + // Print the results of the transaction SQL + bool PrintAndWriteTxnSqlResult(std::vector cur_result, + std::vector>> expected_result_set_list, + const int sql_id, const std::string& sql, const int session_id, const std::string& test_process_file); + // Write the test case type to the specified file + bool WriteTestCaseTypeToFile(const std::string& test_case_type, const std::string& test_process_file); + // Write the result type to the specified file + bool WriteResultType(const std::string& result_type, const std::string& test_process_file); +}; + +extern Outputter outputter; +extern ResultHandler result_handler; diff --git a/src/dbtest/src/case_cntl_v2.cc b/src/dbtest/src/case_cntl_v2.cc new file mode 100644 index 00000000..6ad0dd51 --- /dev/null +++ b/src/dbtest/src/case_cntl_v2.cc @@ -0,0 +1,444 @@ +/* + * Tencent is pleased to support the open source community by making 3TS available. + * + * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software + * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All + * Tencent Modifications are Copyright (C) THL A29 Limited. + * + * Author: farrisli (farrisli@tencent.com) + * + */ +#include "case_cntl.h" +#include +Outputter outputter; +ResultHandler result_handler; + +/** + * Parses a given line to extract the execution order ID, transaction ID, and SQL statement. + * + * The function expects the input line to be formatted with dashes ("-") separating the + * execution order ID, the transaction ID, and the SQL statement. If the format is not met, + * an error message is displayed. The function then returns a vector containing the extracted elements. + * + * @param line The input string containing the execution order ID, transaction ID, and SQL statement. + * @return A vector of strings where the first element is the execution order ID, + * the second is the transaction ID, and the third is the SQL statement. + * + * @note The code is the same as the corresponding function in case_cntl.cc. + */ +std::vector CaseReader::TxnIdAndSql(const std::string& line) { + std::vector txn_id_and_sql; + const auto index_first = line.find("-"); + const auto index_second = line.rfind("-"); + if (!line.empty()) { + if (index_first != line.npos && index_second != line.npos) { + txn_id_and_sql.push_back(line.substr(0, index_first)); + txn_id_and_sql.push_back(line.substr(index_first + 1, index_second - index_first - 1)); + txn_id_and_sql.push_back(line.substr(index_second + 1)); + } else { + std::cerr << "read txn_sql failed, please check format of test file. line:" + line << std::endl; + } + } + return txn_id_and_sql; +} + +/** + * Parses a given line to extract the SQL ID and its expected result. + * + * The function expects the input line to be formatted with a dash ("-") separating the + * SQL ID from the result. The result can be a space-separated list of values. The function + * will then return a pair where the first element is the SQL ID (as an integer) and the + * second element is the enhanced result string. Each value in the result is enclosed within + * parentheses, except for 'null' values. + * + * For example, given a line "9-0,1 1,1", the function will return a pair with 9 as the SQL ID + * and "(0,1) (1,1)" as the result. + * + * If the format is not met or there's an issue with the SQL ID, an appropriate message is displayed. + * + * @param line The input string containing the SQL ID and its expected result. + * @return A pair where the first element is the SQL ID and the second is the enhanced result string. + * + * @note The code is the same as the corresponding function in case_cntl.cc. + */ +std::pair CaseReader::SqlIdAndResult(const std::string& line) { + std::pair sql_id_and_result; + const auto index = line.find("-"); + if (index != line.npos) { + std::string sql_id = line.substr(0, index); + std::string result = line.substr(index + 1); + std::vector ret_list; + std::string result_enhance = ""; + split(result, ret_list, " "); + int i = 0; + for (auto row : ret_list) { + if (row == "null") { + result_enhance = row; + } else { + std::string r = "(" + row + ")"; + if (i != int(ret_list.size()) - 1) { + result_enhance += r + " "; + } else { + result_enhance += r; + } + } + i++; + } + if (!sql_id.empty()) { + sql_id_and_result.first = std::stoi(sql_id); + } else { + std::cout << "line: " << line << " please check case file, there is no sql_id" << std::endl; + } + sql_id_and_result.second = result_enhance; + } + return sql_id_and_result; +} + +/** + * Extracts the isolation level from the given line. + * + * The function expects the input line to contain an isolation level followed by + * a curly brace "{" character. It will extract and return everything before the + * curly brace as the isolation level. + * + * For example, given a line "serializable{...}", the function will return "serializable". + * + * @param line The input string containing the isolation level and subsequent data enclosed within curly braces. + * @return The extracted isolation level from the input string. + * + * @note The code is the same as the corresponding function in case_cntl.cc. + */ +std::string CaseReader::Isolation(const std::string& line) { + const auto index = line.find("{"); + return line.substr(0, index - 1); +} + +/** + * Reads a test file and extracts the test sequence and result set. + * + * This function reads a test file, parses its contents, and extracts the test sequence + * and result set information. It then returns a pair containing the test sequence and result set. + * + * @param test_file The path to the test file to be read. + * @param db_type The type of the database being tested (e.g., MySQL, PostgreSQL). + * @return A pair containing the extracted test sequence and result set. + * + * @note The code is different from the corresponding function in case_cntl.cc. + * Since the dynamic test file doesn't provide expected results, reading them has been canceled. + */ +std::pair CaseReader::TestSequenceAndTestResultSetFromFile(const std::string& test_file, const std::string& db_type) { + std::pair test_sequence_and_result_set; + std::ifstream test_stream(test_file); + const auto index_second = test_file.rfind("/"); + const auto end = test_file.find("."); + std::string test_case = test_file.substr(index_second + 1, end - index_second - 1); + // std::string test_case_type = db_type + "_" + test_case; + std::string test_case_type = test_case; + std::string line; + TestSequence test_sequence(test_case_type); + TestResultSet test_result_set(test_case_type); + std::unordered_map> sql_result_set; + if (test_stream) { + while (getline(test_stream, line)) { + if (!line.empty()) { + auto index_table_type = line.find("Parameters"); + auto index_anno = line.find("#"); + if (index_table_type != line.npos) { + // extract first number + std::string output = std::regex_replace( + line, + std::regex("[^0-9]*([0-9]+).*"), + std::string("$1") + ); + int param_num = 0; + if (!output.empty()) { + param_num = std::stoi(output); + } + test_sequence.SetParamNum(param_num); + } + else if (index_anno != line.npos) { + continue; + } + else { + std::vector txn_id_and_sql = CaseReader::TxnIdAndSql(line); + int sql_id = 0; + int txn_id = 0; + std::string sql = ""; + if (!txn_id_and_sql[0].empty()) { + sql_id = std::stoi(txn_id_and_sql[0]); + } + if (!txn_id_and_sql[1].empty()) { + txn_id = std::stoi(txn_id_and_sql[1]); + } + if (!txn_id_and_sql[2].empty()) { + sql = txn_id_and_sql[2]; + } + TxnSql txn_sql(sql_id, txn_id, sql, test_case_type); + test_sequence.AddTxnSql(txn_sql); + } + } + } + test_sequence_and_result_set.first = test_sequence; + test_sequence_and_result_set.second = test_result_set; + } else { + //throw "test file not found"; + std::cerr << "test file: " + test_file + " not found" << std::endl; + } + return test_sequence_and_result_set; +} + +/** + * Initializes the lists of TestSequence and TestResultSet List based on a provided test path and database type. + * + * The function starts by reading the "do_test_list.txt" file. Each line in this file should represent + * a test case. The function will then, for each test case, retrieve the respective test sequence and + * test result set by reading the corresponding file named ".txt" located in the provided test path. + * + * Lines in the "do_test_list.txt" file starting with a '#' are considered comments and are skipped. + * If the required test file for a test case is successfully read and parsed, a success message is printed. + * + * @param test_path The path to the directory containing the test files. + * @param db_type The type of the database being tested (e.g., "MySQL"). + * @return true if the initialization is successful, false if the "do_test_list.txt" file is not found. + * + * @note The code is the same as the corresponding function in case_cntl.cc. + */ +bool CaseReader::InitTestSequenceAndTestResultSetList(const std::string& test_path, const std::string& db_type) { + std::cout << dash + "read test sequence and test result set start" + dash << std::endl; + std::ifstream do_test_stream("./do_test_list.txt"); + std::string test_case; + if (do_test_stream) { + while (getline(do_test_stream, test_case)) { + auto index = test_case.find("#"); + if (index != test_case.npos) { + continue; + } + if (!do_test_stream) { + continue; + } + std::string test_file_name = test_case + ".txt"; + std::string test_file = test_path + "/" + test_file_name; + std::pair test_sequence_and_result_set = CaseReader::TestSequenceAndTestResultSetFromFile(test_file, db_type); + TestSequence test_sequence = test_sequence_and_result_set.first; + TestResultSet test_result_set = test_sequence_and_result_set.second; + CaseReader::AddTestResultSet(test_result_set); + CaseReader::AddTestSequence(test_sequence); + std::cout << test_file + " read success" << std::endl; + } + return true; + } else { + //throw "do_test_list.txt not found"; + std::cerr << "do_test_list.txt not found" << std::endl; + return false; + } +} + +/** + * Compares the current SQL result with the expected SQL result. + * + * The function checks if the given current result (cur_result) matches the expected result (expected_result) for a specific SQL query. + * The comparison is done element-wise for each entry in the result vectors. If any entry is different, or the sizes of the two vectors + * differ, the function returns false, indicating the results are not as expected. Otherwise, it returns true. + * + * @param cur_result A vector containing the current SQL query result. + * @param expected_result A vector containing the expected SQL query result. + * @param sql_id The ID of the SQL statement being compared. + * @param sql The actual SQL statement string (currently not used in the function). + * @return true if the current result matches the expected result, false otherwise. + * + * @note The code is the same as the corresponding function in case_cntl.cc. + */ +bool ResultHandler::IsSqlExpectedResult(std::vector cur_result, std::vector expected_result, const int sql_id, const std::string& sql) { + if (cur_result.size() != expected_result.size()) { + //std::cout << "stmt_id:" << sql_id << " The number of data is different, cur_result:" << cur_result.size() << " expected_result: " << expected_result.size() << std::endl; + return false; + } + int len = cur_result.size(); + for (int i = 0; i < len; i++) { + std::string cur = cur_result[i]; + std::string expected = expected_result[i]; + if (cur != expected) { + return false; + } + } + return true; +} + +/** + * Compares the current test result with a set of expected test results. + * + * The function checks if the given current test result (cur_result) matches any of the expected results in the provided list of expected result sets. + * For each expected result set, it iteratively compares the results of individual SQL queries. If all queries' results in the current result match those + * in one of the expected result sets, the function returns true. If no such matching expected result set is found, it returns false. + * + * The function also appends the matching result information to a file specified by test_process_file. + * + * @param cur_result An unordered_map containing the current test results, where the key is the SQL ID and the value is the corresponding result vector. + * @param expected_result_set_list A vector containing multiple unordered_maps. Each unordered_map represents expected results for various SQL queries. + * @param sql_map An unordered_map associating each SQL ID with its actual SQL statement string. + * @param test_process_file The name of the file where matching result information will be appended. + * @return true if the current test result matches any of the expected result sets, false otherwise. + * + * @note The code is the same as the corresponding function in case_cntl.cc. + */ +bool ResultHandler::IsTestExpectedResult(std::unordered_map>& cur_result, + std::vector>> expected_result_set_list, + std::unordered_map sql_map, const std::string& test_process_file) { + int index = 1; + for (auto expected_result_set : expected_result_set_list) { + bool is_all_expected = true; + for (auto& result_map : expected_result_set) { + int sql_id = result_map.first; + std::vector sql_expected_result = result_map.second; + std::vector sql_cur_result = cur_result[sql_id]; + if (!IsSqlExpectedResult(sql_cur_result, sql_expected_result, sql_id, sql_map[sql_id])) { + is_all_expected = false; + break; + } + } + if (is_all_expected) { + std::ofstream test_process(test_process_file, std::ios::app); + if (test_process) { + std::string info = "\nThe current result is consistent with the [(" + std::to_string(index) + ") expected_result] of serial scheduling"; + std::cout << info << std::endl; + test_process << info << std::endl; + } + return true; + } + index += 1; + } + return false; +} + +/** + * Writes the summarized test results to a specified file. + * + * This function iterates through each TestResultSet in the given list and extracts the summarized test result for each set. + * It then writes each test case type and its corresponding result to the provided output file. + * Note that the detailed reasons for each result are stripped; only the core result is written. + * + * @param test_result_set_list A vector of TestResultSet objects, each representing the results of a test case. + * @param ret_file The path and filename where the summarized results should be written. + * + * @note The code is the same as the corresponding function in case_cntl.cc. + */ +void Outputter::WriteResultTotal(std::vector test_result_set_list, const std::string& ret_file) { + std::ofstream out(ret_file); + for (auto& test_result_set : test_result_set_list) { + // return result without reason + auto result = test_result_set.ResultType(); + result = result.substr(0, result.find("\n")); + out << test_result_set.TestCaseType() + ": " << result << std::endl << std::endl; + } + out.close(); +} + +/** + * Prints and writes the transaction SQL result. + * + * This function takes a set of parameters and performs the following actions: + * - Creates a formatted output string. + * - Appends the output to a test process file. + * - Prints the output to the console. + * - Checks for expected results and logs them. + * + * @param cur_result The current result to be printed and logged. + * @param expected_result_set_list A list of expected result sets. + * @param sql_id The SQL ID associated with the result. + * @param sql The SQL query. + * @param session_id The session ID for the transaction. + * @param test_process_file The file where test process logs are written. + * @return True if the operation is successful, otherwise false. + * + * @note The code is different from the corresponding function in case_cntl.cc. + */ +bool Outputter::PrintAndWriteTxnSqlResult(std::vector cur_result, + std::vector>> expected_result_set_list, + const int sql_id, const std::string& sql, const int session_id, const std::string& test_process_file) { + std::string blank(blank_base*(session_id - 1), ' '); + std::ofstream test_process(test_process_file, std::ios::app); + if (test_process) { + std::string read_output = blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " return result: "; + for(const auto& result: cur_result) { + read_output = read_output + result + " "; + } + read_output += "\n"; + std::cout << read_output; + test_process << read_output; + // int idx = 1; + // for (auto& expected_result_set : expected_result_set_list) { + // std::vector sql_expected_result = expected_result_set[sql_id]; + // int len = sql_expected_result.size(); + // if (len == 0) { + // std::cout << "[ERROR]" << "stmt_expected_result is empty, please check expected result. stmt_id: " << sql_id << " stmt: " << sql << std::endl; + // } + // if (result_handler.IsSqlExpectedResult(cur_result, sql_expected_result, sql_id, sql)) { + // std::cout << blank + " *(" + std::to_string(idx) + ") " + "expected_result: " << std::endl; + // std::cout << blank + " "; + // std::copy(sql_expected_result.begin(), sql_expected_result.end(), std::ostream_iterator (std::cout, " ")); + // std::cout << "" << std::endl; + // test_process << blank + " *(" + std::to_string(idx) + ") " + "expected_result: " << std::endl; + // test_process << blank + " "; + // std::copy(sql_expected_result.begin(), sql_expected_result.end(), std::ostream_iterator (test_process, " ")); + // test_process << "" << std::endl; + // } else { + // std::cout << blank + " (" + std::to_string(idx) + ") " + "expected_result: " << std::endl; + // std::cout << blank + " "; + // std::copy(sql_expected_result.begin(), sql_expected_result.end(), std::ostream_iterator (std::cout, " ")); + // std::cout << "" << std::endl; + // test_process << blank + " (" + std::to_string(idx) + ") " + "expected_result: " << std::endl; + // test_process << blank + " "; + // std::copy(sql_expected_result.begin(), sql_expected_result.end(), std::ostream_iterator (test_process, " ")); + // test_process << "" << std::endl; + // } + // idx++; + // } + return true; + } else { + std::cerr << test_process_file + "has not found" << std::endl; + return false; + } +} + +/** + * Appends the given test case type to a specified file. + * The test case type is formatted with dashes before and after it. + * + * @param test_case_type The type of the test case to be written. + * @param test_process_file The file to which the test case type will be appended. + * @return Returns true if the write operation is successful; otherwise returns false. + * + * @note The code is the same as the corresponding function in case_cntl.cc. + */ +bool Outputter::WriteTestCaseTypeToFile(const std::string& test_case_type, const std::string& test_process_file) { + std::ofstream test_process(test_process_file, std::ios::app); + if (test_process) { + test_process << dash + test_case_type + dash << std::endl; + return true; + } else { + std::cerr << test_process_file + "has not found" << std::endl; + return false; + } +} + +/** + * Appends the given result type to a specified file. + * The result type is prefixed with "Test Result:" for clarity. + * + * @param result_type The result type to be written. + * @param test_process_file The file to which the result type will be appended. + * @return Returns true if the write operation is successful; otherwise returns false. + * + * @note The code is the same as the corresponding function in case_cntl.cc. + */ +bool Outputter::WriteResultType(const std::string& result_type, const std::string& test_process_file) { + std::ofstream test_process(test_process_file, std::ios::app); + if (test_process) { + test_process << "\nTest Result: " + result_type << std::endl; + test_process << "" << std::endl; + return true; + } else { + std::cerr << test_process_file + "has not found" << std::endl; + return false; + } +} diff --git a/src/dbtest/src/common.cc b/src/dbtest/src/common.cc new file mode 100644 index 00000000..8fa6f07d --- /dev/null +++ b/src/dbtest/src/common.cc @@ -0,0 +1,61 @@ +/* + * Tencent is pleased to support the open source community by making 3TS available. + * + * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software + * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All + * Tencent Modifications are Copyright (C) THL A29 Limited. + * + * Author: farrisli (farrisli@tencent.com) + * + */ +#include "common.h" +std::string dash(10, '-'); +int blank_base = 40; + +/** + * Removes all trailing whitespace characters from the given string str. + * + * This function aims to remove all whitespace characters such as spaces, tabs, enters, etc., from the given string str. + * It utilizes the remove_if function, which moves all non-whitespace characters to the front of the string and then returns an iterator pointing to the first removed element. + * Subsequently, the erase function is used to delete all characters starting from that iterator to the end of the string. + * + * @param str The string from which trailing whitespace characters are to be removed. + */ +void TrimSpace(std::string& str) { + auto itor = remove_if(str.begin(), str.end(), ::isspace); + str.erase(itor, str.end()); +} + +/** + * Removes all double quote (") characters from the given string str. + * + * This function is designed to remove all occurrences of the double quote character from the specified string str. + * + * @param str The string from which the double quote characters are to be removed. + */ +void TrimQuo(std::string& str) { + str.erase(std::remove(str.begin(), str.end(), '\"'), str.end()); +} + +/** + * Splits the given string str by the delimiter delim and stores the results in the tokens vector. + * + * This function aims to split the specified string str based on the delimiter delim. The resulting substrings are then + * stored in the tokens vector. Initially, the tokens vector is cleared to ensure no pre-existing data remains. + * To achieve the splitting, the function uses two iterators, start and position, which cycle through the string + * to identify and extract substrings separated by the delimiter. These substrings are then appended to the tokens vector. + * + * @param str The string to be split. + * @param tokens A vector to hold the split substrings. + * @param delim The delimiter used for splitting the string. + */ +void split(const std::string& str, std::vector& tokens, const std::string delim) { + tokens.clear(); + auto start = str.find_first_not_of(delim, 0); + auto position = str.find_first_of(delim, start); + while (position != std::string::npos || start != std::string::npos) { + tokens.emplace_back(std::move(str.substr(start, position - start))); + start = str.find_first_not_of(delim, position); + position = str.find_first_of(delim, start); + } +} diff --git a/src/dbtest/src/common.h b/src/dbtest/src/common.h new file mode 100644 index 00000000..1fc7b049 --- /dev/null +++ b/src/dbtest/src/common.h @@ -0,0 +1,34 @@ +/* + * Tencent is pleased to support the open source community by making 3TS available. + * + * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software + * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All + * Tencent Modifications are Copyright (C) THL A29 Limited. + * + * Author: farrisli (farrisli@tencent.com) + * + */ +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +extern std::string dash; +extern int blank_base; +// trim all space +void TrimSpace(std::string& str); +// trim all quotation mark +void TrimQuo(std::string& str); +// split string with delim +void split(const std::string& str, std::vector& tokens, const std::string delim = " "); diff --git a/src/dbtest/src/doc/3TS_StaticTest_Doc.md b/src/dbtest/src/doc/3TS_StaticTest_Doc.md new file mode 100644 index 00000000..b1a10fd6 --- /dev/null +++ b/src/dbtest/src/doc/3TS_StaticTest_Doc.md @@ -0,0 +1,114 @@ +## 静态测试分析 + +### 静态测试概述 + +静态测试的源代码包含 `case_cntl.cc`、`sql_cntl.cc`、`sqltest.cc` 以及对应的头文件,生成的可执行文件名为 `3ts_dbtest`。 + +- `case_cntl.cc`封装了测试用例控制所有到的类,主要包括三个方面的功能类: 1.解析测试文件,2.处理和比较结果,3.输出结果。 + +- `sql_cntl.cc` 涉及` SQL` 操作的代码。主要是定义实现了一个 `DBConnector`类。 `DBConnector` 向下对接 `ODBC`,向上提供了封装的 `SQL` 执行接口。包含设置数据库隔离级别、开始事务、执行增删改查等功能、处理 `SQL` 返回值并获取错误信息、结束事务或回滚事务等功能。 + +- `sqltest.cc` 静态测试的的入口,具体定义了静态测试的运行逻辑。该文件利用 `gflags` 库来实现命令行参数解析中,声明定义了 `JobExecutor` 负责多线程执行数据库语句。 + +三个源代码以及他们的头文件从上到下是层层依赖关系。`sql_cntl.cc` 使用了`case_cntl.cc` 中封装的类用来解析语句和返回结果。`sqltest.cc` 需要 `sql_cntl.cc` 中定义的 `DBConnector` 来执行具体的事务 `SQL`。 + +### `case_cntl.cc ` 解析 + +#### 主要功能 + +**解析测试文件** + +- 从文件中逐行读取内容,识别不同的标记和格式(如注释、参数数目、事务SQL、预期结果等)。 +- 将解析后的数据结构化为测试序列和结果集。 + +**处理和比较结果** + +- 比较当前SQL执行结果与预期结果,检查是否匹配。 +- 对于每个测试用例,检查当前结果是否与任意一个预期结果集匹配。 +- 匹配结果会记录到指定文件中,供后续分析使用。 + +**输出结果** + +- 输出整体测试结果,总结各测试用例的执行情况。 +- 将详细的匹配结果输出到控制台和文件,便于调试和验证。 + +#### 主要封装类 + +**TestResultSet 类**: + +- 存储测试用例类型 (`test_case_type_`)、事务隔离级别 (`isolation_`)、测试结果类型 (`result_type_`) 以及预期结果集列表 (`expected_result_set_list_`)。 +- 提供设置和获取这些属性的方法,以及添加 SQL 结果集的方法。 + +**TxnSql 类**: + +- 存储事务 ID (`txn_id_`)、SQL 语句 ID (`sql_id_`)、SQL 语句 (`sql_`) 和测试用例类型 (`test_case_type_`)。 +- 提供获取这些属性的方法。 + +**TestSequence 类**: + +- 存储测试用例类型 (`test_case_type_`)、测试序列列表 (`txn_sql_list_`) 以及结果集的列数 (`param_num_`)。 +- 提供获取这些属性的方法、添加事务 SQL 的方法和设置参数数量的方法。 + +**CaseReader 类**: + +- 用于从文件读取并解析测试序列和预期结果集。 +- 存储从文件中读取的测试序列列表 (`test_sequence_list_`) 和测试结果集列表 (`test_result_set_list_`)。 +- 提供初始化测试序列和结果集的方法、添加测试序列和结果集的方法,以及从文件中解析事务 ID、SQL 语句、SQL 结果和隔离级别的方法。 + +**ResultHandler 类**: + +- 用于处理和验证 SQL 查询的预期结果。 +- 提供方法比较单个 SQL 查询的当前结果与预期结果,以及验证 SQL 查询的当前结果集是否匹配预期结果集列表中的任何一个。 + +**Outputter 类**: + +- 用于输出测试结果。 +- 提供将总体测试结果写入指定文件的方法、打印和写入事务 SQL 结果的方法,以及将测试用例类型和结果类型写入指定文件的方法。 + +**全局变量**: + +- `outputter` 和 `result_handler` 是 Outputter 和 ResultHandler 类的全局实例,用于在整个程序中处理输出和结果验证。 + + + +### `sql_cntl.cc` 解析 + +#### 主要功能 + +`sql_cntl.cc` 涉及` SQL` 操作的代码。主要是定义实现了一个 `DBConnector`类。 `DBConnector` 向下对接 `ODBC`,向上提供了封装的 `SQL` 执行接口。包含设置数据库隔离级别、开始事务、执行增删改查等功能、处理 `SQL` 返回值并获取错误信息、结束事务或回滚事务等功能。 + +#### DBConnector 类 + +* **conn_pool_ **:存储数据库连接句柄的向量,用于连接池管理。 + +* **InitDBConnector**: 初始化数据库连接器,创建指定数量的数据库连接,并将它们添加到连接池中。使用ODBC函数 `SQLAllocHandle` 分配环境和连接句柄,使用 `SQLConnect` 连接到数据库。 + +* **ExecReadSql2Int / ExecWriteSql**: 分别用于执行读取和写入操作的SQL语句。处理结果集或错误,并记录执行过程。 +* **SqlExecuteErr**: 处理SQL执行返回值的错误信息。根据返回值判断执行状态,并返回适当的错误消息或空字符串。 +* **SQLEndTnx / SQLStartTxn**: 用于事务管理的函数,包括开始、提交或回滚事务,并记录执行过程和错误信息。 +* **SetAutoCommit / SetTimeout / SetIsolationLevel**: 分别设置自动提交模式、连接超时和隔离级别,通过ODBC函数调整数据库连接的行为。 +* **ErrInfoWithStmt**: 通过SQL语句句柄获取错误信息,将错误信息和SQL状态填充到指定的数组中。 +* **ReleaseConn / ReleaseEnv / Release**: 释放数据库连接、环境资源或整体资源的函数,确保在使用完毕后进行清理和释放。 + + + +### `sqltest.cc ` 解析 + +#### 主要功能 + +静态测试的的入口,具体定义了静态测试的运行逻辑。该文件利用 `gflags` 库来实现命令行参数解析,声明定义了 `JobExecutor` 负责多线程执行数据库语句。使用了`pthread_mutex_t`来实现事务的并发控制。 + + + +#### 主要函数 + +**MultiThreadExecution** + +* 在多线程环境下执行多个数据库事务的函数,支持不同的数据库操作类型和事务隔离级别。 +* 该函数接受一系列事务SQL,执行并将结果记录到文件中。 + +**ExecTestSequence**: + +* `JobExecutor`的成员函数,执行一系列数据库测试事务并将结果写入文件。 +* 函数首先初始化测试结果文件,然后根据事务类型和隔离级别打印相关信息,执行事务SQL,并验证结果的一致性。 +* 具体调用 `MultiThreadExecution` 来在多线程环境中执行多个SQL事务。 diff --git a/src/dbtest/src/doc/Build 3TS-Coo on ubuntu18.04_en.md b/src/dbtest/src/doc/Build 3TS-Coo on ubuntu18.04_en.md new file mode 100644 index 00000000..a1b4f747 --- /dev/null +++ b/src/dbtest/src/doc/Build 3TS-Coo on ubuntu18.04_en.md @@ -0,0 +1,202 @@ +## Compiling 3TS-Coo on Ubuntu 18.04 + +### Required Dependencies + +First, according to the 3TS official documentation, to generate the Makefile, compile the code, and link to the database, the following tools and libraries need to be installed: + +- GCC suite and CMake +- ODBC Driver Manager +- The database you want to test (e.g., MySQL) +- ODBC driver for the database (e.g., mysql-connector-odbc) +- Dependencies for 3TS-Coo and ODBC + +3TS uses C++17 features, so when installing the GCC suite, make sure it supports C++17 (GCC 8 is recommended). The specific commands are as follows: + +```shell +sudo apt update +sudo apt install build-essential cmake git +apt install +``` + +We also need to install ODBC dependencies, which will be detailed below. + +### Installing the ODBC Driver Manager + +ODBC (Open Database Connectivity) is a standard API for accessing database management systems (DBMS). It was developed by Microsoft to make it easier for applications to communicate with databases. It acts as a middleware between applications and the DBMS. + +ODBC mainly consists of the ODBC Driver and the ODBC Driver Manager. The driver is a module that supports ODBC function calls, and each driver corresponds to a specific database, provided by the database vendor. The driver manager links all ODBC applications to the drivers and handles the binding of ODBC function calls to the appropriate driver functions. + +#### Download and Extract + +The two main driver managers are [unixODBC](https://www.unixodbc.org/) and [iODBC](https://www.iodbc.org/dataspace/doc/iodbc/wiki/iodbcWiki/WelcomeVisitors). We will install `unixODBC`. Download the `unixODBC` source from the official site. Choose the version as needed; here we download version [2.3.12](https://www.unixodbc.org/unixODBC-2.3.12.tar.gz). You can download it directly from the Downloads page on the website or use `curl` or `wget`. After downloading, use `tar` to extract the files. + +```shell +curl -o unixODBC-2.3.12.tar.gz https://www.unixodbc.org/unixODBC-2.3.12.tar.gz +tar -zxvf unixODBC-2.3.12.tar.gz +``` + +#### Installing Dependencies + +According to the `unixODBC` website, the source uses `autoconf` to build. Ensure that `automake`, `autoconf`, and `libtool` are installed before compiling and installing. + +```shell +apt install autoconf automake libtool +``` + +#### Compiling and Installing + +Follow the official steps to compile and install. The commands are as follows. For detailed installation steps and build options, refer to the [unixODBC official site](https://www.unixodbc.org/). + +```shell +cd unixODBC-dir +./configure # By default, unixODBC will be installed in /usr/local. You can change the installation location with the --prefix option. Here we use the default location. +make -j4 && make install +``` + +#### Installation Verification + +After installation, use `odbc_config` or `odbcinst` to verify the installation. + +```shell +root@c7b71bf10157$ odbc_config --version +2.3.12 +root@c7b71bf10157$ odbcinst -j +unixODBC 2.3.12 +DRIVERS............: /usr/local/etc/odbcinst.ini +SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini +FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources +USER DATA SOURCES..: /root/.odbc.ini +SQLULEN Size.......: 8 +SQLLEN Size........: 8 +SQLSETPOSIROW Size.: 8 +``` + +### Installing the ODBC Driver + +#### Installing MySQL ODBC Driver + +Using `mysql-connector-odbc-8.0.19-linux-ubuntu18.04-x86-64` as an example. + +##### Prerequisites + +Using `Ubuntu 18.04`, MySQL ODBC does not provide a corresponding DEB package. Therefore, the ODBC driver must be compiled from source. According to the MySQL official site, to install the MySQL ODBC Driver, ensure the following prerequisites are met: + +* **GNU Compiler Collection and CMake**: Requires GCC 4.2.1 or later. +* **MySQL Client Library**. To obtain the MySQL client library and header files, visit the [MySQL downloads page](https://dev.mysql.com/downloads/). +* **A compatible ODBC driver manager**. Connector/ODBC is known to work with both iODBC and unixODBC managers. +* **Character set support**. If you are using a character set not compiled into the MySQL client library, install the MySQL character definitions from the `charsets` directory to the `SHAREDIR` (default is `/usr/local/mysql/share/mysql/charsets`). If you have installed a MySQL server on the same machine, these character sets should already be in place. For more information on character set support, see "Character Sets, Collations, Unicode." + +##### MySQL Client Library Installation + +MySQL provides DEB packages for the Client Library, which can be downloaded and installed from the [MySQL downloads page](https://downloads.mysql.com/archives/community/). Here we use the MySQL 8.0.19 client library as an example. + +First, download the corresponding DEB packages. The main DEB packages are listed below: + +```shell +mysql-common_8.0.19-1ubuntu18.04_amd64.deb +libmysqlclient21_8.0.19-1ubuntu18.04_amd64.deb +libmysqlclient-dev_8.0.19-1ubuntu18.04_amd64.deb +``` + +The official site provides a **Bundle** package that includes all the deb files. Download it and use the `dpkg` command to install the corresponding DEB packages. + +```shell +dpkg -i mysql-common_8.0.19-1ubuntu18.04_amd64.deb +dpkg -i libmysqlclient21_8.0.19-1ubuntu18.04_amd64.deb +dpkg -i libmysqlclient-dev_8.0.19-1ubuntu18.04_amd64.deb +``` + +Note that these packages depend on each other, so the installation order cannot be changed. + +##### MySQL ODBC Connector (Driver) Compilation and Installation + +First, download the MySQL ODBC Connector source code from the [MySQL ODBC downloads page](https://downloads.mysql.com/archives/c-odbc/), then use `tar` to extract the files. + +```shell +tar -zxvf mysql-connector-odbc-8.0.19-src.tar.gz +``` + +The MySQL ODBC Connector source uses `cmake` to build, so ensure that `cmake` is installed before proceeding. Enter the Connector directory and create a `build` directory. + +```shell +cd mysql-connector-odbc-8.0.19-src +mkdir build +``` + +Configure the build options using `cmake`. + +```shell +cmake -G "Unix Makefiles" -DWITH_UNIXODBC=true -DDISABLE_GUI=true .. +``` + +* `-DWITH_UNIXODBC`: Use `unixODBC` as the driver manager. By default, MySQL ODBC uses `iODBC`. +* `-DDISABLE_GUI`: Do not build the GUI. The default is `false`, which builds the GUI. + +Build the project using `make`, and install it. The default installation path is `/usr/local`, which can be changed using the `-DCMAKE_INSTALL_PREFIX` option. + +```shell +make -j4 && make install +``` + +During compilation, if there are issues about missing dynamic library, install it using `apt` and rebuild. + +```shell +apt install libssl-dev +make -j4 +``` + +### Compiling 3TS-Coo + +#### Download + +First, clone the 3TS source code from the [3TS GitHub repository](https://github.com/Tencent/3TS.git), enter the source code root directory, and switch to the `coo-consistency-check` branch. + +```shell +git clone https://github.com/Tencent/3TS.git +git checkout coo-consistency-check +``` + +#### Dependencies + +Note that the 3TS-Coo project depends on the `pthread` library and the `gflags` library. Ensure these dependencies are installed before compiling. + +#### Compilation + +Navigate to the `src/dbtest` directory, create a `build` directory, and enter it. + +```shell +cd src/dbtest +mkdir build && cd build +``` + +Do not directly run `cmake` here; otherwise, you will encounter the following error: + +> By not providing "FindODBC.cmake" in CMAKE_MODULE_PATH this project has +> asked CMake to find a package configuration file provided by "ODBC", but +> CMake did not find one. +> +> Could not find a package configuration file provided by "ODBC" with any of +> the following names: +> +> ODBCConfig.cmake +> odbc-config.cmake +> +> Make sure the installation of the ODBC driver manager is correct. + +To resolve this error, run: + +```shell +find / -name "FindODBC.cmake" + +//filepath is obtained by "find + +" +cp filepath/FindODBC.cmake 3TS/src/dbtest +``` + +Then, configure and build in the `build` directory. + +```shell +cmake -S -DWITH_UNIXODBC=1 ../ # Copying the MySQL FindODBC.cmake, the default odbc driver manager is iODBC, so we need to set the configuration parameter. +make -j4 +``` diff --git a/src/dbtest/src/doc/Build 3TS-Coo on ubuntu18.04_zh.md b/src/dbtest/src/doc/Build 3TS-Coo on ubuntu18.04_zh.md new file mode 100644 index 00000000..af5aee9b --- /dev/null +++ b/src/dbtest/src/doc/Build 3TS-Coo on ubuntu18.04_zh.md @@ -0,0 +1,211 @@ +## Ubuntu 18.04 编译 3TS-Coo + +### 所需依赖 + +首先,根据 3TS 官方文档,为了生成Makefile、编译代码并链接数据库,需要安装以下内容: + +- GCC 编译套件, CMake +- ODBC 启动管理器 +- 要测试的数据库(例如:MySQL) +- 与数据库对应的 ODBC 驱动(例如:mysql-connector-odbc) +- 3TS-Coo 以及 ODBC 运行的依赖库 + + 3TS 使用了 C++17 的特性,所以安装 GCC 套件的时候请确保它支持 C++17 (推荐 g++8)。具体命令如下。 + +```shell +sudo apt update +sudo apt install build-essential cmake git +apt install +``` + +同样的,我们也要安装 ODBC 依赖,这个在下文会一一给出。 + + + +### 安装 ODBC 驱动管理器 + +ODBC 是 Open Database Connect 即开放数据库互连的简称,它是由微软提出的一个用于访问数据库的统一界面标准,是应用程序和数据库系统之间的中间件。 + +ODBC 主要由驱动程序 (ODBC Driver) 和驱动程序管理器 (ODBC Driver Manager) 组成。驱动程序是一个用以支持 ODBC 函数调用的模块,每个驱动程序对应于相应的数据库,源码由具体的数据库厂商实现。驱动程序管理器可链接到所有 ODBC 应用程序中,它负责管理应用程序中 ODBC 函数与 DLL 中函数的绑定。 + +#### 下载与解压缩 + +目前主要使用的驱动管理器有两个,分别是 [unixODBC](https://www.unixodbc.org/) 和 [iODBC](https://www.iodbc.org/dataspace/doc/iodbc/wiki/iodbcWiki/WelcomeVisitors)。 我们选择下载安装 `unixODBC`。首先,从官方下载 `unixODBC` 源码。具体版本请自行选择,这里选择下载 [2.3.12 ](https://www.unixodbc.org/unixODBC-2.3.12.tar.gz) 版本。可以直接从官网的 Downloads 界面下载,也可以借助 `curl` 或者 `wget` 下载。下载后使用 `tar` 工具进行解压缩。 + +```shell +curl -o unixODBC-2.3.12.tar.gz https://www.unixodbc.org/unixODBC-2.3.12.tar.gz +tar -zxvf unixODBC-2.3.12.tar.gz +``` + +#### 依赖下载 + +根据 `unixODBC` 官方网站, `unixODBC` 源码使用 `autoconf` 构建。编译安装之前,请确保本地环境已经有 `automake`,`autoconf`, `libtool` 工具。 + +```shell +apt install autoconf automake libtool +``` + +#### 编译安装 + +根据官方步骤,进行编译安装,编译安装命令如下。具体安装步骤和编译选项见 [unixODBC 官网](https://www.unixodbc.org/) + +```shell +cd unixODBC-dir +./configure # 默认情况下,unixODBC将会安装到/usr/local中。与configure一样,可以通过更改configure的 --prefix 更改安装位置,这里使用默认位置安装。 +make -j4 && make install +``` + +#### 安装验证 + +安装后,使用 `odbc_config` 或 `odbcinst` 验证安装是否成功。 + +```shell +root@c7b71bf10157$ odbc_config --version +2.3.12 +root@c7b71bf10157$ odbcinst -j +unixODBC 2.3.12 +DRIVERS............: /usr/local/etc/odbcinst.ini +SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini +FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources +USER DATA SOURCES..: /root/.odbc.ini +SQLULEN Size.......: 8 +SQLLEN Size........: 8 +SQLSETPOSIROW Size.: 8 +``` + + + +### 安装 ODBC 驱动 + +#### 安装 MySQL ODBC 驱动 + +以 `mysql-connector-odbc-8.0.19-linux-ubuntu18.04-x86-64` 为例 + +##### 前提条件 + +使用的是 `ubuntu 18.04`,MySQL ODBC 没有提供对应的 DEB 包。所以只能源码编译 ODBC。 首先根据 MySQL 官方网站,为了安装 MySQL ODBC Driver 我们需要先确保以下条件满足。 + +* **GNU 编译套件和 Cmake**: 要求 GCC 4.2.1 或更高版本 + +* **MySQL Client Library**。要获取 MySQL client 库和包含文件,请访问 [MySQL 下载页面](https://dev.mysql.com/downloads/)。 + +* **一个兼容的 ODBC 驱动管理器**。Connector/ODBC 已知可以与 iODBC 和 unixODBC 管理器一起工作。 + +* **字符集支持**。如果您使用的字符集未编译到 MySQL 客户端库中,请将 MySQL 字符定义从 `charsets` 目录安装到 `SHAREDIR`(默认情况下为 `/usr/local/mysql/share/mysql/charsets`)。如果您在同一台机器上安装了 MySQL 服务器,这些字符集应该已经就位。有关字符集支持的更多信息,请参见“字符集、排序规则、Unicode”。 + +##### MySQL Client Library 安装 + +MySQL 针对 Client Library 已经提供了 DEB 包,可以直接在 [对应网站](https://downloads.mysql.com/archives/community/)下载安装。这里以 MySQL 8.0.19 对应的 client library 为例。 + +首先下载对应的 DEB 包。主要涉及的 DEB 包下文列出 + +```shell +mysql-common_8.0.19-1ubuntu18.04_amd64.deb +libmysqlclient21_8.0.19-1ubuntu18.04_amd64.deb +libmysqlclient-dev_8.0.19-1ubuntu18.04_amd64.deb +``` + +官网已经提供了对应的 **Bundle** 包,包含 MySQL 官方打包的所有 deb。下载后使用 `dpkg` 命令安装对应的 DEB 包。 + +```shell +dpkg -i mysql-common_8.0.19-1ubuntu18.04_amd64.deb +dpkg -i libmysqlclient21_8.0.19-1ubuntu18.04_amd64.deb +dpkg -i libmysqlclient-dev_8.0.19-1ubuntu18.04_amd64.deb +``` + +注意,这三个包是层层依赖的,所以安装顺序不能调换。 + +##### MySQL ODBC Connector (Driver) 编译安装 + +首先,从 [MySQL ODBC 下载网站](https://downloads.mysql.com/archives/c-odbc/) 拉取对应版本的 MySQL ODBC Connector 源码到本地,使用 `tar` 进行解压。 + +```shell +tar -zxvf mysql-connector-odbc-8.0.19-src.tar.gz +``` + +MySQL ODBC Connector 源码使用 `cmake` 构建,所以安装之前,请确保本地已经有 `cmake`。进入 Connector 文件夹里,并创建 `build` 文件夹。 + +```shell +cd mysql-connector-odbc-8.0.19-src +mkdir build +``` + +使用 `cmake` 配置构建选项 + +```shell +cmake -G "Unix Makefiles" -DWITH_UNIXODBC=true -DDISABLE_GUI=true .. +``` + +* `-DWITH_UNIXODBC`: 使用 `unixODBC` 作为驱动管理器,MySQL ODBC 默认使用 `iODBC`。 +* `-DDISABLE_GUI`: 不构建 GUI 图形界面,默认为 `false`, 构建 GUI。 + +使用 `make` 进行项目构建,并安装。默认安装到 `/usr/local` 路径。可以使用 `cmake` 编译选项 `-DCMAKE_INSTALL_PREFIX` 进行配置。 + +```shell +make -j4 && make install +``` + +编译过程中可以出现无法链接到 `ssl` 库的问题。可以使用 `apt` 安装后重新构建。 + +```shell +apt install libssl-dev +make -j4 +``` + + + +### 3TS-Coo 编译 + +#### 下载 + +首先从 [3TS github 官网](https://github.com/Tencent/3TS.git) 上拉去 3TS 源码, 进入代码根目录,切换分支到 `coo-consistency-check`。 + +```shell +git clone https://github.com/Tencent/3TS.git +git checkout coo-consistency-check +``` + +#### 依赖 + +注意, 3Ts-Coo 项目依赖 pthread 库 和 gflags 库,编译前请确保已经安装相关依赖。 + +#### 编译 + +进入 `src/dbtest` 文件夹,创建 `build` 目录并进入。 + +~~~shell +cd src/dbtest +mkdir build && cd build +~~~ + +这里不要直接 `cmake` 构建,否则会报下面错误 + +> By not providing "FindODBC.cmake" in CMAKE_MODULE_PATH this project has +> asked CMake to find a package configuration file provided by "ODBC", but +> CMake did not find one. +> +> Could not find a package configuration file provided by "ODBC" with any of +> the following names: +> +> ODBCConfig.cmake +> odbc-config.cmake +> +> separate development package or SDK, be sure it has been +> installed. + +要解决该错误,需要执行 + +~~~shell +find / -name "FindODBC.cmake" + +//filepath is obtained by "find" +cp filepath/FindODBC.cmake 3TS/src/dbtest +~~~ + +之后在 `build` 目录下进行构建与编译 + +~~~shell +cmake -S -DWITH_UNIXODBC=1 ../ #这里拷贝的是 mysql FindODBC.cmake 默认为 iODBC, 需要配置参数 +make -j4 +~~~ + diff --git a/src/dbtest/src/doc/Database_Research_Doc_en.md b/src/dbtest/src/doc/Database_Research_Doc_en.md new file mode 100644 index 00000000..f1f65eb9 --- /dev/null +++ b/src/dbtest/src/doc/Database_Research_Doc_en.md @@ -0,0 +1,78 @@ +### DBMS Overview + +| DBMS Name | DBMS Type | ODBC Support | Transaction Support | 3TS-Coo Verified | Supported Isolation Levels | Concurrency Control Algorithms and Transaction Details | +| -------------------- | ---------------- | ------------ | ------------------- | ---------------- | ------------------------------------------------------------ | ------------------------------------------------------ | +| MySQL | Relational DBMS | Yes | Yes | Yes | Read Uncommitted, Read Committed, Repeatable Read, Serializable | MVCC, Optimistic and Pessimistic Control | +| PostgreSQL | Relational DBMS | Yes | Yes | Yes | Read Uncommitted, Read Committed, Repeatable Read, Serializable | MVCC | +| MariaDB | Relational DBMS | Yes | Yes | Yes | Read Uncommitted, Read Committed, Repeatable Read, Serializable | MVCC | +| Microsoft SQL Server | Relational DBMS | Yes | Yes | Yes | Read Uncommitted, Read Committed, Repeatable Read, Serializable, Snapshot | 2PL, MVCC, Optimistic and Pessimistic Control | +| Oracle Database | Relational DBMS | Yes | Yes | Yes | Read Committed, Serializable | 2PL (No-wait, Wait-for-Grant), MVCC | +| MyRocks | Relational DBMS | Yes | Yes | Yes | Read Committed, Repeatable Read | MVCC | +| MongoDB | NoSQL DBMS | Yes | Supported since 3.0 | Yes | Read Uncommitted, Snapshot | Optimistic Concurrency Control (OCC) | +| Redis | NoSQL DBMS | No | No | No | Not applicable | Optimistic Lock, MULTI/EXEC | +| Cassandra | NoSQL DBMS | Yes | Yes | Yes | Not applicable (controlled by consistency levels) | LWT, Timestamp Ordering Protocol (T/O) | +| Neo4j | Graph Database | Yes | Yes | No | Read Committed | MVCC | +| InfluxDB | Time Series DBMS | Yes | Yes | No | Not applicable | Optimistic Concurrency Control (OCC) | +| TimescaleDB | Time Series DBMS | Yes | Yes | No | Read Uncommitted, Read Committed, Repeatable Read, Serializable | MVCC | +| CockroachDB | Distributed DBMS | Yes | Yes | Yes | Read Committed, Serializable | MVCC, Calvin | +| TiDB | Distributed DBMS | Yes | Yes | Yes | Read Committed, Repeatable Read | MVCC, Percolator | +| Oceanbase | Distributed DBMS | Yes | Yes | Yes | Read Committed, Repeatable Read, Serializable | MVCC, 2PC (Two-Phase Commit) | + + +### DBMS Detailed Overview + +#### MySQL + +MySQL is a widely used open-source relational database management system suitable for applications of various scales, including web and enterprise solutions. It supports transaction processing and replication, offering good performance and stability. Transactions in MySQL are implemented via the InnoDB storage engine, which supports four isolation levels (Read Uncommitted, Read Committed, Repeatable Read, Serializable) and manages concurrent transactions using Multi-Version Concurrency Control (MVCC) and row-level locks. + +#### PostgreSQL + +PostgreSQL is a powerful open-source relational database system supporting complex queries and transactions, along with advanced features like JSON support, full-text search, and geospatial queries. It is widely used in enterprise and research applications. PostgreSQL handles transactions via MVCC, supports four isolation levels, and manages concurrency with shared and exclusive locks. + +#### MariaDB + +MariaDB is a community-driven open-source database management system created by the founders of MySQL. It is compatible with MySQL and includes enhanced features and performance optimizations. It is suited for applications requiring high performance and open-source access. Transaction management in MariaDB is similar to MySQL, primarily implemented via the InnoDB engine. + +#### Microsoft SQL Server + +SQL Server, developed by Microsoft, is a relational database management system designed for large-scale enterprise applications and data-driven solutions. It offers high availability, security, and enterprise-level support, with broad development tool and platform support. SQL Server supports five isolation levels and manages concurrency using locks and lock escalation. It also supports Snapshot Isolation, utilizing optimistic concurrency control mechanisms. + +#### Oracle Database + +Oracle Database is a powerful commercial-grade relational database management system used for enterprise data management and applications. It features high scalability, security, and data integrity. Oracle manages transactions through read consistency and locking mechanisms, supporting two main isolation levels (Read Committed, Serializable). It uses Multi-Version Concurrency Control (MVCC) for consistent reads and combines it with Two-Phase Locking (2PL). + +#### MyRocks + +MyRocks is a high-performance persistent storage engine developed by Facebook, designed to handle large-scale OLTP workloads. Based on RocksDB, it focuses on high throughput and low latency. Transactions in MyRocks are implemented using MVCC and key-based locks, supporting two isolation levels (Read Committed, Repeatable Read). + +#### MongoDB + +MongoDB is a document-oriented NoSQL database suitable for handling large amounts of unstructured data and applications requiring a flexible data model, such as web apps, analytics, and real-time data processing. MongoDB supports transactions starting from version 3.0, with isolation levels mainly being Read Uncommitted and Read Committed. It uses multi-document transactions and distributed locks for concurrency management and employs optimistic concurrency control (OCC). + +#### Redis + +Redis is an in-memory data structure store often used as a cache and message broker. It supports various data structures (e.g., strings, hashes, lists) and offers fast access and high performance. It is suited for real-time data processing and session storage. Redis does not support traditional transaction isolation levels due to its single-threaded model, relying on optimistic locks and transaction commands (MULTI/EXEC) for simple transaction support. + +#### Cassandra + +Cassandra is a distributed column-family NoSQL database known for its high availability and scalability. It is suitable for applications requiring large-scale data processing and distributed data storage, such as analytics and log management. Cassandra does not support traditional transaction isolation levels but manages data consistency through consistency levels (e.g., One, Quorum, All). It uses optimistic concurrency control and lightweight transactions (LWT) and employs a Timestamp Ordering Protocol (T/O). + +#### Neo4j + +Neo4j is a graph database management system focusing on storing and processing graph data (nodes and edges). It is suitable for applications requiring complex relationship and network analysis, such as social networks, recommendation systems, and network security analysis. Neo4j manages transactions using ACID properties, with the main isolation level being Read Committed, and employs locks and MVCC for concurrency control. + +#### InfluxDB + +InfluxDB is an open-source database designed specifically for time-series data, used for handling large volumes of timestamped data, such as monitoring, IoT sensor data, and real-time analytics. It offers high performance and query efficiency. InfluxDB does not support traditional transaction isolation levels as it focuses on time-series data's write and query performance, using the uniqueness of time-series data to prevent conflicts. InfluxDB employs optimistic concurrency control (OCC). + +#### TimescaleDB + +TimescaleDB is an open-source time-series database built on PostgreSQL, combining SQL and NoSQL features for high-performance analysis and querying of time-series data. It is suitable for time-series data storage and complex queries. TimescaleDB inherits PostgreSQL's transaction model, supports four isolation levels, and uses MVCC for concurrency management. + +#### CockroachDB + +CockroachDB is a distributed relational database management system with transaction support and high availability, designed for large-scale distributed applications requiring strong consistency and horizontal scalability, such as online services and global deployments. CockroachDB handles transactions via distributed transaction protocols (e.g., Percolator), supports two isolation levels (Read Committed, Serializable), and uses optimistic concurrency control and deterministic concurrency control protocols (Calvin). + +#### TiDB + +TiDB is an open-source distributed relational database management system compatible with MySQL protocol, supporting transaction processing and horizontal scalability. It is suitable for mixed workloads involving Online Transaction Processing (OLTP) and Online Analytical Processing (OLAP). TiDB's transactions are managed using Percolator, supporting two isolation levels (Read Committed, Repeatable Read). \ No newline at end of file diff --git a/src/dbtest/src/doc/Database_Research_Doc_zh.md b/src/dbtest/src/doc/Database_Research_Doc_zh.md new file mode 100644 index 00000000..72bf8b65 --- /dev/null +++ b/src/dbtest/src/doc/Database_Research_Doc_zh.md @@ -0,0 +1,65 @@ +### DBMS 大致介绍 + +| DBMS 名称 | DBMS 类型 | 是否提供 ODBC | 是否支持事务 | 是否被 3TS-Coo 验证 | 支持的事务隔离级别 | 并发控制算法及事务描述 | +| -------------------- | ---------------------- | ------------- | ------------ | ------------------- | ------------------------------------------------------------ | ---------------------------- | +| MySQL | 关系型数据库管理系统 | 是 | 是 | 是 | Read Uncommitted, Read Committed, Repeatable Read, Serializable | MVCC,乐观和悲观控制 | +| PostgreSQL | 关系型数据库管理系统 | 是 | 是 | 是 | Read Uncommitted, Read Committed, Repeatable Read, Serializable | MVCC | +| MariaDB | 关系型数据库管理系统 | 是 | 是 | 是 | Read Uncommitted, Read Committed, Repeatable Read, Serializable | MVCC | +| Microsoft SQL Server | 关系型数据库管理系统 | 是 | 是 | 是 | Read Uncommitted, Read Committed, Repeatable Read, Serializable, Snapshot | 2PL,MVCC,乐观和悲观控制 | +| Oracle Database | 关系型数据库管理系统 | 是 | 是 | 是 | Read Committed, Serializable | 2PL (无等待、等待死锁),MVCC | +| MyRocks | 关系型数据库管理系统 | 是 | 是 | 是 | Read Committed, Repeatable Read | MVCC | +| MongoDB | NoSQL 数据库管理系统 | 是 | 3.0 后支持 | 是 | Read Uncommitted, Snapshot | 乐观控制(OCC) | +| Redis | NoSQL 数据库管理系统 | 否 | 否 | 否 | 不适用 | 乐观锁,MULTI/EXEC | +| Cassandra | NoSQL 数据库管理系统 | 是 | 是 | 是 | 不适用(通过一致性级别控制) | LWT,时间戳排序协议(T/O) | +| Neo4j | 图数据库 | 是 | 是 | 否 | Read Committed | MVCC | +| InfluxDB | 时间序列数据库管理系统 | 是 | 是 | 否 | 不适用 | 乐观并发控制(OCC) | +| TimescaleDB | 时间序列数据库管理系统 | 是 | 是 | 否 | Read Uncommitted, Read Committed, Repeatable Read, Serializable | MVCC | +| CockroachDB | 分布式数据库管理系统 | 是 | 是 | 是 | Read Committed, Serializable | MVCC,Calvin | +| TiDB | 分布式数据库管理系统 | 是 | 是 | 是 | Read Committed, Repeatable Read | MVCC,Percolator | +| Oceanbase | 分布式数据库管理系统 | 是 | 是 | 是 | Read Committed, Repeatable Read,Serializable | MVCC,2PC(两阶段提交) | + + + +### DBMS 详细介绍 + +#### MySQL +MySQL 是一个广泛使用的开源关系型数据库管理系统,适合用于各种规模的应用,包括 Web 应用和企业级解决方案。支持事务处理和复制,具有良好的性能和稳定性。MySQL 的事务通过 InnoDB 存储引擎实现,支持四种隔离级别(Read Uncommitted, Read Committed, Repeatable Read, Serializable),并使用多版本并发控制(MVCC)和行级锁来管理并发事务。 + +#### PostgreSQL +PostgreSQL 是一个强大的开源关系型数据库系统,支持复杂的查询和事务处理,以及高级功能如 JSON 支持、全文搜索和地理空间查询。广泛用于各种企业和科研领域的应用。PostgreSQL 的事务通过 MVCC 实现,支持四种隔离级别,并使用共享锁和排他锁来管理并发事务。 + +#### MariaDB +MariaDB 是一个社区驱动的开源数据库管理系统,由 MySQL 的创始人创建,兼容 MySQL,并包含增强的功能和性能优化。适合需要高性能和开放源代码的应用。MariaDB 的事务管理与 MySQL 类似,也主要通过 InnoDB 引擎实现。 + +#### Microsoft SQL Server +SQL Server 是由 Microsoft 开发的关系型数据库管理系统,适用于大型企业应用和数据驱动的解决方案。提供高可用性、安全性和企业级支持,支持广泛的开发工具和平台。SQL Server 支持五种事务隔离级别,并使用锁和锁升级来管理并发事务。SQL Server 还支持快照隔离(Snapshot Isolation),使用乐观并发控制机制。 + +#### Oracle Database +Oracle Database 是一种功能强大的商业级关系数据库管理系统,用于企业级数据管理和应用程序。具有高度可扩展性、安全性和数据完整性。Oracle 的事务通过读一致性和锁来管理,并支持两种主要的隔离级别(Read Committed, Serializable)。Oracle 使用多版本并发控制(MVCC)来实现一致性读,并结合两阶段锁定协议(2PL)。 + +#### MyRocks +MyRocks 是 Facebook 开发的高性能持久性存储引擎,设计用于处理大规模的 OLTP 工作负载。基于 RocksDB,专注于高吞吐和低延迟的需求。MyRocks 的事务通过 MVCC 和基于键的锁实现,并支持两种隔离级别(Read Committed, Repeatable Read)。 + +#### MongoDB +MongoDB 是一个面向文档的 NoSQL 数据库,适合处理大量非结构化数据和需要灵活数据模型的应用,如 Web 应用、分析和实时数据处理。MongoDB 从 3.0 版本开始支持事务,隔离级别主要为 Read Uncommitted 和 Read Committed。MongoDB 使用多文档事务和分布式锁来管理并发事务,采用乐观并发控制(OCC)。 + +#### Redis +Redis 是一个内存中的数据结构存储,通常用作缓存和消息代理。支持多种数据结构(如字符串、哈希表、列表等),提供快速访问和高性能。适用于实时数据处理和会话存储等场景。Redis 不支持事务隔离级别,因为它是一个单线程处理模型,使用乐观锁和事务命令(MULTI/EXEC)来实现简单的事务支持。 + +#### Cassandra +Cassandra 是一个分布式的面向列的 NoSQL 数据库,具有高可用性和可伸缩性。适用于需要处理大量数据和分布式数据存储的应用,如分析和日志管理。Cassandra 不支持传统的事务隔离级别,而是通过一致性级别(如 One, Quorum, All)来控制数据一致性。Cassandra 使用乐观并发控制和轻量级事务(LWT)来管理并发事务,同时使用时间戳排序协议(T/O)。 + +#### Neo4j +Neo4j 是一个图数据库管理系统,专注于存储和处理图形结构数据(节点和边)。适用于需要复杂关系和网络分析的应用,如社交网络、推荐系统和网络安全分析。Neo4j 的事务管理使用 ACID 特性,主要隔离级别为 Read Committed,并使用锁机制和 MVCC 来管理并发事务。 + +#### InfluxDB +InfluxDB 是一个专为时间序列数据设计的开源数据库,用于处理大规模的时间戳数据,如监控、IoT 传感器数据和实时分析。具有高性能和查询效率。InfluxDB 不支持传统的事务隔离级别,因为它专注于时间序列数据的写入和查询性能,通过时间序列的唯一性来避免数据冲突。InfluxDB 使用乐观并发控制(OCC)。 + +#### TimescaleDB +TimescaleDB 是建立在 PostgreSQL 之上的开源时间序列数据库,结合了 SQL 和 NoSQL 的特性,用于处理时间序列数据的高性能分析和查询。适合于时间序列数据存储和复杂查询。TimescaleDB 继承了 PostgreSQL 的事务模型,支持四种隔离级别,并使用 MVCC 来管理并发事务。 + +#### CockroachDB +CockroachDB 是一个分布式的关系数据库管理系统,具有事务支持和高可用性,适用于需要强一致性和水平扩展的大规模分布式应用,如在线服务和全球部署的应用。CockroachDB 的事务通过分布式事务协议(如 Percolator)实现,支持两种隔离级别(Read Committed, Serializable),并使用乐观并发控制和确定性并发控制协议(Calvin)。 + +#### TiDB +TiDB 是一个开源的分布式关系数据库管理系统,兼容 MySQL 协议,支持事务处理和横向扩展。适用于在线事务处理(OLTP)和在线分析处理(OLAP)的混合工作负载。TiDB 的事务通过 Percolator 实现,支持两种隔离级别(Read Committed, Repeat)。 diff --git a/src/dbtest/src/doc/StaticTest.md b/src/dbtest/src/doc/StaticTest.md new file mode 100644 index 00000000..e0d6cfaa --- /dev/null +++ b/src/dbtest/src/doc/StaticTest.md @@ -0,0 +1,102 @@ +### Introduction + +This document is for the description of three files, including code functionality, overall structure, relationships with other files, and their roles in the project. + + + +## case_cntl.cc + +This file is for parsing and handling SQL statements and transaction IDs in test files, assisting in reading and parsing commands and data from input files, and outputting results. + +### Overall Structure: + +First, header files are included, followed by the definition of global objects: `outputter` and `result_handler`, which are used for outputting and result handling, respectively. Then, function declarations and definitions are provided, including functions in the `CaseReader` class for handling SQL statement execution and error information retrieval, functions in the `ResultHandler` class for comparing SQL query results, and functions in the `Outputter` class for writing outputs related to test results to specified files. + +#### Function Declarations and Definitions + +- **`CaseReader`** Class + - `TxnIdAndSql`: Used to get the transaction ID and SQL statement of a specific line, parse the input line, and extract the execution order ID, transaction ID, and SQL statement. + - `SqlIdAndResult`: Parses the input line and extracts the SQL ID and its expected result. + - `Isolation`: Extracts the isolation level from a string line. + - `InitTestSequenceAndTestResultSetList`: Initializes the test sequence and result set (casecntl) based on the provided test path and database type. + - `TestSequenceAndTestResultSetFromFile`: Parses the provided test file to extract the test sequence and their corresponding expected results. + +- **`ResultHandler`** Class + - `IsSqlExpectedResult`: Used to compare the current SQL result with the expected SQL result. + - `IsTestExpectedResult`: Used to compare the current test result with a set of expected test results. + +- **`Outputter`** Class + - `WriteResultTotal`: Writes the summary information of the test result set to a specified file. + - `PrintAndWriteTxnSqlResult`: Compares the current SQL result with a set of expected results and outputs the comparison result to the console and file. + - `WriteTestCaseTypeToFile`: Appends the given result type to a specified file, with the prefix "Test Result:" for explanation. + +### Role in the Project + +The overall structure and content of this file revolve around the parsing and execution of SQL statements, providing a series of utility functions and class methods to handle SQL-related operations and compare test results. + + + +## sqltest.cc + +This file is for executing multi-threaded SQL transaction tests, primarily through executing multiple sets of SQL transactions in a multi-threaded environment and verifying their results. + +### Overall Structure + +First, header files and libraries are included, followed by the definition of a series of command-line parameters using the gflags library, such as database type, username, password, database name, connection pool size, transaction isolation level, test case directory, timeout, etc. A global mutex vector `mutex_txn` is defined to manage locks for different transactions. Then, functions are defined. + +#### Function Declarations and Definitions + +- **`try_lock_wait`**: Attempts to acquire the specified mutex within a given timeout, used for multi-threaded lock mechanisms. +- **`MultiThreadExecution`**: Executes a set of SQL transactions in a multi-threaded environment. This function uses the `DBConnector` class to execute SQL statements, and performs lock operations and error handling during transaction execution. +- **`JobExecutor::ExecTestSequence`**: Executes a series of database test transactions and writes the results to a specified file. This function implements multi-threaded transaction execution by calling the `MultiThreadExecution` function. + +### Role in the Project + +**Support for Multiple Database Types**: Supports transaction testing for multiple database types (such as MySQL, PostgreSQL, Oracle, etc.). + +**Multi-threaded Transaction Execution**: Executes transactions through a multi-threaded mechanism, simulating transaction processing in a high-concurrency environment. + +**Transaction Isolation Level Testing**: Supports different transaction isolation levels, verifying the database's behavior under different isolation levels. + +**Result Verification and Output**: After executing transactions, writes the test results to a specified output file for subsequent analysis and verification. + + + +## sql_cntl.cc + +This file is for executing SQL statements and handling database connections. + +### Overall Structure + +First, header files and libraries are defined, followed by the definition of utility functions for time retrieval, string replacement, type conversion, etc. Then, function declarations and definitions are provided, including functions in the `DBConnector` class for handling SQL statement execution, time retrieval, string replacement, and type conversion. + +#### Function Declarations and Definitions + +- **`DBConnector`** Class + - `ErrInfoWithStmt`: Used to get error information for a specific handle. + - `SqlExecuteErr`: Handles error information for SQL execution. + - `ExecWriteSql`: Executes write-type SQL statements. + - `ExecReadSql2Int`: Executes read-type SQL statements and handles results. + +- **`get_current_time`**: Used to get the current time. + +- **`replace`**: Performs string replacement. + +- **`SQLCHARToStr`**: Converts `SQLCHAR` type to `std::string` type. + +### Role in the Project + +This file is for interacting with the database, executing SQL statements, and handling errors and logging during execution. + + + +## Relationship Between Files + +1. `sql_cntl.cc` and `sqltest.cc`: + - `sqltest.cc` relies on the tools and helper functions in `sql_cntl.cc` to execute specific SQL operations. `sqltest.cc` uses the result handling and output functions defined in `sql_cntl.cc` to verify correctness and report results. `sql_cntl.cc` is responsible for the specific SQL execution logic, providing support for `sqltest.cc`. + +2. `sql_cntl.cc` and `case_cntl.cc`: + - The functions and classes in `case_cntl.cc` read test cases, parse expected results, and compare actual results with these expectations. `sqltest.cc` handles the logic of executing SQL statements and calls these comparison functions. + +3. `sql_test.cc` and `case_cntl.cc`: + - `case_cntl.cc` is responsible for reading and parsing test case files and expected results. This parsed data is passed to `sqltest.cc`, which then performs multi-threaded transaction execution tests. diff --git a/src/dbtest/src/doc/dynamicTest.md b/src/dbtest/src/doc/dynamicTest.md new file mode 100644 index 00000000..38240d08 --- /dev/null +++ b/src/dbtest/src/doc/dynamicTest.md @@ -0,0 +1,143 @@ +## Introduction +In this module, we provide a framework for dynamically testing different databases. You can use Python scripts (random_do_list.py, mda_detect.py, mda_generate.py) to generate input test files yourself. Dynamic testing is specifically implemented in (3TS/src/dbtest/src) under case_cntl_v2.cc, sqltest_v2.cc, sql_cntl_v2.cc. + +## Test File Generation +Run random_do_list.py +```shell +python random_do_list.py data_num target_num +``` +The script will generate a do_test_list.txt file with contents like +``` +PW0-PW1 +``` +indicating the type of operation. +- Write (W) +- Read (R) +- Predicate (P) +- Insert (I) +- Delete (D) +- Abort (A) +- Commit (C) + +Next, run mda_generate.py +```shell +python mda_generate.py db_type test_type +``` +db_type includes tdsql, crdb, etc., and test_type includes single, dist. + +Run mad_detect.py for error detection +```shell +python mad_detect.py +``` + +## Test File Format +Static testing first declares ParamNum, which means how many columns the result set has. + +Then input testSequence in the format: execution order ID-transaction ID-SQL statement + +Next, input the isolation level, such as serializable{...} + +Inside the brackets are pairs like "9-0,1 1,1", where 9 is the SQL ID and "(0,1) (1,1)" is the result. + +Comments can be added after # in the file. + +Dynamic testing declares Parameters and testSequence but does not have an expected result sequence. + +Parameters format is similar to the following: +``` +#Parameters: #column=2 #txn=2 #operations=2 #variable=2 +``` + +## case_cntl_v2.cc +Implements the test case control function, including reading database configuration, SQL statements, and expected results from the test file, verifying the difference between actual results and expected results, and outputting comparison results to the specified folder. + +The code first reads the specified test file using the TestSequenceAndTestResultSetFromFile function. This function parses the content of the test file and extracts the test sequence and result set information. During the process of reading the test file, each line is parsed. Depending on the content of the line, different operations are performed: + +If the line contains "Parameters", the number of parameters is extracted and set to the test sequence object. + +If the line starts with "#", it indicates a comment and is skipped. + +In other cases, it is assumed that the line contains transaction ID and SQL statement. The TxnIdAndSql function is used to parse this line, extract the transaction ID, SQL ID, and SQL statement, then create a TxnSql object and add it to the test sequence. +Initialize the test sequence and result set list: The InitTestSequenceAndTestResultSetList function reads the "do_test_list.txt" file, which contains the list of test cases to be executed. For each test case in the list, the function reads the corresponding test file and adds the parsed test sequence and result set to the internal storage structure. + +Finally, the IsSqlExpectedResult function is called to compare the current result of the SQL query with the expected result. This comparison is done item by item. If the current result and the expected result differ in size or any item does not match, the function returns false, indicating that the result does not meet expectations. Otherwise, it returns true, indicating that the test passed. + +Data structures: + +Outputter: Provides functions to write test cases and result data to a file + +ResultHandler: Handles and verifies expected test results + +Functions: + +Same as v1 static testing: + +CaseReader::TxnIdAndSql: Parses a given line to extract the execution order ID, transaction ID, and SQL statement. + +CaseReader::SqlIdAndResult: Parses a given line to extract the SQL ID and its expected result. + +CaseReader::Isolation: Parses the isolation level. + +CaseReader::InitTestSequenceAndTestResultSetList: Same as v1, initializes the TestSequence and TestResultSet lists based on the provided test path and database type. + +ResultHandler::IsSqlExpectedResult, ResultHandler::IsTestExpectedResult: Compares the test result with the expected result. + +Outputter::WriteResultTotal, Outputter::WriteTestCaseTypeToFile, Outputter::WriteResultType: Writes test results to a file. + +Different: + +CaseReader::TestSequenceAndTestResultSetFromFile: Reads the file and outputs the testSequence. Unlike v1, it does not parse the isolation level and expected results. + +Outputter::PrintAndWriteTxnSqlResult: Outputs transaction results. Unlike v1, it only outputs the current result without comparing it with the expected result set. + +## sql_cntl_v2.cc +Code for SQL control or operations. Implements interface functions with ODBC databases, including setting database isolation levels, starting transactions, performing CRUD operations, handling SQL return values and retrieving error messages, ending transactions or rolling back transactions. + +The code first uses DBConnector to get the database connection for the corresponding session ID from the connection pool, then allocates a new statement handle. If the handle allocation fails, the function calls DBConnector::SqlExecuteErr to get error information and outputs an error message. If sql_id is 1024, it skips the print output function. Then, it releases the statement handle and returns false, indicating that the SQL execution failed. Finally, it returns a boolean value indicating whether the SQL statement execution was successful. + +Data structures: + +DBConnector: Manages all database connection-related functions and holds the ODBC database connection handle (Database Connection Handle). + +Same as v1 static testing: + +DBConnector::ErrInfoWithStmt: Extracts error information from the ODBC handle. + +DBConnector::ExecReadSql2Int: Executes SQL read statements and handles errors. + +DBConnector::SQLStartTxn: Starts a transaction and handles errors. + +DBConnector::SetAutoCommit: Sets the database connection to auto-commit mode. + +DBConnector::SetTimeout: Sets the connection timeout. + +DBConnector::SetIsolationLevel: Sets the isolation level. + +Different: + +DBConnector::SqlExecuteErr: Handles and records execution errors. Unlike v1, it outputs the session id and returns empty if it fails for some unknown reason without providing information. + +DBConnector::ExecWriteSql: Executes SQL write statements and handles errors. Unlike v1, it uses the SQLRowCount function to get the number of affected rows. If no rows are affected, it outputs an error. + +DBConnector::SQLEndTnx: Ends the transaction by committing or rolling back. Unlike v1, it outputs the execution time information after the SQL statement is successfully executed. + +## sqltest_v2.cc +Code for SQL testing, containing the main function of the project. + +First, the gflags library is used to implement command-line argument parsing. + +Initialize the test environment: +Set configuration parameters such as database connection pool size and transaction timeout. + +Initialize the database connector (DBConnector) to connect to the specified database. + +Prepare SQL statements and transaction sequences for testing, which may include read (SELECT), write (INSERT, UPDATE, DELETE), transaction start (BEGIN), and end (COMMIT, ROLLBACK) operations. Use multi-threaded programming, where each thread is responsible for executing a group of database statements, and the program code is executed in a specified order by setting different sleep times for the sub-threads. + +During execution, record the test process and results in the specified log file for subsequent analysis and audit. After completing the execution of all SQL statements, release related resources, such as closing database connections and releasing mutex locks. Summarize test results, including the number of successfully executed statements, failed statements, and their reasons. + +Unlike v1, it does not support Cassandra and Yugabyte, nor their isolation level definitions. + +Functions: + +MultiThreadExecution: Executes SQL queries in multiple threads and returns results. Unlike v1, it does not support Yugabyte and MyRocks. + diff --git a/src/dbtest/src/doc/dynamic_test_analysis.md b/src/dbtest/src/doc/dynamic_test_analysis.md new file mode 100644 index 00000000..54dc5854 --- /dev/null +++ b/src/dbtest/src/doc/dynamic_test_analysis.md @@ -0,0 +1,183 @@ +# 3TS-COO 动态测试代码阅读与分析文档 +1 + +## 1. 文件列表与目录结构 +- case_cntl_v2.cc +- sqltest_v2.cc +- sql_cntl_v2.cc +位于 `src/dbtest/src/` 目录下。 +1.文件列表与目录结构 +|文件名|路径|说明| +case_cntl_v2.cc|src/dbtest/src/case_cntl_v2.cc|测试用例控制逻辑| +sqltest_v2.cc |src/dbtest/src/sqltest_v2.cc |动态SQL测试主流程| +sql_cntl_v2.cc |src/dbtest/src/sql_cntl_v2.cc |数据库链接与执行控制| +其他辅助文件: +- case_cntl.cc / sql_cntl.cc /sqltest.cc:旧版实现(兼容保留) +- common.*:公共工具与数据结构 +- *.py:MongoDB与MDA相关脚本 + + +cat >> doc/dynamic_test_analysis.md <<'EOF' + +## 2. sqltest_v2.cc 功能概述 +- 入口函数:`int main(int argc, char **argv)` 位于第 368 行 +- 线程模型: + 1. 解析命令行参数(测试路径、数据库类型、并发线程数等) + 2. 初始化日志 & 全局数据库连接池 + 3. 为每个测试用例启动一个 `std::thread`(`ThreadEntry`) +- 核心测试循环(`RunTestLoop`): + 1. 通过 `CaseReader` 读取 `*.txt` 测试用例 + 2. 调用 `sql_cntl_v2` 接口执行 SQL + 3. 收集结果 → 与预期比对 → 写日志 → 统计 异常 +- 异常处理:连接失败、SQL 语法错误、超时均记录到 `logs/` 目录 + +**调用链流程图** +sqltest_v2.cc::main() +├─ ParseCLI() +├─ InitLogger() +├─ InitDBConnection() +└─ StartThreads() +└─ ThreadEntry() +└─ RunTestLoop() +├─ ReadTestCase() +├─ ExecuteSQL() +├─ CollectResult() +└─ RecordLog() +EOF + +## 2. case_cntl_v2.cc 功能概述 +- 无 `main()`,纯工具类实现。 +- 核心类: + - `CaseReader`: + - `TxnIdAndSql()` —— 从单行文本提取 “执行序号-事务ID-SQL”。 + - `SqlIdAndResult()` —— 提取 “SQL-ID-预期结果”。 + - `Isolation()` —— 提取隔离级别。 + - `TestSequenceAndTestResultSetFromFile()` —— 读取整个测试文件,生成 `TestSequence` 与 `TestResultSet`。 + - `InitTestSequenceAndTestResultSetList()` —— 批量读取 `do_test_list.txt` 中列出的所有测试用例。 + - `ResultHandler`: + - `IsSqlExpectedResult()` —— 单条 SQL 结果比对。 + - `IsTestExpectedResult()`—— 整个测试集结果比对。 + - `Outputter`: + - `WriteResultTotal()`、`PrintAndWriteTxnSqlResult()` 等 —— 结果输出与日志落盘。 + +- 与旧版差异: + - 新版不再读取预期结果(动态测试用例不给出结果)。 + - 支持参数化表个数提取(正则解析 "Parameters=xx")。 + +- 调用链(伪代码) +sqltest_v2.cc::main() +└─ CaseReader::InitTestSequenceAndTestResultSetList() +├─ for each test_case in do_test_list.txt +│ └─ CaseReader::TestSequenceAndTestResultSetFromFile() +│ ├─ TxnIdAndSql() +│ ├─ SqlIdAndResult() +│ └─ Isolation() +└─ ResultHandler::IsTestExpectedResult() +├─ IsSqlExpectedResult() +└─ Outputter::WriteResultTotal() + + +## 3. sql_cntl_v2.cc 功能概述(行号精确版) + +- **建立连接**:`DBConnector::SetAutoCommit`(552 行) +- **执行写 SQL**:`ExecWriteSql`(221 行) +- **执行读 SQL 并收集结果**:`ExecReadSql2Int`(307 行) +- **事务控制**:`SQLStartTxn`(515 行) / `SQLEndTnx`(426 行) +- **隔离级别**:`SetIsolationLevel`(610 行) +- **超时设置**:`SetTimeout`(578 行) +- **异常处理**:`SqlExecuteErr`(136 行) + + + +## 4. sql_cntl_v2.cc 功能概述 + +86178@LAPTOP-TUT2NE8F MINGW64 ~/Desktop (master) +$ cd ~/3TS/src/dbtest/src +grep -nE '^[[:space:]]*(bool|void|std::string)[[:space:]]+[a-zA-Z_][a-zA-Z0-9_]*[[:space:]]*\(' sql_cntl_v2.cc | nl + 1 24:std::string get_current_time(){ + 2 79:bool replace(std::string& str, const std::string& from, const std::string& to) { + 3 96:std::string SQLCHARToStr(SQLCHAR* ch) { + 4 177: std::string blank(blank_base*(session_id - 1), ' '); + 5 276: std::string blank(blank_base*(session_id - 1), ' '); + 6 292: std::string blank(blank_base*(session_id - 1), ' '); + 7 319: std::string blank(blank_base*(session_id - 1), ' '); + 8 367: std::string blank(blank_base*(session_id - 1), ' '); + 9 466: std::string blank(blank_base*(session_id - 1), ' '); + 10 513: std::string blank(blank_base*(session_id - 1), ' '); + 11 527: std::string blank(blank_base*(session_id - 1), ' '); + 12 557: std::string blank(blank_base*(session_id - 1), ' '); + 13 565: std::string blank(blank_base*(session_id - 1), ' '); + +sql_cntl_v2.cc做了部分的修改,代码行数会与原来的行数纯在偏差 + +| 行号 | 函数 | 作用 | +|---|---|---| +| 24 | get_current_time | 高精度时间戳 | +| 79 | replace | 字符串替换 | +| 96 | SQLCHARToStr | SQLCHAR → std::string | +| 121 | ErrInfoWithStmt | 提取 ODBC 错误信息 | +| 174 | SqlExecuteErr | 统一 SQL 执行错误处理 | +| 259 | ExecWriteSql | 执行写 SQL(INSERT/UPDATE/DELETE) | +| 345 | ExecReadSql2Int | 执行读 SQL,返回结果集 | +| 464 | SQLEndTnx | 事务提交/回滚 | +| 553 | SQLStartTxn | 显式开启事务 | +| 590 | SetAutoCommit | 设置自动提交模式 | +| 616 | SetTimeout | 设置锁/事务超时 | +| 648 | SetIsolationLevel | 设置事务隔离级别 | + +**异常处理** +- 连接失败:打印日志 → 重试 +- SQL 超时:检测 "timeout" 字符串 → 标记 ResultType +- 语法错误:立即记录到 `logs/sql_error.log` +**交互/异常处理要点** +- **建立连接**:`SetAutoCommit(590)` 关闭自动提交,进入事务模式 +- **执行 SQL**:`ExecWriteSql(259)` / `ExecReadSql2Int(345)` 使用 ODBC `SQLExecDirect` +- **异常处理**:`SqlExecuteErr(174)` 解析 `SQL_ERROR` → 日志 + 标记超时/回滚 +- **资源清理**:所有句柄在 `SQLFreeStmt` 后释放,避免泄漏 +EOF + + +## 5. 动态测试 vs 静态测试对比与重构建议 + +| 维度 | 动态测试 | 静态测试 | +|---|---|---| +| 执行方式 | 运行时连接真实数据库,执行真实 SQL | 离线解析 SQL 文本,不连接数据库 | +| 结果来源 | 数据库返回结果 + 日志 | AST / 正则 / 规则引擎 | +| 异常捕获 | 连接超时、锁等待、语法错误 | 语法/语义错误、死锁检测 | +| 性能影响 | 受网络、DB 负载影响 | 纯 CPU 计算,速度快 | +| 覆盖范围 | 真实并发、事务边界 | 无法检测运行时并发异常 | +| 适用场景 | 验证隔离级别、性能基准 | 代码审查、规则扫描 | + +### 重构建议(3 条) +1. **统一错误码枚举** + 将 `SqlExecuteErr()` 中的字符串匹配改为 `enum class SqlError { TIMEOUT, SYNTAX, LOCK_WAIT }`,跨模块安全易维护。 +2. **连接池封装** + 将裸数组升级为 `class ConnectionPool`:自动重连、健康检查、线程安全队列、连接泄露检测。 +3. **日志抽象** + 用 `spdlog` 或 `glog` 替换 `std::cout`:异步落盘、分级日志、JSON 输出支持。 + +## 6. 其他重要内容 +### 日志格式 +[YYYY-MM-DD HH:MM:SS.mmm] + +### 并发模型 +- **线程级**:每个测试用例启动 `std::thread`,句柄独占。 +- **资源隔离**:`conn_pool_[session_id]` 无锁竞争。 +- **超时保护**:所有 SQL 执行默认 30 s 超时。 + +### 性能瓶颈与优化 +- **瓶颈** + - 大量 `SQLExecDirect` 导致网络往返 + - 解析 & 绑定开销 +- **优化手段** + 1. 预编译语句 (`SQLPrepare` + `SQLExecute`) + 2. 批处理(一次发送多条 SQL) + 3. 连接复用(长连接 + 心跳) + +### 全文自检清单 +- [x] 所有函数用途 + 行号已列出 +- [x] Markdown 表格统一对齐 +- [x] 无中文标点混用 +- [x] 代码块使用 ```cpp ``` + +EOF diff --git a/src/dbtest/src/doc/dynamic_test_analysis.ms b/src/dbtest/src/doc/dynamic_test_analysis.ms new file mode 100644 index 00000000..e69de29b diff --git a/src/dbtest/src/doc/dynamic_test_doc_python_en.md b/src/dbtest/src/doc/dynamic_test_doc_python_en.md new file mode 100644 index 00000000..fe9adeb3 --- /dev/null +++ b/src/dbtest/src/doc/dynamic_test_doc_python_en.md @@ -0,0 +1,144 @@ +Sure! Here's the translation of your document into English: + +--- + +## `random_do_list.py` + +### File Overview + +`random_do_list.py` randomly generates a series of database operations based on a predefined set of operations while ensuring that the generated operation list contains no illegal patterns. This script generates the `do_test_list.txt` file, which contains different test patterns. + +`op_set = ["P", "R", "W", "I"]` # operations involved in the case + +The `op_set` defines four types of database transaction operators: + +* **P (Predicate)**: Predicate operation used to describe conditions in queries. +* **R (Read)**: Read operation used to retrieve data from the database. +* **W (Write)**: Write operation used to insert or update data in the database. +* **I (Insert)**: Insert operation used to insert new data into the database. + +In `mda_generate.py`, there is a function called `execute_sql` that defines the SQL statements it supports, including seven types of SQL operations, as detailed in the function comment. + +```python +""" +The supported SQL operations include: +- Write (W) +- Read (R) +- Predicate (P) +- Insert (I) +- Delete (D) +- Abort (A) +- Commit (C) +""" +``` + +### Variable Definitions + +- `op_set`: Defines the set of operation types used in the script, including read ("R"), write ("W"), insert ("I"), and predicate ("P") operations. +- `illegal_op_set`: Defines the set of disallowed operation patterns because these patterns are either impossible or meaningless in actual database transactions. + +### Function Definitions + +- **dfs(data_count, total_num, target_num)**: Uses depth-first search to determine which variables need to be operated on twice to meet the total number of operations required in the test sequence. +- **dfs1(data_count, res, total_num)**: Recursive function that generates test cases based on the current `data_count`. It tries different operation combinations to create test sequences. + +--- + +## `mda_generate.py` + +### File Overview + +`mda_generate.py` reads the required operation patterns (e.g., `RW-RR`, etc.) from the `do_test_list.txt` file and generates a test case file for each pattern. + +Each test case is formatted as `sql_id-txn_id-sql`, where `sql_id` is the incrementing identifier for the statement, `txn_id` identifies the transaction executing the statement, and `sql` is the specific SQL statement. + +The process of generating test case files in `mda_generate.py` can be divided into three stages: + +* **Initialization Stage**: Generates the header description of the test case file, initializes tables, and inserts test data. +* **Execution Stage**: Executes transactions and validation SQL statements. The main goal is to automatically generate database test cases for different operation patterns. +* **Commit Stage**: Generates commit statements for each transaction and writes them to the corresponding test case files. + +#### Initialization Stage + +First, it calls `write_description` to write the description of the test cases. Then, it calls `init_table` to initialize the table structure. If it is a distributed test and the database is either `tdsql` or `crdb`, it creates a table for each transaction. + +Then it calls `insert_data` to insert the data used for subsequent transactions. `insert_data` generates SQL insert statements based on provided parameters and writes these statements to a specified file. This function uses an array named `exist` to manage the presence of data elements to avoid duplicate inserts, while updating the SQL operation count. + +#### Execution Stage + +The main method used in this stage is `execute_txn`. This function generates SQL statements for executing operations based on the operation patterns in `do_test_list.txt`. When encountering specific operation patterns, this function reorders the operation statements to resolve conflicts as much as possible. + +In `execute_txn`, there are two critical structures: `data_op_list` for storing data operation lists and `wait_op_list` for storing operations that need to be delayed. When an operation needs to be deferred, it is placed in `wait_op_list`. + +#### Commit Stage + +The commit stage generates commit statements for each transaction and writes them to the corresponding test case files. + +### Class Definitions + +- **OptionException**: Custom exception class. +- **Txn**: Transaction class, containing start and end timestamps. +- **Operation**: Operation class representing a database operation, including operation type and transaction number. +- **Wait_Operation**: Wait operation class extending the Operation class, adding an operation number. + +### Function Definitions + +- **init_table(file_name, sql_count, txn_count, table_num, db_type, test_type)**: Initializes database tables based on database type and test type, creating table structures and writing SQL statements to a file. +- **check_concurrency(txn_num1, txn_num2, txn)**: Checks if two transactions are concurrent. +- **check_exist_op(txn, data_op_list, op, op_num, txn_count)**: Checks if a specific type of operation exists in the transaction and if it is concurrent. +- **execute_sql(IsPredicate, file_name, sql_count, txn_count, op_num, op, data_num, txn, data_value, data_op_list)**: Executes SQL operations such as Write (W), Read (R), Insert (I), Delete (D), Abort (A), and Commit (C). +- **insert_data(...)**: Inserts data into the table and handles possible exceptions, such as data already existing. +- **delete_data(...)**: Deletes data from the table and records the delete operation. +- **write_data(...)**: Writes data to the table, typically incrementing data values by 1 and recording the write operation. +- **read_data(...)**: Reads data from the table and records the read operation. +- **read_data_predicate(...)**: Reads data from the table using a range condition. +- **abort_txn(...)**: Aborts a transaction and writes rollback SQL statements. +- **commit_txn(...)**: Commits a transaction and writes commit SQL statements. +- **execute_check(file_name, sql_count, txn_count, data_num, table_num)**: Performs consistency checks for transactions to validate data. +- **get_last_op(ops, pos)**: Retrieves the last operation before a given position in the operation list. +- **execute_first(...)** and **execute_second(...)**: Handle the first and second operations of Partial Order Pairs (POP), respectively. +- **execute_txn(...)**: Executes transactions, considering the operation order to resolve conflicts. +- **write_description(file_name, txn_num, op_num, data_num)**: Writes the description of test cases to a file. + +--- + +## `mda_detect.py` + +### File Overview + +`mda_detect.py` is primarily responsible for analyzing the results generated by the testing framework (`sqltest_v2`), detecting cyclic dependencies in database transaction concurrency control, and determining whether the concurrent transactions are serializable. The theoretical principle is that a scheduling sequence is conflict-serializable if and only if its precedence graph is acyclic. + +> *For mathematical proofs on this, interested readers can refer to: [Proof of correctness of the precedence graph test](http://www.cs.emory.edu/~cheung/Courses/554/Syllabus/7-serializability/graph-conflict2.html)* + +#### Main Logic + +`sqltest_v2` generates a schedule result file for each test case file. `mda_detect.py` reads each file, recording transaction operations, edges, in-degrees and access statuses. + +* If an error is detected during reading, it outputs the error result and skips further steps. +* If no error message is found, it removes unfinished operations, builds the dependency graph, and calculates in-degrees. + + * If not marked as `go_end`, it checks for cycles in the graph. + * If a cycle exists, it outputs the cycle result and calls the `dfs` method for depth-first search to record the path. + * If no exsited cycle, it outputs the result and prints the path. + +### Class Definitions + +- **Edge**: Represents an edge, containing type and output. +- **Operation**: Represents an operation, including operation type, transaction number, operation time, and value. +- **Txn**: Represents a transaction, including start and end timestamps. + +### Function Definitions + +- **get_total(lines)**: Calculates the maximum number of variables in a query. +- **find_data(query, target)**: Extracts data from the query. +- **set_finish_time(op_time, data_op_list, query, txn, version_list)**: Sets the end time of an operation and updates the transaction and version lists. +- **check_concurrency(data1, data2, txn)**: Checks if two transactions are concurrent. +- **get_edge_type(data1, data2, txn)**: Determines the edge type between two operations. +- **build_graph(data_op_list, indegree, edge, txn)**: Builds a directed graph representing the concurrency relationships of operations. +- **insert_edge(data1, data2, indegree, edge, txn)**: Inserts an edge into the directed graph. +- **init_record(query, version_list)**: Initializes records in the version list based on the query. +- **readVersion_record(query, op_time, data_op_list, version_list)**: Reads versioned records and updates operations. +- **read_record(op_time, txn_num, total_num, txn, data_op_list)**: Reads records and updates data operations. +- **write_record(op_time, txn_num, txn, data_op_list)**: Writes records and updates data operations. +- **delete_record(op_time, txn_num, txn, data_op_list)**: Deletes records and updates data operations. +- **insert_record(op_time, txn_num, txn, data_op_list)**: Inserts records diff --git a/src/dbtest/src/doc/dynamic_test_doc_python_zh.md b/src/dbtest/src/doc/dynamic_test_doc_python_zh.md new file mode 100644 index 00000000..1fc3817f --- /dev/null +++ b/src/dbtest/src/doc/dynamic_test_doc_python_zh.md @@ -0,0 +1,146 @@ +## random_do_list.py + +### 文件概述 + +`random_do_list.py` 基于预定义的操作集随机生成一系列数据库操作,此外还要确保 生成的操作列表不含任何非法模式。此脚本文件会生成 `do_test_list.txt` 文件,该文件包含不同的测试模式,即具体测试文件列表。 + +op_set = ["P", "R", "W", "I"] # operations involved in the case + +op_set 定义了四种数据库事务操作符。分别是: + +* **P (Predicate)**: 谓词操作,用于描述查询中的条件。 +* **R (Read)**: 读取操作,用于从数据库中读取数据。 +* **W (Write)**: 写入操作,用于向数据库中写入或更新数据。 +* **I (Insert)**: 插入操作,用于将新数据插入到数据库中。 + +在 mda_generate.py 中定义了一个 execute_sql 函数,用来定义执行的语句,它支持的 7 种 SQL 操作,具体可见函数注释。 + +```python +""" +The supported SQL operations include: +- Write (W) +- Read (R) +- Predicate (P) +- Insert (I) +- Delete (D) +- Abort (A) +- Commit (C) +""" +``` + +### 变量定义 + +- `op_set`:定义了脚本中使用的操作类型集合,包含读("R")、写("W")、插入("I")、谓词("P")等操作。 +- `illegal_op_set`:定义了不允许出现的操作模式集合,因为这些模式在实际数据库事务中不可能出现或没有意义。 + +### 函数定义 + +- **dfs(data_count, total_num, target_num)**:使用深度优先搜索算法来决定哪些变量需要被操作两次,以满足测试序列中的操作总数要求。 +- **dfs1(data_count, res, total_num)**:递归函数,根据当前的 `data_count`生成测试用例。它尝试不同的操作组合来创建测试序列。 + +## mda_generate.py + +### 文件概述 + +`mda_generate.py` 从 `do_test_list.txt` 文件中读取所需的操作模式(例如 `RW-RR` 等), 针对每种操作模式生成一个测试用例文件。 + +每个测试用例的格式为 `sql_id-txn_id-sql`,`sql_id` 是语句的递增表示,`txn_id` 标识执行语句的事务。 `sql` 为具体的语句。 + +`mda_generate.py` 生成测试用例文件的过程大致可以分为三个阶段: + +* 初始化阶段: 生成测试用例文件的表头描述、初始化表和插入测试所需数据。 +* 执行阶段:执行事务和验证的 `SQL` 语句。主要目的是为不同的操作模式自动生成数据库测试用例。 +* 提交阶段:提交所有事务。 + +`mda_generate.py` 针对上述的三个阶段分别生成测试用例写入到对应的测试用例文件里面。 + +#### 初始化阶段 + +首先会调用 write_description 编写测试用例的描述。之后会调用 init_table 初始化表结构。这里如果是分布式测试并且数据库是 tdsql 或者是 crdb。则会针对每个事务都创建一个表。 + +之后调用 insert_data 插入之后执行事务所使用的数据。insert_data 会根据提供的参数生成SQL插入语句,并将该语句写入指定的文件。该函数会使用名为 exist 的数组来管理数据元素的存在,以防止重复插入,同时他会更新 SQL 操作计数。 + +#### 执行阶段 + +执行阶段主要调用的方法是 execute_txn。这个函数会根据 `do_test_list.txt`中的操作模式生成执行操作事务的SQL语句,当遇到特定的操作模式时,该函数会重新排序操作语句以尽量解决冲突。 + +在 execute_txn 中有两个很关键的结构体。一个是 `data_op_list` 用来存储数据操作的列表。一个是 `wait_op_list` 用来存储需要等待执行的操作列表。当有操作需要延时执行的时候,这个操作就会被放入到 `wait_op_list `里面。 + +#### 提交阶段 + +提交阶段会针对每个事务生成提交语句,并将他们写入到指定的测试用例文件里。 + +### 类定义 + +- **OptionException**: 自定义异常类。 +- **Txn**: 事务类,包含开始和结束时间戳。 +- **Operation**: 操作类,表示一个数据库操作,包含操作类型和事务编号。 +- **Wait_Operation**: 等待操作类,扩展了Operation类,添加了操作编号。 + +### 函数定义 + +- **init_table(file_name, sql_count, txn_count, table_num, db_type, test_type)**: 初始化数据库表,根据数据库类型和测试类型创建表结构,并写入SQL语句到文件。 +- **check_concurrency(txn_num1, txn_num2, txn)**: 检查两个事务是否并发。 +- **check_exist_op(txn, data_op_list, op, op_num, txn_count)**: 检查特定类型的操作是否存在于事务中,并且是并发的。 +- **execute_sql(IsPredicate, file_name, sql_count, txn_count, op_num, op, data_num, txn, data_value, data_op_list)**: 执行SQL操作,如写入(W)、读取(R)、插入(I)、删除(D)、中止(A)和提交(C)操作。 +- **insert_data(...)**: 插入数据到表中,并处理可能的异常情况,例如数据已存在。 +- **delete_data(...)**: 从表中删除数据,并记录删除操作。 +- **write_data(...)**: 写入数据到表中,通常将数据值增加1,并记录写入操作。 +- **read_data(...)**: 从表中读取数据,并记录读取操作。 +- **read_data_predicate(...)**: 使用范围条件从表中读取数据。 +- **abort_txn(...)**: 中止事务,并写入回滚SQL语句。 +- **commit_txn(...)**: 提交事务,并写入提交SQL语句。 +- **execute_check(file_name, sql_count, txn_count, data_num, table_num)**: 执行检查事务,用于验证数据的一致性。 +- **get_last_op(ops, pos)**: 获取操作列表中给定位置前的最后一个操作。 +- **execute_first(...)** 和 **execute_second(...)**: 分别处理Partial Order Pair (POP)的第一次和第二次操作。 +- **execute_txn(...)**: 执行事务,考虑操作顺序以解决冲突。 +- **write_description(file_name, txn_num, op_num, data_num)**: 向文件写入测试用例的描述。 + +## mda_detect.py + +### 文件概述 + +mda_detect.py 主要是对测试框架(sqltest_v2) 跑出来的结果进行分析,检测数据库事务并发控制中的循环依赖。进而本次并发事务是否满足可串行化。理论原理就是一个调度序列,是冲突可序列化的,当且仅当其依赖图是无环的。 + +> *关于这一点的数学证明,这里不展开,感兴趣的可以自行查看:* [Proof of correctness of the precedence graph test](http://www.cs.emory.edu/~cheung/Courses/554/Syllabus/7-serializability/graph-conflict2.html) + +#### 主要逻辑 + +sqltest_v2 针对每个测试用例文件都会生成一个并发调度的结果文件。mda_detect.py 负责对于每个文件读取,并记录事务操作、边、入度、访问状态等。 + +* 如果读取中间检查到了错误信息。则输出错误结果并跳过后续步骤。 +* 如果没有错误消息,则删除未完成的操作,构建依赖图并计算入度。 + + * 如果未标记为 `go_end`,则检查图中是否存在循环。 + * 如果存在循环,输出循环结果并调用 `dfs` 方法进行深度优先搜索,记录路径。 + * 如果不存在循环,输出结果并打印路径 + +### 类定义 + +- **Edge**: 表示一个边,包含类型和输出。 +- **Operation**: 表示一个操作,包含操作类型、事务编号、操作时间和值。 +- **Txn**: 表示一个事务,包含开始时间和结束时间。 + +### 函数定义 + +- **get_total(lines)**: 计算查询中的最大变量数。 +- **find_data(query, target)**: 从查询中提取数据。 +- **set_finish_time(op_time, data_op_list, query, txn, version_list)**: 设置操作的结束时间,并更新事务列表和版本列表。 +- **check_concurrency(data1, data2, txn)**: 检查两个事务是否并发。 +- **get_edge_type(data1, data2, txn)**: 确定两个操作之间的边类型。 +- **build_graph(data_op_list, indegree, edge, txn)**: 构建表示操作并发关系的有向图。 +- **insert_edge(data1, data2, indegree, edge, txn)**: 向有向图中插入边。 +- **init_record(query, version_list)**: 根据查询初始化版本列表中的记录。 +- **readVersion_record(query, op_time, data_op_list, version_list)**: 读取版本化记录并更新操作。 +- **read_record(op_time, txn_num, total_num, txn, data_op_list)**: 读取记录并更新数据操作。 +- **write_record(op_time, txn_num, txn, data_op_list)**: 写入记录并更新数据操作。 +- **delete_record(op_time, txn_num, txn, data_op_list)**: 删除记录并更新数据操作。 +- **insert_record(op_time, txn_num, txn, data_op_list)**: 插入记录并更新数据操作。 +- **end_record(op_time, txn_num, txn)**: 设置事务的结束时间戳。 +- **operation_record(total_num, query, txn, data_op_list, version_list)**: 记录和处理数据库操作。 +- **remove_unfinished_operation(data_op_list)**: 移除未完成的操作。 +- **check_cycle(edge, indegree, total)**: 使用拓扑排序检查有向图中的循环。 +- **dfs(result_folder, ts_now, now, type)**: 执行深度优先搜索以查找并打印有向图中的循环。 +- **print_path(result_folder, ts_now, edge)**: 打印有向图中的路径。 +- **output_result(file, result_folder, ts_now, IsCyclic)**: 将循环检测结果输出到结果文件。 +- **print_error(result_folder, ts_now, error_message)**: 将错误消息打印到结果文件。 diff --git a/src/dbtest/src/doc/readme.md b/src/dbtest/src/doc/readme.md new file mode 100644 index 00000000..756b01c7 --- /dev/null +++ b/src/dbtest/src/doc/readme.md @@ -0,0 +1 @@ +This is the description document folder for 3TS/src/​dbtest/​src diff --git a/src/dbtest/src/kv_cntl.cc b/src/dbtest/src/kv_cntl.cc new file mode 100644 index 00000000..ee773905 --- /dev/null +++ b/src/dbtest/src/kv_cntl.cc @@ -0,0 +1,500 @@ +/* + * Tencent is pleased to support the open source community by making 3TS available. + * + * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software + * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All + * Tencent Modifications are Copyright (C) THL A29 Limited. + * + * Author: farrisli (farrisli@tencent.com) + * + */ +#include "kv_cntl.h" +KVParser kv_parser; + +// execute +bool MongoConnector::ExecInsertkV(const int session_id, const int stmt_id, const std::string& stmt, mongocxx::collection& coll, + bsoncxx::document::value& doc_value, TestResultSet& test_result_set, const std::string test_process_file) { + const std::string blank(blank_base*(session_id - 1), ' '); + try { + mongocxx::client_session& session = session_pool_[session_id - 1]; + std::cout << blank << "T" << session_id << " execute stmt: '" << stmt << "'" << std::endl; + if (!test_process_file.empty()) { + std::ofstream test_process(test_process_file, std::ios::app); + test_process << blank << "T" << session_id << " execute stmt: '" << stmt << "'" << std::endl; + } + + //bsoncxx::document::value doc = document{} << "k" << "0" << "v" << "2" << finalize; + coll.insert_one(session, doc_value.view()); + + } catch (mongocxx::v_noabi::exception& e) { + std::string e_info = e.what(); + + std::cout << blank << "[ERROR] in MongoConnector::ExecInsertkV ->" << e_info << std::endl; + if (!test_process_file.empty()) { + std::ofstream test_process(test_process_file, std::ios::app); + test_process << blank << "[ERROR] in MongoConnector::ExecInsertkV ->" << e_info << std::endl; + } + + auto index_conflict = e_info.find("WriteConflict"); + if (index_conflict != e_info.npos) { + test_result_set.SetResultType("Rollback\nReason: " + e_info); + + return false; + } + } + + return true; +} + +bool MongoConnector::ExecDeleteKV(const int session_id, const int stmt_id, const std::string& stmt, mongocxx::collection& coll, + bsoncxx::document::value& doc_value, TestResultSet& test_result_set, const std::string test_process_file) { + const std::string blank(blank_base*(session_id - 1), ' '); + try { + mongocxx::client_session& session = session_pool_[session_id - 1]; + + std::cout << blank << "T" << session_id << " execute stmt: '" << stmt << "'" << std::endl; + if (!test_process_file.empty()) { + std::ofstream test_process(test_process_file, std::ios::app); + test_process << blank << "T" << session_id << " execute stmt: '" << stmt << "'" << std::endl; + } + + coll.delete_one(session, doc_value.view()); + + } catch (mongocxx::v_noabi::exception& e) { + std::string e_info = e.what(); + + std::cout << blank << "[ERROR] in MongoConnector::ExecDeleteKV ->" << e_info << std::endl; + if (!test_process_file.empty()) { + std::ofstream test_process(test_process_file, std::ios::app); + test_process << blank << "[ERROR] in MongoConnector::ExecDeleteKV ->" << e_info << std::endl; + } + } + + return true; +} + +bool MongoConnector::ExecUpdatekV(const int session_id, const int stmt_id, const std::string& stmt, mongocxx::collection& coll, + bsoncxx::document::value& doc_value_filter, bsoncxx::document::value& doc_value_update, + TestResultSet& test_result_set, const std::string test_process_file) { + const std::string blank(blank_base*(session_id - 1), ' '); + try { + mongocxx::client_session& session = session_pool_[session_id - 1]; + + std::cout << blank << "T" << session_id << " execute stmt: '" << stmt << "'" << std::endl; + if (!test_process_file.empty()) { + std::ofstream test_process(test_process_file, std::ios::app); + test_process << blank << "T" << session_id << " execute stmt: '" << stmt << "'" << std::endl; + } + + coll.update_many(session, doc_value_filter.view(), doc_value_update.view()); + + } catch (mongocxx::v_noabi::exception& e) { + std::string e_info = e.what(); + + std::cout << blank << "[ERROR] in MongoConnector::ExecUpdatekV ->" << e_info << std::endl; + if (!test_process_file.empty()) { + std::ofstream test_process(test_process_file, std::ios::app); + test_process << blank << "[ERROR] in MongoConnector::ExecUpdatekV ->" << e_info << std::endl; + } + + auto index_conflict = e_info.find("WriteConflict"); + + for (int i = 1;i <= 4;i++) { + KVEndTxn(i, 1024, "ROLLBACK", test_result_set); + } + + if (index_conflict != e_info.npos) { + test_result_set.SetResultType("Rollback\nReason: " + e_info); + return false; + } + } + return true; +} + + +bool MongoConnector::ExecUpdatekVWithVInc(const int session_id, const int stmt_id, const std::string& stmt, mongocxx::collection& coll, + TestResultSet& test_result_set, const std::string test_process_file) { + const std::string blank(blank_base*(session_id - 1), ' '); + try { + const auto& [stmt_data_k, stmt_data_v] = kv_parser.StmtKVData(stmt); + + bsoncxx::document::value doc_value_find = kv_parser.MongoFind(stmt_data_k); + + std::string ret_v = ExecGetV(session_id, coll, doc_value_find); + if (ret_v.empty()) { + std::cout << "[ERROR]" << " get value failed, stmt: " << stmt << std::endl; + return false; + } + auto index_p = stmt_data_v.find("+"); + auto index_s = stmt_data_v.find("-"); + std::string target_v = stmt_data_v.substr(1); + int update_v = 0; + if (index_p != ret_v.npos) { + update_v = std::stoi(ret_v) + std::stoi(target_v); + } else if (index_s != ret_v.npos){ + update_v = std::stoi(ret_v) - std::stoi(target_v); + } else { + std::cout << "[ERROR] " << "unkonw stmt: " << stmt << " t1.vinc(k, v_opt)-> v_opt:+100 or -100" << std::endl; + } + + std::vector doc = kv_parser.MongoUpdate(stmt_data_k, std::to_string(update_v)); + bsoncxx::document::value doc_value = doc[0]; + bsoncxx::document::value doc_value_update = doc[1]; + if (!ExecUpdatekV(session_id, stmt_id, stmt, coll, doc_value, doc_value_update, test_result_set, test_process_file)) { + return false; + } + } catch(mongocxx::v_noabi::exception& e) { + std::string e_info = e.what(); + + std::cout << blank << "[ERROR] in MongoConnector::ExecUpdatekV ->" << e_info << std::endl; + if (!test_process_file.empty()) { + std::ofstream test_process(test_process_file, std::ios::app); + test_process << blank << "[ERROR] in MongoConnector::ExecUpdatekV ->" << e_info << std::endl; + } + + auto index_conflict = e_info.find("WriteConflict"); + + for (int i = 1;i <= 4;i++) { + KVEndTxn(i, 1024, "ROLLBACK", test_result_set); + } + + if (index_conflict != e_info.npos) { + test_result_set.SetResultType("Rollback\nReason: " + e_info); + return false; + } + } + return true; +} + +std::string MongoConnector::ExecGetV(const int session_id, mongocxx::collection& coll, bsoncxx::document::value& doc_value) { + const std::string blank(blank_base*(session_id - 1), ' '); + try { + mongocxx::client_session& session = session_pool_[session_id - 1]; + mongocxx::cursor cursor = coll.find(session, doc_value.view()); + std::pair data; + for (auto&& doc : cursor) { + std::string doc_json = bsoncxx::to_json(doc); + data = kv_parser.DocKVData(doc_json); + } + return data.second; + } catch(mongocxx::v_noabi::exception& e) { + std::string e_info = e.what(); + std::cout << blank << "[ERROR] in MongoConnector::ExecUpdatekV ->" << e_info << std::endl; + return ""; + } +} + +bool MongoConnector::ExecFindKV(const int session_id, const int stmt_id, const std::string& stmt, mongocxx::collection& coll, + bsoncxx::document::value& doc_value, TestResultSet& test_result_set, + std::unordered_map>& cur_result_set, + const int param_num, const std::string test_process_file) { + const std::string blank(blank_base*(session_id - 1), ' '); + try { + mongocxx::client_session& session = session_pool_[session_id - 1]; + + auto index_a = stmt.find("*"); + + std::cout << blank << "T" << session_id << " execute stmt: '" << stmt << "'" << std::endl; + if (!test_process_file.empty()) { + std::ofstream test_process(test_process_file, std::ios::app); + test_process << blank << "T" << session_id << " execute stmt: '" << stmt << "'" << std::endl; + } + + mongocxx::cursor cursor = [&] { + if (index_a != stmt.npos) { + return coll.find(session, {}); + } else { + return coll.find(session, doc_value.view()); + } + }(); + + int exist = 0; + for (auto&& doc : cursor) { + std::string row = ""; + std::string doc_json = bsoncxx::to_json(doc); + const auto& [k_data, v_data] = kv_parser.DocKVData(doc_json); + row = "(" + k_data + "," + v_data + ")"; + if (cur_result_set.find(stmt_id) != cur_result_set.end()) { + cur_result_set[stmt_id].push_back(row); + } else { + std::vector sql_result; + sql_result.push_back(row); + cur_result_set[stmt_id] = sql_result; + } + exist = 1; + } + + if (exist == 0) { + std::vector sql_result; + sql_result.push_back("null"); + cur_result_set[stmt_id] = sql_result; + } + std::vector>> expected_result_set_list = test_result_set.ExpectedResultSetList(); + outputter.PrintAndWriteTxnSqlResult(cur_result_set[stmt_id], expected_result_set_list, stmt_id, stmt, session_id, test_process_file); + } catch (mongocxx::v_noabi::exception& e) { + std::string e_info = e.what(); + + std::cout << blank << "[ERROR] in MongoConnector::ExecFindkV ->" << e_info << std::endl; + + if (!test_process_file.empty()) { + std::ofstream test_process(test_process_file, std::ios::app); + test_process << blank << "[ERROR] in MongoConnector::ExecFindkV ->" << e_info << std::endl; + } + + for (int i = 1;i <= 4;i++) { + KVEndTxn(i, 1024, "ROLLBACK", test_result_set); + } + + auto index_no_read = e_info.find("Unable to read from a snapshot due to pending collection catalog changes"); + if (index_no_read != e_info.npos) { + test_result_set.SetResultType("Rollback\nReason: " + e_info); + return false; + } + } + + return true; +} + +// transaction options +bool MongoConnector::KVStartTxn(const int session_id, const int stmt_id, TestResultSet& test_result_set, const std::string test_process_file) { + const std::string blank(blank_base*(session_id - 1), ' '); + try { + mongocxx::client_session& session = session_pool_[session_id - 1]; + + std::cout << blank << "T" << session_id << " start transaction success" << std::endl; + if (!test_process_file.empty()) { + std::ofstream test_process(test_process_file, std::ios::app); + test_process << blank << "T" << session_id << " start transaction success" << std::endl; + } + + session.start_transaction(opts_); + + } catch (mongocxx::v_noabi::exception& e) { + std::string e_info = e.what(); + + std::cout << blank << "[ERROR] in MongoConnector::KVStartTxn ->" << e_info << std::endl; + + if (!test_process_file.empty()) { + std::ofstream test_process(test_process_file, std::ios::app); + test_process << blank << "[ERROR] in MongoConnector::KVStartTxn ->" << e_info << std::endl; + } + } + return true; +} + +bool MongoConnector::KVEndTxn(int session_id, int stmt_id, const std::string& opt, + TestResultSet& test_result_set, const std::string test_process_file) { + const std::string blank(blank_base*(session_id - 1), ' '); + try { + mongocxx::client_session& session = session_pool_[session_id - 1]; + if (stmt_id != 1024) { + std::cout << blank << "T" << session_id << " " << opt << " transaction success" << std::endl; + } + if (!test_process_file.empty()) { + std::ofstream test_process(test_process_file, std::ios::app); + test_process << blank << "T" << session_id << " " << opt << " transaction success" << std::endl; + } + + if (opt == "COMMIT") { + session.commit_transaction(); + } else if (opt == "ROLLBACK") { + session.abort_transaction(); + } else { + std::cout << "[ERROR] unknow opt in MongoConnector::KVEndTxn" << std::endl; + } + + } catch (mongocxx::v_noabi::exception& e) { + std::string e_info = e.what(); + + if (stmt_id != 1024) { + std::cout << blank << "[ERROR] in MongoConnector::KVEndTxn ->" << e_info << std::endl; + } + + if (!test_process_file.empty()) { + std::ofstream test_process(test_process_file, std::ios::app); + test_process << blank << "[ERROR] in MongoConnector::KVEndTxn ->" << e_info << std::endl; + } + + auto index_conflict = e_info.find("WriteConflict"); + if (index_conflict != e_info.npos) { + test_result_set.SetResultType("Rollback\nReason: " + e_info); + return false; + } + } + + return true; +} + +std::string KVParser::MongoOpt(const std::string& stmt) { + auto index_get = stmt.find("get"); + auto index_get_p = stmt.find("getpred"); + auto index_put = stmt.find("put"); + auto index_put_p = stmt.find("putpred"); + auto index_vinc = stmt.find("vinc"); + auto index_begin = stmt.find("begin"); + auto index_commit = stmt.find("commit"); + auto index_rollback = stmt.find("rollback"); + std::string opt = ""; + if (index_get != stmt.npos) { + if (index_get_p != stmt.npos) { + opt = "findpred"; + } else { + opt = "find"; + } + } else if (index_put != stmt.npos) { + const auto& [stmt_data_k, stmt_data_v] = StmtKVData(stmt); + if (index_put_p == stmt.npos) { + if (FindFromKCache(stmt_data_k)) { + opt = "update"; + } else { + opt = "insert"; + PutIntoKCache(stmt_data_k); + } + } else { + opt = "updatepred"; + } + } else if (index_vinc != stmt.npos) { + opt = "vinc"; + } else if (index_begin != stmt.npos) { + opt = "begin"; + } else if (index_commit != stmt.npos) { + opt = "commit"; + } else if (index_rollback != stmt.npos) { + opt = "rollback"; + } + + return opt; +} + +std::pair KVParser::DocKVData(const std::string& doc_json) { + std::pair doc_data; + auto index_k = doc_json.find("k"); + auto index_right = doc_json.find_last_of("}"); + if (index_k != doc_json.npos && index_right != doc_json.npos) { + std::string data = doc_json.substr(index_k, index_right - index_k - 1); + auto index_v = data.find("v"); + auto index_dot = data.find(","); + auto index_m_f = data.find_first_of(":"); + auto index_m_l = data.find_last_of(":"); + if (index_v != data.npos && index_dot != data.npos && index_m_f != data.npos && index_m_l != data.npos) { + std::string k_data = data.substr(index_m_f + 1, index_dot - index_m_f - 1); + std::string v_data = data.substr(index_m_l + 1); + TrimQuo(k_data); + TrimQuo(v_data); + TrimSpace(k_data); + TrimSpace(v_data); + doc_data.first = k_data; + doc_data.second = v_data; + } + } + return doc_data; +} + +std::pair KVParser::StmtKVData(const std::string& stmt) { + auto index_left = stmt.find("("); + auto index_right = stmt.find(")"); + auto index_dot = stmt.find(","); + + std::pair stmt_data; + + if (index_left != stmt.npos && index_right != stmt.npos && index_dot != stmt.npos) { + std::string stmt_data_k = stmt.substr(index_left + 1, index_dot - index_left - 1); + std::string stmt_data_v = stmt.substr(index_dot + 1, index_right - index_dot - 1); + if (!stmt_data_k.empty() && !stmt_data_v.empty()) { + TrimSpace(stmt_data_k); + TrimSpace(stmt_data_v); + stmt_data.first = stmt_data_k; + stmt_data.second = stmt_data_v; + } + } else if (index_dot == stmt.npos) { + std::string stmt_data_k = stmt.substr(index_left + 1, index_right - index_left - 1); + if (!stmt_data_k.empty()) { + TrimSpace(stmt_data_k); + stmt_data.first = stmt_data_k; + stmt_data.second = ""; + } + } else { + stmt_data.first = ""; + stmt_data.second = ""; + } + + return stmt_data; +} + +std::string KVParser::StmtCollName(const std::string& stmt) { + auto index_dot = stmt.find("."); + std::string coll_name = ""; + if (index_dot != stmt.npos) { + coll_name = stmt.substr(0, index_dot); + } + if (coll_name.empty()) { + std::cout << "[ERROR] " << "please check stmt: " << stmt << " there is no coll_name" << std::endl; + } + + return coll_name; +} + +mongocxx::collection KVParser::GetColl(const std::string& stmt, MongoConnector& mongo_connector, int& is_first_use) { + std::string coll_name = StmtCollName(stmt); + if (!coll_name.empty()) { + if (is_first_use == 1) { + mongo_connector.InitColl(coll_name); + is_first_use = 0; + } + } + mongocxx::collection coll; + if (!coll_name.empty()) { + coll = GetFromCollCache(coll_name); + if (!coll) { + coll = mongo_connector.Coll(coll_name); + PutIntoCollCache(coll_name, coll); + } + } + + return coll; +} + +bsoncxx::document::value KVParser::MongoFind(const std::string& stmt_data_k) { + bsoncxx::document::value doc_value = document{} << "k" << stmt_data_k << finalize; + + return doc_value; +} + +bsoncxx::document::value KVParser::MongoFindPred(const std::string& stmt_data_k) { + bsoncxx::document::value doc_value = document{} << "v" << stmt_data_k << finalize; + + return doc_value; +} + +bsoncxx::document::value KVParser::MongoInsert(const std::string& stmt_data_k, const std::string& stmt_data_v) { + auto builder = bsoncxx::builder::stream::document{}; + bsoncxx::document::value doc_value = builder << "k" << stmt_data_k << "v" << stmt_data_v << finalize; + + return doc_value; +} + +std::vector KVParser::MongoUpdate(const std::string& stmt_data_k, const std::string& stmt_data_v) { + auto builder_filter = bsoncxx::builder::stream::document{}; + auto builder_update = bsoncxx::builder::stream::document{}; + + std::vector doc_update; + bsoncxx::document::value doc_value = builder_filter << "k" << stmt_data_k << finalize; + bsoncxx::document::value doc_value_update = builder_update << "$set" << open_document << "v" << stmt_data_v << close_document << finalize; + doc_update.emplace_back(doc_value); + doc_update.emplace_back(doc_value_update); + + return doc_update; +} + +std::vector KVParser::MongoUpdatePred(const std::string& stmt_data_k, const std::string& stmt_data_v) { + auto builder_filter = bsoncxx::builder::stream::document{}; + auto builder_update = bsoncxx::builder::stream::document{}; + + std::vector doc_update; + bsoncxx::document::value doc_value = builder_filter << "v" << stmt_data_k << finalize; + bsoncxx::document::value doc_value_update = builder_update << "$set" << open_document << "v" << stmt_data_v << close_document << finalize; + doc_update.emplace_back(doc_value); + doc_update.emplace_back(doc_value_update); + + return doc_update; +} diff --git a/src/dbtest/src/kv_cntl.h b/src/dbtest/src/kv_cntl.h new file mode 100644 index 00000000..7dc00a0a --- /dev/null +++ b/src/dbtest/src/kv_cntl.h @@ -0,0 +1,145 @@ +/* + * Tencent is pleased to support the open source community by making 3TS available. + * + * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software + * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All + * Tencent Modifications are Copyright (C) THL A29 Limited. + * + * Author: farrisli (farrisli@tencent.com) + * + */ +#include +#include +#include +#include +#include +#include +#include +#include + +#include "case_cntl.h" + +using bsoncxx::builder::stream::close_array; +using bsoncxx::builder::stream::close_document; +using bsoncxx::builder::stream::document; +using bsoncxx::builder::stream::finalize; +using bsoncxx::builder::stream::open_array; +using bsoncxx::builder::stream::open_document; + +class KVParser; +extern KVParser kv_parser; + +class MongoConnector { +private: + mongocxx::instance inst_; + mongocxx::client client_; + const std::string test_db_; + std::vector session_pool_; + mongocxx::write_concern wc_majority_; + mongocxx::read_concern rc_snapshot_; + mongocxx::read_preference rp_primary_; + mongocxx::options::transaction opts_; +public: + // init + MongoConnector(const std::string& conn_uri, const std::string test_db):client_(mongocxx::client{mongocxx::uri{conn_uri}}), test_db_(test_db) {}; + void InitMongoConnector(const int session_pool_size) { + // init read/write concern + wc_majority_.acknowledge_level(mongocxx::write_concern::level::k_majority); + rc_snapshot_.acknowledge_level(mongocxx::read_concern::level::k_snapshot); + rp_primary_.mode(mongocxx::read_preference::read_mode::k_primary); + // init transaction opts + InitTxnOpts(); + // init session pool + auto db = client_[test_db_]; + for (int i = 0; i < session_pool_size; i++) { + mongocxx::client_session session = client_.start_session(); + session_pool_.emplace_back(client_.start_session()); + }; + std::cout << "init mongo_connector success" << std::endl; + }; + // init transaction opts + void InitTxnOpts() { + opts_.write_concern(wc_majority_); + opts_.read_concern(rc_snapshot_); + opts_.read_preference(rp_primary_); + }; + // init transaction timeout + void InitTxnTimeout(std::chrono::milliseconds timeout) { + opts_.max_commit_time_ms(timeout); + }; + // init coll + bool InitColl(const std::string& coll_name) { + client_[test_db_][coll_name].drop(wc_majority_); + return true; + }; + // get obj + //std::vector MongoSessionPool() {return session_pool_;}; + mongocxx::collection Coll(const std::string coll_name) {return client_[test_db_][coll_name];}; + // execute + bool ExecInsertkV(const int session_id, const int stmt_id, const std::string& stmt, mongocxx::collection& coll, + bsoncxx::document::value& doc_value, TestResultSet& test_result_set, const std::string test_process_file=""); + + bool ExecDeleteKV(const int session_id, const int stmt_id, const std::string& stmt, mongocxx::collection& coll, + bsoncxx::document::value& doc_value, TestResultSet& test_result_set, const std::string test_process_file=""); + + bool ExecUpdatekV(const int session_id, const int stmt_id, const std::string& stmt, mongocxx::collection& coll, + bsoncxx::document::value& doc_value_filter, bsoncxx::document::value& doc_value_update, + TestResultSet& test_result_set, const std::string test_process_file=""); + + bool ExecUpdatekVWithVInc(const int session_id, const int stmt_id, const std::string& stmt, mongocxx::collection& coll, + TestResultSet& test_result_set, const std::string test_process_file); + + bool ExecFindKV(const int session_id, const int stmt_id, const std::string& stmt, mongocxx::collection& coll, + bsoncxx::document::value& doc_value, TestResultSet& test_result_set, + std::unordered_map>& cur_result_set, + const int param_num, const std::string test_process_file=""); + std::string ExecGetV(const int session_id, mongocxx::collection& coll, bsoncxx::document::value& doc_value); + + // transaction options + bool KVStartTxn(const int session_id, const int stmt_id, TestResultSet& test_result_set, + const std::string test_process_file=""); + bool KVEndTxn(int session_id, int stmt_id, const std::string& opt, + TestResultSet& test_result_set, const std::string test_process_file=""); + // release resource + void Release(); +}; + +class KVParser { +private: + std::unordered_map k_cache_; + std::unordered_map coll_cache_; +public: + std::string MongoOpt(const std::string& stmt); + std::pair StmtKVData(const std::string& stmt); + std::pair DocKVData(const std::string& doc_json); + std::string StmtCollName(const std::string& stmt); + mongocxx::collection GetColl(const std::string& stmt, MongoConnector& mongo_connector, int& is_first_use); + + bsoncxx::document::value MongoInsert(const std::string& stmt_data_k, const std::string& stmt_data_v); + std::vector MongoUpdate(const std::string& stmt_data_k, const std::string& stmt_data_v); + std::vector MongoUpdatePred(const std::string& stmt_data_k, const std::string& stmt_data_v); + bsoncxx::document::value MongoFind(const std::string& stmt_data_k); + bsoncxx::document::value MongoFindPred(const std::string& stmt_data_k); + // cache options + void PutIntoKCache(const std::string& k) {k_cache_.emplace(k, 0);}; + bool FindFromKCache(const std::string& k) { + if (k_cache_.count(k) == 1) { + return true; + } else { + return false; + } + }; + void ClearKCache() {k_cache_.clear();}; + + void PutIntoCollCache(const std::string& coll_name, mongocxx::collection coll) { + coll_cache_[coll_name] = coll; + }; + mongocxx::collection GetFromCollCache(const std::string& coll_name) { + mongocxx::collection coll; + if (coll_cache_.find(coll_name) != coll_cache_.end()) { + coll = coll_cache_[coll_name]; + } + return coll; + }; + void ClearCollCache() {coll_cache_.clear();}; +}; diff --git a/src/dbtest/src/kvtest.cc b/src/dbtest/src/kvtest.cc new file mode 100644 index 00000000..735b1320 --- /dev/null +++ b/src/dbtest/src/kvtest.cc @@ -0,0 +1,244 @@ +/* + * Tencent is pleased to support the open source community by making 3TS available. + * + * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software + * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All + * Tencent Modifications are Copyright (C) THL A29 Limited. + * + * Author: farrisli (farrisli@tencent.com) + * + */ +#include "kvtest.h" +#include "gflags/gflags.h" + +DEFINE_string(db_type, "mongodb", "data resource name"); +DEFINE_string(uri, "", "conn uri"); +DEFINE_string(db_name, "test", "database name"); +DEFINE_int32(conn_pool_size, 4, "session pool size"); +DEFINE_string(isolation, "snapshot", "transation isolation level: snapshot"); +DEFINE_string(timeout, "2", "timeout"); +int is_first_use = 1; + +bool JobExecutor::MongoStmtExcutor(const int session_id, const int stmt_id, const std::string& stmt, + MongoConnector& mongo_connector, TestResultSet& test_result_set, + std::unordered_map>& cur_result_set, const std::string& test_process_file) { + // get stmt's option + std::string opt = kv_parser.MongoOpt(stmt); + // excute opt + if ("find" == opt || "findpred" == opt) { + const auto& [stmt_data_k, stmt_data_v] = kv_parser.StmtKVData(stmt); + mongocxx::collection coll = kv_parser.GetColl(stmt, mongo_connector, is_first_use); + if (!coll) { + std::cout << "[ERROR]" << "get coll failed" << std::endl; + return false; + } + bsoncxx::document::value doc_value = [&] { + if ("findpred" == opt) { + return kv_parser.MongoFindPred(stmt_data_k); + } else { + return kv_parser.MongoFind(stmt_data_k); + } + }(); + + if (!mongo_connector.ExecFindKV(session_id, stmt_id, stmt, coll, doc_value, test_result_set, cur_result_set, 2, test_process_file)) { + return false; + } + } else if ("update" == opt || "updatepred" == opt) { + const auto& [stmt_data_k, stmt_data_v] = kv_parser.StmtKVData(stmt); + mongocxx::collection coll = kv_parser.GetColl(stmt, mongo_connector, is_first_use); + if (!coll) { + std::cout << "[ERROR]" << "get coll failed" << std::endl; + return false; + } + + std::vector doc = [&] { + if ("updatepred" == opt) { + return kv_parser.MongoUpdatePred(stmt_data_k, stmt_data_v); + } else { + return kv_parser.MongoUpdate(stmt_data_k, stmt_data_v); + } + }(); + + bsoncxx::document::value doc_value = doc[0]; + bsoncxx::document::value doc_value_update = doc[1]; + + if (!mongo_connector.ExecUpdatekV(session_id, stmt_id, stmt, coll, doc_value, doc_value_update, test_result_set, test_process_file)) { + return false; + } + } else if ("vinc" == opt) { + const auto& [stmt_data_k, stmt_data_v] = kv_parser.StmtKVData(stmt); + mongocxx::collection coll = kv_parser.GetColl(stmt, mongo_connector, is_first_use); + if (!coll) { + std::cout << "[ERROR]" << "get coll failed" << std::endl; + return false; + } + + if (!mongo_connector.ExecUpdatekVWithVInc(session_id, stmt_id, stmt, coll, test_result_set, test_process_file)) { + return false; + } + + } else if ("insert" == opt) { + const auto& [stmt_data_k, stmt_data_v] = kv_parser.StmtKVData(stmt); + mongocxx::collection coll = kv_parser.GetColl(stmt, mongo_connector, is_first_use); + if (!coll) { + std::cout << "[ERROR]" << "get coll failed" << std::endl; + return false; + } + bsoncxx::document::value doc_value = kv_parser.MongoInsert(stmt_data_k, stmt_data_v); + + if (!mongo_connector.ExecInsertkV(session_id, stmt_id, stmt, coll, doc_value, test_result_set, test_process_file)) { + return false; + } + } else if ("begin" == opt) { + if (!mongo_connector.KVStartTxn(session_id, stmt_id, test_result_set, test_process_file)) { + return false; + } + } else if ("commit" == opt) { + if (!mongo_connector.KVEndTxn(session_id, stmt_id, "COMMIT", test_result_set, test_process_file)) { + return false; + } + } else if ("rollback" == opt) { + if (!mongo_connector.KVEndTxn(session_id, stmt_id, "ROLLBACK", test_result_set)) { + return false; + } + } else { + std::cout << "[ERROR]" << "stmt: " << stmt << " unknown option: " << opt << " The current program supports the following commands: begin t1.get(k) t1.put(k,v) t1.getpred(v) t1.putpred(v,v) t1.vinc(k,+100) commit rollback" << std::endl; + } + return true; +} + +bool JobExecutor::ExecTestSequence(TestSequence& test_sequence, TestResultSet& test_result_set, MongoConnector& mongo_connector) { + // std::string test_process_file = "./" + FLAGS_db_type + "/" + FLAGS_isolation + "/" + test_sequence.TestCaseType() + "_" + FLAGS_isolation + ".txt"; + std::string test_process_file = "./" + FLAGS_db_type + "/" + FLAGS_isolation + "/" + test_sequence.TestCaseType() + ".txt"; + std::cout << "test_process_file : " << test_process_file << std::endl; + // remove old test_process_file + std::ifstream test_process_tmp(test_process_file); + if (test_process_tmp) { + std::remove(test_process_file.c_str()); + } + // create new test_process_file + std::ofstream test_process(test_process_file, std::ios::app); + if (!test_process) { + std::cout << "create test_process_file failed" << std::endl; + } + + test_process << "#### db_type: " + FLAGS_db_type + " ####" << std::endl; + std::cout << "#### db_type: " + FLAGS_db_type + " ####" << std::endl; + + std::string test_case_type = test_sequence.TestCaseType(); + + auto index_t = test_case_type.find_first_of("_"); + if (index_t != test_case_type.npos) { + test_case_type = test_case_type.substr(int(index_t) + 1); + } + test_process << "#### test_type: " + test_case_type + " ####" << std::endl; + test_process << "#### isolation: " + FLAGS_isolation + " ####\n" << std::endl; + + std::cout << "#### test_type: " + test_case_type + " ####" << std::endl; + std::cout << "#### isolation: " + FLAGS_isolation + " ####\n" << std::endl; + + std::string current_info = "current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas"; + std::string expected_info = "expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory"; + std::cout << current_info << std::endl; + std::cout << expected_info << std::endl; + test_process << current_info << std::endl; + test_process << expected_info << std::endl; + + std::cout << " " << std::endl; + test_process << " " << std::endl; + + // test start + std::cout << dash << "test start" << dash << std::endl; + std::vector txn_sql_list = test_sequence.TxnSqlList(); + std::unordered_map> cur_result_set; + std::unordered_map stmt_map; + std::string table_name; + for (auto& txn_sql : txn_sql_list) { + int stmt_id = txn_sql.SqlId(); + int session_id = txn_sql.TxnId(); + std::string stmt = txn_sql.Sql(); + stmt_map[stmt_id] = stmt; + // If the current case timeout, all transactions are rollback + std::string ret_type = test_result_set.ResultType(); + auto index_T = ret_type.find("Timeout"); + auto index_R = ret_type.find("Rollback"); + if (index_T != ret_type.npos || index_R != ret_type.npos) { + for (int i = 0; i < FLAGS_conn_pool_size; i++) { + mongo_connector.KVEndTxn(session_id, stmt_id, "ROLLBACK", test_result_set); + } + break; + } + if (!MongoStmtExcutor(session_id, stmt_id, stmt, mongo_connector, test_result_set, cur_result_set, test_process_file)) { + break; + } + } + if (test_result_set.ResultType() == "") { + if (result_handler.IsTestExpectedResult(cur_result_set, test_result_set.ExpectedResultSetList(), stmt_map, test_process_file)) { + test_result_set.SetResultType("Avoid\nReason: Data anomaly did not occur and the data is consistent"); + } else { + test_result_set.SetResultType("Anomaly\nReason: Data anomaly is not recognized by the database, resulting in data inconsistencies"); + } + } + if(!outputter.WriteResultType(test_result_set.ResultType(), test_process_file)) { + return false; + } + // release resource + kv_parser.ClearKCache(); + kv_parser.ClearCollCache(); + is_first_use = 1; + return true; +} + +bool JobExecutor::ExecAllTestSequence(std::vector& test_sequence_list, std::vector& test_result_set_list, + MongoConnector& mongo_connector, JobExecutor& job_executor) { + int len = test_sequence_list.size(); + for (int i = 0; i < len; i++) { + if (!job_executor.ExecTestSequence(test_sequence_list[i], test_result_set_list[i], mongo_connector)) { + std::cout << "test sequence " + test_sequence_list[i].TestCaseType() + " execute failed" << std::endl; + } else { + std::string result_type = test_result_set_list[i].ResultType(); + std::cout << "\nTest Result: " << result_type + "\n" << std::endl; + } + } + return true; +} + +int main(int argc, char* argv[]) { + // parser gflags args + google::ParseCommandLineFlags(&argc, &argv, true); + std::cout << "input param-> " << std::endl; + std::cout << " db_type: " << FLAGS_db_type << std::endl; + std::cout << " uri: " << FLAGS_uri << std::endl; + std::cout << " isolation: " << FLAGS_isolation << std::endl; + // init mongo_connector + // provide IP, port, and db + MongoConnector mongo_connector("mongodb://9.134.39.34:27037/admin", "testdb"); + //MongoConnector mongo_connector("mongodb://9.134.218.253:27037/admin", "testdb"); + mongo_connector.InitMongoConnector(4); + // init excute obj + CaseReader case_reader; + JobExecutor job_executor; + // create test_process_output_file's dir + if (access(FLAGS_db_type.c_str(), 0) == -1) { + mkdir(FLAGS_db_type.c_str(), S_IRWXU); + } + // create isolation dir + std::string iso_dir = FLAGS_db_type + "/snapshot"; + if (access(iso_dir.c_str(), 0) == -1) { + mkdir(iso_dir.c_str(), S_IRWXU); + } + // read kv case test file + std::string test_path_base = "t/"; + std::string test_path = test_path_base + "mongodb"; + if (!case_reader.InitTestSequenceAndTestResultSetList(test_path, "mongodb")) { + std::cout << "init test sequence and test result set failed" << std::endl; + } + std::vector test_sequence_list = case_reader.TestSequenceList(); + std::vector test_result_set_list = case_reader.TestResultSetList(); + // execute all case + job_executor.ExecAllTestSequence(test_sequence_list, test_result_set_list, mongo_connector, job_executor); + // write test result total file + std::string ret_file = "./" + FLAGS_db_type + "/" + FLAGS_db_type + "_" + FLAGS_isolation + "_total-result.txt"; + outputter.WriteResultTotal(test_result_set_list, ret_file); + return 0; +} diff --git a/src/dbtest/src/kvtest.h b/src/dbtest/src/kvtest.h new file mode 100644 index 00000000..feaf5c30 --- /dev/null +++ b/src/dbtest/src/kvtest.h @@ -0,0 +1,20 @@ +/* + * Tencent is pleased to support the open source community by making 3TS available. + * + * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software + * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All + * Tencent Modifications are Copyright (C) THL A29 Limited. + * + * Author: farrisli (farrisli@tencent.com) + * + */ +#include "kv_cntl.h" +class JobExecutor { +public: + bool ExecAllTestSequence(std::vector& test_sequence_list, std::vector& test_result_set_list, + MongoConnector& mongo_connector, JobExecutor& job_executor); + bool ExecTestSequence(TestSequence& test_sequence, TestResultSet& test_result_set, MongoConnector& mongo_connector); + bool MongoStmtExcutor(const int session_id, const int stmt_id, const std::string& stmt, + MongoConnector& mongo_connector, TestResultSet& test_result_set, + std::unordered_map>& cur_result_set, const std::string& test_process_file); +}; diff --git a/src/dbtest/src/mda_detect.py b/src/dbtest/src/mda_detect.py new file mode 100644 index 00000000..982361ea --- /dev/null +++ b/src/dbtest/src/mda_detect.py @@ -0,0 +1,755 @@ +# /* +# * Tencent is pleased to support the open source community by making 3TS available. +# * +# * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. The below software +# * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All +# * Tencent Modifications are Copyright (C) THL A29 Limited. +# * +# * Author: xenitchen axingguchen tsunaouyang (xenitchen,axingguchen,tsunaouyang@tencent.com) +# * +# */ + + +import Queue +import os +import time + + +class Edge: + def __init__(self, type, out): + self.type = type + self.out = out + + +class Operation: + def __init__(self, op_type, txn_num, op_time, value): + self.op_type = op_type + self.txn_num = txn_num + self.op_time = op_time + self.value = value + + +class Txn: + def __init__(self): + self.begin_ts = -1 + self.end_ts = 99999999999999999999 + +""" +Find the total variable number. + +Args: +- lines (list): A list of queries. + +Returns: +int: The maximum variable number found in the queries. +""" +# find total variable number +def get_total(lines): + num = 0 + for query in lines: + query = query.replace("\n", "") + query = query.replace(" ", "") + if query[0:2] == "Q0" and query.find("INSERT") != -1: + tmp = find_data(query, "(") + num = max(num, tmp) + elif query[0:2] == "Q1": + break + return num + + +""" +Extract the data we need from a query. + +Args: +- query (str): The input query string. +- target (str): The target substring to search for. + +Returns: +int: The extracted data value, or -1 if not found. +""" +# extract the data we need in query +def find_data(query, target): + pos = query.find(target) + if pos == -1: + return pos + pos += len(target) + data_value = "" + for i in range(pos, len(query)): + if query[i].isdigit(): + data_value += query[i] + else: + break + if data_value == "": + return -1 + data_value = int(data_value) + return data_value + + +""" +When a statement is executed, this function sets the end time, modifies the transaction list, +and updates the version list as needed. + +Args: +- op_time (int): The operation time of the statement. +- data_op_list (list): A list of data operations. +- query (str): The query string containing information about the statement execution. +- txn (list): A list of transaction objects. +- version_list (list): A list of version lists for data operations. + +Returns: +None +""" +# when a statement is executed, set the end time and modify the version list +def set_finish_time(op_time, data_op_list, query, txn, version_list): + pos = query.find("finishedat:") + pos += len("finishedat:") + data_value = "" + tmp, tmp1 = "", "" + for i in range(pos, len(query)): + if query[i].isdigit(): + tmp += query[i] + else: + for j in range(3 - len(tmp)): + tmp1 += "0" + tmp = tmp1 + tmp + data_value += tmp + tmp, tmp1 = "", "" + data_value = int(data_value) + for t in txn: + if t.begin_ts == op_time: + t.begin_ts = data_value + if t.end_ts == op_time: + t.end_ts = data_value + for i, list1 in enumerate(data_op_list): + for op in list1: + if op.op_time == op_time: + op.op_time = data_value + if op.op_type == "W": + version_list[i].append(op.value) + op.value = len(version_list[i]) - 1 + elif op.op_type == "D": + version_list[i].append(-1) + op.value = len(version_list[i]) - 1 + elif op.op_type == "I": + version_list[i].append(op.value) + op.value = len(version_list[i]) - 1 + + +""" +Check if two transactions are concurrent based on their start and end times. + +Args: +- data1: Information about the first transaction. +- data2: Information about the second transaction. +- txn: A list of transaction objects. + +Returns: +bool: True if the transactions are concurrent, False otherwise. +""" +# if both transactions are running +# or the start time of the second transaction is less than the end time of the first transaction +# we think they are concurrent +def check_concurrency(data1, data2, txn): + if txn[data2.txn_num].begin_ts < txn[data1.txn_num].end_ts: + return True + elif txn[data1.txn_num].begin_ts < txn[data2.txn_num].end_ts: + return True + else: + return False + + +""" +Determine the type of edge between two operations based on their read or write versions. + +Args: +- data1: Information about the first operation. +- data2: Information about the second operation. +- txn: A list of transaction objects. + +Returns: +tuple: A tuple containing three values: + - A string indicating the edge type ('R', 'W', 'CR', 'CW'). + - Information about the operation that comes first. + - Information about the operation that comes second. +""" +# decide which operation comes first depending on the read or write version +# if later operation happened after the first txn commit time, edge type will add "C" +def get_edge_type(data1, data2, txn): + if data1.value <= data2.value: + before, after = data1, data2 + else: + before, after = data2, data1 + # if data1.op_type == "D" or data2.op_type == "D": + # if data1.value < data2.value: + # before, after = data2, data1 + # else: + # before, after = data1, data2 + if data2.op_time > txn[data1.txn_num].end_ts: + state = "C" + else: + state = "" + return before.op_type + state + after.op_type, before, after + + +""" +Build a directed graph representing the concurrency relationships between operations. + +Args: +- data_op_list: A list of lists, where each inner list contains information about operations for a specific transaction. +- indegree: A list representing the in-degrees of each operation node in the graph. +- edge: A list representing the edges (concurrency relationships) between operations. +- txn: A list of transaction objects. + +This function constructs a directed graph where nodes represent operations, and edges represent concurrency relationships +between operations. It iterates through the list of operations for each transaction and calls the 'insert_edge' function +to create edges in the graph based on concurrency relationships. + +Returns: +None +""" +def build_graph(data_op_list, indegree, edge, txn): + for list1 in data_op_list: + for i, data in enumerate(list1): + for j in range(0, i): + insert_edge(list1[j], data, indegree, edge, txn) + + +""" +Insert an edge into the directed graph representing concurrency relationships between operations. + +Args: +- data1: An operation object representing the first operation. +- data2: An operation object representing the second operation. +- indegree: A list representing the in-degrees of each transaction in the graph. +- edge: A list representing the edges (concurrency relationships) between operations for each transaction. +- txn: A list of transaction objects. + +This function inserts an edge into the directed graph to represent the concurrency relationship between 'data1' and 'data2'. +It first checks if the two operations are concurrent by calling the 'check_concurrency' function. If they are concurrent, it +determines the edge type using the 'get_edge_type' function and adds the edge to the 'edge' list. + +The 'indegree' list is updated to reflect the in-degree of the target transaction node when an edge is inserted. + +Returns: +None +""" +def insert_edge(data1, data2, indegree, edge, txn): + if check_concurrency(data1, data2, txn): + edge_type, data1, data2 = get_edge_type(data1, data2, txn) + if edge_type != "RR" and edge_type != "RCR" and data1.txn_num != data2.txn_num: + indegree[data2.txn_num] += 1 + edge[data1.txn_num].append(Edge(edge_type, data2.txn_num)) + + +""" +Initialize a record in the version list based on the information in the query. + +Args: +- query: A query string that contains information about a record. +- version_list: A list of lists representing versioned records. + +This function initializes a record in the 'version_list' based on the information provided in the 'query'. It extracts the 'key' +and 'value' of the record from the query using the 'find_data' function and appends the 'value' to the corresponding version list. + +Returns: +None +""" +def init_record(query, version_list): + key = find_data(query, "(") + value = find_data(query, ",") + version_list[key].append(value) + + +""" +Read the versioned record based on the information in the query. + +Args: +- query (str): A query string that contains information about reading a versioned record. +- op_time (int): The operation time of the read operation. +- data_op_list (list): A list of lists representing data operations. +- version_list (list): A list of lists representing versioned records. + +This function reads the versioned record specified in the 'query'. It extracts the 'key' and 'value' from the query, which are +used to identify the record and version to read. The function checks if the specified version exists in the version list and +updates the 'op.value' accordingly. If the version doesn't exist or if the read operation is not successful, an error message +is returned. + +Returns: +str: An error message indicating the result of the read operation. An empty string means the read was successful. +""" +def readVersion_record(query, op_time, data_op_list, version_list): + error_message = "" + data = query.split(")") + if len(data) == 1: + for list1 in data_op_list: + for op in list1: + if op.op_time == op_time: + value = op.value + if len(version_list[value]) == 0: + op.value = -1 + else: + if -1 not in version_list[value]: + error_message = "Value exists, but did not successully read" + return error_message + pos = version_list[value].index(-1) + op.value = pos + else: + for s in data: + key = find_data(s, "(") + value = find_data(s, ",") + for i, list1 in enumerate(data_op_list): + for op in list1: + if key == i and op.op_time == op_time: + value1 = op.value + if len(version_list[value1]) == 0: + op.value = -1 + else: + if version_list[value1].count(value) == 0: + error_message = "Read version that does not exist" + return error_message + pos = version_list[value1].index(value) + op.value = pos + + return error_message + # for i, list1 in enumerate(data_op_list): + # print(i) + # if list1: + # print("") + # print(list1[0].txn_num) + # print(list1[0].op_type) + # print(list1[0].op_time) + # print(list1[0].op_value) + + + + +""" +Read records based on the information in the query and update data operations. + +Args: +- op_time (int): The operation time of the read operation. +- txn_num (int): The transaction number. +- total_num (int): The total number of records. +- txn (list): A list of transactions. +- data_op_list (list): A list of lists representing data operations. + +This function reads records specified in the query and updates the 'data_op_list' accordingly. It extracts information from +the 'query' to determine which records to read and what type of operation to perform (read or predicate). The function also +sets the 'begin_ts' of the transaction if it's not already set. + +The 'query' is analyzed to identify specific record keys or predicates and create corresponding 'Operation' objects in the +'data_op_list'. Depending on the structure of the query, this function handles various cases, such as reading single records, +handling predicates, and selecting all rows in a table. + +Returns: +None +""" +def read_record(op_time, txn_num, total_num, txn, data_op_list): + if txn[txn_num].begin_ts == -1: + txn[txn_num].begin_ts = op_time + # for some distributed cases which have 4 param, write part is same + if query.find("value1=") != -1: + op_data = find_data(query, "value1=") + data_op_list[op_data].append(Operation("R", txn_num, op_time, op_data)) + # for normal cases + elif query.find("k=") != -1: + op_data = find_data(query, "k=") + data_op_list[op_data].append(Operation("R", txn_num, op_time, op_data)) + # for predicate cases + elif query.find("k>") != -1: + left = find_data(query, "k>") + 1 + right = find_data(query, "k<") + for i in range(left, right): + data_op_list[i].append(Operation("P", txn_num, op_time, i)) + elif query.find("value1>") != -1: + left = find_data(query, "value1>") + 1 + right = find_data(query, "value1<") + for i in range(left, right): + data_op_list[i].append(Operation("P", txn_num, op_time, i)) + else: + # it means select all rows in table + for i in range(total_num): + data_op_list[i].append(Operation("R", txn_num, op_time, i)) + + +""" +Write records based on the information in the query and update data operations. + +Args: +- op_time (int): The operation time of the write operation. +- txn_num (int): The transaction number. +- txn (list): A list of transactions. +- data_op_list (list): A list of lists representing data operations. + +This function writes records specified in the query and updates the 'data_op_list' accordingly. It extracts information from the +'query' to determine which records to write and what type of operation to perform (write). The function also sets the 'begin_ts' +of the transaction if it's not already set. + +The 'query' is analyzed to identify specific record keys and values, and it creates corresponding 'Operation' objects in the 'data_op_list'. + +Returns: +None +""" +def write_record(op_time, txn_num, txn, data_op_list): + if txn[txn_num].begin_ts == -1: + txn[txn_num].begin_ts = op_time + if query.find("value1=") != -1: + op_data = find_data(query, "value1=") + op_value = find_data(query, "value2=") + data_op_list[op_data].append(Operation("W", txn_num, op_time, op_value)) + elif query.find("k=") != -1: + op_data = find_data(query, "k=") + op_value = find_data(query, "v=") + data_op_list[op_data].append(Operation("W", txn_num, op_time, op_value)) + + +""" +Delete records based on the information in the query and update data operations. + +Args: +- op_time (int): The operation time of the delete operation. +- txn_num (int): The transaction number. +- txn (list): A list of transactions. +- data_op_list (list): A list of lists representing data operations. + +This function deletes records specified in the query and updates the 'data_op_list' accordingly. It extracts information from the +'query' to determine which records to delete and what type of operation to perform (delete). The function also sets the 'begin_ts' +of the transaction if it's not already set. + +The 'query' is analyzed to identify specific record keys, and it creates corresponding 'Operation' objects in the 'data_op_list'. + +Returns: +None +""" +def delete_record(op_time, txn_num, txn, data_op_list): + if txn[txn_num].begin_ts == -1: + txn[txn_num].begin_ts = op_time + if query.find("value1=") != -1: + op_data = find_data(query, "value1=") + data_op_list[op_data].append(Operation("D", txn_num, op_time, op_data)) + elif query.find("k=") != -1: + op_data = find_data(query, "k=") + data_op_list[op_data].append(Operation("D", txn_num, op_time, op_data)) + + +""" +Insert records based on the information in the query and update data operations. + +Args: +- op_time (int): The operation time of the insert operation. +- txn_num (int): The transaction number. +- txn (list): A list of transactions. +- data_op_list (list): A list of lists representing data operations. + +This function inserts records specified in the query and updates the 'data_op_list' accordingly. It extracts information from the +'query' to determine which records to insert and what type of operation to perform (insert). The function also sets the 'begin_ts' +of the transaction if it's not already set. + +The 'query' is analyzed to identify specific record keys and their corresponding values, and it creates corresponding 'Operation' +objects in the 'data_op_list'. + +Returns: +None +""" +def insert_record(op_time, txn_num, txn, data_op_list): + if txn[txn_num].begin_ts == -1 and op_time != 0: + txn[txn_num].begin_ts = op_time + key = find_data(query, "(") + value = find_data(query, ",") + data_op_list[key].append(Operation("I", txn_num, op_time, value)) + + +""" +Set the end timestamp for a transaction. + +Args: +- op_time (int): The operation time when the transaction ends. +- txn_num (int): The transaction number. +- txn (list): A list of transactions. + +This function sets the 'end_ts' attribute of a transaction specified by 'txn_num' to the given 'op_time'. It marks the end of the +transaction's execution. + +Returns: +None +""" +def end_record(op_time, txn_num, txn): + txn[txn_num].end_ts = op_time + + +""" +Record and process database operations. + +Args: +- total_num (int): The total number of database operations. +- query (str): The SQL query representing a database operation. +- txn (list): A list of transactions. +- data_op_list (list): A list of data operations. +- version_list (list): A list of version information for data operations. + +This function records and processes database operations based on the provided SQL query. It updates the transaction list, data +operation list, and version list accordingly. The 'total_num' parameter specifies the total number of database operations. + +Returns: +str: An error message (if any), or an empty string if the operation is successful. +""" +def operation_record(total_num, query, txn, data_op_list, version_list): + error_message = "" + op_time = find_data(query, "Q") + txn_num = find_data(query, "T") + if op_time == 0 and query.find("INSERT") != -1: + init_record(query, version_list) + return error_message + if query.find("returnresult") != -1: + error_message = readVersion_record(query, op_time, data_op_list, version_list) + return error_message + if query.find("finished") != -1: + set_finish_time(op_time, data_op_list, query, txn, version_list) + return error_message + if op_time == -1 or txn_num == -1: + return error_message + if query.find("SELECT") != -1: + read_record(op_time, txn_num, total_num, txn, data_op_list) + return error_message + elif query.find("UPDATE") != -1: + write_record(op_time, txn_num, txn, data_op_list) + return error_message + elif query.find("DELETE") != -1: + delete_record(op_time, txn_num, txn, data_op_list) + return error_message + elif query.find("INSERT") != -1: + insert_record(op_time, txn_num, txn, data_op_list) + return error_message + elif query.find("COMMIT") != -1: + if op_time != 0: + end_record(op_time, txn_num, txn) + return error_message + return error_message + + + +""" +Remove unfinished operations from the data operation list. + +Args: +- data_op_list (list): A list of data operations. + +This function iterates through the data operation list and removes any unfinished operations based on their operation time. +Unfinished operations are those with an operation time less than 10,000,000. + +Returns: +None +""" +# remove failed statements to prevent redundant edges from being built +def remove_unfinished_operation(data_op_list): + for list1 in data_op_list: + for i, op in enumerate(list1): + if op.op_time < 10000000: + list1.pop(i) + +""" +Check for cycles in a directed graph using topological sorting. + +Args: +- edge (List[List[Edge]]): A list representing the directed edges in the graph. +- indegree (List[int]): A list representing the in-degrees of nodes in the graph. +- total (int): The total number of nodes in the graph. + +This function checks for cycles in a directed graph by performing topological sorting. It takes as input the directed edges (`edge`), +in-degrees of nodes (`indegree`), and the total number of nodes in the graph (`total`). + +Returns: +bool: True if a cycle is detected, False otherwise. +""" +# toposort to determine whether there is a cycle +def check_cycle(edge, indegree, total): + q = Queue.Queue() + for i, degree in enumerate(indegree): + if degree == 0: q.put(i) + ans = [] + while not q.empty(): + now = q.get() + ans.append(now) + for val in edge[now]: + next_node = val.out + indegree[next_node] -= 1 + if indegree[next_node] == 0: + q.put(next_node) + if len(ans) == total: + return False + return True + + +""" +Perform depth-first search (DFS) to find and print loops in a directed graph. + +Args: +- result_folder (str): The path to the folder where the results will be saved. +- ts_now (str): The current timestamp or identifier for result file naming. +- now (int): The current node being visited. +- type (str): The type of edge leading to the current node ('C' for commit, 'R' for read, 'W' for write, etc.). + +This function performs depth-first search (DFS) to find and print loops in a directed graph. It takes as input the result folder +path (`result_folder`), the current timestamp or identifier for result file naming (`ts_now`), the current node being visited (`now`), +and the type of edge leading to the current node (`type`). + +The function recursively explores the graph, tracking the visited nodes and edges to detect loops. When a loop is found, it is printed +to a result file in the specified result folder. + +Note: This function assumes that global variables like 'visit', 'visit1', 'path', 'edge_type', and 'edge' are defined elsewhere. + +""" +# for loop graphs, print the loop +def dfs(result_folder, ts_now, now, type): + visit1[now] = 1 + if visit[now] == 1: return + visit[now] = 1 + path.append(now) + edge_type.append(type) + for v in edge[now]: + if visit[v.out] == 0: + dfs(result_folder, ts_now, v.out, v.type) + else: + path.append(v.out) + edge_type.append(v.type) + with open(result_folder + "/check_result" + ts_now + ".txt", "a+") as f: + for i in range(0, len(path)): + f.write(str(path[i])) + if i != len(path) - 1: f.write("->" + edge_type[i+1] + "->") + f.write("\n\n") + path.pop() + edge_type.pop() + path.pop() + edge_type.pop() + visit[now] = 0 + + +""" +Print the paths in a directed graph to a result file. + +Args: +- result_folder (str): The path to the folder where the results will be saved. +- ts_now (str): The current timestamp or identifier for result file naming. +- edge (list of lists): A list of lists representing the directed edges in the graph. + +This function prints the paths in a directed graph to a result file. It takes as input the result folder path (`result_folder`), +the current timestamp or identifier for result file naming (`ts_now`), and a list of lists (`edge`) representing the directed edges +in the graph. + +The function iterates through the edges and writes the paths to the result file in the specified result folder. + +""" +def print_path(result_folder, ts_now, edge): + with open(result_folder + "/check_result" + ts_now + ".txt", "a+") as f: + flag = 0 + for i in range(len(edge)): + for v in edge[i]: + if flag == 0: + flag = 1 + else: + f.write(", ") + f.write(str(i) + "->" + v.type + "->" + str(v.out)) + f.write("\n\n") + + +""" +Output the result of cycle detection to a result file. + +Args: +- file (str): The name of the file or input source being analyzed. +- result_folder (str): The path to the folder where the results will be saved. +- ts_now (str): The current timestamp or identifier for result file naming. +- IsCyclic (str): A string indicating whether a cycle was detected. + +This function outputs the result of cycle detection to a result file. It takes as input the name of the file or input source being +analyzed (`file`), the result folder path (`result_folder`), the current timestamp or identifier for result file naming (`ts_now`), +and a string (`IsCyclic`) indicating whether a cycle was detected. + +The function writes the result, including the file name and the cyclic status, to the specified result file in the result folder. + +""" +def output_result(file, result_folder, ts_now, IsCyclic): + with open(result_folder + "/check_result" + ts_now + ".txt", "a+") as f: + f.write(file + ": " + IsCyclic + "\n") + + +""" +Print an error message to a result file. + +Args: +- result_folder (str): The path to the folder where the results will be saved. +- ts_now (str): The current timestamp or identifier for result file naming. +- error_message (str): The error message to be printed. + +This function prints an error message to a result file. It takes as input the result folder path (`result_folder`), the current +timestamp or identifier for result file naming (`ts_now`), and the error message (`error_message`) to be printed. + +The function appends the error message to the specified result file in the result folder and adds a newline for separation. + +""" +def print_error(result_folder, ts_now, error_message): + with open(result_folder + "/check_result" + ts_now + ".txt", "a+") as f: + f.write(error_message + "\n") + f.write("\n\n") + + +run_result_folder = "pg/serializable" +result_folder = "check_result/" + run_result_folder +do_test_list = "do_test_list.txt" +#ts_now = "_2param_3txn_insert" +ts_now = time.strftime("%Y%m%d_%H%M%S", time.localtime()) +if not os.path.exists(result_folder): + os.makedirs(result_folder) + +with open(do_test_list, "r") as f: + files = f.readlines() +for file in files: + file = file.replace("\n", "") + file = file.replace(" ", "") + if file == "": + continue + if file[0] == "#": + continue + with open(run_result_folder + "/" + file + ".txt", "r") as f: + lines = f.readlines() + + total_num = get_total(lines) # total number of variables + txn = [Txn() for i in range(total_num + 2)] # total num of transaction + data_op_list = [[] for i in range(total_num + 2)] # record every operation that occurs on the variable + edge = [[] for i in range(total_num + 2)] # all edges from the current point + indegree = [0] * (total_num + 2) # in-degree of each point + visit = [0] * (total_num + 2) # in dfs, whether the current point has been visited + visit1 = [0] * (total_num + 2) # we will only use unvisited points as the starting point of the dfs + path = [] # points in cycle + edge_type = [] # edge type of the cycle + version_list = [[] for i in range(total_num + 2)] + go_end = False # if test result is "Rollback" or "Timeout", we will don't check + + error_message = "" + for query in lines: + query = query.replace("\n", "") + query = query.replace(" ", "") + if query.find("Rollback") != -1 or query.find("Timeout") != -1: + go_end = True + error_message = operation_record(total_num, query, txn, data_op_list, version_list) + if error_message != "": + break + + if error_message != "": + output_result(file, result_folder, ts_now, "Error") + print_error(result_folder, ts_now, error_message) + continue + + cycle = False + remove_unfinished_operation(data_op_list) + build_graph(data_op_list, indegree, edge, txn) + if not go_end: + cycle = check_cycle(edge, indegree, total_num + 2) + if cycle: + output_result(file, result_folder, ts_now, "Cyclic") + for i in range(total_num + 2): + if visit1[i] == 0: + dfs(result_folder, ts_now, i, "null") + else: + output_result(file, result_folder, ts_now, "Avoid") + print_path(result_folder, ts_now, edge) diff --git a/src/dbtest/src/mda_generate.py b/src/dbtest/src/mda_generate.py new file mode 100644 index 00000000..c10768a7 --- /dev/null +++ b/src/dbtest/src/mda_generate.py @@ -0,0 +1,918 @@ +# /* +# * Tencent is pleased to support the open source community by making 3TS available. +# * +# * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. The below software +# * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All +# * Tencent Modifications are Copyright (C) THL A29 Limited. +# * +# * Author: xenitchen axingguchen tsunaouyang (xenitchen,axingguchen,tsunaouyang@tencent.com) +# * +# */ + +from operator import truediv +import os +import sys + + +class OptionException(Exception): + pass + + +class Txn: + def __init__(self): + self.begin_ts = -1 + self.end_ts = max_time + + +class Operation: + def __init__(self, op_type, txn_num): + self.op_type = op_type + self.txn_num = txn_num + + +class Wait_Operation: + def __init__(self, op_type, txn_num, op_num): + self.op_type = op_type + self.txn_num = txn_num + self.op_num = op_num + + +""" +Initialize tables for database testing. + +Args: +- file_name (str): The name of the file where the SQL statements will be written. +- sql_count (int): The count of SQL statements to generate. +- txn_count (int): The count of transactions. +- table_num (int): The number of tables to create. +- db_type (str): The type of database being used. +- test_type (str): The type of test being conducted. + +Returns: +int: The data_num value, which depends on the database type and determines the number of data columns in each table. + +This function initializes tables for database testing by generating SQL statements and writing them to the specified +file (`file_name`). The SQL statements include DROP TABLE IF EXISTS and CREATE TABLE statements for the specified +number of tables (`table_num`). + +The function takes into account the `db_type` and `test_type` to determine the structure of the created tables and +the number of data columns. It returns the `data_num` value, which is an integer that depends on the database type +and determines the number of data columns in each table. + +""" +def init_table(file_name, sql_count, txn_count, table_num, db_type, test_type): + data_num = 2 + with open(file_name, "a+") as file_test: + for i in range(1, table_num + 1): + drop_sql = str(sql_count) + "-" + str(txn_count) + "-" + "DROP TABLE IF EXISTS t" + str(i) + ";\n" + file_test.write(drop_sql) + if test_type == "single": + for i in range(1, table_num + 1): + # MySQL 5.1 add InnoDB for table + # create_sql = str(sql_count) + "-" + str(txn_count) + "-" + "CREATE TABLE t" + str(i) + \ + # " (k INT PRIMARY KEY, v INT) ENGINE=InnoDB;\n" + create_sql = str(sql_count) + "-" + str(txn_count) + "-" + "CREATE TABLE t" + str(i) + \ + " (k INT PRIMARY KEY, v INT);\n" + file_test.write(create_sql) + elif db_type == "tdsql" or db_type == "ob_oracle": + data_num = 4 + for i in range(1, table_num + 1): + create_sql = str(sql_count) + "-" + str(txn_count) + "-" + "CREATE TABLE t" + str(i) + \ + " (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) " \ + "(PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));\n" + file_test.write(create_sql) + elif db_type == "crdb": + data_num = 4 + for i in range(1, table_num + 1): + create_sql = str(sql_count) + "-" + str(txn_count) + "-" + "CREATE TABLE t" + str(i) + \ + " (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) " \ + "(PARTITION p0 VALUES FROM (MINVALUE) TO (2), " \ + "PARTITION p1 VALUES FROM (2) TO (MAXVALUE));\n" + file_test.write(create_sql) + else: + for i in range(1, table_num + 1): + create_sql = str(sql_count) + "-" + str(txn_count) + "-" + "CREATE TABLE t" + str(i) + \ + " (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), " \ + "PARTITION p1 VALUES LESS THAN(4));\n" + file_test.write(create_sql) + return data_num + + +""" +Check if two transactions are concurrent based on their start and end times. + +Args: +- data1: Information about the first transaction. +- data2: Information about the second transaction. +- txn: A list of transaction objects. + +Returns: +bool: True if the transactions are concurrent, False otherwise. +""" +# if both transactions are running +# or the start time of the second transaction is less than the end time of the first transaction +# we think they are concurrent +def check_concurrency(txn_num1, txn_num2, txn): + if txn[txn_num2].begin_ts < txn[txn_num1].end_ts: + return True + elif txn[txn_num1].begin_ts < txn[txn_num2].end_ts: + return True + else: + return False + + +""" +Check if a specific operation type exists in a transaction. + +Args: +- txn (list): The list of transactions. +- data_op_list (list): The list of data operations. +- op (str): The operation type to check for. +- op_num (int): The operation number to check. +- txn_count (int): The total number of transactions. + +Returns: +bool: True if the specified operation type exists in the transaction and is concurrent; False otherwise. + +This function checks if a specific operation type (`op`) exists in a transaction (`txn`) by examining +the list of data operations (`data_op_list`) associated with that operation number (`op_num`). If the +specified operation type exists in the transaction and is concurrent with other transactions, the +function returns True; otherwise, it returns False. + +The function is designed to help identify and handle concurrent operations in a transactional context. + +""" +def check_exist_op(txn, data_op_list, op, op_num, txn_count): + flag, txn_num = False, 0 + for data in data_op_list[op_num]: + if data.op_type == op: + flag = True + txn_num = data.txn_num + if flag: + if check_concurrency(txn_num, txn_count, txn): + return True + return False + return False + + +""" +Execute an SQL operation within a transaction. + +Args: +- IsPredicate (bool): A flag indicating whether the operation is a predicate operation. +- file_name (str): The name of the file to write the SQL operation to. +- sql_count (int): The current count of SQL operations. +- txn_count (int): The total number of transactions. +- op_num (int): The operation number. +- op (str): The type of SQL operation to execute. +- data_num (int): The number of data elements involved in the operation. +- txn (list): The list of transactions. +- data_value (list): The values associated with the data elements. +- data_op_list (list): The list of data operations. + +Returns: +int: The updated count of SQL operations after execution. + +This function executes an SQL operation within a transaction context. It takes into account whether the +operation is a predicate operation (IsPredicate flag) and writes the SQL operation to the specified file. +The function also updates the SQL operation count and performs the necessary actions based on the type of +SQL operation. + +The supported SQL operations include: +- Write (W) +- Read (R) +- Predicate (P) +- Insert (I) +- Delete (D) +- Abort (A) +- Commit (C) + +The function returns the updated count of SQL operations after execution. + +""" +def execute_sql(IsPredicate, file_name, sql_count, txn_count, op_num, op, data_num, txn, data_value, data_op_list): + # if check_exist_op(txn, data_op_list, op, op_num, txn_count): + # return sql_count + if op == "W": + if IsPredicate: + sql_count = write_data(file_name, sql_count, txn_count, op_num*2+1, data_num, txn, data_value, data_op_list) + else: + sql_count = write_data(file_name, sql_count, txn_count, op_num, data_num, txn, data_value, data_op_list) + elif op == "R": + if IsPredicate: + sql_count = read_data(file_name, sql_count, txn_count, op_num*2+1, data_num, txn, data_op_list) + else: + sql_count = read_data(file_name, sql_count, txn_count, op_num, data_num, txn, data_op_list) + elif op == "P": + sql_count = read_data_predicate(file_name, sql_count, txn_count, op_num, data_num, txn, data_op_list) + # I and D only works for single test_type now + elif op == "I": + sql_count = insert_data(file_name, sql_count, txn_count, op_num*2+1, 1, 1, data_num, exist, data_value) + elif op == "D": + sql_count = delete_data(file_name, sql_count, txn_count, op_num*2+1, 1, data_num, exist, txn, data_op_list) + elif op == "A": + sql_count = abort_txn(file_name, sql_count, txn_count, txn) + elif op == "C": + sql_count = commit_txn(file_name, sql_count, txn_count, txn) + return sql_count + + +""" +Insert data into a table within a transaction. + +Args: +- file_name (str): The name of the file to write the SQL insert statement to. +- sql_count (int): The current count of SQL operations. +- txn_count (int): The total number of transactions. +- cur_count (int): The current count for data insertion. +- partition_num (int): The partition number for the insert operation. +- insert_table (int): The table number to insert data into. +- data_num (int): The number of data elements to insert. +- exist (list): A list of flags indicating the existence of data elements. +- data_value (list): The values associated with the data elements. + +Returns: +int: The updated count of SQL operations after the insert. + +This function inserts data into a table within a transaction context. It generates an SQL insert statement +based on the provided parameters and writes the statement to the specified file. The function also updates +the SQL operation count and manages the existence of data elements to prevent duplicate inserts. + +The function returns the updated count of SQL operations after the insert. + +""" +def insert_data(file_name, sql_count, txn_count, cur_count, partition_num, insert_table, data_num, exist, + data_value): + with open(file_name, "a+") as file_test: + try: + #if exist[cur_count]: + if False: + raise OptionException + else: + # if it is not initialization, we need to pay attention to whether the transaction should be started + if sql_count != 0 and txn[txn_count].begin_ts == -1: + txn[txn_count].begin_ts = sql_count + begin_sql = str(sql_count) + "-" + str(txn_count) + "-" + "BEGIN;\n" + file_test.write(begin_sql) + sql_count += 1 + exist[cur_count] = True + if data_num == 2: + insert_sql = str(sql_count) + "-" + str(txn_count) + "-" + "INSERT INTO t" + \ + str(insert_table) + " VALUES (" + str(cur_count) + "," + str(cur_count) + ");\n" + else: + insert_sql = str(sql_count) + "-" + str(txn_count) + "-" + "INSERT INTO t" + \ + str(insert_table) + " VALUES (" + str(cur_count) + "," + str(partition_num) + \ + "," + str(cur_count) + "," + str(cur_count) + ");\n" + file_test.write(insert_sql) + data_value[cur_count] = cur_count + except OptionException: + if data_num == 2: + file_test.write("data" + " k=" + str(cur_count) + " already exists, can't insert") + print("data" + " k=" + str(cur_count) + " already exists, can't insert") + else: + file_test.write("data" + " value1=" + str(cur_count) + " already exists, can't insert") + print("data" + " value1=" + str(cur_count) + " already exists, can't insert") + return sql_count + + +""" +Delete data from a table within a transaction. + +Args: +- file_name (str): The name of the file to write the SQL delete statement to. +- sql_count (int): The current count of SQL operations. +- txn_count (int): The total number of transactions. +- cur_count (int): The current count for data deletion. +- delete_table (int): The table number to delete data from. +- data_num (int): The number of data elements to delete. +- exist (list): A list of flags indicating the existence of data elements. +- txn (list): A list of transactions. +- data_op_list (list): A list of data operation records. + +Returns: +int: The updated count of SQL operations after the delete. + +This function deletes data from a table within a transaction context. It generates an SQL delete statement +based on the provided parameters and writes the statement to the specified file. The function also updates +the SQL operation count, manages the existence of data elements, and records the delete operation in the +data operation list. + +The function returns the updated count of SQL operations after the delete. + +""" +def delete_data(file_name, sql_count, txn_count, cur_count, delete_table, data_num, exist, txn, data_op_list): + with open(file_name, "a+") as file_test: + try: + if txn[txn_count].end_ts != max_time: + raise OptionException + else: + if txn[txn_count].begin_ts == -1: + txn[txn_count].begin_ts = sql_count + begin_sql = str(sql_count) + "-" + str(txn_count) + "-" + "BEGIN;\n" + file_test.write(begin_sql) + sql_count += 1 + exist[cur_count] = False + if data_num == 2: + delete_sql = str(sql_count) + "-" + str(txn_count) + "-" + "DELETE FROM t" + \ + str(delete_table) + " WHERE k=" + str(cur_count) + ";\n" + else: + delete_sql = str(sql_count) + "-" + str(txn_count) + "-" + "DELETE FROM t" + \ + str(delete_table) + " WHERE value1=" + str(cur_count) + ";\n" + file_test.write(delete_sql) + data_op_list[cur_count].append(Operation("D", txn_count)) + except OptionException: + file_test.write("the transaction has ended and cannot be read") + print("the transaction has ended and cannot be read") + return sql_count + + +""" +Write data to a table within a transaction, incrementing its value by 1. + +Args: +- file_name (str): The name of the file to write the SQL update statement to. +- sql_count (int): The current count of SQL operations. +- txn_count (int): The total number of transactions. +- op_num (int): The current operation number. +- data_num (int): The number of data elements to write. +- txn (list): A list of transactions. +- data_value (list): A list of data values. +- data_op_list (list): A list of data operation records. + +Returns: +int: The updated count of SQL operations after the write. + +This function writes data to a table within a transaction context, incrementing its value by 1. It generates +an SQL update statement based on the provided parameters and writes the statement to the specified file. +The function also updates the SQL operation count, increments the data value, and records the write operation +in the data operation list. + +The function returns the updated count of SQL operations after the write. + +""" +# when updating data, increment its value by 1 +def write_data(file_name, sql_count, txn_count, op_num, data_num, txn, data_value, data_op_list): + with open(file_name, "a+") as file_test: + try: + #if not exist[op_num] or txn[txn_count].end_ts != max_time: + if txn[txn_count].end_ts != max_time: + raise OptionException + else: + if txn[txn_count].begin_ts == -1: + txn[txn_count].begin_ts = sql_count + begin_sql = str(sql_count) + "-" + str(txn_count) + "-" + "BEGIN;\n" + file_test.write(begin_sql) + sql_count += 1 + if data_num == 2: + write_sql = str(sql_count) + "-" + str(txn_count) + "-" + "UPDATE t1 SET v=" + \ + str(data_value[op_num] + 1) + " WHERE k=" + str(op_num) + ";\n" + else: + write_sql = str(sql_count) + "-" + str(txn_count) + "-" + "UPDATE t" + str(txn_count) + \ + " SET value2=" + str(data_value[op_num] + 1) + " WHERE value1=" + \ + str(op_num) + ";\n" + file_test.write(write_sql) + data_op_list[op_num].append(Operation("W", txn_count)) + data_value[op_num] += 1 + except OptionException: + file_test.write("data doesn't exist or the transaction has ended and cannot be updated") + print("data doesn't exist or the transaction has ended and cannot be updated") + return sql_count + + +""" +Read data from a table within a transaction. + +Args: +- file_name (str): The name of the file to write the SQL read statement to. +- sql_count (int): The current count of SQL operations. +- txn_count (int): The total number of transactions. +- op_num (int): The current operation number. +- data_num (int): The number of data elements to read. +- txn (list): A list of transactions. +- data_op_list (list): A list of data operation records. + +Returns: +int: The updated count of SQL operations after the read. + +This function reads data from a table within a transaction context. It generates an SQL select statement +based on the provided parameters and writes the statement to the specified file. The function also updates +the SQL operation count and records the read operation in the data operation list. + +The function returns the updated count of SQL operations after the read. + +""" +def read_data(file_name, sql_count, txn_count, op_num, data_num, txn, data_op_list): + with open(file_name, "a+") as file_test: + try: + if txn[txn_count].end_ts != max_time: + raise OptionException + else: + if txn[txn_count].begin_ts == -1: + txn[txn_count].begin_ts = sql_count + begin_sql = str(sql_count) + "-" + str(txn_count) + "-" + "BEGIN;\n" + file_test.write(begin_sql) + sql_count += 1 + if data_num == 2: + read_sql = str(sql_count) + "-" + str(txn_count) + "-" + "SELECT * FROM t1 WHERE k=" + \ + str(op_num) + ";\n" + else: + read_sql = str(sql_count) + "-" + str(txn_count) + "-" + "SELECT * FROM t" + str(txn_count) + \ + " WHERE value1=" + str(op_num) + ";\n" + file_test.write(read_sql) + data_op_list[op_num].append(Operation("R", txn_count)) + except OptionException: + file_test.write("the transaction has ended and cannot be read") + print("the transaction has ended and cannot be read") + return sql_count + + +""" +Read data from a table with a predicate (range condition) within a transaction. + +Args: +- file_name (str): The name of the file to write the SQL read statement to. +- sql_count (int): The current count of SQL operations. +- txn_count (int): The total number of transactions. +- op_num (int): The current operation number. +- data_num (int): The number of data elements to read. +- txn (list): A list of transactions. +- data_op_list (list): A list of data operation records. + +Returns: +int: The updated count of SQL operations after the read. + +This function reads data from a table within a transaction context with a predicate (range condition). It generates +an SQL select statement based on the provided parameters and writes the statement to the specified file. +The function also updates the SQL operation count and records the read operation in the data operation list. + +The function returns the updated count of SQL operations after the read. + +""" +def read_data_predicate(file_name, sql_count, txn_count, op_num, data_num, txn, data_op_list): + with open(file_name, "a+") as file_test: + try: + if txn[txn_count].end_ts != max_time: + raise OptionException + else: + if txn[txn_count].begin_ts == -1: + txn[txn_count].begin_ts = sql_count + begin_sql = str(sql_count) + "-" + str(txn_count) + "-" + "BEGIN;\n" + file_test.write(begin_sql) + sql_count += 1 + if data_num == 2: + read_sql = str(sql_count) + "-" + str(txn_count) + "-" + "SELECT * FROM t1 WHERE k>" + \ + str(op_num*2) + " and k<" + str(op_num*2+2) + ";\n" + else: + read_sql = str(sql_count) + "-" + str(txn_count) + "-" + "SELECT * FROM t" + str(txn_count) + \ + " WHERE value1>" + str(op_num*2) + " and value1<" + str(op_num*2+2) + ";\n" + file_test.write(read_sql) + data_op_list[op_num].append(Operation("P", txn_count)) + except OptionException: + file_test.write("the transaction has ended and cannot be read") + print("the transaction has ended and cannot be read") + return sql_count + + +""" +Abort (rollback) a transaction. + +Args: +- file_name (str): The name of the file to write the SQL rollback statement to. +- sql_count (int): The current count of SQL operations. +- txn_count (int): The total number of transactions. +- txn (list): A list of transactions. + +Returns: +int: The updated count of SQL operations after the rollback. + +This function aborts (rolls back) a transaction by generating an SQL rollback statement based on the provided +parameters and writes the statement to the specified file. It updates the SQL operation count and marks the +transaction as ended. If the transaction has already ended, it logs an error message. + +The function returns the updated count of SQL operations after the rollback. + +""" +def abort_txn(file_name, sql_count, txn_count, txn): + with open(file_name, "a+") as file_test: + try: + if txn[txn_count].end_ts != max_time: + raise OptionException + else: + txn[txn_count].end_ts = sql_count + abort_sql = str(sql_count) + "-" + str(txn_count) + "-" + "ROLLBACK;\n" + file_test.write(abort_sql) + except OptionException: + file_test.write("transaction" + str(txn_count) + " ended and can't be rolled back again") + print("transaction" + str(txn_count) + " ended and can't be rolled back again") + return sql_count + + +""" +Commit a transaction. + +Args: +- file_name (str): The name of the file to write the SQL commit statement to. +- sql_count (int): The current count of SQL operations. +- txn_count (int): The total number of transactions. +- txn (list): A list of transactions. + +Returns: +int: The updated count of SQL operations after the commit. + +This function commits a transaction by generating an SQL commit statement based on the provided parameters and +writes the statement to the specified file. It updates the SQL operation count and marks the transaction as ended. +If the transaction has already ended, it logs an error message. + +The function returns the updated count of SQL operations after the commit. + +""" +def commit_txn(file_name, sql_count, txn_count, txn): + with open(file_name, "a+") as file_test: + try: + if txn[txn_count].end_ts != max_time: + raise OptionException + else: + txn[txn_count].end_ts = sql_count + commit_sql = str(sql_count) + "-" + str(txn_count) + "-" + "COMMIT;\n" + file_test.write(commit_sql) + except OptionException: + file_test.write("transaction" + str(txn_count) + " ended and can't be committed again") + print("transaction" + str(txn_count) + " ended and can't be committed again") + return sql_count + + +""" +Execute a check transaction to read data from tables and order the results. + +Args: +- file_name (str): The name of the file to write SQL statements to. +- sql_count (int): The current count of SQL operations. +- txn_count (int): The total number of transactions. +- data_num (int): The number of data columns in each table. +- table_num (int): The total number of tables. + +This function generates and executes a check transaction. It begins the transaction, performs ordered SELECT +queries on all tables to read data, and then commits the transaction. The generated SQL statements are written +to the specified file. + +""" +def execute_check(file_name, sql_count, txn_count, data_num, table_num): + with open(file_name, "a+") as file_test: + begin_sql = str(sql_count) + "-" + str(txn_count) + "-" + "BEGIN;\n" + file_test.write(begin_sql) + sql_count += 1 + for i in range(1, table_num + 1): + if data_num == 2: + read_sql = str(sql_count) + "-" + str(txn_count) + "-" + "SELECT * FROM t1 ORDER BY k;\n" + else: + read_sql = str(sql_count) + "-" + str(txn_count) + "-" + "SELECT * FROM t" + str(i) + \ + " ORDER BY k;\n" + file_test.write(read_sql) + sql_count += 1 + commit_sql = str(sql_count) + "-" + str(txn_count) + "-" + "COMMIT;\n" + file_test.write(commit_sql) + sql_count += 1 + +""" +Check the last operation before the current position in a list of operations. + +Args: +- ops (list): A list of operations. +- pos (int): The current position in the list. + +Returns: +- last_op_type (str): The type of the last operation before the current position. +- last_txn_num (int): The transaction number of the last operation before the current position. + +This function examines the list of operations and checks the last operation that occurred before the current position. +It returns the type of that operation (e.g., "C" for commit, "A" for abort, or a specific operation type) and the +corresponding transaction number. + +""" +# check if the txn commit/abort before or not +def get_last_op(ops, pos): + if pos == 0: + return -1, -1 + if ops[pos-1][1] == "C" or ops[pos-1][1] == "A": + return ops[pos-1][2], int(ops[pos-1][3]) + else: + return ops[pos-1][1], int(ops[pos-1][2]) + +""" +Process the first operation of a Partial Order Pair (POP) for a given transaction. + +Args: +- IsPredicate (bool): Indicates whether the operation is a predicate operation. +- num (int): The number of operations in the POP. +- ops (list): A list of operations in the POP. +- file_name (str): The name of the file where SQL queries are logged. +- sql_count (int): The current count of SQL queries. +- txn_count (int): The current transaction count. +- data_num (int): The number of data parameters. +- txn (list): A list of transactions. +- data_value (list): A list of data values. +- data_op_list (list): A list of data operations. + +Returns: +- sql_count (int): The updated count of SQL queries after processing the first operation of the POP. + +This function processes the first operation of a Partial Order Pair (POP) for a given transaction. It checks whether +the last operation before the current operation has the same type and number. If not, it executes the SQL query for +the current operation, updates the SQL query count, and advances the transaction count. The function returns the +updated SQL query count. + +""" +# process first operation of a POP +def execute_first(IsPredicate, num, ops, file_name, sql_count, txn_count, data_num, txn, data_value, data_op_list): + for i in range(num): + op1 = ops[i][0] + if ops[i][1] == "C" or ops[i][1] == "A": + need_ac[txn_count] = ops[i][1] + op_num = int(ops[i][3:]) + else: + op_num = int(ops[i][2:]) + last_op_type, last_op_num = get_last_op(ops, i) + if last_op_num == op_num and last_op_type == op1: + return sql_count + sql_count = execute_sql(IsPredicate, file_name, sql_count, txn_count, op_num, op1, data_num, txn, data_value, data_op_list) + sql_count += 1 + txn_count += 1 + if txn_count == num + 1: txn_count = 1 + return sql_count + +""" +Process the second operation of a Partial Order Pair (POP) for a given transaction. + +Args: +- IsPredicate (bool): Indicates whether the operation is a predicate operation. +- num (int): The number of operations in the POP. +- ops (list): A list of operations in the POP. +- need_ac (list): A list indicating whether each operation requires an "AC" (Abort or Commit) operation. +- file_name (str): The name of the file where SQL queries are logged. +- sql_count (int): The current count of SQL queries. +- txn_count (int): The current transaction count. +- data_num (int): The number of data parameters. +- txn (list): A list of transactions. +- data_value (list): A list of data values. +- data_op_list (list): A list of data operations. + +Returns: +- sql_count (int): The updated count of SQL queries after processing the second operation of the POP. + +This function processes the second operation of a Partial Order Pair (POP) for a given transaction. It iterates +through the list of operations, executes the SQL queries for each operation, updates the SQL query count, and +advances the transaction count. If an operation requires an "AC" (Abort or Commit) operation, it is also executed. +The function returns the updated SQL query count. + +""" +# process second operation of a POP +def execute_second(IsPredicate, num, ops, need_ac, file_name, sql_count, txn_count, data_num, txn, data_value, data_op_list): + for i in range(num): + if ops[i][1] == "C" or ops[i][1] == "A": + op2 = ops[i][2] + op_num = int(ops[i][3:]) + else: + op2 = ops[i][1] + op_num = int(ops[i][2:]) + sql_count = execute_sql(IsPredicate, file_name, sql_count, txn_count, op_num, op2, data_num, txn, data_value, data_op_list) + sql_count += 1 + if need_ac[txn_count] != "NO": + sql_count = execute_sql(IsPredicate, file_name, sql_count, txn_count, i, need_ac[txn_count], data_num, + txn, data_value, data_op_list) + sql_count += 1 + txn_count += 1 + if txn_count == num + 1: txn_count = 1 + return sql_count + + +""" +Execute a transaction considering the order of operations for conflict resolution. + +Args: +- IsPredicate (bool): Indicates whether the operation is a predicate operation. +- num (int): The number of operations in the transaction. +- ops (list): A list of operations in the transaction. +- need_ac (list): A list indicating whether each operation requires an "AC" (Abort or Commit) operation. +- file_name (str): The name of the file where SQL queries are logged. +- sql_count (int): The current count of SQL queries. +- data_num (int): The number of data parameters. +- txn (list): A list of transactions. +- data_value (list): A list of data values. +- wait_op_list (list): A list of wait operations. +- data_op_list (list): A list of data operations. + +Returns: +- sql_count (int): The updated count of SQL queries after executing the transaction. + +This function executes a transaction while considering the order of operations for conflict resolution. +It iterates through the list of operations, executes SQL queries, and manages the execution order to +resolve conflicts. The function returns the updated SQL query count. + +""" +# if the data of adjacent pattern operations are not the same, +# reorder statements so that conflict-free statements execute first +# otherwise, execute in the original order +# such as RW0-RW1, we will execute as order R1[x]-R2[y]-W2[x]-W1[y] +# IR0-ICW1-RW1, we will execute as order I1[x]-I2[y]-R2[x]-C2-W3[y]-R3[y]-W1[y] +def execute_txn(IsPredicate, num, ops, need_ac, file_name, sql_count, data_num, txn, data_value, wait_op_list,data_op_list): + for i in range(num): + op1 = ops[i][0] + if ops[i][1] == "C" or ops[i][1] == "A": + op2 = ops[i][2] + need_ac[i+1] = ops[i][1] + op_num = int(ops[i][3:]) + else: + op2 = ops[i][1] + op_num = int(ops[i][2:]) + next_txn_count = i + 2 + if next_txn_count == num+1: next_txn_count = 1 + + if i == 0: + sql_count = execute_sql(IsPredicate, file_name, sql_count, i+1, op_num, op1, data_num, txn, data_value, data_op_list) + sql_count += 1 + wait_op_list.append(Wait_Operation(op2, next_txn_count, op_num)) + else: + last_op_type, last_op_num = get_last_op(ops, i) + if last_op_num == op_num: + #if last_op_num and last_op_type both are same as now operation, we will only execute later operation + if op1 == last_op_type: + wait_op_list.pop() + for data in wait_op_list: + sql_count = execute_sql(IsPredicate, file_name, sql_count, data.txn_num, data.op_num, data.op_type, data_num, txn, data_value, data_op_list) + sql_count += 1 + if need_ac[data.txn_num] != "NO" and data.op_num != op_num: + sql_count = execute_sql(IsPredicate, file_name, sql_count, data.txn_num, data.op_num, need_ac[data.txn_num], data_num, txn, data_value, data_op_list) + sql_count += 1 + wait_op_list = [] + + sql_count = execute_sql(IsPredicate, file_name, sql_count, i+1, op_num, op1, data_num, txn, data_value, data_op_list) + sql_count += 1 + + if need_ac[i+1] != "NO": + sql_count = execute_sql(IsPredicate, file_name, sql_count, i+1, op_num, need_ac[i+1], data_num, txn, data_value, data_op_list) + sql_count += 1 + + sql_count = execute_sql(IsPredicate, file_name, sql_count, next_txn_count, op_num, op2, data_num, txn, data_value, data_op_list) + sql_count += 1 + else: + sql_count = execute_sql(IsPredicate, file_name, sql_count, i+1, op_num, op1, data_num, txn, data_value, data_op_list) + sql_count += 1 + + if len(wait_op_list) == 0: + if need_ac[i+1] != "NO": + sql_count = execute_sql(IsPredicate, file_name, sql_count, i+1, op_num, need_ac[i+1], data_num, txn, data_value, data_op_list) + sql_count += 1 + wait_op_list.append(Wait_Operation(op2, next_txn_count, op_num)) + + for data in wait_op_list: + sql_count = execute_sql(IsPredicate, file_name, sql_count, data.txn_num, data.op_num, data.op_type, data_num, txn, data_value, data_op_list) + sql_count += 1 + + if need_ac[data.txn_num] != "NO": + sql_count = execute_sql(IsPredicate, file_name, sql_count, data.txn_num, data.op_num, need_ac[data.txn_num], data_num, txn, data_value, data_op_list) + sql_count += 1 + wait_op_list = [] + + return sql_count + + +""" +Write a description for the test case to the specified file. + +Args: +- file_name (str): The name of the file where the description will be written. +- txn_num (int): The number of transactions. +- op_num (int): The number of operations. +- data_num (int): The number of data parameters. + +This function writes a description for the test case to the specified file. The description includes +information about the test case pattern, parameters, and structure. + +""" +def write_description(file_name, txn_num, op_num, data_num): + with open(file_name, "w+") as file_test: + description = "#\n" + description += "# Test case description\n" + description += "# POPG Pattern: " + patterns = file_name.split("/")[-1].split(".")[0].split("-") + for i in range(len(patterns)): + description += "T" + str(i+1) + " ==" + patterns[i] + "==> " + description += "T1\n" + description += "# Parameters: #column=2 #txn=" + str(txn_num) + " #operations=" + str(op_num) + " #variable=" + str(data_num) + "\n" + description += "# Structure: Sequence-Session-Query" + "\n" + description += "# When sequence=0, it is a preparation phase, otherwise an execution phase" + "\n" + description += "#\n" + file_test.write(description) + +# target folder +case_folder = "t/test_case_v2" +# pattern files +do_test_list = "do_test_list.txt" +# [single,distributed] => for local test or distributed test +db_type = sys.argv[1] +# [tdsql] => for pg/sql standard queries +test_type = sys.argv[2] +max_time = 99999999999999999999 +with open(do_test_list, "r") as f: + lines = f.readlines() +if not os.path.exists(case_folder): + os.mkdir(case_folder) + + +# for each popg, generate popg test case and write into file. +for popg in lines: + popg = popg.replace("\n", "") + popg = popg.replace(" ", "") + if popg == "": + continue + # check whether popg is predicate operation + if popg.find("I") != -1 or popg.find("D") != -1 or popg.find("P") != -1: + IsPredicate = True + else: + IsPredicate = False + if popg[0] == "#": + continue + ops = popg.split('-') + + path_store = case_folder + if not os.path.exists(path_store): + os.mkdir(path_store) + file_name = path_store + "/" + popg + ".txt" + + num = len(ops) + if (db_type == "tdsql" or db_type == "crdb") and test_type == "dist": + table_num = num + else: + table_num = 1 + sql_count, txn_count = 0, 1 + + # description + write_description(file_name, num, num, num) + + # preparation + data_num = init_table(file_name, sql_count, txn_count, table_num, db_type, test_type) + + # exist means whether data can be inserted, only data that doesn't exist can be inserted + # when the first write of one object is insert, then we will not insert the data in firsthand + exist = [False] * (2*num+2) + visit = [False] * (2*num+2) + data_value = {} + for i in range(2*num+2): + data_value[i] = 0 + cur_count, partition_num, insert_table = 0, 1, 1 + if IsPredicate: + insert_num = num + 1 + else: + insert_num = num + + # barrier data insertion + for i in range(1, insert_num + 1): + insert_data(file_name, sql_count, txn_count, cur_count, partition_num, insert_table, data_num, exist, + data_value) + if IsPredicate: + cur_count += 2 + else: + cur_count += 1 + partition_num ^= 2 + insert_table += 1 + if table_num == 1: insert_table = 1 + + # for a data, if W and D operation at an earlier time, we will insert this data when initialized + for i in range(len(ops)): + if ops[i][1] == "C" or ops[i][1] == "A": + op_num = int(ops[i][3:]) + else: + op_num = int(ops[i][2:]) + if IsPredicate and not visit[op_num]: + visit[op_num] = True + if ops[i][0] == "R" or ops[i][0] == "P": + if ops[i].find("I") == -1: + insert_data(file_name, sql_count, txn_count, 2*op_num+1, partition_num, insert_table, data_num, exist, data_value) + elif ops[i][0] == "D" or ops[i][0] == "W": + insert_data(file_name, sql_count, txn_count, 2*op_num+1, partition_num, insert_table, data_num, exist, + data_value) + partition_num ^= 2 + insert_table += 1 + if table_num == 1: insert_table = 1 + + # execution + txn = [Txn() for i in range(num + 2)] + wait_op_list = [] + data_op_list = [[] for i in range(2*num + 2)] + + # need_ac means whether need abort/commit immediately and if necessary which operation need to be done + need_ac = ["NO"] * (num + 1) + sql_count += 1 + sql_count = execute_txn(IsPredicate, num, ops, need_ac, file_name, sql_count, data_num, txn, data_value, wait_op_list,data_op_list) + + # reorder statements so that conflict-free statements execute first + # sql_count = execute_first(IsPredicate, num, ops, file_name, sql_count, txn_count, data_num, txn, data_value, data_op_list) + # txn_count = 2 + # sql_count = execute_second(IsPredicate, num, ops, need_ac, file_name, sql_count, txn_count, data_num, txn, data_value, data_op_list) + for i in range(1, num + 1): + if txn[i].end_ts == max_time: + commit_txn(file_name, sql_count, i, txn) + sql_count += 1 + + # verification + # execute_check(file_name, sql_count, num + 1, data_num, table_num) diff --git a/src/dbtest/src/mongodb_test.cc b/src/dbtest/src/mongodb_test.cc new file mode 100644 index 00000000..1c480ac0 --- /dev/null +++ b/src/dbtest/src/mongodb_test.cc @@ -0,0 +1,81 @@ +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +using bsoncxx::builder::stream::close_array; +using bsoncxx::builder::stream::close_document; +using bsoncxx::builder::stream::document; +using bsoncxx::builder::stream::finalize; +using bsoncxx::builder::stream::open_array; +using bsoncxx::builder::stream::open_document; + +using bsoncxx::builder::basic::kvp; +using bsoncxx::builder::basic::make_document; +using bsoncxx::to_json; + +using namespace mongocxx; + +int main() { + // The mongocxx::instance constructor and destructor initialize and shut down the driver, + // respectively. Therefore, a mongocxx::instance must be created before using the driver and + // must remain alive for as long as the driver is in use. + //mongocxx::instance inst{}; + instance inst; + //mongocxx::client client{mongocxx::uri{"mongodb://9.134.39.34:27017/admin"}}; + client client{mongocxx::uri{"mongodb://9.134.39.34:27017/admin"}}; + write_concern wc_majority{}; + wc_majority.acknowledge_level(write_concern::level::k_majority); + + read_concern rc_snapshot{}; + rc_snapshot.acknowledge_level(read_concern::level::k_snapshot); + + read_preference rp_primary{}; + rp_primary.mode(read_preference::read_mode::k_primary); + + auto db = client["testdb"]; + + auto coll_old1 = client["testdb"]["coll1"]; + auto coll_old2 = client["testdb"]["coll2"]; + coll_old1.drop(wc_majority); + coll_old2.drop(wc_majority); + + auto coll1 = client["testdb"]["coll1"]; + auto coll2 = client["testdb"]["coll2"]; + + options::transaction opts; + opts.write_concern(wc_majority); + opts.read_concern(rc_snapshot); + opts.read_preference(rp_primary); + + auto session1 = client.start_session(); + session1.start_transaction(opts); + std::cout << "session1 start tx" << std::endl; + + auto session2 = client.start_session(); + session2.start_transaction(opts); + std::cout << "session2 start tx" << std::endl; + + auto doc_value1 = document{} << "k" << "0" << "v" << "0" << finalize; + auto doc_value2 = document{} << "k" << "1" << "v" << "0" << finalize; + + coll1.insert_one(session1, doc_value1.view()); + std::cout << "session1 insert k:0 v:0" << std::endl; + session1.commit_transaction(); + std::cout << "session1 commit" << std::endl; + + //coll2.insert_one(session2, doc_value2.view()); + + auto cursor = coll1.find(session2, document{} << "k" << "0" << finalize); + + for (auto&& doc : cursor) { + std::cout << "doc:" + to_json(doc) << std::endl; + } +} diff --git a/src/dbtest/src/odbc.cc b/src/dbtest/src/odbc.cc new file mode 100644 index 00000000..fbf2afd5 --- /dev/null +++ b/src/dbtest/src/odbc.cc @@ -0,0 +1,96 @@ +#include +#include +#include +#include + +/** + * Retrieves error information associated with a SQL handle. + * + * @param handle_type The type of SQL handle ('stmt' for statement handle or 'dbc' for database connection handle). + * @param handle The SQL handle to retrieve error information from. + * @param ErrInfo A buffer to store the error message. + * @param SQLState A buffer to store the SQL state code. + */ +void ErrInfoWithStmt(std::string handle_type, SQLHANDLE& handle, SQLCHAR ErrInfo[], SQLCHAR SQLState[]) { + SQLINTEGER NativeErrorPtr = 0; + SQLSMALLINT TextLengthPtr = 0; + if ("stmt" == handle_type) { + SQLGetDiagRec(SQL_HANDLE_STMT, handle, 1, SQLState, &NativeErrorPtr, ErrInfo, 256, &TextLengthPtr); + } + if ("dbc" == handle_type) { + SQLGetDiagRec(SQL_HANDLE_DBC, handle, 1, SQLState, &NativeErrorPtr, ErrInfo, 256, &TextLengthPtr); + } +} + +/** + * Executes an SQL query and retrieves results. + * + * This function initializes the ODBC environment, establishes a database connection, + * allocates a statement handle, and executes an SQL query. It can be used to interact + * with a database and retrieve data. + * + * @note To execute specific SQL queries, you can uncomment the relevant lines + * within the function. + */ +void exec_sql() { + SQLHENV m_hEnviroment; + SQLHDBC m_hDatabaseConnection; + SQLHSTMT m_hStatement; + SQLRETURN ret; + SQLLEN length; + // get env + ret = SQLAllocHandle(SQL_HANDLE_ENV, NULL, &m_hEnviroment); + if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO) { + std::cout << "get env failed" << std::endl; + } + SQLSetEnvAttr(m_hEnviroment, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_ODBC3, SQL_IS_INTEGER); + // get conn + ret = SQLAllocHandle(SQL_HANDLE_DBC, m_hEnviroment, &m_hDatabaseConnection); + if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO) { + std::cout << "get conn failed" << std::endl; + } + ret = SQLConnect( m_hDatabaseConnection + ,(SQLCHAR*)"mongodb", SQL_NTS + ,(SQLCHAR*)"test123", SQL_NTS + ,(SQLCHAR*)"Ly.123456", SQL_NTS); + + if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO) { + std::cout << "connected failed" << std::endl; + } + // get stmt + ret = SQLAllocHandle(SQL_HANDLE_STMT, m_hDatabaseConnection, &m_hStatement); + if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO) { + std::cout << "get stmt failed" << std::endl; + } + // execute sql + //ret = SQLExecDirect(m_hStatement, (SQLCHAR*)"BEGIN TRANSACTION;", SQL_NTS); + //std::cout << "BEGIN TRANSACTION;" << std::endl; + //ret = SQLExecDirect(m_hStatement, (SQLCHAR*)"update t1 set v=1 where k=1;", SQL_NTS); + //std::cout << "update t1 set v=1 where k=1;" << std::endl; + //ret = SQLExecDirect(m_hStatement, (SQLCHAR*)"COMMIT TRANSACTION;", SQL_NTS); + //std::cout << "COMMIT TRANSACTION;" << std::endl; + if (ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO) { + std::cout << "success" << std::endl; + } else if (ret == SQL_ERROR) { + SQLCHAR ErrInfo[256]; + SQLCHAR SQLState[256]; + ErrInfoWithStmt("stmt", m_hStatement, ErrInfo, SQLState); + std::cerr << "execute sql: 'SELECT * from t1 WHERE k = 1;' failed, reason: " << ErrInfo << " errcode: " << SQLState << std::endl; + } + SQLCHAR k[20]={0}, v[20]={0}; + SQLBindCol(m_hStatement, 1, SQL_C_CHAR, (void*)k, sizeof(k), &length); + SQLBindCol(m_hStatement, 2, SQL_C_CHAR, (void*)v, sizeof(v), &length); + // get next row + //while(SQL_NO_DATA != SQLFetch(m_hStatement)) { + // std::cout << "k:" << k << "v:" << v << std::endl; + //} + // release + SQLFreeHandle(SQL_HANDLE_STMT, m_hStatement); + SQLFreeHandle(SQL_HANDLE_DBC, m_hDatabaseConnection); + SQLFreeHandle(SQL_HANDLE_ENV, m_hEnviroment); +} + +int main() { + exec_sql(); + return 0; +} diff --git a/src/dbtest/src/random_do_list.py b/src/dbtest/src/random_do_list.py new file mode 100644 index 00000000..f044368c --- /dev/null +++ b/src/dbtest/src/random_do_list.py @@ -0,0 +1,144 @@ +# /* +# * Tencent is pleased to support the open source community by making 3TS available. +# * +# * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. The below software +# * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All +# * Tencent Modifications are Copyright (C) THL A29 Limited. +# * +# * Author: xenitchen axingguchen tsunaouyang (xenitchen,axingguchen,tsunaouyang@tencent.com) +# * +# */ + +from operator import index +from pprint import pprint +import random +import sys +import os + +#op_set = ["RW", "WR", "WW", "IP", "PI", "DP", "PD", "IR", "RI", "DR", "RD", "RCW", "WCR", "WCW", "ICP", "PCI", "DCP", "PCD", "ICR", "RCI", "DCR", "RCD"] +#op_set = ["RW", "WR", "IP", "PI", "DP", "PD"] +op_set = ["P", "R", "W", "I"] # operations involved in the case +illegal_op_set = ["RR", "RP", "PR", "PP"] # patterns can't occur in the case +do_test_list = "do_test_list.txt" + +total_test_num = 1 +min_txn = 2 +max_txn = 20 + +""" +Decide which variable to operate twice. + +Args: +- data_count (list): A list of integers representing the current count of operations for each variable. +- total_num (int): The total number of operations counted so far. +- target_num (int): The target number of operations where some variables should be operated twice. + +This function uses depth-first search (DFS) to explore different combinations of variables to operate twice. +If data_num = 3, target_num = 5, and data_count = [2, 1, 2], it means the first and third variables are operated twice. + +""" +def dfs(data_count, total_num, target_num): + s = "" + for v in data_count: + s += str(v) + if v > 2: + return + if total_num == target_num and visit.count(s) == 0: + visit.append(s) + res = [] + data_count1 = [] + for v in data_count: + data_count1.append(v) + dfs1(data_count1, res, total_num) + for i in range(data_num): + data_count[i] += 1 + if total_num <= target_num: + dfs(data_count, total_num+1, target_num) + data_count[i] -= 1 + + +""" +Generate test cases based on the current data_count. + +Args: +- data_count (list): A list of integers representing the current count of operations for each variable. +- res (list): A list to store the generated test case. +- total_num (int): The total number of operations to be generated. + +This function recursively generates test cases based on the given data_count. It explores different +combinations of operations for each variable to create a test case. + +""" +# According to now data_count to generate test case +def dfs1(data_count, res, total_num): + if len(res) == total_num: + popg = "" + for i in range(total_num): + popg += res[i] + if i != total_num-1: + popg += "-" + else: + popg += "\n" + with open(do_test_list, "a+") as f: + f.write(popg) + return + for i in range(len(data_count)): + if data_count[i] != 0: + data_count[i] -= 1 + for j in range(len(op_set)): + for k in range(len(op_set)): + op = op_set[j] + op_set[k] + if illegal_op_set.count(op) == 0: + op += str(i) + res.append(op) + data_count1, data_count2 = [], [] + for v in data_count: + data_count1.append(v) + data_count2.append(v) + dfs1(data_count1, res, total_num) + res.pop() + if len(res) != 0: + res1 = [] + for v in res: + res1.append(v) + op1 = op_set[j] + "C" + op_set[k] + str(i) + res1.append(op1) + dfs1(data_count2, res1, total_num) + res1.pop() + + + +data_num = int(sys.argv[1]) +target_num = int(sys.argv[2]) +data_count = [1] * data_num +visit = [] +if os.path.exists(do_test_list): + os.remove(do_test_list) +dfs(data_count, data_num, target_num) +# for i in range(total_test_num): +# txn_num = random.randint(min_txn, max_txn) +# popg = "" +# commit_num = txn_num / 2 +# for j in range(txn_num): +# while True: +# op_num = random.randint(0, len(op_set)-1) +# if op_num == 2 or op_num == 9: +# continue +# if op_num <= 10: +# break +# else: +# if commit_num != 0: +# commit_num -= 1 +# break +# popg += op_set[op_num] +# popg += str(j) +# if j != txn_num-1: +# popg += "-" +# else: +# popg += "\n" +# if i == 0: +# with open(do_test_list, "w+") as f: +# f.write(popg) +# else: +# with open(do_test_list, "a+") as f: +# f.write(popg) diff --git a/src/dbtest/src/sql_cntl.cc b/src/dbtest/src/sql_cntl.cc new file mode 100644 index 00000000..16958d24 --- /dev/null +++ b/src/dbtest/src/sql_cntl.cc @@ -0,0 +1,663 @@ +/* + * Tencent is pleased to support the open source community by making 3TS available. + * + * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software + * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All + * Tencent Modifications are Copyright (C) THL A29 Limited. + * + * Author: axingguchen xenitchen farrisli (axingguchen,xenitchen,farrisli@tencent.com) + * + */ +#include "sql_cntl.h" +#include +#include +#include +#include + +/** + * Get the current date and time in the format: "YYYY-MM-DD HH:MM:SS.mmmuuunnn" + * + * @return A string representing the current date and time. + */ +std::string get_current_time(){ + + // date + time_t d = time(0); + tm* d_now = std::localtime(&d); + + // time + std::chrono::time_point now = std::chrono::system_clock::now(); + auto duration = now.time_since_epoch(); + + typedef std::chrono::duration + >::type> Days; /* UTC: +8:00 */ + + Days days = std::chrono::duration_cast(duration); + duration -= days; + auto hours = std::chrono::duration_cast(duration); + duration -= hours; + auto minutes = std::chrono::duration_cast(duration); + duration -= minutes; + auto seconds = std::chrono::duration_cast(duration); + duration -= seconds; + auto milliseconds = std::chrono::duration_cast(duration); + duration -= milliseconds; + auto microseconds = std::chrono::duration_cast(duration); + duration -= microseconds; + auto nanoseconds = std::chrono::duration_cast(duration); + + // return it by year, month, day, and time + return std::to_string(d_now->tm_year + 1900) + "-" + std::to_string(d_now->tm_mon + 1) + "-" + std::to_string(d_now->tm_mday) + + " " + + std::to_string(d_now->tm_hour) +':'+ std::to_string(minutes.count()) +":"+ std::to_string(seconds.count())+":" + + std::to_string(milliseconds.count()) +':'+ std::to_string(microseconds.count()); + +} + +/** + * Replace all occurrences of a substring 'from' with another substring 'to' in a given string. + * + * @param str The input string in which replacements will be made. + * @param from The substring to search for and replace. + * @param to The replacement substring. + * @return True if at least one replacement was made, false otherwise. + */ +bool replace(std::string& str, const std::string& from, const std::string& to) { + size_t start_pos = str.find(from); + if(start_pos == std::string::npos) + return false; + str.replace(start_pos, from.length(), to); + return true; +} + +/** + * Convert a SQLCHAR pointer to a C-style string and then to a C++ string. + * + * @param ch A pointer to a SQLCHAR character array. + * @return A C++ string containing the converted value from SQLCHAR. + */ +std::string SQLCHARToStr(SQLCHAR* ch) { + char* ch_char = (char*)ch; + std::string ch_str = ch_char; + return ch_str; +} + +/** + * Retrieves error information from an ODBC handle (either a statement or a database connection) + * and stores it in the provided arrays. + * + * @param handle_type A string indicating the handle type. It can be "stmt" (for statement handle) or "dbc" (for database connection handle). + * @param handle The specific handle, which can be either a statement handle or a database connection handle depending on handle_type. + * @param ErrInfo A SQLCHAR array to store the retrieved error information. + * @param SQLState A SQLCHAR array to store the retrieved SQL state. + */ +// handle_type: stmt and dbc +void DBConnector::ErrInfoWithStmt(std::string handle_type, SQLHANDLE& handle, SQLCHAR ErrInfo[], SQLCHAR SQLState[]) { + SQLINTEGER NativeErrorPtr = 0; + SQLSMALLINT TextLengthPtr = 0; + if ("stmt" == handle_type) { + SQLGetDiagRec(SQL_HANDLE_STMT, handle, 1, SQLState, &NativeErrorPtr, ErrInfo, 256, &TextLengthPtr); + } + if ("dbc" == handle_type) { + SQLGetDiagRec(SQL_HANDLE_DBC, handle, 1, SQLState, &NativeErrorPtr, ErrInfo, 256, &TextLengthPtr); + } +} + +/** + * Processes the return value of an SQL execution and retrieves error information from the handle if necessary. + * + * @param session_id The current session ID. + * @param sql_id The ID of the SQL statement. + * @param sql The SQL statement to execute. + * @param handle_type The type of handle, which can be "stmt" or "dbc". + * @param handle The specific ODBC handle (either a statement or a database connection). + * @param ret The return value of the SQL function. + * @param test_process_file The name of the file used to record the test process. + * @return An empty string if SQL execution is successful or has additional info. Otherwise, an error message is returned. + */ +std::string DBConnector::SqlExecuteErr(int session_id, int sql_id, const std::string& sql, std::string handle_type, SQLHANDLE& handle, SQLRETURN ret, std::string test_process_file) { + + std::ofstream test_process(test_process_file, std::ios::app); + std::string blank(blank_base*(session_id - 1), ' '); + // SQL_SUCCESS or SQL_SUCCESS_WITH_INFO: Indicates successful execution or success with additional info. Function returns an empty string. + if (ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO) { + return ""; + } + // SQL_ERROR: Indicates an error occurred. The function calls ErrInfoWithStmt to retrieve error information from the handle, + // then processes and returns the error information. + else if (ret == SQL_ERROR) { + SQLCHAR ErrInfo[256]; + SQLCHAR SQLState[256]; + DBConnector::ErrInfoWithStmt(handle_type, handle, ErrInfo, SQLState); + std::string err_info = SQLCHARToStr(ErrInfo); + + // get error information of all line, comment it to get only first line + // replace "\n" to " " + err_info = err_info.substr(0, err_info.find("\n")); + + auto index_not_exist = err_info.find("not exist"); + auto index_crdb_rollback = sql.find("ROLLBACK TRANSACTION"); + if (sql_id != 1024 && index_not_exist == err_info.npos && index_crdb_rollback == sql.npos) { + // some time between rollback queries + usleep(100000*sql_id^3); + std::cout << blank + "Q" + std::to_string(sql_id) + " failed reason: " << err_info << " errcode: " << SQLState << std::endl; + test_process << blank + "Q" + std::to_string(sql_id) + " failed reason: " << err_info << " errcode: " << SQLState << std::endl; + std::string output_time_info = blank + "Q" + std::to_string(sql_id) + " failed at: " + get_current_time() ; + std::cout << output_time_info << std::endl; + std::ofstream test_process(test_process_file, std::ios::app); + test_process << output_time_info << std::endl; + // if (!test_process) { + // test_process << output_time_info << std::endl; + // } + std::cout << err_info << std::endl; + return "Err:"+err_info; + } else { + return "Failed with no reason"; + } + + return err_info; + // Other statuses like SQL_NEED_DATA, SQL_STILL_EXECUTING, SQL_NO_DATA, etc. have specific messages associated with them. + } else if (ret == SQL_NEED_DATA) { + std::cout << blank + "SQL_NEED_DATA" << std::endl; + test_process << blank + "SQL_NEED_DATA" << std::endl; + return "SQL_NEED_DATA"; + } else if (ret == SQL_STILL_EXECUTING) { + std::cout << blank + "SQL_STILL_EXECUTING" << std::endl; + test_process << blank + "SQL_STILL_EXECUTING" << std::endl; + return "SQL_STILL_EXECUTING"; + } else if (ret == SQL_NO_DATA) { + std::cout << blank + "SQL_NO_DATA" << std::endl; + test_process << blank + "SQL_NO_DATA" << std::endl; + return "SQL_NO_DATA"; + } else if (ret == SQL_INVALID_HANDLE) { + std::cout << blank + "SQL_INVALID_HANDLE" << std::endl; + test_process << blank + "SQL_INVALID_HANDLE" << std::endl; + return "SQL_INVALID_HANDLE"; + } else if (ret == SQL_PARAM_DIAG_UNAVAILABLE) { + std::cout << blank + "SQL_PARAM_DIAG_UNAVAILABLE" << std::endl; + test_process << blank + "SQL_PARAM_DIAG_UNAVAILABLE" << std::endl; + return "SQL_PARAM_DIAG_UNAVAILABLE"; + } else { + std::cout << blank + "execute sql: '" + sql + "' failed, unknow error" << std::endl; + test_process << blank + "execute sql: '" + sql + "' failed, unknow error" << std::endl; + return "unknow error"; + } +} + +/** + * Executes a write SQL statement and handles errors if they occur. + * + * @param sql_id The ID of the SQL statement. + * @param sql The SQL statement to execute. + * @param test_result_set The test result set to update. + * @param session_id The session ID. + * @param test_process_file The name of the file used to record the test process. + * @return True if the SQL execution is successful, false otherwise. + */ +bool DBConnector::ExecWriteSql(int sql_id, const std::string& sql, TestResultSet& test_result_set, int session_id, std::string test_process_file) { + SQLRETURN ret; + SQLHSTMT m_hStatement; + SQLHDBC m_hDatabaseConnection = DBConnector::conn_pool_[session_id - 1]; + + // Allocate a statement handle: Allocate a new statement handle for the database connection using SQLAllocHandle function. + ret = SQLAllocHandle(SQL_HANDLE_STMT, m_hDatabaseConnection, &m_hStatement); + std::string err_info_stmt = DBConnector::SqlExecuteErr(session_id, sql_id, sql, "stmt", m_hStatement, ret, test_process_file); + if (!err_info_stmt.empty()) { + std::cout << "get stmt failed in DBConnector::ExecWriteSql" << std::endl; + std::cout << __TIMESTAMP__ << std::endl; + SQLFreeStmt( m_hStatement, SQL_UNBIND); + SQLFreeStmt( m_hStatement, SQL_DROP); + return false; + } + // execute sql + // Adjust SQL statement: If sql_id is not 1024, replace "rollback" with "ROLLBACK" and print the executed SQL statement. + if (sql_id != 1024) { + std::string sql1 = std::regex_replace(sql, std::regex("rollback"), "ROLLBACK"); + std::string blank(blank_base*(session_id - 1), ' '); + std::string output_info = blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " execute sql: '" + sql1 + "'"; + std::cout << output_info << std::endl; + if (!test_process_file.empty()) { + std::ofstream test_process(test_process_file, std::ios::app); + test_process << output_info << std::endl; + } + } + ret = SQLExecDirect(m_hStatement, (SQLCHAR*)sql.c_str(), SQL_NTS); + std::string err_info_sql = DBConnector::SqlExecuteErr(session_id, sql_id, sql, "stmt", m_hStatement, ret, test_process_file); + SQLFreeStmt( m_hStatement, SQL_UNBIND); + SQLFreeStmt( m_hStatement, SQL_DROP); + + if (!err_info_sql.empty()) { + auto index_timeout1 = err_info_sql.find("timeout"); + auto index_timeout2 = err_info_sql.find("Timeout"); + auto index_timeout3 = err_info_sql.find("time out"); + if (index_timeout1 != err_info_sql.npos || index_timeout2 != err_info_sql.npos || index_timeout3 != err_info_sql.npos) { + if (test_result_set.ResultType() == ""){ + test_result_set.SetResultType("Timeout\nReason: Transaction execution timeout"); + } + return true; + } else { + if (test_result_set.ResultType().empty()) { + std::string info = "Rollback\nReason: " + err_info_sql; + test_result_set.SetResultType(info); + } + } + //return false; + } + // get error info + else{ + if (sql_id != 1024 && sql_id !=0) { + std::string blank(blank_base*(session_id - 1), ' '); + std::string output_time_info = blank + "Q" + std::to_string(sql_id) + " finished at: " + get_current_time() ; + std::cout << output_time_info << std::endl; + std::ofstream test_process(test_process_file, std::ios::app); + test_process << output_time_info << std::endl; + } + } + return true; +} + + +/** + * Executes a read SQL statement and handles the results. + * + * @param sql_id The ID of the SQL statement. + * @param sql The SQL statement to execute. + * @param test_result_set The test result set to update. + * @param cur_result_set The current query result set. + * @param session_id The session ID. + * @param param_num The number of columns in the result set. + * @param test_process_file The name of the file used to record the test process. + * @return True if the SQL execution is successful, false otherwise. + */ +bool DBConnector::ExecReadSql2Int(int sql_id, const std::string& sql, TestResultSet& test_result_set, + std::unordered_map>& cur_result_set, + int session_id, int param_num, std::string test_process_file) { + SQLRETURN ret; + SQLHSTMT m_hStatement; + SQLHDBC m_hDatabaseConnection = DBConnector::conn_pool_[session_id - 1]; + // Get the expected result set list from test_result_set + std::vector>> expected_result_set_list = test_result_set.ExpectedResultSetList(); + + // Allocate a statement handle: Allocate a new statement handle for the database connection using SQLAllocHandle function. + ret = SQLAllocHandle(SQL_HANDLE_STMT, m_hDatabaseConnection, &m_hStatement); + // Check if allocating a statement handle was successful. If it fails, release the handle and return false. + std::string err_info_stmt = DBConnector::SqlExecuteErr(session_id, sql_id, sql, "stmt", m_hStatement, ret, test_process_file); + if (!err_info_stmt.empty()) { + std::cout << "get stmt failed in DBConnector::ExecReadSql2Int" << std::endl; + SQLFreeStmt( m_hStatement, SQL_UNBIND); + SQLFreeStmt( m_hStatement, SQL_DROP); + return false; + } + SQLLEN length; + SQLCHAR value[param_num][20] = {{0}}; + // execute sql + std::string blank(blank_base*(session_id - 1), ' '); + std::string output_info = blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " execute sql: '" + sql + "'"; + std::cout << output_info << std::endl; + if (!test_process_file.empty()) { + std::ofstream test_process(test_process_file, std::ios::app); + test_process << output_info << std::endl; + } + // Execute the SQL statement using SQLExecDirect function + ret = SQLExecDirect(m_hStatement, (SQLCHAR*)sql.c_str(), SQL_NTS); + // parse result + std::string err_info_sql = DBConnector::SqlExecuteErr(session_id, sql_id, sql, "stmt", m_hStatement, ret, test_process_file); + if(err_info_sql.empty()) { + + // bind column data + // If SQL execution is successful, bind column data and fetch the next row. + // It will convert each row's data into string form and store it in cur_result_set. + for (int i = 0; i < param_num; i++) { + SQLBindCol(m_hStatement, i + 1, SQL_C_CHAR, (void*)value[i], sizeof(value[i]), &length); + } + // get next row, and fill cur_sql_result_set + bool is_no_data = true; + while(SQL_NO_DATA != SQLFetch(m_hStatement)) { + std::string row = ""; + for (int i = 0; i < param_num; i++) { + std::string v_str = SQLCHARToStr(value[i]); + if (i == (param_num - 1)) { + row += v_str; + } else { + row += v_str + ","; + } + } + row = "(" + row + ")"; + if (cur_result_set.find(sql_id) != cur_result_set.end()) { + cur_result_set[sql_id].push_back(row); + } else { + std::vector sql_result; + sql_result.push_back(row); + cur_result_set[sql_id] = sql_result; + } + is_no_data = false; + } + if (is_no_data) { + cur_result_set[sql_id].push_back("null"); + } + // Output the result: Compare the current query result with the expected result set list + // using the outputter object and output the information. + outputter.PrintAndWriteTxnSqlResult(cur_result_set[sql_id], expected_result_set_list, sql_id, sql, session_id, test_process_file); + if (sql_id != 1024 && sql_id !=0) { + std::string output_time_info = blank + "Q" + std::to_string(sql_id) + " finished at: " + get_current_time() ; + std::cout << output_time_info << std::endl; + std::ofstream test_process(test_process_file, std::ios::app); + test_process << output_time_info << std::endl; + } + SQLFreeStmt( m_hStatement, SQL_UNBIND); + SQLFreeStmt( m_hStatement, SQL_DROP); + return true; + } else { + // Handle errors: If SQL execution fails, check if the error message contains "timeout". + // If yes, set the result type of test_result_set to "Timeout". + // Otherwise, set the result type to "Rollback" and include the relevant error message. + SQLFreeStmt( m_hStatement, SQL_UNBIND); + SQLFreeStmt( m_hStatement, SQL_DROP); + auto index_timeout1 = err_info_sql.find("timeout"); + auto index_timeout2 = err_info_sql.find("Timeout"); + auto index_timeout3 = err_info_sql.find("time out"); + if (index_timeout1 != err_info_sql.npos || index_timeout2 != err_info_sql.npos || index_timeout3 != err_info_sql.npos) { + if (test_result_set.ResultType() == ""){ + test_result_set.SetResultType("Timeout\nReason: Transaction execution timeout"); + } + + return true; + } else { + if (test_result_set.ResultType().empty()) { + std::string info = "Rollback\nReason: " + err_info_sql; + test_result_set.SetResultType(info); + } + } + //return false; + return true; + } +} + +/** + * Executes a transaction end operation (commit, rollback, or custom) based on the given option and database type. + * + * @param opt The operation, such as "commit" or "rollback". + * @param session_id The current session ID. + * @param sql_id The ID of the SQL statement. + * @param test_result_set The result set object that may contain expected results or other test-related information. + * @param db_type The database type, such as "oracle", "sqlserver", "ob", etc. + * @param test_process_file The name of the file used to record the test process. + * @return True if the operation is successful, false otherwise. + */ +bool DBConnector::SQLEndTnx(std::string opt, int session_id, int sql_id, TestResultSet& test_result_set, const std::string& db_type, std::string test_process_file) { + if (sql_id != 1024) { + std::string blank(blank_base*(session_id - 1), ' '); + std::string output_info; + if ("commit" == opt) { + output_info = blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " execute opt: '"+ "COMMIT" +"';"; + } + else if ("rollback" == opt) { + output_info = blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " execute opt: '"+ "ROLLBACK" +"';"; + } + else { + output_info = blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " execute opt: '"+ opt +"';"; + } + + std::cout << output_info << std::endl; + if (!test_process_file.empty()) { + std::ofstream test_process(test_process_file, std::ios::app); + test_process << output_info << std::endl; + } + } + // Non-Oracle database handling: If db_type is not "oracle", the function will use the SQLEndTran function of ODBC to perform transaction end operations. + if (db_type != "oracle") { + SQLRETURN ret; + SQLHDBC m_hDatabaseConnection = DBConnector::conn_pool_[session_id - 1]; + // If the operation is "commit," perform a commit. + if ("commit" == opt) { + ret = SQLEndTran(SQL_HANDLE_DBC, m_hDatabaseConnection, SQL_COMMIT); + // If the operation is "rollback" and the database type is not "crdb," perform a rollback. Otherwise, execute the rollback SQL command specific to "crdb." + } else if ("rollback" == opt) { + if (db_type != "crdb"){ + ret = SQLEndTran(SQL_HANDLE_DBC, m_hDatabaseConnection, SQL_ROLLBACK); + } else { + std::string sql = "ROLLBACK TRANSCATION;"; + if (!DBConnector::ExecWriteSql(1024, sql, test_result_set, session_id, test_process_file)) { + return false; + } + } + + } else { + std::cout << "unknow txn opt" << std::endl; + } + + // Afterward, the function calls SqlExecuteErr to handle possible errors. + std::string err_info_sql = DBConnector::SqlExecuteErr(session_id, sql_id, opt, "dbc", m_hDatabaseConnection, ret, test_process_file); + if (!err_info_sql.empty()) { + if (test_result_set.ResultType().empty()) { + std::string info = "Rollback\n" + err_info_sql; + test_result_set.SetResultType(info); + } + } + else{ + if (sql_id != 1024 && sql_id !=0) { + std::string blank(blank_base*(session_id - 1), ' '); + std::string output_time_info = blank + "Q" + std::to_string(sql_id) + " finished at: " + get_current_time() ; + std::cout << output_time_info << std::endl; + std::ofstream test_process(test_process_file, std::ios::app); + test_process << output_time_info << std::endl; + } + } + // Oracle database handling: If db_type is "oracle," directly execute the provided opt SQL command. + } else { + TestResultSet test_result_set; + if (!DBConnector::ExecWriteSql(1024, opt, test_result_set, session_id, test_process_file)) { + return false; + } + } + return true; +} + +/** + * Starts a transaction for the given session and logs the transaction start in the test process file. + * + * @param session_id The current session ID. + * @param sql_id ID of the SQL statement. + * @param test_process_file Filename to record the test process. + * @return True if the transaction start is successful, false otherwise. + */ +bool DBConnector::SQLStartTxn(int session_id, int sql_id, std::string test_process_file) { + SQLHDBC m_hDatabaseConnection = DBConnector::conn_pool_[session_id - 1]; + std::ofstream test_process(test_process_file, std::ios::app); + // To start a transaction, the function calls DBConnector::SetAutoCommit with the value 0, which means it turns off the auto-commit mode for the database connection. Turning off auto-commit mode means that any changes made during the transaction are not committed until explicitly requested. If the function fails to turn off auto-commit mode, it logs an error message and returns false. + if(!DBConnector::SetAutoCommit(m_hDatabaseConnection, 0)) { + std::string blank(blank_base*(session_id - 1), ' '); + std::string output_info = blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " begin failed"; + std::cout << output_info << std::endl; + if (!test_process) { + test_process << output_info << std::endl; + } + return false; + } else { + std::string blank(blank_base*(session_id - 1), ' '); + std::string output_info = blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " execute opt: '"+"BEGIN;'"; + std::cout << output_info << std::endl; + test_process << output_info << std::endl; + // for test purpose + // if (!test_process) { + // test_process << output_info << std::endl; + // } + if (sql_id != 1024 && sql_id !=0) { + std::string output_time_info = blank + "Q" + std::to_string(sql_id) + " finished at: " + get_current_time() ; + std::cout << output_time_info << std::endl; + test_process << output_time_info << std::endl; + } + return true; + } +} + +/** + * Sets the auto-commit mode for the given database connection. + * + * @param m_hDatabaseConnection The database connection handle. + * @param opt 0 to disable auto-commit, 1 to enable it. + * @return True if the auto-commit mode is successfully set, false otherwise. + */ +bool DBConnector::SetAutoCommit(SQLHDBC m_hDatabaseConnection, int opt) { + SQLRETURN ret; + SQLUINTEGER autoCommit; + if (opt == 0) { + autoCommit = 0; + } else { + autoCommit = 1; + } + ret = SQLSetConnectAttr(m_hDatabaseConnection, SQL_ATTR_AUTOCOMMIT, (SQLPOINTER)(long)autoCommit, 0); + if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO) { + std::cout << "set AutoCommit = 0 failed" << std::endl; + return false; + } + return true; +} + +/** + * Sets the timeout for a database connection. + * + * @param conn_id The ID of the database connection. + * @param timeout The timeout value in seconds. + * @param db_type The type of the database, e.g., "sqlserver" or "ob". + * @return True if the timeout is successfully set, false otherwise. + */ +bool DBConnector::SetTimeout(int conn_id, std::string timeout, const std::string& db_type) { + std::string sql = "" ; + if (db_type == "sqlserver") { + // Note that there are three additional zeros after the timeout value + // This is because SQL Server's timeout is in milliseconds + sql = "SET LOCK_TIMEOUT " + timeout + "000" + ";"; + } else if (db_type == "ob") { + // If the database type is "ob" (OceanBase), use OceanBase's ob_trx_timeout to set the timeout + sql = "set session ob_trx_timeout=" + timeout + "000000;"; + } + if (!sql.empty()) { + TestResultSet test_result_set; + if (!DBConnector::ExecWriteSql(1024, sql, test_result_set, conn_id)) { + return false; + } + } + + return true; +} + +/** + * Sets the transaction isolation level for the database based on the given option. + * + * @param m_hDatabaseConnection The database connection handle. + * @param opt The transaction isolation level to be set. + * @param session_id The current session's ID. + * @param db_type The database type. + * @param test_process_file The filename to record the test process. + * @return True if the isolation level is successfully set, false otherwise. + */ +bool DBConnector::SetIsolationLevel(SQLHDBC m_hDatabaseConnection, std::string opt, int session_id, const std::string& db_type, std::string test_process_file) { + // For non-Oracle and OB databases: + // Set the transaction isolation level based on the 'opt' value (e.g., "read-uncommitted," "read-committed," "repeatable-read," etc.) + // Use SQLSetConnectAttr method to set the appropriate transaction isolation level. + // "snapshot" and "rcsnapshot" options require additional SQL commands to be executed for specific isolation levels. + + // https://cassandra.apache.org/doc/4.1/cassandra/tools/cqlsh.html#consistency + if (db_type == "cassandra") { + std::string iso; + if (opt == "one") { + iso = "one"; + } else { + std::cout << "unknow isolation level" << std::endl; + return false; + } + TestResultSet test_result_set; + std::string sql; + sql = "consistency " + iso + ";"; + if (!DBConnector::ExecWriteSql(1024, sql, test_result_set, session_id, test_process_file)) { + return false; + } + return true; + } + + if (db_type != "oracle" && db_type != "ob") { + // for ob mysql mode + // if (db_type != "oracle") { + SQLRETURN ret; + if (opt == "read-uncommitted") { + ret = SQLSetConnectAttr(m_hDatabaseConnection, SQL_ATTR_TXN_ISOLATION, (SQLPOINTER)SQL_TXN_READ_UNCOMMITTED, 0); + } else if (opt == "read-committed") { + ret = SQLSetConnectAttr(m_hDatabaseConnection, SQL_ATTR_TXN_ISOLATION, (SQLPOINTER)SQL_TXN_READ_COMMITTED, 0); + } else if (opt == "repeatable-read") { + ret = SQLSetConnectAttr(m_hDatabaseConnection, SQL_ATTR_TXN_ISOLATION, (SQLPOINTER)SQL_TXN_REPEATABLE_READ, 0); + } else if (opt == "serializable") { + ret = SQLSetConnectAttr(m_hDatabaseConnection, SQL_ATTR_TXN_ISOLATION, (SQLPOINTER)SQL_TXN_SERIALIZABLE, 0); + } else if (opt == "snapshot") { + TestResultSet test_result_set; + std::string sql; + sql = "ALTER DATABASE CURRENT SET ALLOW_SNAPSHOT_ISOLATION ON;"; // SI + std::cout << sql << std::endl; + if (!DBConnector::ExecWriteSql(1024, sql, test_result_set, session_id, test_process_file)) { + return false; + } + sql = "SET TRANSACTION ISOLATION LEVEL SNAPSHOT;"; // SI + std::cout << sql << std::endl; + if (!DBConnector::ExecWriteSql(1024, sql, test_result_set, session_id, test_process_file)) { + return false; + } + } else if (opt == "rcsnapshot") { + ret = SQLSetConnectAttr(m_hDatabaseConnection, SQL_ATTR_TXN_ISOLATION, (SQLPOINTER)SQL_TXN_READ_COMMITTED, 0); + TestResultSet test_result_set; + std::string sql; + sql = "ALTER DATABASE CURRENT SET READ_COMMITTED_SNAPSHOT ON WITH NO_WAIT;"; // RCSI + std::cout << sql << std::endl; + if (!DBConnector::ExecWriteSql(1024, sql, test_result_set, session_id, test_process_file)) { + return false; + } + } else { + std::cout << "unknow isolation level" << std::endl; + return false; + } + std::string err_info_stmt = DBConnector::SqlExecuteErr(session_id, 1024, "set isolation", "dbc", m_hDatabaseConnection, ret, test_process_file); + if (!err_info_stmt.empty()) { + return false; + } + } + // For Oracle or OB databases: + // Construct an SQL command to set the transaction isolation level based on the 'opt' value, + // and execute it using ExecWriteSql. + else { + std::string iso; + if (opt == "read-committed") { + iso = "read committed"; + } else if (opt == "repeatable-read") { + iso = "repeatable read"; + } else if (opt == "serializable") { + iso = "serializable"; + } else { + std::cout << "unknow isolation level" << std::endl; + return false; + } + TestResultSet test_result_set; + std::string sql; + if (db_type == "oracle") { + sql = "alter session set isolation_level =" + iso; + } else if (db_type == "ob") { + sql = "set session transaction isolation level " + iso + ";"; + } + if (!DBConnector::ExecWriteSql(1024, sql, test_result_set, session_id, test_process_file)) { + return false; + } + } + + // Snapshot mode for myrocks + // comment for normal mode for 4 levels + // if (db_type == "myrocks") { + // TestResultSet test_result_set; + // std::string sql; + // // sql = "START TRANSACTION WITH CONSISTENT ROCKSDB SNAPSHOT"; + // sql = "START TRANSACTION WITH CONSISTENT SNAPSHOT"; + // if (!DBConnector::ExecWriteSql(1024, sql, test_result_set, session_id, test_process_file)) { + // return false; + // } + // std::cout << sql << std::endl; + // } + + return true; +} diff --git a/src/dbtest/src/sql_cntl.h b/src/dbtest/src/sql_cntl.h new file mode 100644 index 00000000..153cc989 --- /dev/null +++ b/src/dbtest/src/sql_cntl.h @@ -0,0 +1,110 @@ +/* + * Tencent is pleased to support the open source community by making 3TS available. + * + * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software + * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All + * Tencent Modifications are Copyright (C) THL A29 Limited. + * + * Author: farrisli (farrisli@tencent.com) + * + */ +#include +#include +#include +#include "case_cntl.h" + +//db connector +class DBConnector { +private: + // Each SQLHDBC is a handle for a single database connection. + std::vector conn_pool_; +public: + // Initializes the database connector, stablishes a specified number of database connections and adds them to the connection pool. + bool InitDBConnector(std::string& user, std::string& passwd, std::string& db_type, int conn_pool_size) { + for (int i = 0; i < (int)conn_pool_size; i++) { + // Initializes the ODBC environment handle m_hEnviroment. + SQLHENV m_hEnviroment; + SQLHDBC m_hDatabaseConnection; + SQLRETURN ret; + // get env + // Allocates the ODBC environment handle using SQLAllocHandle. + ret = SQLAllocHandle(SQL_HANDLE_ENV, NULL, &m_hEnviroment); + if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO) { + std::cerr << "get env failed" << std::endl; + return false; + } + + // Sets the ODBC version to ODBC 3.0. + SQLSetEnvAttr(m_hEnviroment, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_ODBC3, SQL_IS_INTEGER); + // get conn + // Allocates the ODBC connection handle m_hDatabaseConnection using SQLAllocHandle. + ret = SQLAllocHandle(SQL_HANDLE_DBC, m_hEnviroment, &m_hDatabaseConnection); + if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO) { + std::cerr << "get conn failed" << std::endl; + return false; + } + // connect + // Connects to the database using SQLConnect. + ret = SQLConnect(m_hDatabaseConnection, + (SQLCHAR*)db_type.c_str(), SQL_NTS, + (SQLCHAR*)user.c_str(), SQL_NTS, + (SQLCHAR*)passwd.c_str(), SQL_NTS); + + // Checks the success of the database connection using the SqlExecuteErr method. + std::string err_info_stmt = DBConnector::SqlExecuteErr(1, 1024, "connnected", "dbc", m_hDatabaseConnection, ret); + if (err_info_stmt != "") { + return false; + } + /* + if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO) { + std::cerr << "connected failed" << std::endl; + return false; + }*/ + // Releases the environment handle m_hEnvironment + SQLFreeHandle( SQL_HANDLE_ENV, m_hEnviroment); + // Adds the database connection handle m_hDatabaseConnection to the connection pool. + conn_pool_.push_back(m_hDatabaseConnection); + } + std::cout << "init db_connector success" << std::endl; + return true; + }; + + // Set the auto-commit mode for the database connection. + bool SetAutoCommit(SQLHDBC m_hDatabaseConnection, int opt); + // Set a timeout for a specific database connection. + bool SetTimeout(int conn_id, std::string timeout, const std::string& db_type); + + // Execute an SQL statement for reading and store the result as an integer. + bool ExecReadSql2Int(int sql_id, const std::string& sql, TestResultSet& test_result_set, std::unordered_map>& cur_result_set, int conn_id, int param_num, std::string test_process_file=""); + // Execute an SQL statement for writing + bool ExecWriteSql(int sql_id, const std::string& sql, TestResultSet& test_result_set, int conn_id, std::string test_process_file=""); + + // Get error information using the SQL statement handle. + void ErrInfoWithStmt(std::string handle_type, SQLHANDLE& handle, SQLCHAR ErrInfo[], SQLCHAR SQLState[]); + // Return the database connection pool. + std::vector DBConnPool() {return conn_pool_;}; + // Get error information when executing an SQL statement. + std::string SqlExecuteErr(int session_id, int sql_id, const std::string& sql, std::string handle_type, SQLHANDLE& handle, SQLRETURN ret, std::string test_process_file=""); + + // End the transaction. + bool SQLEndTnx(std::string opt, int session_id, int sql_id, TestResultSet& test_result_set, const std::string& db_type, std::string test_process_file=""); + // Begin a transaction. + bool SQLStartTxn(int session_id, int sql_id, std::string test_process_file=""); + // Set the isolation level of the database connection. + bool SetIsolationLevel(SQLHDBC m_hDatabaseConnection, std::string opt, int conn_id, const std::string& db_type, std::string test_process_file=""); + + // Release all database connections in the connection pool. + void ReleaseConn() { + for (int i = 0; i < (int)conn_pool_.size(); i++) { + if (conn_pool_[i]){ + SQLDisconnect( conn_pool_[i] ); + SQLFreeHandle(SQL_HANDLE_DBC, conn_pool_[i]); + } + } + }; + // Release environment resources. + void ReleaseEnv(); + void Release() { + ReleaseConn(); + }; +}; diff --git a/src/dbtest/src/sql_cntl_v2.cc b/src/dbtest/src/sql_cntl_v2.cc new file mode 100644 index 00000000..73236cbb --- /dev/null +++ b/src/dbtest/src/sql_cntl_v2.cc @@ -0,0 +1,698 @@ +/* + * Tencent is pleased to support the open source community by making 3TS available. + * + * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software + * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All + * Tencent Modifications are Copyright (C) THL A29 Limited. + * + * Author: axingguchen farrisli (axingguchen,farrisli@tencent.com) + * + */ +#include "sql_cntl.h" +#include +#include +#include +#include + +/** + * Get the current date and time in the format: "YYYY-MM-DD HH:MM:SS.mmmuuunnn" + * + * @return A string representing the current date and time. + * + * @note The code is the same as the corresponding function in sql_cntl.cc. + */ +std::string get_current_time(){ + + // date + time_t d = time(0); + tm* d_now = std::localtime(&d); + + // time + std::chrono::time_point now = std::chrono::system_clock::now(); + auto duration = now.time_since_epoch(); + + typedef std::chrono::duration + >::type> Days; /* UTC: +8:00 */ + + Days days = std::chrono::duration_cast(duration); + duration -= days; + auto hours = std::chrono::duration_cast(duration); + duration -= hours; + auto minutes = std::chrono::duration_cast(duration); + duration -= minutes; + auto seconds = std::chrono::duration_cast(duration); + duration -= seconds; + auto milliseconds = std::chrono::duration_cast(duration); + duration -= milliseconds; + auto microseconds = std::chrono::duration_cast(duration); + duration -= microseconds; + auto nanoseconds = std::chrono::duration_cast(duration); + + + // return std::to_string(hours.count()) +':'+ std::to_string(minutes.count()) +":"+ std::to_string(seconds.count())+":" + // + std::to_string(milliseconds.count()) +":"+ std::to_string(microseconds.count()) +":"+ std::to_string(nanoseconds.count()); + return std::to_string(d_now->tm_year + 1900) + "-" + std::to_string(d_now->tm_mon + 1) + "-" + std::to_string(d_now->tm_mday) + + " " + + std::to_string(d_now->tm_hour) +':'+ std::to_string(minutes.count()) +":"+ std::to_string(seconds.count())+":" + + std::to_string(milliseconds.count()) +':'+ std::to_string(microseconds.count()); + +} + +/** + * Replace all occurrences of a substring 'from' with another substring 'to' in a given string. + * + * @param str The input string in which replacements will be made. + * @param from The substring to search for and replace. + * @param to The replacement substring. + * @return True if at least one replacement was made, false otherwise. + * + * @note The code is the same as the corresponding function in sql_cntl.cc. + */ +bool replace(std::string& str, const std::string& from, const std::string& to) { + size_t start_pos = str.find(from); + if(start_pos == std::string::npos) + return false; + str.replace(start_pos, from.length(), to); + return true; +} + +/** + * Convert a SQLCHAR pointer to a C-style string and then to a C++ string. + * + * @param ch A pointer to a SQLCHAR character array. + * @return A C++ string containing the converted value from SQLCHAR. + * + * @note The code is the same as the corresponding function in sql_cntl.cc. + */ +std::string SQLCHARToStr(SQLCHAR* ch) { + char* ch_char = (char*)ch; + std::string ch_str = ch_char; + return ch_str; +} + +/** + * Retrieves error information from an ODBC handle (either a statement or a database connection) + * and stores it in the provided arrays. + * + * @param handle_type A string indicating the handle type. It can be "stmt" (for statement handle) or "dbc" (for database connection handle). + * @param handle The specific handle, which can be either a statement handle or a database connection handle depending on handle_type. + * @param ErrInfo A SQLCHAR array to store the retrieved error information. + * @param SQLState A SQLCHAR array to store the retrieved SQL state. + * + * @note The code is the same as the corresponding function in sql_cntl.cc. + */ +// handle_type: stmt and dbc +void DBConnector::ErrInfoWithStmt(std::string handle_type, SQLHANDLE& handle, SQLCHAR ErrInfo[], SQLCHAR SQLState[]) { + SQLINTEGER NativeErrorPtr = 0; + SQLSMALLINT TextLengthPtr = 0; + if ("stmt" == handle_type) { + SQLGetDiagRec(SQL_HANDLE_STMT, handle, 1, SQLState, &NativeErrorPtr, ErrInfo, 256, &TextLengthPtr); + } + if ("dbc" == handle_type) { + SQLGetDiagRec(SQL_HANDLE_DBC, handle, 1, SQLState, &NativeErrorPtr, ErrInfo, 256, &TextLengthPtr); + } +} + +/** + * Handles and logs SQL execution errors. + * + * This function takes care of handling SQL execution errors and logging them to an output stream. + * It processes the error code (`ret`) and provides detailed error information when an error occurs. + * Depending on the error type, it logs the error details, including the error message, SQL state, + * and additional information about the query. It also handles specific error conditions differently, + * such as "not exist" errors and "ROLLBACK TRANSACTION" errors. + * + * @param session_id The session ID associated with the SQL query. + * @param sql_id The ID of the SQL query. + * @param sql The SQL query that caused the error. + * @param handle_type The type of ODBC handle (e.g., "stmt" or "dbc"). + * @param handle The ODBC handle associated with the error. + * @param ret The return code from the SQL execution. + * @param test_process_file The output file for logging error information. + * @return A string containing the error information, or an empty string if no error occurred. + * + * @note The code is different from the corresponding function in sql_cntl.cc. + */ +std::string DBConnector::SqlExecuteErr(int session_id, int sql_id, const std::string& sql, std::string handle_type, SQLHANDLE& handle, SQLRETURN ret, std::string test_process_file) { + + std::ofstream test_process(test_process_file, std::ios::app); + std::string blank(blank_base*(session_id - 1), ' '); + if (ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO) { + return ""; + } else if (ret == SQL_ERROR) { + SQLCHAR ErrInfo[256]; + SQLCHAR SQLState[256]; + DBConnector::ErrInfoWithStmt(handle_type, handle, ErrInfo, SQLState); + std::string err_info = SQLCHARToStr(ErrInfo); + + // replace "\n" to " " + // replace(err_info, "\n", " "); + // std::string s = "one two three"; + // get error information of first line + err_info = err_info.substr(0, err_info.find("\n")); + + auto index_not_exist = err_info.find("not exist"); + auto index_crdb_rollback = sql.find("ROLLBACK TRANSACTION"); + if (sql_id != 1024 && index_not_exist == err_info.npos && index_crdb_rollback == sql.npos) { + usleep(100000*sql_id^3); + std::cout << blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " failed reason: " << err_info << " errcode: " << SQLState << std::endl; + test_process << blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " failed reason: " << err_info << " errcode: " << SQLState << std::endl; + // if (!test_process) { + // test_process << blank + "execute sql: '" + sql + "' failed, reason: " << ErrInfo << " errcode: " << SQLState << std::endl; + // } + std::string output_time_info = blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " failed at: " + get_current_time() ; + std::cout << output_time_info << std::endl; + std::ofstream test_process(test_process_file, std::ios::app); + test_process << output_time_info << std::endl; + // if (!test_process) { + // test_process << output_time_info << std::endl; + // } + return err_info; + } else { + return ""; + } + + return err_info; + } else if (ret == SQL_NEED_DATA) { + std::cout << blank + "SQL_NEED_DATA" << std::endl; + test_process << blank + "SQL_NEED_DATA" << std::endl; + return "SQL_NEED_DATA"; + } else if (ret == SQL_STILL_EXECUTING) { + std::cout << blank + "SQL_STILL_EXECUTING" << std::endl; + test_process << blank + "SQL_STILL_EXECUTING" << std::endl; + return "SQL_STILL_EXECUTING"; + } else if (ret == SQL_NO_DATA) { + std::cout << blank + "SQL_NO_DATA" << std::endl; + test_process << blank + "SQL_NO_DATA" << std::endl; + return "SQL_NO_DATA"; + } else if (ret == SQL_INVALID_HANDLE) { + std::cout << blank + "SQL_INVALID_HANDLE" << std::endl; + test_process << blank + "SQL_INVALID_HANDLE" << std::endl; + return "SQL_INVALID_HANDLE"; + } else if (ret == SQL_PARAM_DIAG_UNAVAILABLE) { + std::cout << blank + "SQL_PARAM_DIAG_UNAVAILABLE" << std::endl; + test_process << blank + "SQL_PARAM_DIAG_UNAVAILABLE" << std::endl; + return "SQL_PARAM_DIAG_UNAVAILABLE"; + } else { + std::cout << blank + "execute sql: '" + sql + "' failed, unknow error" << std::endl; + test_process << blank + "execute sql: '" + sql + "' failed, unknow error" << std::endl; + return "unknow error"; + } +} + +/** + * Executes a write SQL statement and handles potential errors. + * + * This function executes a write SQL statement and handles any potential errors that may occur + * during execution. It allocates an SQL statement handle (`m_hStatement`) and executes the SQL + * statement using ODBC. If an error occurs during execution, it logs the error information, + * including error messages and SQL states. It also checks for specific error conditions, such as + * timeouts and rollbacks, and handles them accordingly. + * + * @param sql_id The ID of the SQL statement. + * @param sql The SQL statement to be executed. + * @param test_result_set The test result set object to update with error information. + * @param session_id The session ID associated with the SQL query. + * @param test_process_file The output file for logging error and execution information. + * @return True if the SQL statement executed successfully, false otherwise. + * + * @note The code is different from the corresponding function in sql_cntl.cc. + */ +bool DBConnector::ExecWriteSql(int sql_id, const std::string& sql, TestResultSet& test_result_set, int session_id, std::string test_process_file) { + SQLRETURN ret; + SQLHSTMT m_hStatement; + SQLHDBC m_hDatabaseConnection = DBConnector::conn_pool_[session_id - 1]; + + ret = SQLAllocHandle(SQL_HANDLE_STMT, m_hDatabaseConnection, &m_hStatement); + std::string err_info_stmt = DBConnector::SqlExecuteErr(session_id, sql_id, sql, "stmt", m_hStatement, ret, test_process_file); + if (!err_info_stmt.empty()) { + std::cout << "get stmt failed in DBConnector::ExecWriteSql" << std::endl; + std::cout << __TIMESTAMP__ << std::endl; + SQLFreeStmt( m_hStatement, SQL_UNBIND); + SQLFreeStmt( m_hStatement, SQL_DROP); + return false; + } + // execute sql + if (sql_id != 1024) { + std::string sql1 = std::regex_replace(sql, std::regex("rollback"), "ROLLBACK"); + std::string blank(blank_base*(session_id - 1), ' '); + std::string output_info = blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " execute sql: '" + sql1 + "'"; + std::cout << output_info << std::endl; + if (!test_process_file.empty()) { + std::ofstream test_process(test_process_file, std::ios::app); + test_process << output_info << std::endl; + } + } + SQLLEN row_count=-1; + ret = SQLExecDirect(m_hStatement, (SQLCHAR*)sql.c_str(), SQL_NTS); + SQLRowCount(m_hStatement,&row_count); + // std::cout << "row_count" << row_count << std::endl; + std::string err_info_sql = DBConnector::SqlExecuteErr(session_id, sql_id, sql, "stmt", m_hStatement, ret, test_process_file); + SQLFreeStmt( m_hStatement, SQL_UNBIND); + SQLFreeStmt( m_hStatement, SQL_DROP); + if (row_count==0 && sql_id !=0){ + std::string blank(blank_base*(session_id - 1), ' '); + std::string output_time_info = blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " failed at: " + get_current_time() ; + std::cout << output_time_info << std::endl; + std::ofstream test_process(test_process_file, std::ios::app); + test_process << output_time_info << std::endl; + } + + else if (!err_info_sql.empty()) { + auto index_timeout1 = err_info_sql.find("timeout"); + auto index_timeout2 = err_info_sql.find("Timeout"); + auto index_timeout3 = err_info_sql.find("time out"); + if (index_timeout1 != err_info_sql.npos || index_timeout2 != err_info_sql.npos || index_timeout3 != err_info_sql.npos) { + if (test_result_set.ResultType() == ""){ + test_result_set.SetResultType("Timeout\nReason: Transaction execution timeout"); + } + return true; + } else { + if (test_result_set.ResultType().empty()) { + std::string info = "Rollback\nReason: " + err_info_sql; + test_result_set.SetResultType(info); + } + } + //return false; + } + // get error info + else{ + if (sql_id != 1024 && sql_id !=0) { + std::string blank(blank_base*(session_id - 1), ' '); + std::string output_time_info = blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " finished at: " + get_current_time() ; + std::cout << output_time_info << std::endl; + std::ofstream test_process(test_process_file, std::ios::app); + test_process << output_time_info << std::endl; + } + } + + return true; +} + + +/** + * Executes a read SQL statement and handles the results. + * + * @param sql_id The ID of the SQL statement. + * @param sql The SQL statement to execute. + * @param test_result_set The test result set to update. + * @param cur_result_set The current query result set. + * @param session_id The session ID. + * @param param_num The number of columns in the result set. + * @param test_process_file The name of the file used to record the test process. + * @return True if the SQL execution is successful, false otherwise. + * + * @note The code is different from the corresponding function in sql_cntl.cc. + */ +bool DBConnector::ExecReadSql2Int(int sql_id, const std::string& sql, TestResultSet& test_result_set, + std::unordered_map>& cur_result_set, + int session_id, int param_num, std::string test_process_file) { + SQLRETURN ret; + SQLHSTMT m_hStatement; + SQLHDBC m_hDatabaseConnection = DBConnector::conn_pool_[session_id - 1]; + // Get the expected result set list from test_result_set + std::vector>> expected_result_set_list = test_result_set.ExpectedResultSetList(); + + // Allocate a statement handle: Allocate a new statement handle for the database connection using SQLAllocHandle function. + ret = SQLAllocHandle(SQL_HANDLE_STMT, m_hDatabaseConnection, &m_hStatement); + // Check if allocating a statement handle was successful. If it fails, release the handle and return false. + std::string err_info_stmt = DBConnector::SqlExecuteErr(session_id, sql_id, sql, "stmt", m_hStatement, ret, test_process_file); + if (!err_info_stmt.empty()) { + std::cout << "get stmt failed in DBConnector::ExecReadSql2Int" << std::endl; + SQLFreeStmt( m_hStatement, SQL_UNBIND); + SQLFreeStmt( m_hStatement, SQL_DROP); + return false; + } + SQLLEN length; + SQLCHAR value[param_num][20] = {{0}}; + // execute sql + std::string blank(blank_base*(session_id - 1), ' '); + std::string output_info = blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " execute sql: '" + sql + "'"; + std::cout << output_info << std::endl; + if (!test_process_file.empty()) { + std::ofstream test_process(test_process_file, std::ios::app); + test_process << output_info << std::endl; + } + // Execute the SQL statement using SQLExecDirect function + ret = SQLExecDirect(m_hStatement, (SQLCHAR*)sql.c_str(), SQL_NTS); + // parse result + std::string err_info_sql = DBConnector::SqlExecuteErr(session_id, sql_id, sql, "stmt", m_hStatement, ret, test_process_file); + if(err_info_sql.empty()) { + + // bind column data + // If SQL execution is successful, bind column data and fetch the next row. + // It will convert each row's data into string form and store it in cur_result_set. + for (int i = 0; i < param_num; i++) { + SQLBindCol(m_hStatement, i + 1, SQL_C_CHAR, (void*)value[i], sizeof(value[i]), &length); + } + // get next row, and fill cur_sql_result_set + bool is_no_data = true; + while(SQL_NO_DATA != SQLFetch(m_hStatement)) { + std::string row = ""; + for (int i = 0; i < param_num; i++) { + std::string v_str = SQLCHARToStr(value[i]); + if (i == (param_num - 1)) { + row += v_str; + } else { + row += v_str + ","; + } + } + row = "(" + row + ")"; + if (cur_result_set.find(sql_id) != cur_result_set.end()) { + cur_result_set[sql_id].push_back(row); + } else { + std::vector sql_result; + sql_result.push_back(row); + cur_result_set[sql_id] = sql_result; + } + is_no_data = false; + } + if (is_no_data) { + cur_result_set[sql_id].push_back("null"); + } + // Output the result: Compare the current query result with the expected result set list + // using the outputter object and output the information. + outputter.PrintAndWriteTxnSqlResult(cur_result_set[sql_id], expected_result_set_list, sql_id, sql, session_id, test_process_file); + if (sql_id != 1024 && sql_id !=0) { + std::string output_time_info = blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " finished at: " + get_current_time() ; + std::cout << output_time_info << std::endl; + std::ofstream test_process(test_process_file, std::ios::app); + test_process << output_time_info << std::endl; + } + SQLFreeStmt( m_hStatement, SQL_UNBIND); + SQLFreeStmt( m_hStatement, SQL_DROP); + return true; + } else { + SQLFreeStmt( m_hStatement, SQL_UNBIND); + SQLFreeStmt( m_hStatement, SQL_DROP); + auto index_timeout1 = err_info_sql.find("timeout"); + auto index_timeout2 = err_info_sql.find("Timeout"); + auto index_timeout3 = err_info_sql.find("time out"); + if (index_timeout1 != err_info_sql.npos || index_timeout2 != err_info_sql.npos || index_timeout3 != err_info_sql.npos) { + if (test_result_set.ResultType() == ""){ + test_result_set.SetResultType("Timeout\nReason: Transaction execution timeout"); + } + return true; + } else { + if (test_result_set.ResultType().empty()) { + std::string info = "Rollback\nReason: " + err_info_sql; + test_result_set.SetResultType(info); + } + } + //return false; + return true; + } +} + +/** + * Ends a transaction in the database and handles potential errors. + * + * This function ends a transaction in the database, either by committing or rolling back, and + * handles any potential errors that may occur during the transaction. It logs the transaction + * operation, including whether it's a commit or rollback, and updates the test result set with + * error information if needed. It also checks for specific error conditions, such as timeouts and + * database types (e.g., Oracle), and handles them accordingly. + * + * @param opt The transaction operation, either "commit" or "rollback". + * @param session_id The session ID associated with the transaction. + * @param sql_id The ID of the SQL statement (0 for non-SQL transactions). + * @param test_result_set The test result set object to update with error information. + * @param db_type The type of the database ("oracle", "crdb", etc.). + * @param test_process_file The output file for logging transaction and execution information. + * @return True if the transaction is successful, false otherwise. + * + * @note The code is different from the corresponding function in sql_cntl.cc. + */ +bool DBConnector::SQLEndTnx(std::string opt, int session_id, int sql_id, TestResultSet& test_result_set, const std::string& db_type, std::string test_process_file) { + if (sql_id != 1024) { + std::string blank(blank_base*(session_id - 1), ' '); + std::string output_info; + if ("commit" == opt) { + output_info = blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " execute opt: '"+ "COMMIT" +";'"; + } + else if ("rollback" == opt) { + output_info = blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " execute opt: '"+ "ROLLBACK" +";'"; + } + else { + output_info = blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " execute opt: '"+ opt +";'"; + } + + std::cout << output_info << std::endl; + if (!test_process_file.empty()) { + std::ofstream test_process(test_process_file, std::ios::app); + test_process << output_info << std::endl; + } + } + if (db_type != "oracle") { + SQLRETURN ret; + SQLHDBC m_hDatabaseConnection = DBConnector::conn_pool_[session_id - 1]; + if ("commit" == opt) { + ret = SQLEndTran(SQL_HANDLE_DBC, m_hDatabaseConnection, SQL_COMMIT); + } else if ("rollback" == opt) { + if (db_type != "crdb"){ + ret = SQLEndTran(SQL_HANDLE_DBC, m_hDatabaseConnection, SQL_ROLLBACK); + } else { + std::string sql = "ROLLBACK TRANSCATION;"; + // std::cout << sql << std::endl; + if (!DBConnector::ExecWriteSql(1024, sql, test_result_set, session_id, test_process_file)) { + return false; + } + } + + } else { + std::cout << "unknow txn opt" << std::endl; + } + + std::string err_info_sql = DBConnector::SqlExecuteErr(session_id, sql_id, opt, "dbc", m_hDatabaseConnection, ret, test_process_file); + if (!err_info_sql.empty()) { + if (test_result_set.ResultType().empty()) { + std::string info = "Rollback\n" + err_info_sql; + test_result_set.SetResultType(info); + } + } + else{ + if (sql_id != 1024 && sql_id !=0) { + std::string blank(blank_base*(session_id - 1), ' '); + std::string output_time_info = blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " finished at: " + get_current_time() ; + std::cout << output_time_info << std::endl; + std::ofstream test_process(test_process_file, std::ios::app); + test_process << output_time_info << std::endl; + } + } + } else { + TestResultSet test_result_set; + if (!DBConnector::ExecWriteSql(1024, opt, test_result_set, session_id, test_process_file)) { + return false; + } + else{ + if (sql_id != 1024 && sql_id !=0) { + std::string blank(blank_base*(session_id - 1), ' '); + std::string output_time_info = blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " finished at: " + get_current_time() ; + std::cout << output_time_info << std::endl; + std::ofstream test_process(test_process_file, std::ios::app); + test_process << output_time_info << std::endl; + } + } + } + return true; +} + +/** + * Starts a new transaction in the database and handles potential errors. + * + * This function begins a new transaction in the database, setting the auto-commit mode to off. + * It logs the transaction operation and checks for potential errors, such as failure to begin + * the transaction. If an error occurs, it logs the error and returns false. Otherwise, it returns + * true to indicate a successful transaction start. + * + * @param session_id The session ID associated with the transaction. + * @param sql_id The ID of the SQL statement (0 for non-SQL transactions). + * @param test_process_file The output file for logging transaction and execution information. + * @return True if the transaction starts successfully, false otherwise. + * + * @note The code is different from the corresponding function in sql_cntl.cc. + */ +bool DBConnector::SQLStartTxn(int session_id, int sql_id, std::string test_process_file) { + SQLHDBC m_hDatabaseConnection = DBConnector::conn_pool_[session_id - 1]; + std::ofstream test_process(test_process_file, std::ios::app); + if(!DBConnector::SetAutoCommit(m_hDatabaseConnection, 0)) { + std::string blank(blank_base*(session_id - 1), ' '); + std::string output_info = blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " begin failed"; + std::cout << output_info << std::endl; + if (!test_process) { + test_process << output_info << std::endl; + } + return false; + } else { + std::string blank(blank_base*(session_id - 1), ' '); + std::string output_info = blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " execute opt: '"+"BEGIN;'"; + std::cout << output_info << std::endl; + test_process << output_info << std::endl; + // if (!test_process) { + // test_process << output_info << std::endl; + // } + if (sql_id != 1024 && sql_id !=0) { + std::string output_time_info = blank + "Q" + std::to_string(sql_id) + "-T" + std::to_string(session_id) + " finished at: " + get_current_time() ; + std::cout << output_time_info << std::endl; + test_process << output_time_info << std::endl; + } + return true; + } +} + +/** + * Sets the auto-commit mode for the given database connection. + * + * @param m_hDatabaseConnection The database connection handle. + * @param opt 0 to disable auto-commit, 1 to enable it. + * @return True if the auto-commit mode is successfully set, false otherwise. + * + * @note The code is the same as the corresponding function in sql_cntl.cc. + */ +bool DBConnector::SetAutoCommit(SQLHDBC m_hDatabaseConnection, int opt) { + SQLRETURN ret; + SQLUINTEGER autoCommit; + if (opt == 0) { + autoCommit = 0; + } else { + autoCommit = 1; + } + ret = SQLSetConnectAttr(m_hDatabaseConnection, SQL_ATTR_AUTOCOMMIT, (SQLPOINTER)(long)autoCommit, 0); + if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO) { + std::cout << "set AutoCommit = 0 failed" << std::endl; + return false; + } + return true; +} + +/** + * Sets the timeout for a database connection. + * + * @param conn_id The ID of the database connection. + * @param timeout The timeout value in seconds. + * @param db_type The type of the database, e.g., "sqlserver" or "ob". + * @return True if the timeout is successfully set, false otherwise. + * + * @note The code is the same as the corresponding function in sql_cntl.cc. + */ +bool DBConnector::SetTimeout(int conn_id, std::string timeout, const std::string& db_type) { + std::string sql = "" ; + if (db_type == "sqlserver") { + // Note that there are three additional zeros after the timeout value + // This is because SQL Server's timeout is in milliseconds + sql = "SET LOCK_TIMEOUT " + timeout + "000" + ";"; + } else if (db_type == "ob") { + // If the database type is "ob" (OceanBase), use OceanBase's ob_trx_timeout to set the timeout + sql = "set session ob_trx_timeout=" + timeout + "000000;"; + } + if (!sql.empty()) { + TestResultSet test_result_set; + if (!DBConnector::ExecWriteSql(1024, sql, test_result_set, conn_id)) { + return false; + } + } + + return true; +} + +/** + * Sets the transaction isolation level for the database based on the given option. + * + * @param m_hDatabaseConnection The database connection handle. + * @param opt The transaction isolation level to be set. + * @param session_id The current session's ID. + * @param db_type The database type. + * @param test_process_file The filename to record the test process. + * @return True if the isolation level is successfully set, false otherwise. + * + * @note The code is the same as the corresponding function in sql_cntl.cc. + */ +bool DBConnector::SetIsolationLevel(SQLHDBC m_hDatabaseConnection, std::string opt, int session_id, const std::string& db_type, std::string test_process_file) { + // For non-Oracle and OB databases: + // Set the transaction isolation level based on the 'opt' value (e.g., "read-uncommitted," "read-committed," "repeatable-read," etc.) + // Use SQLSetConnectAttr method to set the appropriate transaction isolation level. + // "snapshot" and "rcsnapshot" options require additional SQL commands to be executed for specific isolation levels. + if (db_type != "oracle" && db_type != "ob") { + // mysql mode + // if (db_type != "oracle") { + SQLRETURN ret; + if (opt == "read-uncommitted") { + ret = SQLSetConnectAttr(m_hDatabaseConnection, SQL_ATTR_TXN_ISOLATION, (SQLPOINTER)SQL_TXN_READ_UNCOMMITTED, 0); + } else if (opt == "read-committed") { + ret = SQLSetConnectAttr(m_hDatabaseConnection, SQL_ATTR_TXN_ISOLATION, (SQLPOINTER)SQL_TXN_READ_COMMITTED, 0); + } else if (opt == "repeatable-read") { + ret = SQLSetConnectAttr(m_hDatabaseConnection, SQL_ATTR_TXN_ISOLATION, (SQLPOINTER)SQL_TXN_REPEATABLE_READ, 0); + } else if (opt == "serializable") { + ret = SQLSetConnectAttr(m_hDatabaseConnection, SQL_ATTR_TXN_ISOLATION, (SQLPOINTER)SQL_TXN_SERIALIZABLE, 0); + } else if (opt == "snapshot") { + TestResultSet test_result_set; + std::string sql; + sql = "ALTER DATABASE CURRENT SET ALLOW_SNAPSHOT_ISOLATION ON;"; // SI + std::cout << sql << std::endl; + if (!DBConnector::ExecWriteSql(1024, sql, test_result_set, session_id, test_process_file)) { + return false; + } + sql = "SET TRANSACTION ISOLATION LEVEL SNAPSHOT;"; // SI + std::cout << sql << std::endl; + if (!DBConnector::ExecWriteSql(1024, sql, test_result_set, session_id, test_process_file)) { + return false; + } + } else if (opt == "rcsnapshot") { + ret = SQLSetConnectAttr(m_hDatabaseConnection, SQL_ATTR_TXN_ISOLATION, (SQLPOINTER)SQL_TXN_READ_COMMITTED, 0); + TestResultSet test_result_set; + std::string sql; + sql = "ALTER DATABASE CURRENT SET READ_COMMITTED_SNAPSHOT ON WITH NO_WAIT;"; // RCSI + std::cout << sql << std::endl; + if (!DBConnector::ExecWriteSql(1024, sql, test_result_set, session_id, test_process_file)) { + return false; + } + } else { + std::cout << "unknow isolation level" << std::endl; + return false; + } + std::string err_info_stmt = DBConnector::SqlExecuteErr(session_id, 1024, "set isolation", "dbc", m_hDatabaseConnection, ret, test_process_file); + if (!err_info_stmt.empty()) { + return false; + } + } + // For Oracle or OB databases: + // Construct an SQL command to set the transaction isolation level based on the 'opt' value, + // and execute it using ExecWriteSql. + else { + std::string iso; + if (opt == "read-committed") { + iso = "read committed"; + } else if (opt == "repeatable-read") { + iso = "repeatable read"; + } else if (opt == "serializable") { + iso = "serializable"; + } else { + std::cout << "unknow isolation level" << std::endl; + return false; + } + TestResultSet test_result_set; + std::string sql; + if (db_type == "oracle") { + sql = "alter session set isolation_level =" + iso; + } else if (db_type == "ob") { + sql = "set session transaction isolation level " + iso + ";"; + } + if (!DBConnector::ExecWriteSql(1024, sql, test_result_set, session_id, test_process_file)) { + return false; + } + } + + // // snapshot mode for myrocks + // if (db_type == "myrocks") { + // TestResultSet test_result_set; + // std::string sql; + // // sql = "START TRANSACTION WITH CONSISTENT ROCKSDB SNAPSHOT"; + // sql = "START TRANSACTION WITH CONSISTENT SNAPSHOT"; + // if (!DBConnector::ExecWriteSql(1024, sql, test_result_set, session_id, test_process_file)) { + // return false; + // } + // std::cout << sql << std::endl; + // } + + return true; +} diff --git a/src/dbtest/src/sqltest.cc b/src/dbtest/src/sqltest.cc new file mode 100644 index 00000000..644c9a9e --- /dev/null +++ b/src/dbtest/src/sqltest.cc @@ -0,0 +1,578 @@ +/* + * Tencent is pleased to support the open source community by making 3TS available. + * + * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software + * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All + * Tencent Modifications are Copyright (C) THL A29 Limited. + * + * Author: axingguchen xenitchen farrisli (axingguchen,xenitchen,farrisli@tencent.com) + * + */ +#include "gflags/gflags.h" +#include "sqltest.h" +#include +#include +#include +#include + +// Implement command-line argument parsing based on Google's gflags library +DEFINE_string(db_type, "mysql", "data resource name, please see /etc/odbc.ini, such as mysql pg oracle ob tidb sqlserver crdb"); +DEFINE_string(user, "test123", "username"); +DEFINE_string(passwd, "Ly.123456", "password"); +DEFINE_string(db_name, "test", "create database name"); +DEFINE_int32(conn_pool_size, 6, "db_conn pool size"); +DEFINE_string(isolation, "serializable", "transation isolation level: read-uncommitted read-committed repeatable-read serializable"); +DEFINE_string(case_dir, "mysql", "test case dir name"); +DEFINE_string(timeout, "20", "timeout"); +DEFINE_int32(sql_interval, 2000, "sleep for the specified interval between SQL executions"); + +// std::vector mutex_txn(5); // same as conn_pool_size +std::vector mutex_txn(FLAGS_conn_pool_size); // same as conn_pool_size + +/** + * Tries to lock the specified mutex within the given timeout. + * + * @param wait_second The timeout in seconds. + * @param wait_nanosecond The timeout in nanoseconds. + * @param txn_id The transaction ID. + * @return True if the lock is acquired within the timeout, false otherwise. + */ +bool try_lock_wait(float wait_second, float wait_nanosecond, int txn_id) +{ + struct timespec timeoutTime; + timeoutTime.tv_nsec = wait_nanosecond; + timeoutTime.tv_sec = wait_second; + return pthread_mutex_timedlock( mutex_txn[txn_id], &timeoutTime ) == 0; // == 0 locked else no lock +} + + +/** + * Executes multiple SQL transactions in a multi-threaded environment. + * + * @param txn_sql_list The list of transaction SQL to execute. + * @param test_sequence Represents the test sequence object. + * @param test_result_set Represents the expected test result set object. + * @param db_connector The object used for database interactions. + * @param test_process_file The file for logging or recording the test process. + * @param cur_result_set A map to store the current result set. + * @param sleeptime The sleep time between transaction executions. Note: Different threads may have different sleep times to stagger their execution. + * @param sql_interval The sleep time between individual SQL executions within a transaction. + * @return True if the transactions are executed successfully, false otherwise. + */ +bool MultiThreadExecution(std::vector& txn_sql_list, TestSequence& test_sequence, TestResultSet& test_result_set, + DBConnector db_connector, std::string test_process_file, std::unordered_map>& cur_result_set, int sleeptime, int sql_interval) { + + // time between queries + // usleep(1000000*sleeptime); // 1 second + usleep(100000*sleeptime); // 0.1 second + + std::ofstream test_process(test_process_file, std::ios::app); + int txn_id; + // If txn_sql_list is not empty, attempt to acquire a mutex lock associated with the current transaction ID. + if (txn_sql_list.size() && txn_sql_list[0].TxnId()){ + txn_id = txn_sql_list[0].TxnId(); + pthread_mutex_lock(mutex_txn[txn_id]); + /* pthread for wait die + float wait_second = 5; + float wait_nanosecond = 0; + if (!try_lock_wait(wait_second, wait_nanosecond, txn_id)) + { + std::string blank(blank_base*(txn_id - 1), ' '); + // std::cout<< blank <<"wait too long"< 'SET' + sql = std::regex_replace(sql, std::regex("from"), "FROM"); // replace 'from' -> 'FROM' + sql = std::regex_replace(sql, std::regex("values"), "VALUES"); + sql = std::regex_replace(sql, std::regex("where"), "WHERE"); + sql = std::regex_replace(sql, std::regex("insert"), "INSERT"); + sql = std::regex_replace(sql, std::regex("select"), "SELECT"); + sql = std::regex_replace(sql, std::regex("update"), "UPDATE"); + + + std::string ret_type = test_result_set.ResultType(); + auto index_T = ret_type.find("Timeout"); + auto index_R = ret_type.find("Rollback"); + if (index_T != ret_type.npos || index_R != ret_type.npos) { + for (int i = 0; i < FLAGS_conn_pool_size; i++) { + if (FLAGS_db_type != "ob") { + if (FLAGS_db_type == "crdb") { + db_connector.ExecWriteSql(1024, "ROLLBACK TRANSACTION", test_result_set, i + 1, test_process_file); + } else { + db_connector.SQLEndTnx("rollback", i + 1, 1024, test_result_set, FLAGS_db_type,test_process_file); + } + } + } + break; + } + + auto index_read = sql.find("SELECT"); + auto index_read_1 = sql.find("select"); + auto index_begin = sql.find("BEGIN"); + auto index_begin_1 = sql.find("begin"); + auto index_commit = sql.find("COMMIT"); + auto index_commit_1 = sql.find("commit"); + auto index_rollback = sql.find("ROLLBACK"); + auto index_rollback_1 = sql.find("rollback"); + + if (sql_id == 1) { + std::cout << "" << std::endl; + test_process << "" << std::endl; + std::cout << dash + test_sequence.TestCaseType() + " test run" + dash << std::endl; + test_process << dash + test_sequence.TestCaseType() + " test run" + dash << std::endl; + } + if (index_read != sql.npos || index_read_1 != sql.npos) { + if (!db_connector.ExecReadSql2Int(sql_id, sql, test_result_set, cur_result_set, txn_id, test_sequence.ParamNum(), test_process_file)) { + goto jump; + } + } else if (index_begin != sql.npos || index_begin_1 != sql.npos) { + if (FLAGS_db_type != "crdb" && FLAGS_db_type != "ob") { + if (FLAGS_db_type == "tidb") { + // Pessimistic mode + if (!db_connector.ExecWriteSql(sql_id, "BEGIN PESSIMISTIC;", test_result_set, txn_id, test_process_file)) { + // Optimistic mode + // if (!db_connector.ExecWriteSql(sql_id, "BEGIN OPTIMISTIC;", test_result_set, txn_id, test_process_file)) { + goto jump; + } + // MyRocks SI mode, comment it for 4 normal levels + } else if (FLAGS_db_type == "myrocks") { + if (!db_connector.ExecWriteSql(sql_id, "START TRANSACTION WITH CONSISTENT SNAPSHOT;", test_result_set, txn_id, test_process_file)) { + goto jump; + } + // YugabyteDB https://docs.yugabyte.com/preview/explore/transactions/isolation-levels/ + } else if (FLAGS_db_type == "yugabyte") { + if (!db_connector.SQLStartTxn(txn_id, sql_id, test_process_file)) { + goto jump; + } + std::string begin_sql = "BEGIN TRANSACTION"; + // beta version: You must set the YB-Tserver flag yb_enable_read_committed_isolation to true when start database service for read-committed level!!! + // if (FLAGS_isolation == "read-committed") { + // begin_sql += " ISOLATION LEVEL READ COMMITTED;"; + // } + if (FLAGS_isolation == "snapshot") { + begin_sql += ";"; + } else { + begin_sql += " ISOLATION LEVEL SERIALIZABLE;"; + } + if (!db_connector.ExecWriteSql(sql_id, begin_sql, test_result_set, txn_id, test_process_file)) { + goto jump; + } + } else { + if (!db_connector.SQLStartTxn(txn_id, sql_id, test_process_file)) { + goto jump; + } + // set pg lock timeout + if (FLAGS_db_type == "pg") { + std::string sql_timeout = "SET LOCAL lock_timeout = '" + FLAGS_timeout + "s';"; + if (!db_connector.ExecWriteSql(1024, sql_timeout, test_result_set, txn_id, test_process_file)) { + goto jump; + } + } + // // oracle this will kill the session. + // if (FLAGS_db_type == "oracle") { + // std::string sql_timeout = "alter session set ddl_lock_timeout = " + FLAGS_timeout + ";"; + // std::cout << " sql: " << sql_timeout << std::endl; + // if (!db_connector.ExecWriteSql(1024, sql_timeout, test_result_set, txn_id, test_process_file)) { + // goto jump; + // } + // } + // // alter session set ddl_lock_timeout = 5 + + } + } else { + if (FLAGS_db_type == "crdb") { + if (!db_connector.ExecWriteSql(sql_id, "BEGIN TRANSACTION;", test_result_set, txn_id, test_process_file)) { + goto jump; + } + } else { + if (!db_connector.ExecWriteSql(sql_id, "BEGIN;", test_result_set, txn_id, test_process_file)) { + goto jump; + } + } + } + } else if (index_commit != sql.npos || index_commit_1 != sql.npos) { + if (FLAGS_db_type != "crdb") { + if (!db_connector.SQLEndTnx("commit", txn_id, sql_id, test_result_set, FLAGS_db_type, test_process_file)) { + goto jump; + } + } else { + if (!db_connector.ExecWriteSql(sql_id, "COMMIT TRANSACTION;", test_result_set, txn_id, test_process_file)) { + goto jump; + } + } + } else if (index_rollback != sql.npos || index_rollback_1 != sql.npos) { + if (FLAGS_db_type != "crdb") { + if (!db_connector.SQLEndTnx("rollback", txn_id, sql_id, test_result_set, FLAGS_db_type, test_process_file)) { + goto jump; + } + } else { + if (!db_connector.SQLEndTnx("rollback", txn_id, sql_id, test_result_set, FLAGS_db_type, test_process_file)) { + goto jump; + } + } + } else { + if (!db_connector.ExecWriteSql(sql_id, sql, test_result_set, txn_id, test_process_file)) { + goto jump; + } + } + + // Output the interval between SQL executions + std::string blank(blank_base*(txn_id - 1), ' '); + std::string output_time_info = blank + "T" + std::to_string(txn_id) + " sleeping for " + std::to_string(sql_interval) + " ms " + "before executing next SQL"; + std::cout << output_time_info << std::endl; + test_process << output_time_info << std::endl; + // sleep for sql_interval milliseconds + usleep(1000 * sql_interval); + + // mutex_txn[txn_id]->unlock(); + } + pthread_mutex_unlock(mutex_txn[txn_id]); + return true; +jump: + pthread_mutex_unlock(mutex_txn[txn_id]); + // mutex_txn[txn_id]->unlock(); + return false; + + +}; + +/** + * Executes a series of database test transactions and writes the results to a file. + * + * @param test_sequence A TestSequence object containing a series of database transactions to execute. + * @param test_result_set A TestResultSet object used to store test results. + * @param db_connector A DBConnector object providing database connectivity. + * @return True if the transactions are executed successfully, false otherwise. + */ +bool JobExecutor::ExecTestSequence(TestSequence& test_sequence, TestResultSet& test_result_set, DBConnector db_connector) { + // Define the path and name of the test result file. + std::string test_process_file = "./" + FLAGS_db_type + "/" + FLAGS_isolation + "/" + test_sequence.TestCaseType() + ".txt"; + // std::string test_process_file = "./" + FLAGS_db_type + "/" + FLAGS_isolation + "/" + test_sequence.TestCaseType() + "_" + FLAGS_isolation + ".txt"; + std::cout << test_process_file << std::endl; + // Open an output file stream named "test_process" for writing test process information. + std::ifstream test_process_tmp(test_process_file); + if (test_process_tmp) { + std::remove(test_process_file.c_str()); + } + std::ofstream test_process(test_process_file, std::ios::app); + + if (!test_process) { + std::cout << "create test_process_file failed" << std::endl; + } + + // Print the database type and isolation level to both the file and the console. + test_process << "#### db_type: " + FLAGS_db_type + " ####" << std::endl; + std::cout << "#### db_type: " + FLAGS_db_type + " ####" << std::endl; + + std::string test_case_type = test_sequence.TestCaseType(); + auto index_t = test_case_type.find_first_of("_"); + if (index_t != test_case_type.npos) { + test_case_type = test_case_type.substr(int(index_t) + 1); + } + + test_process << "#### test_type: " + test_case_type + " ####" << std::endl; + test_process << "#### isolation: " + FLAGS_isolation + " ####\n" << std::endl; + + std::cout << "#### test_type: " + test_case_type + " ####" << std::endl; + std::cout << "#### isolation: " + FLAGS_isolation + " ####\n" << std::endl; + + std::string current_info = "current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas"; + std::string expected_info = "expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory"; + std::cout << current_info << std::endl; + std::cout << expected_info << std::endl; + test_process << current_info << std::endl; + test_process << expected_info << std::endl; + + std::cout << " " << std::endl; + test_process << " " << std::endl; + + if (FLAGS_db_type != "oracle" && FLAGS_db_type != "ob") { + test_process << "set TXN_ISOLATION = " + FLAGS_isolation + " for each session"<< std::endl; + } + + // Get the list of transaction SQLs from test_sequence. + std::vector txn_sql_list = test_sequence.TxnSqlList(); + std::cout << dash + test_sequence.TestCaseType() + " test prepare" + dash << std::endl; + test_process << dash + test_sequence.TestCaseType() + " test prepare" + dash << std::endl; + //int i = 0; + std::unordered_map> cur_result_set; + std::unordered_map sql_map; + std::string table_name; + + + std::vector> init_group; + std::vector> split_groups; + std::vector group; + + // test purpose + // for(int i = 0; i != txn_sql_list.size(); i++) { + // std::cout << txn_sql_list[i].SqlId() << std::endl; + // } + + // std::cout << " SQLID: " << txn_sql_list[0].SqlId() << " TXNID: " << txn_sql_list[0].TxnId() << " SQL: " << txn_sql_list[0].Sql() << std::endl; + int txn_id_old; + int thread_cnt = 0; + // Group transactions based on SQL ID and transaction ID. + for (auto& txn_sql : txn_sql_list) { + // split into anther group + if (txn_sql.SqlId() == 1 || txn_sql.TxnId() != txn_id_old){ + // put into init group + if (txn_sql.SqlId() == 1) { + init_group.push_back(group); + group.clear(); + } + // put into parallel groups + else{ + split_groups.push_back(group); + group.clear(); + thread_cnt = thread_cnt + 1; + } + } + sql_map[txn_sql.SqlId()] = txn_sql.Sql(); + // add into the same group + TxnSql txn_sql1(txn_sql.SqlId(), txn_sql.TxnId(), txn_sql.Sql(), txn_sql.TestCaseType()); + group.push_back(txn_sql1); + txn_id_old = txn_sql.TxnId(); + } + split_groups.push_back(group); + thread_cnt = thread_cnt + 1; + + // Special handling for "crdb" database type. + if (FLAGS_db_type == "crdb"){ + // remove non transaction commit + // remove the first commit at the prepraration + init_group[0].pop_back(); + // remove the last commit at verification selct + split_groups[thread_cnt-1].pop_back(); + } + + // prepration phase + for (auto& group : init_group) { + // for (auto& txn_sql : group) { + // std::cout << " SQLID: " << txn_sql.SqlId() << " TXNID: " << txn_sql.TxnId() << " SQL: " << txn_sql.Sql() << std::endl; + // } + // std::cout << std::endl; + if (! MultiThreadExecution(group, test_sequence, test_result_set, db_connector, test_process_file, cur_result_set, 0, 0)) {return false;} + + } + + std::vector threads; + + // exlcude last group for parallel execution + for (int i = 0; i < thread_cnt-1; i++) { + threads.push_back(std::thread(MultiThreadExecution, std::ref(split_groups[i]), std::ref(test_sequence), std::ref(test_result_set), std::ref(db_connector), test_process_file, std::ref(cur_result_set), i+1, FLAGS_sql_interval)); + } + + for (auto &th : threads) { + th.join(); + // th.detach(); + } + + // execute last group if correct (no error) + if (test_result_set.ResultType() == "") { + if (! MultiThreadExecution(split_groups[thread_cnt-1], test_sequence, test_result_set, db_connector, test_process_file, cur_result_set, 0, FLAGS_sql_interval)) {return false;} + } + + if (test_result_set.ResultType() == "") { + if (result_handler.IsTestExpectedResult(cur_result_set, test_result_set.ExpectedResultSetList(), sql_map, test_process_file)) { + test_result_set.SetResultType("Avoid\nReason: Data anomaly did not occur and the data is consistent"); + } else { + test_result_set.SetResultType("Anomaly\nReason: Data anomaly is not recognized by the database, resulting in data inconsistencies"); + } + } + if(!outputter.WriteResultType(test_result_set.ResultType(), test_process_file)) { + return false; + } + return true; +} + +int main(int argc, char* argv[]) { + // parse gflags args + gflags::ParseCommandLineFlags(&argc, &argv, true); + std::cout << "input param-> " << std::endl; + std::cout << " db_type: " + FLAGS_db_type << std::endl; + std::cout << " user: " + FLAGS_user << std::endl; + std::cout << " passwd: " + FLAGS_passwd << std::endl; + std::cout << " isolation: " + FLAGS_isolation << std::endl; + + // mutex for txn + for(int i=0;i test_sequence_list = case_reader.TestSequenceList(); + std::vector test_result_set_list = case_reader.TestResultSetList(); + + + // // one session for all + // // init db_connector + // std::cout << dash + "init db_connector start" + dash << std::endl; + // DBConnector db_connector; + // if (!db_connector.InitDBConnector(FLAGS_user, FLAGS_passwd, FLAGS_db_type, FLAGS_conn_pool_size)) { + // std::cout << "init db_connector failed" << std::endl; + // } + // // set TXN_ISOLATION + // // crdb has only one isolation level, which is serializable by default + // if (FLAGS_db_type != "crdb" && FLAGS_db_type != "mongodb") { + // std::cout << dash + "set TXN_ISOLATION = " + FLAGS_isolation + dash << std::endl; + // //std::cout << dash + "set TIMEOUT = " + FLAGS_timeout + dash << std::endl; + // int idx = 1; + // for (auto hdbc : db_connector.DBConnPool()) { + // // set timeout + // if (!db_connector.SetTimeout(idx, FLAGS_timeout, FLAGS_db_type)) { + // return false; + // } + // if(!db_connector.SetIsolationLevel(hdbc, FLAGS_isolation, idx, FLAGS_db_type)) { + // return false; + // } + // idx++; + // } + // std::cout << "set TXN_ISOLATION = " + FLAGS_isolation + " success"<< std::endl; + // } + + // // create test_process_output_file's dir + // if (access(FLAGS_db_type.c_str(), 0) == -1) { + // mkdir(FLAGS_db_type.c_str(), S_IRWXU); + // } + // // create isolation dir + // // std::vector iso_list = {"read-uncommitted", "read-committed", "repeatable-read", "serializable", "result_summary"}; + // std::vector iso_list = {"read-committed", "serializable", "result_summary"}; + // for (auto iso : iso_list) { + // std::string iso_dir = FLAGS_db_type + "/" + iso; + // if (access(iso_dir.c_str(), 0) == -1) { + // mkdir(iso_dir.c_str(), S_IRWXU); + // } + // } + + // // send sql + // JobExecutor job_executor; + // int len = test_sequence_list.size(); + // for (int i = 0; i < len; i++) { + + // if (!job_executor.ExecTestSequence(test_sequence_list[i], test_result_set_list[i], db_connector)) { + // std::cout << "test sequence " + test_sequence_list[i].TestCaseType() + " execute failed" << std::endl; + // } else { + // std::string result_type = test_result_set_list[i].ResultType(); + // std::cout << "Test Result: " << result_type + "\n" << std::endl; + // } + // } + // // output result and release connection + // std::string ret_file = "./" + FLAGS_db_type + "/result_summary" + "/" + FLAGS_isolation + "_total-result.txt"; + // outputter.WriteResultTotal(test_result_set_list, ret_file); + // db_connector.ReleaseConn(); + + + // one case one intialization + // create test_process_output_file's dir + if (access(FLAGS_db_type.c_str(), 0) == -1) { + mkdir(FLAGS_db_type.c_str(), S_IRWXU); + } + // create isolation dir + std::vector iso_list; + if (FLAGS_db_type == "cassandra") { + iso_list = std::vector({"one"}); + } else if (FLAGS_db_type == "yugabyte") { + iso_list = std::vector({"serializable", "snapshot"}); + } else { + iso_list = std::vector({"read-uncommitted", "read-committed", "repeatable-read", "serializable", "result_summary"}); + } + //std::vector iso_list = {"read-uncommitted", "read-committed", "repeatable-read", "serializable", "result_summary"}; + for (auto iso : iso_list) { + std::string iso_dir = FLAGS_db_type + "/" + iso; + if (access(iso_dir.c_str(), 0) == -1) { + mkdir(iso_dir.c_str(), S_IRWXU); + } + } + // send sql + JobExecutor job_executor; + int len = test_sequence_list.size(); + for (int i = 0; i < len; i++) { + + // init db_connector + std::cout << dash + "init db_connector start" + dash << std::endl; + DBConnector db_connector; + if (!db_connector.InitDBConnector(FLAGS_user, FLAGS_passwd, FLAGS_db_type, FLAGS_conn_pool_size)) { + std::cout << "init db_connector failed" << std::endl; + } + // set TXN_ISOLATION + // crdb has only one isolation level, which is serializable by default + if (FLAGS_db_type != "crdb" && FLAGS_db_type != "mongodb" && FLAGS_db_type != "yugabyte") { + std::cout << dash + "set TXN_ISOLATION = " + FLAGS_isolation + dash << std::endl; + //std::cout << dash + "set TIMEOUT = " + FLAGS_timeout + dash << std::endl; + int idx = 1; + for (auto hdbc : db_connector.DBConnPool()) { + // set timeout + if (!db_connector.SetTimeout(idx, FLAGS_timeout, FLAGS_db_type)) { + return false; + } + if(!db_connector.SetIsolationLevel(hdbc, FLAGS_isolation, idx, FLAGS_db_type)) { + return false; + } + idx++; + } + std::cout << "set TXN_ISOLATION = " + FLAGS_isolation + " success"<< std::endl; + } + + // exec + if (!job_executor.ExecTestSequence(test_sequence_list[i], test_result_set_list[i], db_connector)) { + std::cout << "test sequence " + test_sequence_list[i].TestCaseType() + " execute failed" << std::endl; + } else { + std::string result_type = test_result_set_list[i].ResultType(); + std::cout << "Test Result: " << result_type + "\n" << std::endl; + } + + // db release + db_connector.ReleaseConn(); + } + std::string ret_file = "./" + FLAGS_db_type + "/result_summary" + "/" + FLAGS_isolation + "_total-result.txt"; + outputter.WriteResultTotal(test_result_set_list, ret_file); + + + // remove mutex for txn + for(int i=0;i test_sequence_list); + bool ExecTestSequence(TestSequence& test_sequence, TestResultSet& test_result_set, DBConnector db_connector); +}; diff --git a/src/dbtest/src/sqltest_v2.cc b/src/dbtest/src/sqltest_v2.cc new file mode 100644 index 00000000..b48f08b3 --- /dev/null +++ b/src/dbtest/src/sqltest_v2.cc @@ -0,0 +1,518 @@ +/* + * Tencent is pleased to support the open source community by making 3TS available. + * + * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software + * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All + * Tencent Modifications are Copyright (C) THL A29 Limited. + * + * Author: axingguchen farrisli (axingguchen,farrisli@tencent.com) + * + */ +#include "gflags/gflags.h" +#include "sqltest.h" +#include +#include +#include +#include + +// Implement command-line argument parsing based on Google's gflags library +DEFINE_string(db_type, "mysql", "data resource name, please see /etc/odbc.ini, such as mysql pg oracle ob tidb sqlserver crdb"); +DEFINE_string(user, "test123", "username"); +DEFINE_string(passwd, "Ly.123456", "password"); +DEFINE_string(db_name, "test", "create database name"); +DEFINE_int32(conn_pool_size, 30, "db_conn pool size"); +DEFINE_string(isolation, "serializable", "transation isolation level: read-uncommitted read-committed repeatable-read serializable"); +DEFINE_string(case_dir, "mysql", "test case dir name"); +DEFINE_string(timeout, "3", "timeout"); + + +std::vector mutex_txn(FLAGS_conn_pool_size); // same as conn_pool_size + +/** + * Tries to lock the specified mutex within the given timeout. + * + * @param wait_second The timeout in seconds. + * @param wait_nanosecond The timeout in nanoseconds. + * @param txn_id The transaction ID. + * @return True if the lock is acquired within the timeout, false otherwise. + */ +bool try_lock_wait(float wait_second, float wait_nanosecond, int txn_id) +{ + struct timespec timeoutTime; + timeoutTime.tv_nsec = wait_nanosecond; + timeoutTime.tv_sec = wait_second; + return pthread_mutex_timedlock( mutex_txn[txn_id], &timeoutTime ) == 0; // == 0 locked else no lock +} + +/** + * Executes a SQL query and returns the result. + * + * @param sql The SQL query to execute. + * @param session_id The session ID for tracking. + * @param sql_id The SQL query ID for tracking. + * @param test_result_set The test result set to store results. + * @param db_type The type of the database (e.g., "oracle", "mysql"). + * @param test_process_file The file to log test process. + * @return True if the query execution is successful, false otherwise. + */ +bool MultiThreadExecution(std::vector& txn_sql_list, TestSequence& test_sequence, TestResultSet& test_result_set, + DBConnector db_connector, std::string test_process_file, std::unordered_map>& cur_result_set, int sleeptime){ + + // usleep(2000000*sleeptime); // 2 second + usleep(100000*sleeptime); // 0.1 second + + std::ofstream test_process(test_process_file, std::ios::app); + int txn_id; + if (txn_sql_list.size() && txn_sql_list[0].TxnId()){ + txn_id = txn_sql_list[0].TxnId(); + pthread_mutex_lock(mutex_txn[txn_id]); + } + else{ + return false; + } + + for (auto& txn_sql : txn_sql_list) { + + int sql_id = txn_sql.SqlId(); + txn_id = txn_sql.TxnId(); + std::string sql = txn_sql.Sql(); + + // oracle mode + if (FLAGS_db_type == "oracle" || FLAGS_db_type == "ob") { + // mysql mode + // if (FLAGS_db_type == "oracle") { + std::string sub_str ("IF EXISTS"); // some SQL queries are different in Oracle DB + if (sql.find(sub_str) != std::string::npos) { + sql = std::regex_replace(sql, std::regex("IF EXISTS "), ""); + sql = std::regex_replace(sql, std::regex("IF EXISTS "), ""); + } + // std::string sub_str1 ("PRIMARY KEY"); // remove primary key in Oracle DB + // if (sql.find(sub_str1) != std::string::npos) { + // sql = std::regex_replace(sql, std::regex("k INT PRIMARY KEY"), "k INT"); + // } + std::string sql_timeout = "alter session set ddl_lock_timeout = " + FLAGS_timeout + ";"; + if (!db_connector.ExecWriteSql(1024, sql_timeout, test_result_set, txn_id, test_process_file)) { + goto jump; + } + } + + // replace sql keywords to capital + sql = std::regex_replace(sql, std::regex("set"), "SET"); // replace 'set' -> 'SET' + sql = std::regex_replace(sql, std::regex("from"), "FROM"); // replace 'from' -> 'FROM' + sql = std::regex_replace(sql, std::regex("values"), "VALUES"); + sql = std::regex_replace(sql, std::regex("where"), "WHERE"); + sql = std::regex_replace(sql, std::regex("insert"), "INSERT"); + sql = std::regex_replace(sql, std::regex("select"), "SELECT"); + sql = std::regex_replace(sql, std::regex("update"), "UPDATE"); + + + std::string ret_type = test_result_set.ResultType(); + auto index_T = ret_type.find("Timeout"); + auto index_R = ret_type.find("Rollback"); + if (index_T != ret_type.npos || index_R != ret_type.npos) { + for (int i = 0; i < FLAGS_conn_pool_size; i++) { + if (FLAGS_db_type != "ob") { + if (FLAGS_db_type == "crdb") { + db_connector.ExecWriteSql(1024, "ROLLBACK TRANSACTION", test_result_set, i + 1, test_process_file); + } else { + db_connector.SQLEndTnx("rollback", i + 1, 1024, test_result_set, FLAGS_db_type,test_process_file); + } + } + } + break; + } + + auto index_read = sql.find("SELECT"); + auto index_read_1 = sql.find("select"); + auto index_begin = sql.find("BEGIN"); + auto index_begin_1 = sql.find("begin"); + auto index_commit = sql.find("COMMIT"); + auto index_commit_1 = sql.find("commit"); + auto index_rollback = sql.find("ROLLBACK"); + auto index_rollback_1 = sql.find("rollback"); + + if (sql_id == 1) { + std::cout << "" << std::endl; + test_process << "" << std::endl; + std::cout << dash + test_sequence.TestCaseType() + " test execution" + dash << std::endl; + test_process << dash + test_sequence.TestCaseType() + " test execution" + dash << std::endl; + } + if (index_read != sql.npos || index_read_1 != sql.npos) { + if (!db_connector.ExecReadSql2Int(sql_id, sql, test_result_set, cur_result_set, txn_id, test_sequence.ParamNum(), test_process_file)) { + goto jump; + } + } else if (index_begin != sql.npos || index_begin_1 != sql.npos) { + if (FLAGS_db_type != "crdb" && FLAGS_db_type != "ob") { + if (FLAGS_db_type == "tidb") { + // if (!db_connector.ExecWriteSql(sql_id, "BEGIN PESSIMISTIC;", test_result_set, txn_id, test_process_file)) { + if (!db_connector.ExecWriteSql(sql_id, "BEGIN OPTIMISTIC;", test_result_set, txn_id, test_process_file)) { + goto jump; + } + // } else if (FLAGS_db_type == "myrocks") { // MyRocks SI mode + // if (!db_connector.ExecWriteSql(sql_id, "START TRANSACTION WITH CONSISTENT SNAPSHOT;", test_result_set, txn_id, test_process_file)) { + // // if (!db_connector.ExecWriteSql(sql_id, "BEGIN OPTIMISTIC;", test_result_set, txn_id, test_process_file)) { + // goto jump; + // } + } else { + if (!db_connector.SQLStartTxn(txn_id, sql_id, test_process_file)) { + goto jump; + } + // set pg lock timeout + if (FLAGS_db_type == "pg") { + std::string sql_timeout = "SET LOCAL lock_timeout = '" + FLAGS_timeout + "s';"; + if (!db_connector.ExecWriteSql(1024, sql_timeout, test_result_set, txn_id, test_process_file)) { + goto jump; + } + } + // set mysql lock timeout + if (FLAGS_db_type == "mysql") { + std::string sql_timeout = "SET GLOBAL innodb_lock_wait_timetout = " + FLAGS_timeout + ";"; + if (!db_connector.ExecWriteSql(1024, sql_timeout, test_result_set, txn_id, test_process_file)) { + goto jump; + } + } + + + // // note: oracle timeout will kill the session + // if (FLAGS_db_type == "oracle") { + // std::string sql_timeout = "alter session set ddl_lock_timeout = " + FLAGS_timeout + ";"; + // std::cout << " sql: " << sql_timeout << std::endl; + // if (!db_connector.ExecWriteSql(1024, sql_timeout, test_result_set, txn_id, test_process_file)) { + // goto jump; + // } + // } + // // alter session set ddl_lock_timeout = 5 + + } + } else { + if (FLAGS_db_type == "crdb") { + if (!db_connector.ExecWriteSql(sql_id, "BEGIN TRANSACTION;", test_result_set, txn_id, test_process_file)) { + goto jump; + } + } else { + if (!db_connector.ExecWriteSql(sql_id, "BEGIN;", test_result_set, txn_id, test_process_file)) { + goto jump; + } + } + } + } else if (index_commit != sql.npos || index_commit_1 != sql.npos) { + if (FLAGS_db_type != "crdb") { + if (!db_connector.SQLEndTnx("commit", txn_id, sql_id, test_result_set, FLAGS_db_type, test_process_file)) { + goto jump; + } + } else { + if (!db_connector.ExecWriteSql(sql_id, "COMMIT TRANSACTION;", test_result_set, txn_id, test_process_file)) { + goto jump; + } + } + } else if (index_rollback != sql.npos || index_rollback_1 != sql.npos) { + if (FLAGS_db_type != "crdb") { + if (!db_connector.SQLEndTnx("rollback", txn_id, sql_id, test_result_set, FLAGS_db_type, test_process_file)) { + goto jump; + } + } else { + if (!db_connector.SQLEndTnx("rollback", txn_id, sql_id, test_result_set, FLAGS_db_type, test_process_file)) { + goto jump; + } + } + } else { + if (!db_connector.ExecWriteSql(sql_id, sql, test_result_set, txn_id, test_process_file)) { + goto jump; + } + } + } + pthread_mutex_unlock(mutex_txn[txn_id]); + return true; +jump: + pthread_mutex_unlock(mutex_txn[txn_id]); + return false; + + +}; + +/** + * Executes a test sequence, including preparation, execution, and verification. + * + * @param test_sequence The test sequence to execute. + * @param test_result_set The result set to store test results. + * @param db_connector The database connector for executing SQL queries. + * @return True if the test sequence execution is successful, false otherwise. + */ +bool JobExecutor::ExecTestSequence(TestSequence& test_sequence, TestResultSet& test_result_set, DBConnector db_connector) { + std::string test_process_file = "./" + FLAGS_db_type + "/" + FLAGS_isolation + "/" + test_sequence.TestCaseType() + ".txt"; + // std::string test_process_file = "./" + FLAGS_db_type + "/" + FLAGS_isolation + "/" + test_sequence.TestCaseType() + "_" + FLAGS_isolation + ".txt"; + std::cout << test_process_file << std::endl; + std::ifstream test_process_tmp(test_process_file); + if (test_process_tmp) { + std::remove(test_process_file.c_str()); + } + std::ofstream test_process(test_process_file, std::ios::app); + + if (!test_process) { + std::cout << "create test_process_file failed" << std::endl; + } + + test_process << "#### db_type: " + FLAGS_db_type + " ####" << std::endl; + std::cout << "#### db_type: " + FLAGS_db_type + " ####" << std::endl; + + std::string test_case_type = test_sequence.TestCaseType(); + auto index_t = test_case_type.find_first_of("_"); + if (index_t != test_case_type.npos) { + test_case_type = test_case_type.substr(int(index_t) + 1); + } + + test_process << "#### test_name: " + test_case_type + " ####" << std::endl; + test_process << "#### isolation_level: " + FLAGS_isolation + " ####\n" << std::endl; + + std::cout << "#### test_name: " + test_case_type + " ####" << std::endl; + std::cout << "#### isolation_level: " + FLAGS_isolation + " ####\n" << std::endl; + + std::string preparation_info = "Preparation: create new tables and insert necessory rows"; + std::string execution_info = "Execution: execute transactions in parallel"; + std::cout << preparation_info << std::endl; + std::cout << execution_info << std::endl; + test_process << preparation_info << std::endl; + test_process << execution_info << std::endl; + + std::cout << " " << std::endl; + test_process << " " << std::endl; + + if (FLAGS_db_type != "oracle" && FLAGS_db_type != "ob") { + std::cout << "set TXN_ISOLATION = " + FLAGS_isolation + " for each session"<< std::endl<< std::endl; + test_process << "set TXN_ISOLATION = " + FLAGS_isolation + " for each session"<< std::endl<< std::endl; + } + + std::vector txn_sql_list = test_sequence.TxnSqlList(); + std::cout << dash + test_sequence.TestCaseType() + " test preparation" + dash << std::endl; + test_process << dash + test_sequence.TestCaseType() + " test preparation" + dash << std::endl; + std::unordered_map> cur_result_set; + std::unordered_map sql_map; + std::string table_name; + + std::vector> init_group; // preparation part + std::vector> split_groups; // execution and verification part + std::vector group; + + int txn_id_old; + int thread_cnt = 0; + for (auto& txn_sql : txn_sql_list) { + // split into anther group + if (txn_sql.SqlId() == 1 || txn_sql.TxnId() != txn_id_old){ + // put into init group + if (txn_sql.SqlId() == 1) { + init_group.push_back(group); + group.clear(); + } + // put into parallel groups + else{ + split_groups.push_back(group); + group.clear(); + thread_cnt = thread_cnt + 1; + } + } + sql_map[txn_sql.SqlId()] = txn_sql.Sql();; + // add into the same group + TxnSql txn_sql1(txn_sql.SqlId(), txn_sql.TxnId(), txn_sql.Sql(), txn_sql.TestCaseType()); + group.push_back(txn_sql1); + txn_id_old = txn_sql.TxnId(); + } + split_groups.push_back(group); + thread_cnt = thread_cnt + 1; + + if (FLAGS_db_type == "crdb"){ + // remove non transaction commit + // remove the first commit at the prepraration + init_group[0].pop_back(); + // remove the last commit at verification selct + split_groups[thread_cnt-1].pop_back(); + } + // std::cout << init_group.size() < threads; + + // exlcude last group + for (int i = 0; i < thread_cnt-1; i++) { + threads.push_back(std::thread(MultiThreadExecution, std::ref(split_groups[i]), std::ref(test_sequence), std::ref(test_result_set), std::ref(db_connector), test_process_file, std::ref(cur_result_set), i+1)); + } + + for (auto &th : threads) { + th.join(); + + } + // execute last group if correct + if (test_result_set.ResultType() == "") { + if (! MultiThreadExecution(split_groups[thread_cnt-1], test_sequence, test_result_set, db_connector, test_process_file, cur_result_set, 0)) {return false;} + } + if (test_result_set.ResultType() == "") { + test_result_set.SetResultType("Finish\nReason: The test case was finished without rollback, to be checked if consistent"); + // if (result_handler.IsTestExpectedResult(cur_result_set, test_result_set.ExpectedResultSetList(), sql_map, test_process_file)) { + // test_result_set.SetResultType("Avoid\nReason: Data anomaly did not occur and the data is consistent"); + // } else { + // test_result_set.SetResultType("Anomaly\nReason: Data anomaly is not recognized by the database, resulting in data inconsistencies"); + // } + } + if(!outputter.WriteResultType(test_result_set.ResultType(), test_process_file)) { + return false; + } + return true; +} + +int main(int argc, char* argv[]) { + // parse gflags args + gflags::ParseCommandLineFlags(&argc, &argv, true); + std::cout << "input param-> " << std::endl; + std::cout << " db_type: " + FLAGS_db_type << std::endl; + std::cout << " user: " + FLAGS_user << std::endl; + std::cout << " passwd: " + FLAGS_passwd << std::endl; + std::cout << " isolation: " + FLAGS_isolation << std::endl; + + // mutex for txn + for(int i=0;i test_sequence_list = case_reader.TestSequenceList(); + std::vector test_result_set_list = case_reader.TestResultSetList(); + + + // // one session for all + // // init db_connector + // std::cout << dash + "init db_connector start" + dash << std::endl; + // DBConnector db_connector; + // if (!db_connector.InitDBConnector(FLAGS_user, FLAGS_passwd, FLAGS_db_type, FLAGS_conn_pool_size)) { + // std::cout << "init db_connector failed" << std::endl; + // } + // // set TXN_ISOLATION + // // crdb has only one isolation level, which is serializable by default + // if (FLAGS_db_type != "crdb" && FLAGS_db_type != "mongodb") { + // std::cout << dash + "set TXN_ISOLATION = " + FLAGS_isolation + dash << std::endl; + // //std::cout << dash + "set TIMEOUT = " + FLAGS_timeout + dash << std::endl; + // int idx = 1; + // for (auto hdbc : db_connector.DBConnPool()) { + // // set timeout + // if (!db_connector.SetTimeout(idx, FLAGS_timeout, FLAGS_db_type)) { + // return false; + // } + // if(!db_connector.SetIsolationLevel(hdbc, FLAGS_isolation, idx, FLAGS_db_type)) { + // return false; + // } + // idx++; + // } + // std::cout << "set TXN_ISOLATION = " + FLAGS_isolation + " success"<< std::endl; + // } + + // // create test_process_output_file's dir + // if (access(FLAGS_db_type.c_str(), 0) == -1) { + // mkdir(FLAGS_db_type.c_str(), S_IRWXU); + // } + // // create isolation dir + // // std::vector iso_list = {"read-uncommitted", "read-committed", "repeatable-read", "serializable", "result_summary"}; + // std::vector iso_list = {"read-committed", "serializable", "result_summary"}; + // for (auto iso : iso_list) { + // std::string iso_dir = FLAGS_db_type + "/" + iso; + // if (access(iso_dir.c_str(), 0) == -1) { + // mkdir(iso_dir.c_str(), S_IRWXU); + // } + // } + + // // send sql + // JobExecutor job_executor; + // int len = test_sequence_list.size(); + // for (int i = 0; i < len; i++) { + + // if (!job_executor.ExecTestSequence(test_sequence_list[i], test_result_set_list[i], db_connector)) { + // std::cout << "test sequence " + test_sequence_list[i].TestCaseType() + " execute failed" << std::endl; + // } else { + // std::string result_type = test_result_set_list[i].ResultType(); + // std::cout << "Test Result: " << result_type + "\n" << std::endl; + // } + // } + // // output result and release connection + // std::string ret_file = "./" + FLAGS_db_type + "/result_summary" + "/" + FLAGS_isolation + "_total-result.txt"; + // outputter.WriteResultTotal(test_result_set_list, ret_file); + // db_connector.ReleaseConn(); + + + // one case one intialization + // create test_process_output_file's dir + if (access(FLAGS_db_type.c_str(), 0) == -1) { + mkdir(FLAGS_db_type.c_str(), S_IRWXU); + } + // create isolation dir + // std::vector iso_list = {"read-committed", "repeatable-read", "serializable", "result_summary"}; + std::vector iso_list = {"read-uncommitted", "read-committed", "repeatable-read", "serializable", "result_summary"}; + for (auto iso : iso_list) { + std::string iso_dir = FLAGS_db_type + "/" + iso; + if (access(iso_dir.c_str(), 0) == -1) { + mkdir(iso_dir.c_str(), S_IRWXU); + } + } + // send sql + JobExecutor job_executor; + int len = test_sequence_list.size(); + for (int i = 0; i < len; i++) { + + // init db_connector + std::cout << dash + "init db_connector start" + dash << std::endl; + DBConnector db_connector; + if (!db_connector.InitDBConnector(FLAGS_user, FLAGS_passwd, FLAGS_db_type, FLAGS_conn_pool_size)) { + std::cout << "init db_connector failed" << std::endl; + } + // set TXN_ISOLATION + // crdb has only one isolation level, which is serializable by default + if (FLAGS_db_type != "crdb" && FLAGS_db_type != "mongodb") { + std::cout << dash + "set TXN_ISOLATION = " + FLAGS_isolation + dash << std::endl; + //std::cout << dash + "set TIMEOUT = " + FLAGS_timeout + dash << std::endl; + int idx = 1; + for (auto hdbc : db_connector.DBConnPool()) { + // set timeout + if (!db_connector.SetTimeout(idx, FLAGS_timeout, FLAGS_db_type)) { + return false; + } + if(!db_connector.SetIsolationLevel(hdbc, FLAGS_isolation, idx, FLAGS_db_type)) { + return false; + } + idx++; + } + std::cout << "set TXN_ISOLATION = " + FLAGS_isolation + " success"<< std::endl; + } + + // exec + if (!job_executor.ExecTestSequence(test_sequence_list[i], test_result_set_list[i], db_connector)) { + std::cout << "test sequence " + test_sequence_list[i].TestCaseType() + " execute failed" << std::endl; + } else { + std::string result_type = test_result_set_list[i].ResultType(); + std::cout << "Test Result: " << result_type + "\n" << std::endl; + } + // db release + db_connector.ReleaseConn(); + + } + std::string ret_file = "./" + FLAGS_db_type + "/result_summary" + "/" + FLAGS_isolation + "_total-result.txt"; + outputter.WriteResultTotal(test_result_set_list, ret_file); + + + // remove mutex for txn + for(int i=0;i= 1 ; +3-2-BEGIN; +4-2-insert into t1 values(0,1); +5-2-insert into t1 values(1,2); +6-2-COMMIT; +7-1-SELECT SUM(v) FROM t1 WHERE k <= 0; +8-1-COMMIT: +9-3-select * from t1 ORDER BY k; +10-3-COMMIT; + + +serializable { +2-, +7-, +9-0,1 1,2 + + +2-1 +7-2 +9-0,1 1,2 +} diff --git a/src/dbtest/t/pg/rat_dda_write_read_skew.txt b/src/dbtest/t/pg/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..90b9ada2 --- /dev/null +++ b/src/dbtest/t/pg/rat_dda_write_read_skew.txt @@ -0,0 +1,26 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-update t1 set v=1 where k=0; +3-2-BEGIN; +4-2-update t1 set v=1 where k=1; +5-2-select * from t1 where k=0; +6-1-select * from t1 where k=1; +7-2-COMMIT; +8-1-commit; +9-3-select * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +5-0,1 +6-1,0 +9-0,1 1,1 + +5-0,0 +6-1,1 +9-0,1 1,1 +} \ No newline at end of file diff --git a/src/dbtest/t/pg/rat_dda_write_read_skew_committed.txt b/src/dbtest/t/pg/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..764cb1a2 --- /dev/null +++ b/src/dbtest/t/pg/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,29 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-update t1 set v=1 where k=0; +3-2-BEGIN; +4-2-update t1 set v=1 where k=1; +5-2-select * from t1 where k=0; +6-2-COMMIT; +7-1-select * from t1 where k=1; +8-1-COMMIT; +9-3-select * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +5-0,1 +7-1,0 +9-0,1 1,1 + +5-0,0 +7-1,1 +9-0,1 1,1 +} + + + diff --git a/src/dbtest/t/pg/rat_mda_step_rat.txt b/src/dbtest/t/pg/rat_mda_step_rat.txt new file mode 100644 index 00000000..6a3e0eb3 --- /dev/null +++ b/src/dbtest/t/pg/rat_mda_step_rat.txt @@ -0,0 +1,53 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-update t1 set v=1 where k=0; +3-2-BEGIN; +4-2-update t1 set v=1 where k=1; +5-2-select * from t1 where k=0; +6-3-BEGIN; +7-3-update t1 set v=1 where k=2; +8-3-select * from t1 where k=1; +9-1-select * from t1 where k=2; +10-1-COMMIT; +11-2-COMMIT; +12-3-COMMIT; +13-4-select * from t1 ORDER BY k; +14-4-COMMIT; + +serializable { +5-0,1 +8-1,1 +9-2,0 +13-0,1 1,1 2,1 + +5-0,1 +8-1,0 +9-2,0 +13-0,1 1,1 2,1 + +5-0,0 +8-1,1 +9-2,0 +13-0,1 1,1 2,1 + +5-0,0 +8-1,1 +9-2,1 +13-0,1 1,1 2,1 + +5-0,1 +8-1,0 +9-2,1 +13-0,1 1,1 2,1 + +5-0,0 +8-1,0 +9-2,1 +13-0,1 1,1 2,1 +} diff --git a/src/dbtest/t/pg/rat_mda_step_rat_long_fork.txt b/src/dbtest/t/pg/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..bda3a76c --- /dev/null +++ b/src/dbtest/t/pg/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,108 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-4-BEGIN; +2-4-select * from t1 where k=0; +3-1-BEGIN; +4-1-update t1 set v=1 where k=0; +5-3-BEGIN; +6-3-select * from t1 where k=1; +7-3-select * from t1 where k=0; +8-2-BEGIN; +9-2-update t1 set v=1 where k=1; +10-4-select * from t1 where k=1; +11-1-commit; +12-2-commit; +13-3-commit; +14-4-commit; +15-4-select * from t1 ORDER BY k; +16-4-commit; + +serializable { +2-0,0 +6-1,0 +7-0,0 +10-1,0 +15-0,1 1,1 + +2-0,1 +6-1,0 +7-0,0 +10-1,1 +15-0,1 1,1 + +2-0,0 +6-1,1 +7-0,1 +10-1,0 +15-0,1 1,1 + +2-0,1 +6-1,1 +7-0,1 +10-1,1 +15-0,1 1,1 + +2-0,1 +6-1,0 +7-0,1 +10-1,0 +15-0,1 1,1 + +2-0,0 +6-1,1 +7-0,0 +10-1,1 +15-0,1 1,1 + +2-0,1 +6-1,1 +7-0,1 +10-1,0 +15-0,1 1,1 + +2-0,1 +6-1,0 +7-0,1 +10-1,1 +15-0,1 1,1 + +2-0,0 +6-1,1 +7-0,1 +10-1,1 +15-0,1 1,1 + +2-0,1 +6-1,1 +7-0,0 +10-1,1 +15-0,1 1,1 + +2-0,0 +6-1,0 +7-0,0 +10-1,1 +15-0,1 1,1 + +2-0,1 +6-1,0 +7-0,0 +10-1,0 +15-0,1 1,1 + +2-0,0 +6-1,0 +7-0,1 +10-1,0 +15-0,1 1,1 + +2-0,0 +6-1,1 +7-0,0 +10-1,0 +15-0,1 1,1 +} diff --git a/src/dbtest/t/pg/rat_mda_step_rat_predicate_based_delete.txt b/src/dbtest/t/pg/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..877ed9de --- /dev/null +++ b/src/dbtest/t/pg/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,53 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 1); +0-1-INSERT INTO t1 VALUES (1, 1); +0-1-INSERT INTO t1 VALUES (2, 1); +0-1-COMMIT; +1-1-BEGIN; +2-1-DELETE FROM t1 WHERE k=0; +3-2-BEGIN; +4-2-DELETE FROM t1 WHERE k=1; +5-2-SELECT SUM(v) FROM t1 WHERE k = 0; +6-3-BEGIN; +7-3-DELETE FROM t1 WHERE k=2; +8-3-SELECT SUM(v) FROM t1 WHERE k = 1; +9-1-SELECT SUM(v) FROM t1 WHERE k = 2; +10-1-COMMIT; +11-2-COMMIT; +12-3-COMMIT; +13-4-select * from t1; +14-4-COMMIT; + +serializable { +5-, +8-, +9-1, +13-null + +5-, +8-1, +9-1, +13-null + +5-1, +8-, +9-1, +13-null + +5-1, +8-1, +9-, +13-null + +5-, +8-1, +9-, +13-null + +5-1, +8-1, +9-, +13-null +} diff --git a/src/dbtest/t/pg/rat_mda_step_rat_predicate_based_insert.txt b/src/dbtest/t/pg/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..06f68f2d --- /dev/null +++ b/src/dbtest/t/pg/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,50 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-COMMIT; +1-1-BEGIN; +2-1-INSERT INTO t1 VALUES (0, 1); +3-2-BEGIN; +4-2-INSERT INTO t1 VALUES (1, 1); +5-2-SELECT SUM(v) FROM t1 WHERE k = 0; +6-3-BEGIN; +7-3-INSERT INTO t1 VALUES (2, 1); +8-3-SELECT SUM(v) FROM t1 WHERE k = 1; +9-1-SELECT SUM(v) FROM t1 WHERE k = 2; +10-1-COMMIT; +11-2-COMMIT; +12-3-COMMIT; +13-4-select * from t1 ORDER BY k; +14-4-COMMIT; + +serializable { +5-, +8-1, +9-1, +13-0,1 1,1 2,1 + +5-, +8-1, +9-, +13-0,1 1,1 2,1 + +5-, +8-, +9-1, +13-0,1 1,1 2,1 + +5-1, +8-, +9-1, +13-0,1 1,1 2,1 + +5-1, +8-1, +9-, +13-0,1 1,1 2,1 + +5-1, +8-, +9-, +13-0,1 1,1 2,1 +} diff --git a/src/dbtest/t/pg/rat_sda_dirty_read.txt b/src/dbtest/t/pg/rat_sda_dirty_read.txt new file mode 100644 index 00000000..51a54867 --- /dev/null +++ b/src/dbtest/t/pg/rat_sda_dirty_read.txt @@ -0,0 +1,18 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k = 0; +5-1-ROLLBACK; +6-2-COMMIT; +7-3-SELECT * FROM t1; +8-3-COMMIT; + +serializable { +4-0,0 +7-0,0 +} diff --git a/src/dbtest/t/pg/rat_sda_intermediate_read.txt b/src/dbtest/t/pg/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..7054534f --- /dev/null +++ b/src/dbtest/t/pg/rat_sda_intermediate_read.txt @@ -0,0 +1,23 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k=0; +5-1-UPDATE t1 SET v=2 WHERE k=0; +6-2-COMMIT; +7-1-COMMIT; +8-3-SELECT * from t1; +9-3-COMMIT; + +serializable { +4-0,2 +8-0,2 + +4-0,0 +8-0,2 +} + diff --git a/src/dbtest/t/pg/rat_sda_intermediate_read_committed.txt b/src/dbtest/t/pg/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..cd9132fe --- /dev/null +++ b/src/dbtest/t/pg/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,23 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k=0; +5-2-COMMIT; +6-1-UPDATE t1 SET v=2 WHERE k=0; +7-1-COMMIT; +8-3-SELECT * from t1; +9-3-COMMIT; + +serializable { +4-0,2 +8-0,2 + +4-0,0 +8-0,2 +} + diff --git a/src/dbtest/t/pg/rat_sda_lost_self_update.txt b/src/dbtest/t/pg/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..31745804 --- /dev/null +++ b/src/dbtest/t/pg/rat_sda_lost_self_update.txt @@ -0,0 +1,22 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=0; +5-1-SELECT * from t1 WHERE k=0; +6-1-COMMIT; +7-2-COMMIT; +8-3-SELECT * FROM t1; +9-3-COMMIT; + +serializable { +5-0,1 +8-0,2 + +5-0,1 +8-0,1 +} diff --git a/src/dbtest/t/pg/rat_sda_non_repeatable_read.txt b/src/dbtest/t/pg/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..18d8be0b --- /dev/null +++ b/src/dbtest/t/pg/rat_sda_non_repeatable_read.txt @@ -0,0 +1,24 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k=0; +3-2-BEGIN;; +4-2-UPDATE t1 SET v=1 WHERE k=0; +5-1-SELECT * from t1 WHERE k=0; +6-2-COMMIT; +7-1-COMMIT; +8-3-SELECT * FROM t1; +9-3-COMMIT; + +serializable { +2-0,0 +5-0,0 +8-0,1 + +2-0,1 +5-0,1 +8-0,1 +} \ No newline at end of file diff --git a/src/dbtest/t/pg/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/src/dbtest/t/pg/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..0ae57913 --- /dev/null +++ b/src/dbtest/t/pg/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,24 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE v=0; +3-2-BEGIN; +4-2-DELETE FROM t1 WHERE k=0; +5-2-COMMIT; +6-1-SELECT * from t1 WHERE v=0; +7-1-COMMIT; +8-3-SELECT * FROM t1; +9-3-COMMIT; + +serializable { +2-null +6-null +8-0,0 + +2-0,0 +6-0,0 +8-null +} diff --git a/src/dbtest/t/pg/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/src/dbtest/t/pg/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..408f7737 --- /dev/null +++ b/src/dbtest/t/pg/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,23 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE v=0; +3-2-BEGIN; +4-2-INSERT INTO t1 VALUES (0, 0); +5-2-COMMIT; +6-1-SELECT * from t1 WHERE v=0; +7-1-COMMIT; +8-3-SELECT * FROM t1; +9-3-COMMIT; + +serializable { +2-null +6-null +8-0,0 + +2-0,0 +6-0,0 +8-0,0 +} diff --git a/src/dbtest/t/pg/wat_dda_double_write_skew2_committed.txt b/src/dbtest/t/pg/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..c925c802 --- /dev/null +++ b/src/dbtest/t/pg/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,24 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-begin; +2-1-update t1 set v=1 where k=0; +3-2-begin; +4-2-update t1 set v=1 where k=1; +5-2-update t1 set v=2 where k=0; +6-2-commit; +7-1-select * from t1 where k=1; +8-1-commit; +9-3-SELECT * FROM t1 ORDER BY k; +10-3-COMMIT; + +serializable { +7-1,0 +9-0,2 1,1 + +7-1,1 +9-0,1 1,1 +} \ No newline at end of file diff --git a/src/dbtest/t/pg/wat_dda_full_write_skew_c1.txt b/src/dbtest/t/pg/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..2ad62d13 --- /dev/null +++ b/src/dbtest/t/pg/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,22 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=1; +5-2-UPDATE t1 SET v=2 WHERE k=0; +6-1-UPDATE t1 SET v=1 WHERE k=1; +7-1-COMMIT; +8-2-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +9-0,1 1,1 + +9-0,2 1,2 +} diff --git a/src/dbtest/t/pg/wat_dda_full_write_skew_c2.txt b/src/dbtest/t/pg/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..e047cc73 --- /dev/null +++ b/src/dbtest/t/pg/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,22 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=1; +5-2-UPDATE t1 SET v=2 WHERE k=0; +6-1-UPDATE t1 SET v=1 WHERE k=1; +7-2-COMMIT; +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +9-0,1 1,1 + +9-0,2 1,2 +} diff --git a/src/dbtest/t/pg/wat_dda_full_write_skew_committed.txt b/src/dbtest/t/pg/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..de5b71d0 --- /dev/null +++ b/src/dbtest/t/pg/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,22 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=1; +5-2-UPDATE t1 SET v=2 WHERE k=0; +6-2-COMMIT; +7-1-UPDATE t1 SET v=1 WHERE k=1; +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +9-0,1 1,1 + +9-0,2 1,2 +} diff --git a/src/dbtest/t/pg/wat_dda_read_write_skew1_c1.txt b/src/dbtest/t/pg/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..e129c548 --- /dev/null +++ b/src/dbtest/t/pg/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,24 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=1; +5-2-UPDATE t1 SET v=1 WHERE k=0; +6-1-UPDATE t1 SET v=1 WHERE k=1; +7-1-COMMIT; +8-2-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +2-0,0 +9-0,1 1,2 + +2-0,1 +9-0,1 1,1 +} diff --git a/src/dbtest/t/pg/wat_dda_read_write_skew1_c2.txt b/src/dbtest/t/pg/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..ad1a73ee --- /dev/null +++ b/src/dbtest/t/pg/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,24 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=1; +5-2-UPDATE t1 SET v=1 WHERE k=0; +6-1-UPDATE t1 SET v=1 WHERE k=1; +7-2-COMMIT; +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +2-0,0 +9-0,1 1,2 + +2-0,1 +9-0,1 1,1 +} diff --git a/src/dbtest/t/pg/wat_dda_read_write_skew2_c1.txt b/src/dbtest/t/pg/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..2b92f31a --- /dev/null +++ b/src/dbtest/t/pg/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,24 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k=1; +5-2-UPDATE t1 SET v=2 WHERE k=0; +6-1-UPDATE t1 SET v=1 WHERE k=1; +7-1-COMMIT; +8-2-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +4-1,1 +9-0,2 1,1 + +4-1,0 +9-0,1 1,1 +} diff --git a/src/dbtest/t/pg/wat_dda_read_write_skew2_c2.txt b/src/dbtest/t/pg/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..8c9f9aa6 --- /dev/null +++ b/src/dbtest/t/pg/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,24 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k=1; +5-2-UPDATE t1 SET v=2 WHERE k=0; +6-1-UPDATE t1 SET v=1 WHERE k=1; +7-2-COMMIT; +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +4-1,1 +9-0,2 1,1 + +4-1,0 +9-0,1 1,1 +} diff --git a/src/dbtest/t/pg/wat_dda_read_write_skew2_committed.txt b/src/dbtest/t/pg/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..ade01f80 --- /dev/null +++ b/src/dbtest/t/pg/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,24 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k=1; +5-2-UPDATE t1 SET v=2 WHERE k=0; +6-2-COMMIT; +7-1-UPDATE t1 SET v=1 WHERE k=1; +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +4-1,1 +9-0,2 1,1 + +4-1,0 +9-0,1 1,1 +} diff --git a/src/dbtest/t/pg/wat_mda_step_wat_c1.txt b/src/dbtest/t/pg/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..1a57bfed --- /dev/null +++ b/src/dbtest/t/pg/wat_mda_step_wat_c1.txt @@ -0,0 +1,35 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-update t1 set v=1 where k=0; +3-2-BEGIN; +4-2-update t1 set v=2 where k=1; +5-2-update t1 set v=2 where k=0; +6-3-BEGIN; +7-3-update t1 set v=3 where k=2; +8-3-update t1 set v=3 where k=1; +9-1-update t1 set v=1 where k=2; +10-1-COMMIT; +11-2-COMMIT; +12-3-COMMIT; +13-4-select * from t1 ORDER BY k; +14-4-COMMIT; + +serializable { +13-0,2 1,3 2,3 + +13-0,2 1,2 2,3 + +13-0,1 1,3 2,3 + +13-0,1 1,3 2,1 + +13-0,2 1,2 2,1 + +13-0,1 1,2 2,1 +} diff --git a/src/dbtest/t/pg/wat_mda_step_wat_c2.txt b/src/dbtest/t/pg/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..df78d474 --- /dev/null +++ b/src/dbtest/t/pg/wat_mda_step_wat_c2.txt @@ -0,0 +1,35 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-update t1 set v=1 where k=0; +3-2-BEGIN; +4-2-update t1 set v=2 where k=1; +5-3-BEGIN; +6-2-update t1 set v=2 where k=0; +7-3-update t1 set v=3 where k=2; +8-3-update t1 set v=3 where k=1; +9-1-update t1 set v=1 where k=2; +10-2-COMMIT; +11-1-COMMIT; +12-3-COMMIT; +13-4-select * from t1 ORDER BY k; +14-4-COMMIT; + +serializable { +13-0,2 1,3 2,3 + +13-0,2 1,2 2,3 + +13-0,1 1,3 2,3 + +13-0,1 1,3 2,1 + +13-0,2 1,2 2,1 + +13-0,1 1,2 2,1 +} diff --git a/src/dbtest/t/pg/wat_sda_dirty_write_1abort.txt b/src/dbtest/t/pg/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..3a0a598e --- /dev/null +++ b/src/dbtest/t/pg/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,20 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=0; +5-1-ROLLBACK; +6-2-COMMIT; +7-3-SELECT * FROM t1; +8-3-DROP TABLE IF EXISTS t1; +9-3-COMMIT; + +serializable { +7-0,1 + +7-0,2 +} \ No newline at end of file diff --git a/src/dbtest/t/pg/wat_sda_dirty_write_2commit.txt b/src/dbtest/t/pg/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..736f479f --- /dev/null +++ b/src/dbtest/t/pg/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,21 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=0; +5-1-COMMIT; +6-2-COMMIT; +7-3-SELECT * FROM t1; +8-3-DROP TABLE IF EXISTS t1; +9-3-COMMIT; + + +serializable { +7-0,1 + +7-0,2 +} diff --git a/src/dbtest/t/pg/wat_sda_full_write.txt b/src/dbtest/t/pg/wat_sda_full_write.txt new file mode 100644 index 00000000..c4c9ceaf --- /dev/null +++ b/src/dbtest/t/pg/wat_sda_full_write.txt @@ -0,0 +1,20 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=0; +5-1-UPDATE t1 SET v=3 WHERE k=0; +6-1-COMMIT; +7-2-COMMIT; +8-3-SELECT * from t1; +9-3-COMMIT; + +serializable { +8-0,2 + +8-0,3 +} diff --git a/src/dbtest/t/pg/wat_sda_full_write_committed.txt b/src/dbtest/t/pg/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..97b442de --- /dev/null +++ b/src/dbtest/t/pg/wat_sda_full_write_committed.txt @@ -0,0 +1,20 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=0; +5-2-COMMIT; +6-1-UPDATE t1 SET v=3 WHERE k=0; +7-1-COMMIT; +8-3-SELECT * from t1; +9-3-COMMIT; + +serializable { +8-0,2 + +8-0,3 +} \ No newline at end of file diff --git a/src/dbtest/t/pg/wat_sda_lost_self_update_committed.txt b/src/dbtest/t/pg/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..7b8a0059 --- /dev/null +++ b/src/dbtest/t/pg/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,22 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=0; +5-2-COMMIT; +6-1-SELECT * from t1 WHERE k=0; +7-1-COMMIT; +8-3-SELECT * FROM t1; +9-3-COMMIT; + +serializable { +6-0,1 +8-0,2 + +6-0,1 +8-0,1 +} diff --git a/src/dbtest/t/pg/wat_sda_lost_update_c1.txt b/src/dbtest/t/pg/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..5bc21686 --- /dev/null +++ b/src/dbtest/t/pg/wat_sda_lost_update_c1.txt @@ -0,0 +1,22 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=0; +5-1-UPDATE t1 SET v=1 WHERE k=0; +6-1-COMMIT; +7-2-COMMIT; +8-3-SELECT * FROM t1; +9-3-COMMIT; + +serializable { +2-0,0 +8-0,2 + +2-0,2 +8-0,1 +} \ No newline at end of file diff --git a/src/dbtest/t/pg/wat_sda_lost_update_c2.txt b/src/dbtest/t/pg/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..90c6cc76 --- /dev/null +++ b/src/dbtest/t/pg/wat_sda_lost_update_c2.txt @@ -0,0 +1,22 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=0; +5-1-UPDATE t1 SET v=1 WHERE k=0; +6-2-COMMIT; +7-1-COMMIT; +8-3-SELECT * FROM t1; +9-3-COMMIT; + +serializable { +2-0,0 +8-0,2 + +2-0,2 +8-0,1 +} \ No newline at end of file diff --git a/src/test/history/special/all_same_not_serial b/src/test/history/special/all_same_not_serial deleted file mode 100644 index 67fb4ea0..00000000 --- a/src/test/history/special/all_same_not_serial +++ /dev/null @@ -1,200 +0,0 @@ -R0a W0a R0b W1b C1 R2a C0 R2b A2 -R0a W0a R0b W1b C1 R2a R2b A2 C0 -R0a W0a R0b W1b C1 R2b C0 R2a A2 -R0a W0a R0b W1b C1 R2b R2a A2 C0 -R0a W0a R1a W1b C0 R2a C1 R2b A2 -R0a W0a R1a C0 W1b R2a C1 R2b A2 -R0a W0a R1a W1b C0 R2a R2b A2 C1 -R0a W0a R1a C0 W1b R2a R2b A2 C1 -R0a W0a R1a W1b C0 R2b C1 R2a A2 -R0a W0a R1a W1b C0 R2b R2a A2 C1 -R0a W0a R1a C0 W1b R2b R2a A2 C1 -R0a W0a R1a C0 W1b R2b C1 R2a A2 -R0a W0a R1a C0 R2a W1b C1 R2b A2 -R0a W0a R1a C0 R2a W1b R2b A2 C1 -R0a W0a R1a C0 R2a R2b A2 W1b C1 -R0a W0a R1a C0 R2a R2b W1b A2 C1 -R0a W0a R1a C0 R2b W1b C1 R2a A2 -R0a W0a R1a C0 R2b W1b R2a A2 C1 -R0a W0a R1a C0 R2b R2a W1b A2 C1 -R0a W0a R1a C0 R2b R2a A2 W1b C1 -R0a W0a W1b R0b C1 R2a C0 R2b A2 -R0a W0a W1b C1 R0b R2a C0 R2b A2 -R0a W0a W1b R0b C1 R2a R2b A2 C0 -R0a W0a W1b C1 R0b R2a R2b A2 C0 -R0a W0a W1b R0b C1 R2b C0 R2a A2 -R0a W0a W1b C1 R0b R2b C0 R2a A2 -R0a W0a W1b R0b C1 R2b R2a A2 C0 -R0a W0a W1b C1 R0b R2b R2a A2 C0 -R0a W0a W1b R1a C0 R2a C1 R2b A2 -R0a W0a W1b C0 R1a R2a C1 R2b A2 -R0a W0a W1b R1a C0 R2a R2b A2 C1 -R0a W0a W1b C0 R1a R2a R2b A2 C1 -R0a W0a W1b C0 R1a R2b C1 R2a A2 -R0a W0a W1b R1a C0 R2b C1 R2a A2 -R0a W0a W1b R1a C0 R2b R2a A2 C1 -R0a W0a W1b C0 R1a R2b R2a A2 C1 -R0a W0a W1b C1 R2a R0b C0 R2b A2 -R0a W0a W1b C1 R2a R0b R2b A2 C0 -R0a W0a W1b C0 R2a R1a C1 R2b A2 -R0a W0a W1b C0 R2a R1a R2b A2 C1 -R0a W0a W1b C1 R2a R2b R0b A2 C0 -R0a W0a W1b C1 R2a R2b A2 R0b C0 -R0a W0a W1b C0 R2a R2b R1a A2 C1 -R0a W0a W1b C0 R2a R2b A2 R1a C1 -R0a W0a W1b C1 R2b R0b R2a A2 C0 -R0a W0a W1b C1 R2b R0b C0 R2a A2 -R0a W0a W1b C0 R2b R1a C1 R2a A2 -R0a W0a W1b C0 R2b R1a R2a A2 C1 -R0a W0a W1b C1 R2b R2a A2 R0b C0 -R0a W0a W1b C1 R2b R2a R0b A2 C0 -R0a W0a W1b C0 R2b R2a R1a A2 C1 -R0a W0a W1b C0 R2b R2a A2 R1a C1 -R0a R0b W0a W1b C1 R2a C0 R2b A2 -R0a R0b W0a W1b C1 R2a R2b A2 C0 -R0a R0b W0a W1b C1 R2b C0 R2a A2 -R0a R0b W0a W1b C1 R2b R2a A2 C0 -R0a R0b W0b W1a C1 R2a C0 R2b A2 -R0a R0b W0b W1a C1 R2a R2b A2 C0 -R0a R0b W0b W1a C1 R2b C0 R2a A2 -R0a R0b W0b W1a C1 R2b R2a A2 C0 -R0a R0b W0c W1a C1 R2a C0 R2c A2 -R0a R0b W0c W1a C1 R2a R2c A2 C0 -R0a R0b W0c W1a C1 R2c C0 R2a A2 -R0a R0b W0c W1a C1 R2c R2a A2 C0 -R0a R0b W0c W1b C1 R2b C0 R2c A2 -R0a R0b W0c W1b C1 R2b R2c A2 C0 -R0a R0b W0c W1b C1 R2c C0 R2b A2 -R0a R0b W0c W1b C1 R2c R2b A2 C0 -R0a R0b W1a W0b C1 R2a C0 R2b A2 -R0a R0b W1a C1 W0b R2a R2b A2 C0 -R0a R0b W1a C1 W0b R2a C0 R2b A2 -R0a R0b W1a W0b C1 R2a R2b A2 C0 -R0a R0b W1a W0b C1 R2b C0 R2a A2 -R0a R0b W1a C1 W0b R2b C0 R2a A2 -R0a R0b W1a W0b C1 R2b R2a A2 C0 -R0a R0b W1a C1 W0b R2b R2a A2 C0 -R0a R0b W1a W0c C1 R2a C0 R2c A2 -R0a R0b W1a C1 W0c R2a C0 R2c A2 -R0a R0b W1a W0c C1 R2a R2c A2 C0 -R0a R0b W1a C1 W0c R2a R2c A2 C0 -R0a R0b W1a W0c C1 R2c C0 R2a A2 -R0a R0b W1a C1 W0c R2c C0 R2a A2 -R0a R0b W1a W0c C1 R2c R2a A2 C0 -R0a R0b W1a C1 W0c R2c R2a A2 C0 -R0a R0b W1a C1 R2a W0b C0 R2b A2 -R0a R0b W1a C1 R2a W0b R2b A2 C0 -R0a R0b W1a C1 R2a W0c C0 R2c A2 -R0a R0b W1a C1 R2a W0c R2c A2 C0 -R0a R0b W1a C1 R2a R2b W0b A2 C0 -R0a R0b W1a C1 R2a R2b A2 W0b C0 -R0a R0b W1a C1 R2a R2c A2 W0c C0 -R0a R0b W1a C1 R2a R2c W0c A2 C0 -R0a R0b W1a C1 R2b W0b C0 R2a A2 -R0a R0b W1a C1 R2b W0b R2a A2 C0 -R0a R0b W1a C1 R2b R2a W0b A2 C0 -R0a R0b W1a C1 R2b R2a A2 W0b C0 -R0a R0b W1a C1 R2c W0c C0 R2a A2 -R0a R0b W1a C1 R2c W0c R2a A2 C0 -R0a R0b W1a C1 R2c R2a W0c A2 C0 -R0a R0b W1a C1 R2c R2a A2 W0c C0 -R0a W0a R0b W1b C1 R2a R2b C0 A2 -R0a W0a R0b W1b C1 R2b R2a C0 A2 -R0a W0a R1a W1b C0 R2a R2b C1 A2 -R0a W0a R1a C0 W1b R2a R2b C1 A2 -R0a W0a R1a W1b C0 R2b R2a C1 A2 -R0a W0a R1a C0 W1b R2b R2a C1 A2 -R0a W0a R1a C0 R2a W1b R2b C1 A2 -R0a W0a R1a C0 R2a R2b W1b C1 A2 -R0a W0a R1a C0 R2b W1b R2a C1 A2 -R0a W0a R1a C0 R2b R2a W1b C1 A2 -R0a W0a W1b R0b C1 R2a R2b C0 A2 -R0a W0a W1b C1 R0b R2a R2b C0 A2 -R0a W0a W1b R0b C1 R2b R2a C0 A2 -R0a W0a W1b C1 R0b R2b R2a C0 A2 -R0a W0a W1b R1a C0 R2a R2b C1 A2 -R0a W0a W1b C0 R1a R2a R2b C1 A2 -R0a W0a W1b R1a C0 R2b R2a C1 A2 -R0a W0a W1b C0 R1a R2b R2a C1 A2 -R0a W0a W1b C1 R2a R0b R2b C0 A2 -R0a W0a W1b C0 R2a R1a R2b C1 A2 -R0a W0a W1b C1 R2a R2b R0b C0 A2 -R0a W0a W1b C0 R2a R2b R1a C1 A2 -R0a W0a W1b C1 R2b R0b R2a C0 A2 -R0a W0a W1b C0 R2b R1a R2a C1 A2 -R0a W0a W1b C1 R2b R2a R0b C0 A2 -R0a W0a W1b C0 R2b R2a R1a C1 A2 -R0a R0b W0a W1b C1 R2a R2b C0 A2 -R0a R0b W0a W1b C1 R2b R2a C0 A2 -R0a R0b W0b W1a C1 R2a R2b C0 A2 -R0a R0b W0b W1a C1 R2b R2a C0 A2 -R0a R0b W0c W1a C1 R2a R2c C0 A2 -R0a R0b W0c W1a C1 R2c R2a C0 A2 -R0a R0b W0c W1b C1 R2b R2c C0 A2 -R0a R0b W0c W1b C1 R2c R2b C0 A2 -R0a R0b W1a W0b C1 R2a R2b C0 A2 -R0a R0b W1a C1 W0b R2a R2b C0 A2 -R0a R0b W1a W0b C1 R2b R2a C0 A2 -R0a R0b W1a C1 W0b R2b R2a C0 A2 -R0a R0b W1a W0c C1 R2a R2c C0 A2 -R0a R0b W1a C1 W0c R2a R2c C0 A2 -R0a R0b W1a W0c C1 R2c R2a C0 A2 -R0a R0b W1a C1 W0c R2c R2a C0 A2 -R0a R0b W1a C1 R2a W0b R2b C0 A2 -R0a R0b W1a C1 R2a W0c R2c C0 A2 -R0a R0b W1a C1 R2a R2b W0b C0 A2 -R0a R0b W1a C1 R2a R2c W0c C0 A2 -R0a R0b W1a C1 R2b W0b R2a C0 A2 -R0a R0b W1a C1 R2b R2a W0b C0 A2 -R0a R0b W1a C1 R2c W0c R2a C0 A2 -R0a R0b W1a C1 R2c R2a W0c C0 A2 -R0a R0b W1b W0a C1 R2a R2b C0 A2 -R0a R0b W1b C1 W0a R2a R2b C0 A2 -R0a R0b W1b W0a C1 R2b R2a C0 A2 -R0a R0b W1b C1 W0a R2b R2a C0 A2 -R0a R0b W1b W0c C1 R2b R2c C0 A2 -R0a R0b W1b C1 W0c R2b R2c C0 A2 -R0a R0b W1b C1 W0c R2c R2b C0 A2 -R0a R0b W1b W0c C1 R2c R2b C0 A2 -R0a R0b W1b C1 R2a W0a R2b C0 A2 -R0a R0b W1b C1 R2a R2b W0a C0 A2 -R0a R0b W1b C1 R2b W0a R2a C0 A2 -R0a R0b W1b C1 R2b W0c R2c C0 A2 -R0a R0b W1b C1 R2b R2a W0a C0 A2 -R0a R0b W1b C1 R2b R2c W0c C0 A2 -R0a R0b W1b C1 R2c W0c R2b C0 A2 -R0a R0b W1b C1 R2c R2b W0c C0 A2 -R0a W0b R0a W1a C1 R2a R2b C0 A2 -R0a W0b R0a W1a C1 R2b R2a C0 A2 -R0a W0b R0b W1a C1 R2a R2b C0 A2 -R0a W0b R0b W1a C1 R2b R2a C0 A2 -R0a W0b W0b W1a C1 R2a R2b C0 A2 -R0a W0b W0b W1a C1 R2b R2a C0 A2 -R0a W0b R0c W1a C1 R2a R2b C0 A2 -R0a W0b R0c W1a C1 R2b R2a C0 A2 -R0a W0b R0c W1c C1 R2b R2c C0 A2 -R0a W0b R0c W1c C1 R2c R2b C0 A2 -R0a W0b W0c W1a C1 R2a R2b C0 A2 -R0a W0b W0c W1a C1 R2a R2c C0 A2 -R0a W0b W0c W1a C1 R2b R2a C0 A2 -R0a W0b W0c W1a C1 R2c R2a C0 A2 -R0a W0b R1a W1a C1 R2a R2b C0 A2 -R0a W0b R1a W1a C1 R2b R2a C0 A2 -R0a W0b W1a R0a C1 R2a R2b C0 A2 -R0a W0b W1a C1 R0a R2a R2b C0 A2 -R0a W0b W1a R0a C1 R2b R2a C0 A2 -R0a W0b W1a C1 R0a R2b R2a C0 A2 -R0a W0b W1a R0b C1 R2a R2b C0 A2 -R0a W0b W1a C1 R0b R2a R2b C0 A2 -R0a W0b W1a R0b C1 R2b R2a C0 A2 -R0a W0b W1a C1 R0b R2b R2a C0 A2 -R0a W0b W1a W0b C1 R2a R2b C0 A2 -R0a W0b W1a C1 W0b R2a R2b C0 A2 -R0a W0b W1a W0b C1 R2b R2a C0 A2 -R0a W0b W1a C1 W0b R2b R2a C0 A2 -R0a W0b W1a R0c C1 R2a R2b C0 A2 -R0a W0b W1a C1 R0c R2a R2b C0 A2 -R0a W0b W1a R0c C1 R2b R2a C0 A2 -R0a W0b W1a C1 R0c R2b R2a C0 A2 -R0a W0b W1a W0c C1 R2a R2b C0 A2 -R0a W0b W1a C1 W0c R2a R2b C0 A2 diff --git a/src/test/unittest/base_test.cc b/src/test/unittest/base_test.cc deleted file mode 100644 index e7a63121..00000000 --- a/src/test/unittest/base_test.cc +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: moggma@tencent.com - * - */ -#include "../backend/history/parse_config.h" -#include "gtest/gtest.h" -using namespace std; -using namespace t3s; - -shared_ptr checker = pre_checkers["SSI"]; -vector inputs = { - // Dirty Write - "W1a1 W2a2 C1 R3a2 C2 C3", "W1a1 W2a2 C1 R3a2 A2 C3", "W1a1 W2a2 A1 C2 R3a0 C3", - "W1a1 W2a2 A1 A2 R3a1 C3", "W1a1 W2a2 C2 C1 R3a2 C3", "W1a1 W2a2 C2 A1 R3a0 C3", - - // Dirty Read - "W1a1 R2a1 A1 C2" - "W1a1 R2a1 C2 A1" - - // Intermediate Reads - "W1a1 R2a1 W1a2 C1 C2", - "W1a1 R2a1 W1a2 C2 C1", - - // Fuzzy or Non-Repeatable Read - "R1a0 W2a1 C2 R1a1 C1", "R1a0 W2a1 R1a1 C2 C1", - - // Lost Update - "R1a0 W2a1 C2 W1a2 C1", - - // Read Skew - "R1a0 W2a1 W2b1 R1b1 C1 C2", "R1a0 W2a1 W2b1 R1b1 C2 C1", "R1a0 W2b1 W2a1 R1b1 C1 C2", - "R1a0 W2b1 W2a1 R1b1 C2 C1", "R1a0 W2b1 R1b1 W2a1 C1 C2", "R1a0 W2b1 R1b1 W2a1 C2 C1", - "R1a0 W2a1 W2b1 C2 R1b1 C1", "R1a0 W2a1 W2b1 C2 R1b1 C1", "R1a0 W2b1 W2a1 C2 R1b1 C1", - "R1a0 W2b1 W2a1 C2 R1b1 C1", - - // Read and Write Skew - "R1a0 W2a1 W2b1 C2 W1b1 C1", "R1a0 W2a1 W2b1 W1b1 C2 C1", "R1a0 W2a1 W2b1 W1b1 C1 C2", - - // Step Read Skew - "R1a0 W2a1 W2b1 C2 W3b2 W3c1 C3 R1c1 C1", - - // Phantom - //"S1a0 W2a1 W2b1 C2 S1a0 C1", - - // Write Skew - "R1a0 R2b0 W1b1 W2a1 C1 C2", - - // Sawtooth Write Skew - "R1a0 R2b0 R3c0 W1b1 W2c1 W3a1 C1 C2 C3", - - // Predicate Write Skew - //"S1a0 W2a1 W2b1 C2 C1", -}; - -class BaseTest : public ::testing::TestWithParam {}; - -TEST_P(BaseTest, AllErr) { - ActionSequence seq = GetParam(); - ASSERT_FALSE(checker->Check(seq)); -} - -vector Init() { - vector seqs; - for (const string &s : inputs) { - ActionSequence seq; - stringstream ss(s); - ss >> seq; - seqs.emplace_back(std::move(seq)); - } - return seqs; -} - -INSTANTIATE_TEST_CASE_P(AllErr, BaseTest, testing::ValuesIn(Init())); - -int main(int argc, char **argv) { - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/src/test/unittest/ssi_test/ssi_checker_test.cc b/src/test/unittest/ssi_test/ssi_checker_test.cc deleted file mode 100644 index 87c01352..00000000 --- a/src/test/unittest/ssi_test/ssi_checker_test.cc +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making 3TS available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software - * in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All - * Tencent Modifications are Copyright (C) THL A29 Limited. - * - * Author: moggma@tencent.com - * - */ -#include "../../backend/cca/ssi_checker.h" - -#include "gtest/gtest.h" - -TEST(SSICheckerTest, SingleTransaction) { - std::vector acts{ - {t3s::Action::Type::READ, 0, 0}, - {t3s::Action::Type::WRITE, 0, 0}, - {t3s::Action::Type::COMMIT, 0}, - }; - - t3s::ActionSequence seq(1, 1, acts); - - t3s::SSIChecker checker; - ASSERT_TRUE(checker.Check(seq, nullptr)); -} - -TEST(SSICheckerTest, WWConfilct) { - std::vector acts{{t3s::Action::Type::WRITE, 0, 0}, - {t3s::Action::Type::WRITE, 1, 0}, - {t3s::Action::Type::COMMIT, 0}, - {t3s::Action::Type::COMMIT, 1}}; - - t3s::ActionSequence seq(2, 1, acts); - - t3s::SSIChecker checker; - ASSERT_FALSE(checker.Check(seq, nullptr)); -} - -TEST(SSICheckerTest, WriteScrew) { - std::vector acts{ - {t3s::Action::Type::READ, 0, 0}, {t3s::Action::Type::READ, 0, 1}, - {t3s::Action::Type::READ, 1, 0}, {t3s::Action::Type::READ, 1, 1}, - {t3s::Action::Type::WRITE, 0, 0}, {t3s::Action::Type::WRITE, 1, 1}, - {t3s::Action::Type::COMMIT, 0}, {t3s::Action::Type::COMMIT, 1}}; - - t3s::ActionSequence seq(2, 2, acts); - - t3s::SSIChecker checker; - ASSERT_EQ(checker.RollbackNum(seq), 1); -} - -TEST(SSICheckerTest, Success) { - std::vector acts{ - {t3s::Action::Type::READ, 0, 1}, {t3s::Action::Type::READ, 1, 0}, - {t3s::Action::Type::WRITE, 0, 1}, {t3s::Action::Type::WRITE, 1, 0}, - {t3s::Action::Type::COMMIT, 0}, {t3s::Action::Type::COMMIT, 1}}; - - t3s::ActionSequence seq(2, 2, acts); - - t3s::SSIChecker checker; - ASSERT_TRUE(checker.Check(seq, nullptr)); -} - -int main(int argc, char **argv) { - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/src/test/unittest/test.sh b/src/test/unittest/test.sh deleted file mode 100755 index da5031a7..00000000 --- a/src/test/unittest/test.sh +++ /dev/null @@ -1,3 +0,0 @@ -g++ $1 -lpthread -lgtest -std=c++11 -lconfig++ -./a.out -rm ./a.out diff --git a/test_result/centralizend_result/cassandra/README.md b/test_result/centralizend_result/cassandra/README.md new file mode 100644 index 00000000..f74c92be --- /dev/null +++ b/test_result/centralizend_result/cassandra/README.md @@ -0,0 +1,78 @@ +# Cassandra数据库测试说明 + +## 测试环境 + +`Ubuntu22.04` | `Cassandra 4.0.11` | `CQL spec 3.4.5` | `unixODBC 2.3.9` + +## 数据库简介 + +`Apache Cassandra`是一个开源的、分布式的、`NoSQL`数据库系统,它最初是由`Facebook`开发的,用于处理大量的分布式数据存储。`Cassandra`是基于`Amazon`的`Dynamo`数据库和`Google`的`Bigtable`数据库的设计理念构建的,因此它结合了两者的优势,提供了高度可扩展性和高性能的数据管理功能。 + +## 隔离级别 + +`Cassandra` 数据库采用一种称为最终一致性(`Eventual Consistency`)的一致性模型,它与传统的关系型数据库中的 `ACID` 事务模型有所不同。因此,`Cassandra` 并不使用传统的隔离级别,如 `Read Committed`、`Repeatable Read` 等。而是提供一系列的一致性级别(`Consistency Levels`)来控制读写操作的一致性,一致性级别决定了在进行读取或写入操作时,必须成功应答的副本(`replica`)数量。主要的一致性级别包括: + +1. **ANY**:对于写操作,只要至少有一个副本应答,操作就被视为成功。 +2. **ONE**:至少有一个副本成功应答。 +3. **TWO / THREE**:至少有两个/三个副本成功应答。 +4. **QUORUM**:成功应答的副本数达到副本总数的大多数。 +5. **ALL**:所有副本都必须成功应答。 +6. **LOCAL_ONE / LOCAL_QUORUM**:对于多数据中心部署,至少有一个/大多数副本在本地数据中心应答。 +7. **EACH_QUORUM**:在每个数据中心,成功应答的副本数都达到该数据中心副本总数的大多数。 +8. **SERIAL / LOCAL_SERIAL**:用于轻量事务,确保线性一致性。 + +根据不同的一致性级别,`Cassandra` 的读写操作可能会表现出不同的隔离性,但这与传统的关系型数据库中定义的隔离级别是不同的。 + +### 轻量级事务 + +`Cassandra`支持轻量级事务(`Lightweight Transactions`),这可以为某些操作提供一种类似于传统`ACID`事务的一致性模型,但它们通常有一定的性能开销,并且不适用于所有用例。即在`CQL`语句中使用`IF NOT EXISTS`,`IF EXISTS`,或`IF`子句来实现一些形式的条件更新和删除。这种情况下,Cassandra内部会使用Paxos协议来确保操作的线性一致性,但这会带来更高的延迟和开销。 + +例如,可以使用`IF`条件来保证操作的原子性: + +```CQL +UPDATE mykeyspace.mytable SET value = 123 WHERE key = 'some_key' IF EXISTS; +``` + +这个查询只有在`some_key`确实存在时才会更新,否则不会进行任何操作。但是,这并不等同于传统的`ROLLBACK`命令,因为一旦满足条件并执行了更新,这个操作是不可逆的。 + +### 批处理 + +`Cassandra`提供了一定程度的事务支持,即通过批处理(`Batch`)来实现原子性。在`Cassandra`中,可以将多个写操作(如`INSERT`、`UPDATE`、`DELETE`)组合到一个批处理中,这些操作要么全部成功,要么全部失败。但要注意,`Cassandra`中的批处理操作不同于关系型数据库中的事务,它不提供隔离性和持久性保证。 + +```CQL +BEGIN BATCH +INSERT INTO table1 (column1, column2) VALUES ('value1', 'value2'); +UPDATE table2 SET column1 = 'value1' WHERE column2 = 'value2'; +DELETE FROM table3 WHERE column1 = 'value1'; +APPLY BATCH; +``` + +## CQL语言 + +### `COMMIT`和`ROLLBACK`指令 + +`Cassandra`不支持传统的`SQL`事务,因此也不支持`COMMIT`和`ROLLBACK`指令。因为`Cassandra`不是一个支持`ACID`属性的关系型数据库系统。`Cassandra`是一个最终一致性(`eventual consistency`)的分布式数据库,它主要关注的是可扩展性和高可用性。 + +### `INSERT`指令 + +`INSERT INTO mytab VALUES (1, 20);`语句在`CQL`语言中不被允许,需要完整形式`INSERT INTO mytab (k,v) VALUES (1, 20);` + +## 实际测试说明 + +实际测试中编写了`sql2cql.py`脚本文件将原始测试文件中的`INSERT`语句转化为符合`CQL`语法的`INSERT`语句,其他测试语句保持原状,在单机环境对`one`一致性级别进行了测试,由于不支持传统的`SQL`事务,因此`33`个测试样例中大部分异常,小部分通过,仅有一个测试样例存在死锁情况。 + +针对除`one`以外的一致性级别,由于无法通过`ODBC`接口函数直接设置一致性隔离级别,因此暂时没有测试: + +即`CONSISTENCY ***;`是CQL中的一个命令,用于设置后续查询的一致性级别,但如果直接通过`SQLExecDirect`函数执行语句,会报错`Malformed SQL Statement: Unrecognized keyword: consistency`,原因为ODBC是通用SQL接口,无法直接发送非标准的SQL命令,如`Cassandra`的`CONSISTENCY ***;`,对于Cassandra,可以使用专有的驱动器,如DataStax的C++驱动器,在DataStax C++驱动器中,可以这样设置一致性级别: + +```c++ +CassStatement* statement = cass_statement_new("SELECT * FROM table_name", 0); +cass_statement_set_consistency(statement, CASS_CONSISTENCY_QUORUM); +``` + + + + + + + diff --git a/test_result/centralizend_result/cassandra/one/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/cassandra/one/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..2acb68fa --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/iat_dda_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: cassandra #### +#### test_type: dda_read_skew_committed #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:54:672:702 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-24 22:19:54:677:112 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:54:772:439 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-24 22:19:54:775:721 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-24 22:19:54:778:619 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-24 22:19:54:779:250 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2023-9-24 22:19:54:875:367 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-24 22:19:54:876:41 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-24 22:19:54:880:453 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:19:54:881:63 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/cassandra/one/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..0d056ecb --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: cassandra #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:55:988:163 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-24 22:19:55:991:150 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:56:88:198 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-24 22:19:56:92:73 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-24 22:19:56:95:600 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-24 22:19:56:96:385 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2023-9-24 22:19:56:191:449 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-24 22:19:56:192:82 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-24 22:19:56:196:50 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:19:56:196:667 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/iat_dda_write_skew.txt b/test_result/centralizend_result/cassandra/one/iat_dda_write_skew.txt new file mode 100644 index 00000000..3a873a8e --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: cassandra #### +#### test_type: dda_write_skew #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:57:330:967 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-24 22:19:57:334:290 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:57:430:910 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-24 22:19:57:433:764 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-24 22:19:57:437:512 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-9-24 22:19:57:534:692 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-24 22:19:57:535:425 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-24 22:19:57:631:388 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-24 22:19:57:636:11 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-24 22:19:57:636:726 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/cassandra/one/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..828b087d --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: cassandra #### +#### test_type: dda_write_skew_committed #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:20:0:943:883 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-24 22:20:0:947:289 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:20:1:43:912 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-24 22:20:1:47:796 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-24 22:20:1:51:585 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-24 22:20:1:52:475 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2023-9-24 22:20:1:146:638 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-24 22:20:1:147:113 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-24 22:20:1:150:486 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:20:1:150:939 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/cassandra/one/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..c65acbc0 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,17 @@ +#### db_type: cassandra #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0 failed reason: The connection '266' query failed to execute query 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL)': The CQL error message is 'No PRIMARY KEY specifed for table 'mytab' (exactly one required)'.. errcode: HY000 +Q0 failed at: 2023-9-24 22:19:58:76:74 + +Test Result: Rollback +Reason: Err:The connection '266' query failed to execute query 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL)': The CQL error message is 'No PRIMARY KEY specifed for table 'mytab' (exactly one required)'.. + diff --git a/test_result/centralizend_result/cassandra/one/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/cassandra/one/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..f80e0581 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: cassandra #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account (name,type,balance) VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account (name,type,balance) VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:59:618:214 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2023-9-24 22:19:59:623:738 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:59:718:232 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2023-9-24 22:19:59:723:774 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2023-9-24 22:19:59:740:86 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-24 22:19:59:741:293 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2023-9-24 22:19:59:837:171 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-24 22:19:59:838:68 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2023-9-24 22:19:59:842:312 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:19:59:843:153 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/iat_mda_step_iat.txt b/test_result/centralizend_result/cassandra/one/iat_mda_step_iat.txt new file mode 100644 index 00000000..52de9d4c --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: cassandra #### +#### test_type: mda_step_iat #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:20:2:313:210 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2023-9-24 22:20:2:318:917 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:20:2:414:76 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2023-9-24 22:20:2:424:549 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-24 22:20:2:512:678 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2023-9-24 22:20:2:515:226 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2023-9-24 22:20:2:623:78 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2023-9-24 22:20:2:715:714 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2023-9-24 22:20:2:816:275 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-24 22:20:2:913:232 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-24 22:20:3:13:392 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-24 22:20:3:113:800 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2023-9-24 22:20:3:121:381 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-24 22:20:3:122:525 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/cassandra/one/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..ea2d6434 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,106 @@ +#### db_type: cassandra #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:20:11:225:625 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2023-9-24 22:20:11:230:248 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:20:11:325:369 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2023-9-24 22:20:11:329:63 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-24 22:20:11:329:665 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-24 22:20:11:425:454 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2023-9-24 22:20:11:429:105 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2023-9-24 22:20:11:432:513 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-24 22:20:11:433:201 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2023-9-24 22:20:11:528:391 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2023-9-24 22:20:11:529:183 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2023-9-24 22:20:11:533:609 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2023-9-24 22:20:11:534:184 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/cassandra/one/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..05ffa661 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,207 @@ +#### db_type: cassandra #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:20:9:600:137 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2023-9-24 22:20:9:604:203 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:20:9:700:133 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2023-9-24 22:20:9:704:785 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-24 22:20:9:800:197 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2023-9-24 22:20:9:804:627 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-24 22:20:9:805:450 + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2023-9-24 22:20:9:900:263 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2023-9-24 22:20:9:904:494 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:20:9:905:236 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2023-9-24 22:20:10:3:710 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-24 22:20:10:4:571 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2023-9-24 22:20:10:104:492 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2023-9-24 22:20:10:105:452 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2023-9-24 22:20:10:111:806 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2023-9-24 22:20:10:112:749 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/cassandra/one/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..91147d3f --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: cassandra #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:20:4:281:391 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2023-9-24 22:20:4:285:701 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:20:4:381:383 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2023-9-24 22:20:4:386:487 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-24 22:20:4:481:469 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2023-9-24 22:20:4:485:914 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2023-9-24 22:20:4:584:798 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2023-9-24 22:20:4:684:587 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2023-9-24 22:20:4:784:755 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-24 22:20:4:881:471 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-24 22:20:4:981:593 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-24 22:20:5:81:657 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2023-9-24 22:20:5:84:800 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-24 22:20:5:85:438 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/cassandra/one/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..7cd0a122 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: cassandra #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:20:6:183:48 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2023-9-24 22:20:6:186:378 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:20:6:282:839 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2023-9-24 22:20:6:285:101 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-24 22:20:6:383:136 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2023-9-24 22:20:6:386:886 +Q7-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q7 finished at: 2023-9-24 22:20:6:485:829 + Q8-T2 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' + Q8 finished at: 2023-9-24 22:20:6:585:321 + Q9-T3 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 0);' + Q9 finished at: 2023-9-24 22:20:6:685:571 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-24 22:20:6:786:49 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-24 22:20:6:883:323 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-24 22:20:6:983:473 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2023-9-24 22:20:6:987:554 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-24 22:20:6:988:170 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/cassandra/one/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..21142262 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: cassandra #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:20:12:678:470 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2023-9-24 22:20:12:682:551 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2023-9-24 22:20:12:685:798 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2023-9-24 22:20:12:778:953 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2023-9-24 22:20:12:782:887 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2023-9-24 22:20:12:786:403 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-24 22:20:12:787:42 + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2023-9-24 22:20:12:878:593 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2023-9-24 22:20:12:882:418 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2023-9-24 22:20:12:885:656 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-24 22:20:12:886:443 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2023-9-24 22:20:12:981:721 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2023-9-24 22:20:12:982:206 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2023-9-24 22:20:12:985:626 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2023-9-24 22:20:12:986:93 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/cassandra/one/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..8cb02df3 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,162 @@ +#### db_type: cassandra #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:20:8:142:752 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2023-9-24 22:20:8:146:365 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:20:8:242:714 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2023-9-24 22:20:8:246:322 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-24 22:20:8:249:507 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2023-9-24 22:20:8:252:443 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2023-9-24 22:20:8:257:812 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-24 22:20:8:258:754 + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2023-9-24 22:20:8:342:805 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2023-9-24 22:20:8:346:162 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2023-9-24 22:20:8:349:26 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2023-9-24 22:20:8:351:882 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2023-9-24 22:20:8:355:112 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-24 22:20:8:355:722 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2023-9-24 22:20:8:447:131 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2023-9-24 22:20:8:447:875 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2023-9-24 22:20:8:452:789 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2023-9-24 22:20:8:453:416 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/cassandra/one/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..2a37dde6 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: cassandra #### +#### test_type: sda_lost_update_committed #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:53:330:839 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2023-9-24 22:19:53:334:757 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:53:430:808 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-9-24 22:19:53:435:219 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-24 22:19:53:436:68 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2023-9-24 22:19:53:534:390 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-24 22:19:53:535:112 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-9-24 22:19:53:538:693 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-24 22:19:53:539:390 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/cassandra/one/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..f807303a --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,58 @@ +#### db_type: cassandra #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:51:976:791 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-24 22:19:51:980:472 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:52:76:866 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2023-9-24 22:19:52:82:992 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-24 22:19:52:84:385 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2023-9-24 22:19:52:180:818 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-24 22:19:52:181:658 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-9-24 22:19:52:185:859 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-24 22:19:52:186:510 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/cassandra/one/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..c385ff89 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/rat_dda_double_write_skew1.txt @@ -0,0 +1,54 @@ +#### db_type: cassandra #### +#### test_type: dda_double_write_skew1 #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:7:505:288 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:7:509:924 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:7:605:301 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-24 22:19:7:610:110 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2023-9-24 22:19:7:614:138 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q6 finished at: 2023-9-24 22:19:7:709:112 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-24 22:19:7:805:998 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-24 22:19:7:906:244 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2023-9-24 22:19:7:914:34 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:19:7:914:821 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/cassandra/one/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..0b5bd710 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: cassandra #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:9:74:577 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:9:78:323 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:9:174:776 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-24 22:19:9:178:920 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2023-9-24 22:19:9:182:129 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-24 22:19:9:182:953 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2023-9-24 22:19:9:278:576 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-24 22:19:9:279:185 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2023-9-24 22:19:9:283:285 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:19:9:283:799 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/cassandra/one/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..7a026d70 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/rat_dda_double_write_skew2.txt @@ -0,0 +1,54 @@ +#### db_type: cassandra #### +#### test_type: dda_double_write_skew2 #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:10:404:92 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:10:408:62 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:10:504:211 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-24 22:19:10:508:878 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2023-9-24 22:19:10:513:7 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q6 finished at: 2023-9-24 22:19:10:607:444 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-24 22:19:10:608:139 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-24 22:19:10:704:581 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-24 22:19:10:709:856 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:19:10:710:434 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/rat_dda_read_skew.txt b/test_result/centralizend_result/cassandra/one/rat_dda_read_skew.txt new file mode 100644 index 00000000..9eef15b4 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/rat_dda_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: cassandra #### +#### test_type: dda_read_skew #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:11:839:98 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-24 22:19:11:843:92 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:11:939:82 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-24 22:19:11:944:300 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-24 22:19:11:948:868 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q6 finished at: 2023-9-24 22:19:12:41:840 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-24 22:19:12:139:325 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-24 22:19:12:239:493 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-24 22:19:12:245:449 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:19:12:246:198 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/rat_dda_read_skew2.txt b/test_result/centralizend_result/cassandra/one/rat_dda_read_skew2.txt new file mode 100644 index 00000000..e9c479e5 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/rat_dda_read_skew2.txt @@ -0,0 +1,61 @@ +#### db_type: cassandra #### +#### test_type: dda_read_skew2 #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:16:21:479 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:16:26:165 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:16:121:217 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-24 22:19:16:124:484 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2023-9-24 22:19:16:128:221 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-9-24 22:19:16:224:126 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-24 22:19:16:224:556 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-24 22:19:16:321:434 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-24 22:19:16:325:237 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:19:16:325:732 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/cassandra/one/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..5722478c --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/rat_dda_read_skew2_committed.txt @@ -0,0 +1,61 @@ +#### db_type: cassandra #### +#### test_type: dda_read_skew2_committed #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:17:487:981 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:17:492:346 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:17:588:162 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-24 22:19:17:591:699 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2023-9-24 22:19:17:595:73 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-24 22:19:17:595:897 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2023-9-24 22:19:17:692:437 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-24 22:19:17:693:208 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-24 22:19:17:699:496 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:19:17:700:384 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/cassandra/one/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..f7979a7a --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,61 @@ +#### db_type: cassandra #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:13:379:794 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (1,0) (0,0) + (1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2023-9-24 22:19:13:387:998 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:13:479:170 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2023-9-24 22:19:13:487:553 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2023-9-24 22:19:13:491:841 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-24 22:19:13:492:581 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2023-9-24 22:19:13:583:388 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-24 22:19:13:584:63 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2023-9-24 22:19:13:589:364 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:19:13:590:52 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/cassandra/one/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..8be87b5d --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,59 @@ +#### db_type: cassandra #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:14:737:596 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2023-9-24 22:19:14:741:919 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:14:837:635 + Q4-T2 execute sql: 'INSERT into t1 (k,v) VALUES(1,0);' + Q4 finished at: 2023-9-24 22:19:14:841:280 + Q5-T2 execute sql: 'INSERT into t1 (k,v) VALUES(0,0);' + Q5 finished at: 2023-9-24 22:19:14:845:562 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-24 22:19:14:846:222 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (1,0) (0,0) + (1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2023-9-24 22:19:14:940:465 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-24 22:19:14:940:933 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2023-9-24 22:19:14:944:582 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:19:14:945:76 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/rat_dda_write_read_skew.txt b/test_result/centralizend_result/cassandra/one/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..4f7142f0 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: cassandra #### +#### test_type: dda_write_read_skew #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:4:632:583 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:4:638:259 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:4:732:567 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-24 22:19:4:738:297 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2023-9-24 22:19:4:744:212 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q6 finished at: 2023-9-24 22:19:4:834:946 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-24 22:19:4:932:627 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-24 22:19:5:32:931 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-24 22:19:5:45:418 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:19:5:46:134 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/cassandra/one/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..05751d6b --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: cassandra #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:6:185:789 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:6:191:188 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:6:285:596 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-24 22:19:6:290:134 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2023-9-24 22:19:6:293:25 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-24 22:19:6:293:608 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2023-9-24 22:19:6:389:290 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-24 22:19:6:389:939 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-24 22:19:6:394:912 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:19:6:395:543 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/rat_mda_step_rat.txt b/test_result/centralizend_result/cassandra/one/rat_mda_step_rat.txt new file mode 100644 index 00000000..ac1a12df --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: cassandra #### +#### test_type: mda_step_rat #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:18:829:206 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:18:834:227 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:18:929:60 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-24 22:19:18:933:100 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + (3) expected_result: + (0,0) + (4) expected_result: + (0,0) + *(5) expected_result: + (0,1) + (6) expected_result: + (0,0) + + Q5 finished at: 2023-9-24 22:19:18:936:9 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-24 22:19:19:29:165 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2023-9-24 22:19:19:33:992 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + *(1) expected_result: + (1,1) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q8 finished at: 2023-9-24 22:19:19:38:146 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + *(4) expected_result: + (2,1) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q9 finished at: 2023-9-24 22:19:19:132:977 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-24 22:19:19:133:629 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-24 22:19:19:229:257 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-24 22:19:19:330:528 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2023-9-24 22:19:19:339:543 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-24 22:19:19:340:437 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/cassandra/one/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..bde46e18 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,207 @@ +#### db_type: cassandra #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2023-9-24 22:19:20:452:275 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2023-9-24 22:19:20:457:691 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2023-9-24 22:19:20:552:123 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2023-9-24 22:19:20:556:262 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-24 22:19:20:652:250 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2023-9-24 22:19:20:656:807 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + *(5) expected_result: + (0,1) + (6) expected_result: + (0,0) + *(7) expected_result: + (0,1) + *(8) expected_result: + (0,1) + *(9) expected_result: + (0,1) + (10) expected_result: + (0,0) + (11) expected_result: + (0,0) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + (14) expected_result: + (0,0) + + Q7 finished at: 2023-9-24 22:19:20:661:199 + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2023-9-24 22:19:20:752:190 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2023-9-24 22:19:20:756:386 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + (3) expected_result: + (1,0) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + *(6) expected_result: + (1,1) + (7) expected_result: + (1,0) + *(8) expected_result: + (1,1) + *(9) expected_result: + (1,1) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + (12) expected_result: + (1,0) + (13) expected_result: + (1,0) + (14) expected_result: + (1,0) + + Q10 finished at: 2023-9-24 22:19:20:856:836 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2023-9-24 22:19:20:952:208 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-24 22:19:21:52:400 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2023-9-24 22:19:21:152:526 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-24 22:19:21:153:159 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2023-9-24 22:19:21:156:937 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2023-9-24 22:19:21:157:445 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/cassandra/one/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..e618dec0 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: cassandra #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:22:272:631 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:22:277:368 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:22:372:472 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2023-9-24 22:19:22:376:917 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (0,) + (1) expected_result: + (,) + (2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + (5) expected_result: + (,) + (6) expected_result: + (1,) + + Q5 finished at: 2023-9-24 22:19:22:383:149 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-24 22:19:22:472:592 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2023-9-24 22:19:22:476:42 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (0,) + (1) expected_result: + (,) + (2) expected_result: + (1,) + (3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q8 finished at: 2023-9-24 22:19:22:479:486 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (0,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + (3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2023-9-24 22:19:22:575:139 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-24 22:19:22:575:718 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-24 22:19:22:672:740 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-24 22:19:22:772:895 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2023-9-24 22:19:22:775:749 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-24 22:19:22:776:295 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/cassandra/one/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..f2f11250 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: cassandra #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:23:908:342 +Q2-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 1);' +Q2 finished at: 2023-9-24 22:19:23:912:744 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:24:8:511 + Q4-T2 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 1);' + Q4 finished at: 2023-9-24 22:19:24:13:66 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q5 finished at: 2023-9-24 22:19:24:18:966 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-24 22:19:24:108:464 + Q7-T3 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 1);' + Q7 finished at: 2023-9-24 22:19:24:113:165 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + (4) expected_result: + (,) + *(5) expected_result: + (1,) + (6) expected_result: + (,) + + Q8 finished at: 2023-9-24 22:19:24:119:419 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2023-9-24 22:19:24:212:802 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-24 22:19:24:213:781 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-24 22:19:24:308:802 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-24 22:19:24:408:740 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2023-9-24 22:19:24:414:541 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-24 22:19:24:415:396 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/rat_sda_dirty_read.txt b/test_result/centralizend_result/cassandra/one/rat_sda_dirty_read.txt new file mode 100644 index 00000000..4bf932e9 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/rat_sda_dirty_read.txt @@ -0,0 +1,45 @@ +#### db_type: cassandra #### +#### test_type: sda_dirty_read #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k, v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:18:54:451:848 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:18:54:466:94 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:18:54:551:758 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + + Q4 finished at: 2023-9-24 22:18:54:594:419 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2023-9-24 22:18:54:651:870 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-24 22:18:54:751:998 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,0) + + Q7 finished at: 2023-9-24 22:18:54:756:245 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-24 22:18:54:756:873 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/rat_sda_intermediate_read.txt b/test_result/centralizend_result/cassandra/one/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..68f85c36 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/rat_sda_intermediate_read.txt @@ -0,0 +1,51 @@ +#### db_type: cassandra #### +#### test_type: sda_intermediate_read #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:18:57:484:790 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:18:57:490:879 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:18:57:584:569 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2023-9-24 22:18:57:596:100 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2023-9-24 22:18:57:690:633 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-24 22:18:57:785:88 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-24 22:18:57:885:81 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2023-9-24 22:18:57:890:577 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-24 22:18:57:891:311 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/cassandra/one/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..29ae49be --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,51 @@ +#### db_type: cassandra #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:18:59:10:23 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:18:59:17:919 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:18:59:109:874 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2023-9-24 22:18:59:114:427 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-24 22:18:59:115:174 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2023-9-24 22:18:59:214:390 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-24 22:18:59:214:957 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2023-9-24 22:18:59:219:425 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-24 22:18:59:220:8 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/rat_sda_lost_self_update.txt b/test_result/centralizend_result/cassandra/one/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..4909d44a --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/rat_sda_lost_self_update.txt @@ -0,0 +1,51 @@ +#### db_type: cassandra #### +#### test_type: sda_lost_self_update #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:3:124:110 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:3:130:132 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:3:224:69 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-9-24 22:19:3:230:580 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,2) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + +Q5 finished at: 2023-9-24 22:19:3:327:949 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2023-9-24 22:19:3:328:715 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-24 22:19:3:425:988 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2023-9-24 22:19:3:435:671 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-24 22:19:3:437:584 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/cassandra/one/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..2b316a37 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/rat_sda_non_repeatable_read.txt @@ -0,0 +1,58 @@ +#### db_type: cassandra #### +#### test_type: sda_non_repeatable_read #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:18:55:921:858 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-24 22:18:55:926:945 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:18:56:21:911 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2023-9-24 22:18:56:27:625 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q5 finished at: 2023-9-24 22:18:56:125:970 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-24 22:18:56:222:297 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-24 22:18:56:322:215 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-9-24 22:18:56:326:967 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-24 22:18:56:327:617 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/cassandra/one/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..a762f596 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,58 @@ +#### db_type: cassandra #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:0:392:365 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2023-9-24 22:19:0:452:261 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:0:493:432 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2023-9-24 22:19:0:508:689 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-24 22:19:0:510:408 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2023-9-24 22:19:0:596:867 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-24 22:19:0:597:418 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2023-9-24 22:19:0:601:214 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-24 22:19:0:601:830 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/cassandra/one/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..d75ceef4 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,57 @@ +#### db_type: cassandra #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:1:768:995 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2023-9-24 22:19:1:775:423 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:1:868:758 + Q4-T2 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' + Q4 finished at: 2023-9-24 22:19:1:874:57 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-24 22:19:1:874:724 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2023-9-24 22:19:1:974:207 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-24 22:19:1:974:869 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2023-9-24 22:19:1:978:812 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-24 22:19:1:979:516 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/cassandra/one/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..536a5fcf --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: cassandra #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:35:452:871 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:35:458:832 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:35:552:510 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-24 22:19:35:555:980 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2023-9-24 22:19:35:559:626 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-24 22:19:35:560:299 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2023-9-24 22:19:35:654:833 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-24 22:19:35:655:358 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-24 22:19:35:660:77 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:19:35:660:614 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/cassandra/one/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..f5d3abd2 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,47 @@ +#### db_type: cassandra #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:36:793:86 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:36:797:652 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:36:894:460 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-24 22:19:36:905:344 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2023-9-24 22:19:36:913:539 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-9-24 22:19:36:995:741 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-24 22:19:36:996:165 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-24 22:19:37:93:159 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + (1) expected_result: + (0,1) (1,1) + (2) expected_result: + (0,2) (1,2) + + Q9 finished at: 2023-9-24 22:19:37:97:634 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:19:37:98:151 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/cassandra/one/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..ab0d88c4 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,47 @@ +#### db_type: cassandra #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:38:215:965 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:38:222:369 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:38:315:605 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-24 22:19:38:320:331 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2023-9-24 22:19:38:324:552 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-9-24 22:19:38:419:320 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-24 22:19:38:515:481 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-24 22:19:38:617:274 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + (1) expected_result: + (0,1) (1,1) + (2) expected_result: + (0,2) (1,2) + + Q9 finished at: 2023-9-24 22:19:38:629:206 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:19:38:630:529 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/cassandra/one/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..952cb708 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,47 @@ +#### db_type: cassandra #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:39:767:561 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:39:771:902 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:39:867:732 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-24 22:19:39:872:439 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2023-9-24 22:19:39:877:640 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-24 22:19:39:878:753 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2023-9-24 22:19:39:970:741 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-24 22:19:39:971:337 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + (1) expected_result: + (0,1) (1,1) + (2) expected_result: + (0,2) (1,2) + + Q9 finished at: 2023-9-24 22:19:39:976:92 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:19:39:976:971 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/cassandra/one/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..32c6174c --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: cassandra #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:41:102:507 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-24 22:19:41:105:425 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:41:202:646 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-24 22:19:41:206:740 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-24 22:19:41:211:7 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-9-24 22:19:41:305:957 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-24 22:19:41:306:545 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-24 22:19:41:402:809 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-24 22:19:41:406:887 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:19:41:407:410 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/cassandra/one/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..23bb440d --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: cassandra #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:42:533:60 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-24 22:19:42:536:438 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:42:633:68 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-24 22:19:42:636:912 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-24 22:19:42:640:337 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-9-24 22:19:42:737:526 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-24 22:19:42:833:675 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-24 22:19:42:933:450 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-24 22:19:42:938:960 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:19:42:939:719 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/cassandra/one/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..5a2801af --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: cassandra #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:44:91:135 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:44:95:274 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:44:191:157 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-24 22:19:44:194:736 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2023-9-24 22:19:44:199:444 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-9-24 22:19:44:299:611 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-24 22:19:44:300:643 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-24 22:19:44:391:563 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-24 22:19:44:397:110 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:19:44:397:740 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/cassandra/one/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..c042b498 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: cassandra #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:45:542:467 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:45:553:491 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:45:641:276 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-24 22:19:45:645:104 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2023-9-24 22:19:45:649:516 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-9-24 22:19:45:744:634 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-24 22:19:45:841:66 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-24 22:19:45:941:146 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-24 22:19:45:945:597 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:19:45:946:145 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/cassandra/one/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..c45b03c1 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: cassandra #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:47:41:254 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:47:47:775 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:47:141:68 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-24 22:19:47:146:403 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2023-9-24 22:19:47:151:615 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-24 22:19:47:152:674 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2023-9-24 22:19:47:243:950 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-24 22:19:47:244:532 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-24 22:19:47:249:156 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:19:47:249:721 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/cassandra/one/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..037a4ec1 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/wat_mda_step_wat_c1.txt @@ -0,0 +1,64 @@ +#### db_type: cassandra #### +#### test_type: mda_step_wat_c1 #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:48:400:232 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:48:403:624 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:48:500:272 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-24 22:19:48:504:138 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2023-9-24 22:19:48:507:335 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-24 22:19:48:600:198 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2023-9-24 22:19:48:603:790 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' + Q8 finished at: 2023-9-24 22:19:48:607:291 +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q9 finished at: 2023-9-24 22:19:48:703:84 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-24 22:19:48:703:614 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-24 22:19:48:800:383 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-24 22:19:48:900:530 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,3) (2,1) + (1) expected_result: + (0,2) (1,3) (2,3) + (2) expected_result: + (0,2) (1,2) (2,3) + (3) expected_result: + (0,1) (1,3) (2,3) + (4) expected_result: + (0,1) (1,3) (2,1) + (5) expected_result: + (0,2) (1,2) (2,1) + (6) expected_result: + (0,1) (1,2) (2,1) + + Q13 finished at: 2023-9-24 22:19:48:904:701 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-24 22:19:48:905:275 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/cassandra/one/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..068f2c96 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/wat_mda_step_wat_c2.txt @@ -0,0 +1,64 @@ +#### db_type: cassandra #### +#### test_type: mda_step_wat_c2 #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:50:63:345 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:50:67:469 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:50:163:428 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-24 22:19:50:167:104 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-24 22:19:50:263:333 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6 finished at: 2023-9-24 22:19:50:369:128 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2023-9-24 22:19:50:467:925 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' + Q8 finished at: 2023-9-24 22:19:50:471:780 +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q9 finished at: 2023-9-24 22:19:50:566:639 + Q10-T2 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-24 22:19:50:663:898 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2023-9-24 22:19:50:763:867 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-24 22:19:50:864:104 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,3) (2,1) + (1) expected_result: + (0,2) (1,3) (2,3) + (2) expected_result: + (0,2) (1,2) (2,3) + (3) expected_result: + (0,1) (1,3) (2,3) + (4) expected_result: + (0,1) (1,3) (2,1) + (5) expected_result: + (0,2) (1,2) (2,1) + (6) expected_result: + (0,1) (1,2) (2,1) + + Q13 finished at: 2023-9-24 22:19:50:867:996 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-24 22:19:50:868:479 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/cassandra/one/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..904a95d5 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: cassandra #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:25:514:264 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:25:518:625 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:25:614:152 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-9-24 22:19:25:618:339 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2023-9-24 22:19:25:714:274 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-24 22:19:25:814:379 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2023-9-24 22:19:25:817:250 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2023-9-24 22:19:26:268:29 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-24 22:19:26:268:756 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/cassandra/one/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/cassandra/one/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..a58ad44b --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: cassandra #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:26:974:935 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:26:979:569 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:27:74:944 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-9-24 22:19:27:79:868 +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2023-9-24 22:19:27:174:968 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-24 22:19:27:274:972 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2023-9-24 22:19:27:277:621 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2023-9-24 22:19:27:659:730 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-24 22:19:27:660:772 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/cassandra/one/wat_sda_full_write.txt b/test_result/centralizend_result/cassandra/one/wat_sda_full_write.txt new file mode 100644 index 00000000..fc47f263 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: cassandra #### +#### test_type: sda_full_write #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:28:394:265 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:28:398:317 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:28:494:114 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-9-24 22:19:28:497:735 +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2023-9-24 22:19:28:597:91 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2023-9-24 22:19:28:597:596 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-24 22:19:28:694:390 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,3) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,3) + + Q8 finished at: 2023-9-24 22:19:28:697:666 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-24 22:19:28:698:176 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/cassandra/one/wat_sda_full_write_committed.txt b/test_result/centralizend_result/cassandra/one/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..27fddd03 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: cassandra #### +#### test_type: sda_full_write_committed #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:29:803:715 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:29:808:89 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:29:903:834 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-9-24 22:19:29:908:909 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-24 22:19:29:909:858 +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2023-9-24 22:19:30:8:203 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-24 22:19:30:8:976 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,3) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,3) + + Q8 finished at: 2023-9-24 22:19:30:12:866 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-24 22:19:30:13:557 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/cassandra/one/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/cassandra/one/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..e1281c37 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: cassandra #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:34:113:229 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-24 22:19:34:117:91 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:34:213:272 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-9-24 22:19:34:216:742 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-24 22:19:34:217:287 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,2) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + +Q6 finished at: 2023-9-24 22:19:34:315:821 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-24 22:19:34:316:387 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2023-9-24 22:19:34:318:621 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-24 22:19:34:319:150 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/cassandra/one/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..58676f56 --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: cassandra #### +#### test_type: sda_lost_update_c1 #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:31:183:721 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2023-9-24 22:19:31:187:624 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:31:283:942 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-9-24 22:19:31:289:834 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2023-9-24 22:19:31:388:207 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2023-9-24 22:19:31:389:15 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-24 22:19:31:483:651 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-9-24 22:19:31:486:200 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-24 22:19:31:486:720 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/one/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/cassandra/one/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..68c1430d --- /dev/null +++ b/test_result/centralizend_result/cassandra/one/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: cassandra #### +#### test_type: sda_lost_update_c2 #### +#### isolation: one #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = one for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-24 22:19:32:583:820 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2023-9-24 22:19:32:586:923 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-24 22:19:32:683:984 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-9-24 22:19:32:688:513 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2023-9-24 22:19:32:786:616 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-24 22:19:32:884:391 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-24 22:19:32:984:92 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-9-24 22:19:32:987:787 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-24 22:19:32:988:577 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/cassandra/result_summary/one_total-result.txt b/test_result/centralizend_result/cassandra/result_summary/one_total-result.txt new file mode 100644 index 00000000..3155065e --- /dev/null +++ b/test_result/centralizend_result/cassandra/result_summary/one_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Anomaly + +rat_sda_non_repeatable_read: Anomaly + +rat_sda_intermediate_read: Anomaly + +rat_sda_intermediate_read_committed: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Anomaly + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Anomaly + +rat_dda_double_write_skew1_committed: Anomaly + +rat_dda_double_write_skew2: Anomaly + +rat_dda_read_skew: Anomaly + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Anomaly + +rat_dda_read_skew2_committed: Anomaly + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Anomaly + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Anomaly + +wat_dda_double_write_skew2_committed: Anomaly + +wat_dda_full_write_skew_c1: Anomaly + +wat_dda_full_write_skew_c2: Anomaly + +wat_dda_full_write_skew_committed: Anomaly + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Anomaly + +wat_mda_step_wat_c2: Anomaly + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Rollback + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/crdb/result_summary/serializable_total-result.txt b/test_result/centralizend_result/crdb/result_summary/serializable_total-result.txt new file mode 100644 index 00000000..63240c80 --- /dev/null +++ b/test_result/centralizend_result/crdb/result_summary/serializable_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Avoid + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Avoid + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Avoid + +rat_mda_step_rat_predicate_based_insert: Avoid + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Rollback + +iat_dda_write_skew_predicate_based-intersecting_data: Avoid + +iat_dda_write_skew_predicate_based-overdraft_protection: Rollback + +iat_dda_write_skew_committed: Rollback + +iat_mda_step_iat: Rollback + +iat_mda_step_iat_predicate_based_delete: Rollback + +iat_mda_step_iat_predicate_based_insert: Rollback + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Rollback + diff --git a/test_result/centralizend_result/crdb/serializable/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/crdb/serializable/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..da1d915e --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/iat_dda_read_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: crdb #### +#### test_type: dda_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:53:6:619:49 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 16:53:6:622:619 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:53:6:720:978 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 16:53:6:724:491 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 16:53:6:727:692 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-2 16:53:6:730:895 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 16:53:6:823:571 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-2 16:53:6:825:405 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 16:53:6:828:827 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/crdb/serializable/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..70d32f52 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,41 @@ +#### db_type: crdb #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:53:7:145:274 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 16:53:7:148:534 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:53:7:247:353 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 16:53:7:250:486 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 16:53:7:253:575 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-2 16:53:7:256:516 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1648889587.144869253,0 too old; wrote at 1648889587.246952816,1 errcode: HY000 +Q7 failed at: 2022-4-2 16:53:8:48:989 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1648889587.144869253,0 too old; wrote at 1648889587.246952816,1 + diff --git a/test_result/centralizend_result/crdb/serializable/iat_dda_write_skew.txt b/test_result/centralizend_result/crdb/serializable/iat_dda_write_skew.txt new file mode 100644 index 00000000..c8c75c64 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/iat_dda_write_skew.txt @@ -0,0 +1,50 @@ +#### db_type: crdb #### +#### test_type: dda_write_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:53:8:400:595 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 16:53:8:403:821 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:53:8:500:401 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 16:53:8:503:880 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 16:53:8:507:190 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 16:53:8:601:965 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' + Q8-T2 execute sql: 'COMMIT TRANSACTION;' + Q8 finished at: 2022-4-2 16:53:8:703:2 +Q7 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SERIALIZABLE): "sql txn" id=8947d20d key=/Table/330/1/1/0 rw=true pri=0.04650676 stat=PENDING epo=0 ts=1648889588.50002684 errcode: HY000 +Q7 failed at: 2022-4-2 16:53:9:306:390 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SERIALIZABLE): "sql txn" id=8947d20d key=/Table/330/1/1/0 rw=true pri=0.04650676 stat=PENDING epo=0 ts=1648889588.50002684 + diff --git a/test_result/centralizend_result/crdb/serializable/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/crdb/serializable/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..3b4c03ff --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/iat_dda_write_skew_committed.txt @@ -0,0 +1,50 @@ +#### db_type: crdb #### +#### test_type: dda_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:53:11:383:976 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 16:53:11:387:951 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:53:11:483:991 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 16:53:11:487:620 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 16:53:11:491:337 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-2 16:53:11:495:486 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 16:53:11:585:833 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SERIALIZABLE): "sql txn" id=27646345 key=/Table/333/1/1/0 rw=true pri=0.01261970 stat=PENDING epo=0 ts=1648889591.48360386 errcode: HY000 +Q8 failed at: 2022-4-2 16:53:12:390:533 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SERIALIZABLE): "sql txn" id=27646345 key=/Table/333/1/1/0 rw=true pri=0.01261970 stat=PENDING epo=0 ts=1648889591.48360386 + diff --git a/test_result/centralizend_result/crdb/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/crdb/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..3f1e9364 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,71 @@ +#### db_type: crdb #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:53:9:553:603 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-2 16:53:9:557:927 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-2 16:53:9:560:904 + Q4-T2 execute sql: 'BEGIN TRANSACTION;' + Q4 finished at: 2022-4-2 16:53:9:653:444 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-2 16:53:9:755:484 + current_result: + (330,) + *(1) expected_result: + (330,) + (2) expected_result: + (300,) + + Q5 finished at: 2022-4-2 16:53:9:763:506 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-2 16:53:9:766:343 + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-2 16:53:9:769:535 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-2 16:53:9:773:367 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-2 16:53:9:776:569 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/crdb/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..49077e81 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,50 @@ +#### db_type: crdb #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:53:10:48:555 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-2 16:53:10:52:730 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:53:10:148:628 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-2 16:53:10:153:630 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-2 16:53:10:170:832 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-2 16:53:10:174:944 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-2 16:53:10:250:997 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SERIALIZABLE): "sql txn" id=c6ca7478 key=/Table/332/1/"kevin"/"checking"/0 rw=true pri=0.06037639 stat=PENDING epo=0 ts=16 errcode: HY000 +Q8 failed at: 2022-4-2 16:53:11:55:114 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SERIALIZABLE): "sql txn" id=c6ca7478 key=/Table/332/1/"kevin"/"checking"/0 rw=true pri=0.06037639 stat=PENDING epo=0 ts=16 + diff --git a/test_result/centralizend_result/crdb/serializable/iat_mda_step_iat.txt b/test_result/centralizend_result/crdb/serializable/iat_mda_step_iat.txt new file mode 100644 index 00000000..c9156645 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/iat_mda_step_iat.txt @@ -0,0 +1,90 @@ +#### db_type: crdb #### +#### test_type: mda_step_iat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:53:12:714:385 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 16:53:12:717:793 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:53:12:814:282 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 16:53:12:817:887 + Q5-T3 execute sql: 'BEGIN TRANSACTION;' + Q5 finished at: 2022-4-2 16:53:12:916:503 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 16:53:12:920:179 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-2 16:53:13:16:387 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-2 16:53:13:116:164 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-2 16:53:13:216:323 +Q10-T1 execute sql: 'COMMIT TRANSACTION;' +Q10 finished at: 2022-4-2 16:53:13:317:177 + Q11-T2 execute sql: 'COMMIT TRANSACTION;' + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-2 16:53:13:516:406 + Q11 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SERIALIZABLE): "sql txn" id=bc65461d key=/Table/334/1/1/0 rw=true pri=0.00452134 stat=PENDING epo=0 ts=1648889592.91615675 errcode: HY000 + Q11 failed at: 2022-4-2 16:53:14:517:981 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SERIALIZABLE): "sql txn" id=bc65461d key=/Table/334/1/1/0 rw=true pri=0.00452134 stat=PENDING epo=0 ts=1648889592.91615675 + diff --git a/test_result/centralizend_result/crdb/serializable/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/crdb/serializable/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..af310a1f --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,105 @@ +#### db_type: crdb #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:53:20:506:798 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 16:53:20:510:541 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:53:20:605:331 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 16:53:20:609:906 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-2 16:53:20:613:911 + Q6-T3 execute sql: 'BEGIN TRANSACTION;' + Q6 finished at: 2022-4-2 16:53:20:708:644 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 16:53:20:712:234 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-2 16:53:20:716:229 + Q9-T3 execute sql: 'COMMIT TRANSACTION;' + Q9 finished at: 2022-4-2 16:53:20:719:599 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-2 16:53:20:810:537 +Q11-T1 execute sql: 'COMMIT TRANSACTION;' +Q11 finished at: 2022-4-2 16:53:20:812:290 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-2 16:53:20:815:850 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/crdb/serializable/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..180d08f7 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,206 @@ +#### db_type: crdb #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:53:19:677:63 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 16:53:19:681:657 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:53:19:776:517 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 16:53:19:780:669 + Q5-T3 execute sql: 'BEGIN TRANSACTION;' + Q5 finished at: 2022-4-2 16:53:19:873:76 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-2 16:53:19:876:915 + Q7-T3 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-2 16:53:19:880:466 + Q8-T4 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-2 16:53:19:976:338 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-2 16:53:19:979:715 + Q10-T4 execute sql: 'COMMIT TRANSACTION;' + Q10 finished at: 2022-4-2 16:53:19:982:881 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-2 16:53:20:75:321 + Q12-T2 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-2 16:53:20:77:211 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-2 16:53:20:173:706 +Q14-T1 execute sql: 'COMMIT TRANSACTION;' +Q14 finished at: 2022-4-2 16:53:20:175:621 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-2 16:53:20:180:642 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/crdb/serializable/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..fb54777c --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,90 @@ +#### db_type: crdb #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:53:14:846:121 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-2 16:53:14:849:986 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:53:14:945:358 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 16:53:14:949:504 + Q5-T3 execute sql: 'BEGIN TRANSACTION;' + Q5 finished at: 2022-4-2 16:53:15:45:108 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 16:53:15:49:342 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-2 16:53:15:151:612 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-2 16:53:15:248:369 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-2 16:53:15:348:54 +Q10-T1 execute sql: 'COMMIT TRANSACTION;' +Q10 finished at: 2022-4-2 16:53:15:448:324 + Q11-T2 execute sql: 'COMMIT TRANSACTION;' + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-2 16:53:15:647:444 + Q11 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SERIALIZABLE): "sql txn" id=28793754 key=/Table/335/1/1 rw=true pri=0.03177472 stat=PENDING epo=0 ts=1648889595.044727208, errcode: HY000 + Q11 failed at: 2022-4-2 16:53:16:650:0 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SERIALIZABLE): "sql txn" id=28793754 key=/Table/335/1/1 rw=true pri=0.03177472 stat=PENDING epo=0 ts=1648889595.044727208, + diff --git a/test_result/centralizend_result/crdb/serializable/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/crdb/serializable/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..e5d92f92 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,87 @@ +#### db_type: crdb #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:53:16:948:897 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 16:53:16:961:521 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:53:17:48:486 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-2 16:53:17:52:290 + Q5-T3 execute sql: 'BEGIN TRANSACTION;' + Q5 finished at: 2022-4-2 16:53:17:148:412 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-2 16:53:17:152:120 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-2 16:53:17:250:314 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-2 16:53:17:351:85 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-2 16:53:17:450:336 +Q10-T1 execute sql: 'COMMIT TRANSACTION;' +Q10 finished at: 2022-4-2 16:53:17:552:164 + Q11-T2 execute sql: 'COMMIT TRANSACTION;' + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-2 16:53:17:751:324 + Q11 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SERIALIZABLE): "sql txn" id=56c02bb7 key=/Table/336/1/1/0 rw=true pri=0.00554938 stat=PENDING epo=0 ts=1648889597.14800837 errcode: HY000 + Q11 failed at: 2022-4-2 16:53:18:752:22 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SERIALIZABLE): "sql txn" id=56c02bb7 key=/Table/336/1/1/0 rw=true pri=0.00554938 stat=PENDING epo=0 ts=1648889597.14800837 + diff --git a/test_result/centralizend_result/crdb/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/crdb/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..e2d25f5c --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,121 @@ +#### db_type: crdb #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:53:21:147:87 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 16:53:21:151:376 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-2 16:53:21:155:190 + Q4-T2 execute sql: 'BEGIN TRANSACTION;' + Q4 finished at: 2022-4-2 16:53:21:246:842 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-2 16:53:21:250:476 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-2 16:53:21:253:908 + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-2 16:53:21:257:421 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-2 16:53:21:349:72 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-2 16:53:21:353:526 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 16:53:21:356:956 + Q11-T3 execute sql: 'COMMIT TRANSACTION;' + Q11 finished at: 2022-4-2 16:53:21:358:628 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-2 16:53:21:454:623 +Q13-T1 execute sql: 'COMMIT TRANSACTION;' +Q13 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SERIALIZABLE): "sql txn" id=fda15299 key=/Table/340/1/0/0 rw=true pri=0.01143240 stat=PENDING epo=0 ts=1648889601.34859007 errcode: HY000 +Q13 failed at: 2022-4-2 16:53:22:759:597 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SERIALIZABLE): "sql txn" id=fda15299 key=/Table/340/1/0/0 rw=true pri=0.01143240 stat=PENDING epo=0 ts=1648889601.34859007 + diff --git a/test_result/centralizend_result/crdb/serializable/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/crdb/serializable/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..b9814723 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,161 @@ +#### db_type: crdb #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:53:19:32:345 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-2 16:53:19:35:955 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:53:19:132:460 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-2 16:53:19:136:690 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 16:53:19:140:56 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 16:53:19:144:462 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-2 16:53:19:147:665 + Q8-T2 execute sql: 'COMMIT TRANSACTION;' + Q8 finished at: 2022-4-2 16:53:19:150:542 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-2 16:53:19:232:785 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-2 16:53:19:236:461 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-2 16:53:19:239:523 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-2 16:53:19:243:290 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-2 16:53:19:246:559 + Q14-T3 execute sql: 'COMMIT TRANSACTION;' + Q14 finished at: 2022-4-2 16:53:19:250:546 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-2 16:53:19:334:943 +Q16-T1 execute sql: 'COMMIT TRANSACTION;' +Q16 finished at: 2022-4-2 16:53:19:337:19 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-2 16:53:19:341:278 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/crdb/serializable/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..b96c3930 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/iat_sda_lost_update_committed.txt @@ -0,0 +1,38 @@ +#### db_type: crdb #### +#### test_type: sda_lost_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:53:5:486:810 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 16:53:5:490:194 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:53:5:586:870 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 16:53:5:590:159 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-2 16:53:5:597:748 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1648889585.486334849,0 too old; wrote at 1648889585.586497792,1 errcode: HY000 +Q6 failed at: 2022-4-2 16:53:6:291:46 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1648889585.486334849,0 too old; wrote at 1648889585.586497792,1 + diff --git a/test_result/centralizend_result/crdb/serializable/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/crdb/serializable/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..a8fe60af --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,57 @@ +#### db_type: crdb #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 17:11:2:974:620 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 17:11:2:987:952 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 17:11:3:69:739 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 17:11:3:76:433 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-2 17:11:3:80:252 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 17:11:3:172:212 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-2 17:11:3:175:236 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 17:11:3:179:334 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/crdb/serializable/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..b60794da --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/rat_dda_double_write_skew1.txt @@ -0,0 +1,34 @@ +#### db_type: crdb #### +#### test_type: dda_double_write_skew1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:35:843:731 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:35:848:536 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:35:943:160 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 16:52:35:947:281 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q6 finished at: 2022-4-2 16:52:36:59:421 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-2 16:52:36:246:191 + Q5 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REASON_PUSHER_ABORTED): "sql txn" id=6dfc20ac key=/Table/297/1/1/0 rw=true pri=0.01388052 stat=ABORTED epo=0 ts=1648889555.942584994 errcode: HY000 + Q5 failed at: 2022-4-2 16:52:36:576:336 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REASON_PUSHER_ABORTED): "sql txn" id=6dfc20ac key=/Table/297/1/1/0 rw=true pri=0.01388052 stat=ABORTED epo=0 ts=1648889555.942584994 + diff --git a/test_result/centralizend_result/crdb/serializable/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/crdb/serializable/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..ce138127 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,41 @@ +#### db_type: crdb #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:36:906:164 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:36:910:645 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:37:6:93 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 16:52:37:9:779 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 16:52:37:119:777 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-2 16:52:37:123:752 +Q7 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REASON_ABORT_SPAN): "sql txn" id=74990123 key=/Table/298/1/0/0 rw=true pri=0.01323698 stat=ABORTED epo=0 ts=1648889557.005586845,1 o errcode: HY000 +Q7 failed at: 2022-4-2 16:52:37:832:763 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REASON_ABORT_SPAN): "sql txn" id=74990123 key=/Table/298/1/0/0 rw=true pri=0.01323698 stat=ABORTED epo=0 ts=1648889557.005586845,1 o + diff --git a/test_result/centralizend_result/crdb/serializable/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/crdb/serializable/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..a1906abf --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/rat_dda_double_write_skew2.txt @@ -0,0 +1,53 @@ +#### db_type: crdb #### +#### test_type: dda_double_write_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:38:176:466 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:38:180:183 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:38:276:786 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 16:52:38:280:743 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 16:52:38:378:469 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-2 16:52:38:382:239 + Q5 finished at: 2022-4-2 16:52:38:390:589 + Q8-T2 execute sql: 'COMMIT TRANSACTION;' + Q8 finished at: 2022-4-2 16:52:38:483:60 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 16:52:38:486:960 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/rat_dda_read_skew.txt b/test_result/centralizend_result/crdb/serializable/rat_dda_read_skew.txt new file mode 100644 index 00000000..3fceb3a6 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/rat_dda_read_skew.txt @@ -0,0 +1,60 @@ +#### db_type: crdb #### +#### test_type: dda_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:38:808:758 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 16:52:38:812:426 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:38:908:512 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 16:52:38:912:320 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 16:52:38:915:832 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 16:52:39:11:248 + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-2 16:52:39:110:523 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-2 16:52:39:208:728 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 16:52:39:212:592 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/rat_dda_read_skew2.txt b/test_result/centralizend_result/crdb/serializable/rat_dda_read_skew2.txt new file mode 100644 index 00000000..5c81b566 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/rat_dda_read_skew2.txt @@ -0,0 +1,60 @@ +#### db_type: crdb #### +#### test_type: dda_read_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:40:581:343 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:40:584:775 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:40:681:552 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 16:52:40:685:445 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 16:52:40:783:156 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-2 16:52:40:787:95 + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 16:52:40:794:871 + Q8-T2 execute sql: 'COMMIT TRANSACTION;' + Q8 finished at: 2022-4-2 16:52:40:881:336 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 16:52:40:896:759 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/crdb/serializable/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..556ef637 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/rat_dda_read_skew2_committed.txt @@ -0,0 +1,60 @@ +#### db_type: crdb #### +#### test_type: dda_read_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:41:217:439 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:41:221:680 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:41:317:547 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 16:52:41:321:482 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 16:52:41:419:20 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-2 16:52:41:422:969 + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 16:52:41:430:871 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-2 16:52:41:432:972 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 16:52:41:436:425 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/crdb/serializable/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..f7b52476 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,60 @@ +#### db_type: crdb #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:39:525:393 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 16:52:39:529:591 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:39:623:985 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-2 16:52:39:628:603 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-2 16:52:39:640:990 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-2 16:52:39:644:745 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 16:52:39:725:617 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-2 16:52:39:727:575 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-2 16:52:39:730:764 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/crdb/serializable/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..7d892e39 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,58 @@ +#### db_type: crdb #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:40:29:59 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 16:52:40:39:609 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:40:128:893 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-2 16:52:40:132:102 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-2 16:52:40:134:933 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-2 16:52:40:138:58 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 16:52:40:249:669 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-2 16:52:40:251:983 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-2 16:52:40:255:335 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/rat_dda_write_read_skew.txt b/test_result/centralizend_result/crdb/serializable/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..9ee7ba9f --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/rat_dda_write_read_skew.txt @@ -0,0 +1,60 @@ +#### db_type: crdb #### +#### test_type: dda_write_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:34:530:528 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:34:534:579 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:34:630:662 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 16:52:34:634:645 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 16:52:34:732:539 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-2 16:52:34:933:761 + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 16:52:34:942:919 + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-2 16:52:34:963:972 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 16:52:34:970:209 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/crdb/serializable/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..de802241 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: crdb #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:35:306:802 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:35:310:707 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:35:406:781 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 16:52:35:411:616 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 16:52:35:507:707 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-2 16:52:35:512:969 + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 16:52:35:520:904 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-2 16:52:35:524:857 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 16:52:35:528:228 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/rat_mda_step_rat.txt b/test_result/centralizend_result/crdb/serializable/rat_mda_step_rat.txt new file mode 100644 index 00000000..6188472f --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/rat_mda_step_rat.txt @@ -0,0 +1,108 @@ +#### db_type: crdb #### +#### test_type: mda_step_rat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:41:759:44 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:41:762:637 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:41:858:928 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 16:52:41:863:128 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q6-T3 execute sql: 'BEGIN TRANSACTION;' + Q6 finished at: 2022-4-2 16:52:41:961:857 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-2 16:52:41:969:486 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-2 16:52:42:61:131 +Q10-T1 execute sql: 'COMMIT TRANSACTION;' +Q10 finished at: 2022-4-2 16:52:42:65:429 + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + (3) expected_result: + (0,0) + (4) expected_result: + (0,0) + *(5) expected_result: + (0,1) + (6) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 16:52:42:74:447 + Q11-T2 execute sql: 'COMMIT TRANSACTION;' + Q11 finished at: 2022-4-2 16:52:42:166:622 + current_result: + (1,1) + *(1) expected_result: + (1,1) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q8 finished at: 2022-4-2 16:52:42:175:58 + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-2 16:52:42:263:624 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 16:52:42:268:672 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/crdb/serializable/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..8fdbeba7 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,206 @@ +#### db_type: crdb #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN TRANSACTION;' + Q1 finished at: 2022-4-2 17:27:5:712:79 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-2 17:27:5:726:913 +Q3-T1 execute sql: 'BEGIN TRANSACTION;' +Q3 finished at: 2022-4-2 17:27:5:806:747 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-2 17:27:5:813:256 + Q5-T3 execute sql: 'BEGIN TRANSACTION;' + Q5 finished at: 2022-4-2 17:27:5:906:907 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-2 17:27:5:912:640 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q8-T2 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-2 17:27:6:7:141 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-2 17:27:6:12:179 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 17:27:6:110:283 +Q11-T1 execute sql: 'COMMIT TRANSACTION;' +Q11 finished at: 2022-4-2 17:27:6:209:42 + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + *(5) expected_result: + (0,1) + (6) expected_result: + (0,0) + *(7) expected_result: + (0,1) + *(8) expected_result: + (0,1) + *(9) expected_result: + (0,1) + (10) expected_result: + (0,0) + (11) expected_result: + (0,0) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + (14) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 17:27:6:217:667 + Q12-T2 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-2 17:27:6:312:35 + Q13-T3 execute sql: 'COMMIT TRANSACTION;' + Q13 finished at: 2022-4-2 17:27:6:407:35 + Q14-T4 execute sql: 'COMMIT TRANSACTION;' + Q14 finished at: 2022-4-2 17:27:6:410:227 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-2 17:27:6:415:876 + +The current result is consistent with the [(13) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/crdb/serializable/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..969ce569 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,108 @@ +#### db_type: crdb #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:43:636:278 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:43:641:204 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:43:735:949 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-2 16:52:43:740:773 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute sql: 'BEGIN TRANSACTION;' + Q6 finished at: 2022-4-2 16:52:43:836:102 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-2 16:52:43:841:389 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-2 16:52:43:940:639 +Q10-T1 execute sql: 'COMMIT TRANSACTION;' +Q10 finished at: 2022-4-2 16:52:43:946:302 + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 16:52:43:952:913 + Q11-T2 execute sql: 'COMMIT TRANSACTION;' + Q11 finished at: 2022-4-2 16:52:44:38:381 + current_result: + (,) + *(1) expected_result: + (,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q8 finished at: 2022-4-2 16:52:44:45:341 + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-2 16:52:44:138:47 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-2 16:52:44:141:809 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/crdb/serializable/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..a33c8c47 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,105 @@ +#### db_type: crdb #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:44:445:477 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-2 16:52:44:454:239 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:44:545:188 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-2 16:52:44:549:659 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute sql: 'BEGIN TRANSACTION;' + Q6 finished at: 2022-4-2 16:52:44:645:752 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-2 16:52:44:651:894 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-2 16:52:44:747:897 +Q10-T1 execute sql: 'COMMIT TRANSACTION;' +Q10 finished at: 2022-4-2 16:52:44:752:774 + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 16:52:44:759:643 + Q11-T2 execute sql: 'COMMIT TRANSACTION;' + Q11 finished at: 2022-4-2 16:52:44:847:478 + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + (4) expected_result: + (,) + *(5) expected_result: + (1,) + (6) expected_result: + (,) + + Q8 finished at: 2022-4-2 16:52:44:872:86 + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-2 16:52:44:947:943 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 16:52:44:951:764 + +The current result is consistent with the [(5) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/rat_sda_dirty_read.txt b/test_result/centralizend_result/crdb/serializable/rat_sda_dirty_read.txt new file mode 100644 index 00000000..8494439b --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/rat_sda_dirty_read.txt @@ -0,0 +1,44 @@ +#### db_type: crdb #### +#### test_type: sda_dirty_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:30:123:669 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:30:131:464 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:30:217:226 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' +Q5-T1 execute opt: 'ROLLBACK'; + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 16:52:30:335:656 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-2 16:52:30:417:922 +Q5 finished at: 2022-4-2 16:52:30:514:207 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 16:52:30:519:396 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/rat_sda_intermediate_read.txt b/test_result/centralizend_result/crdb/serializable/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..92fc2d2c --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/rat_sda_intermediate_read.txt @@ -0,0 +1,50 @@ +#### db_type: crdb #### +#### test_type: sda_intermediate_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:31:565:893 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:31:570:753 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:31:666:67 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-2 16:52:31:765:904 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-2 16:52:31:965:271 + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 16:52:31:973:611 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-2 16:52:31:976:572 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 16:52:31:980:356 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/crdb/serializable/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..b6301d37 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,50 @@ +#### db_type: crdb #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:32:294:584 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:32:299:673 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:32:394:636 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-2 16:52:32:496:908 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-2 16:52:32:501:408 + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 16:52:32:509:523 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-2 16:52:32:511:834 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 16:52:32:515:124 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/rat_sda_lost_self_update.txt b/test_result/centralizend_result/crdb/serializable/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..210509ba --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/rat_sda_lost_self_update.txt @@ -0,0 +1,50 @@ +#### db_type: crdb #### +#### test_type: sda_lost_self_update #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:33:904:863 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:33:909:653 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:34:5:399 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 16:52:34:106:576 +Q6-T1 execute sql: 'COMMIT TRANSACTION;' +Q6 finished at: 2022-4-2 16:52:34:111:258 + Q4 finished at: 2022-4-2 16:52:34:117:225 + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-2 16:52:34:207:471 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 16:52:34:213:48 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/crdb/serializable/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..6edfa97f --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/rat_sda_non_repeatable_read.txt @@ -0,0 +1,57 @@ +#### db_type: crdb #### +#### test_type: sda_non_repeatable_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 17:3:16:212:181 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 17:3:16:226:708 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 17:3:16:307:584 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 17:3:16:314:243 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 17:3:16:407:747 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-2 17:3:16:508:114 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-2 17:3:16:604:887 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 17:3:16:609:389 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/crdb/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..99d97dbd --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,57 @@ +#### db_type: crdb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:32:824:457 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 16:52:32:828:771 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:32:924:263 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-2 16:52:32:929:870 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-2 16:52:32:933:787 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 16:52:33:26:448 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-2 16:52:33:29:15 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-2 16:52:33:32:509 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/crdb/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..6a859974 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,56 @@ +#### db_type: crdb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:33:385:681 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 16:52:33:399:667 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:33:485:555 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-2 16:52:33:489:411 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-2 16:52:33:493:43 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 16:52:33:587:210 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-2 16:52:33:589:858 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-2 16:52:33:593:715 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/crdb/serializable/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..1d9fe1ad --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,53 @@ +#### db_type: crdb #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:50:472:711 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:50:476:546 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:50:573:57 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 16:52:50:576:493 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 16:52:50:671:334 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-2 16:52:50:675:357 + Q5 finished at: 2022-4-2 16:52:50:682:789 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-2 16:52:50:687:384 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 16:52:50:690:695 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/crdb/serializable/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..c4888768 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,34 @@ +#### db_type: crdb #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:51:31:130 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:51:34:372 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:51:131:333 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 16:52:51:135:368 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 16:52:51:251:927 + Q8-T2 execute sql: 'COMMIT TRANSACTION;' + Q8 finished at: 2022-4-2 16:52:51:334:959 +Q6 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REASON_PUSHER_ABORTED): "sql txn" id=a169cc1e key=/Table/316/1/0/0 rw=true pri=0.00752718 stat=ABORTED epo=0 ts=1648889571.030721457 errcode: HY000 +Q6 failed at: 2022-4-2 16:52:51:846:79 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REASON_PUSHER_ABORTED): "sql txn" id=a169cc1e key=/Table/316/1/0/0 rw=true pri=0.00752718 stat=ABORTED epo=0 ts=1648889571.030721457 + diff --git a/test_result/centralizend_result/crdb/serializable/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/crdb/serializable/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..f215eea5 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,34 @@ +#### db_type: crdb #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:52:189:799 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:52:193:155 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:52:289:670 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 16:52:52:292:897 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 16:52:52:398:920 + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-2 16:52:52:492:639 +Q6 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REASON_PUSHER_ABORTED): "sql txn" id=2eaf352b key=/Table/317/1/0/0 rw=true pri=0.00510947 stat=ABORTED epo=0 ts=1648889572.189359556 errcode: HY000 +Q6 failed at: 2022-4-2 16:52:52:992:684 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REASON_PUSHER_ABORTED): "sql txn" id=2eaf352b key=/Table/317/1/0/0 rw=true pri=0.00510947 stat=ABORTED epo=0 ts=1648889572.189359556 + diff --git a/test_result/centralizend_result/crdb/serializable/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/crdb/serializable/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..9247baee --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,34 @@ +#### db_type: crdb #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:53:325:159 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:53:329:229 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:53:432:990 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 16:52:53:436:234 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 16:52:53:536:572 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-2 16:52:53:539:534 +Q7 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REASON_PUSHER_ABORTED): "sql txn" id=e329b49a key=/Table/318/1/0/0 rw=true pri=0.00928901 stat=ABORTED epo=0 ts=1648889573.324600888 errcode: HY000 +Q7 failed at: 2022-4-2 16:52:54:227:705 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REASON_PUSHER_ABORTED): "sql txn" id=e329b49a key=/Table/318/1/0/0 rw=true pri=0.00928901 stat=ABORTED epo=0 ts=1648889573.324600888 + diff --git a/test_result/centralizend_result/crdb/serializable/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/crdb/serializable/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..ffeefd9a --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,41 @@ +#### db_type: crdb #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:54:555:746 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 16:52:54:559:501 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:54:655:902 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 16:52:54:659:146 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 16:52:54:662:213 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute sql: 'COMMIT TRANSACTION;' + Q8 finished at: 2022-4-2 16:52:54:859:363 +Q6 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1648889574.555247881,0 too old; wrote at 1648889574.655508025,1 errcode: HY000 +Q6 failed at: 2022-4-2 16:52:55:468:761 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1648889574.555247881,0 too old; wrote at 1648889574.655508025,1 + diff --git a/test_result/centralizend_result/crdb/serializable/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/crdb/serializable/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..697c113f --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,41 @@ +#### db_type: crdb #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:55:812:679 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 16:52:55:816:529 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:55:912:464 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 16:52:55:916:58 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 16:52:55:918:987 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-2 16:52:56:114:906 +Q6 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1648889575.812167779,0 too old; wrote at 1648889575.911965607,1 errcode: HY000 +Q6 failed at: 2022-4-2 16:52:56:724:661 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1648889575.812167779,0 too old; wrote at 1648889575.911965607,1 + diff --git a/test_result/centralizend_result/crdb/serializable/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/crdb/serializable/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..938a005e --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,41 @@ +#### db_type: crdb #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:57:81:303 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:57:85:211 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:57:180:891 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 16:52:57:184:569 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 16:52:57:282:373 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-2 16:52:57:286:335 + Q5 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1648889577.180503439,0 too old; wrote at 1648889577.180503439,2 errcode: HY000 + Q5 failed at: 2022-4-2 16:52:57:795:551 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1648889577.180503439,0 too old; wrote at 1648889577.180503439,2 + diff --git a/test_result/centralizend_result/crdb/serializable/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/crdb/serializable/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..d2748e59 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,41 @@ +#### db_type: crdb #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:58:126:383 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:58:129:711 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:58:229:101 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 16:52:58:232:499 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 16:52:58:327:904 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-2 16:52:58:533:580 + Q5 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1648889578.228739680,0 too old; wrote at 1648889578.228739680,2 errcode: HY000 + Q5 failed at: 2022-4-2 16:52:59:44:731 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1648889578.228739680,0 too old; wrote at 1648889578.228739680,2 + diff --git a/test_result/centralizend_result/crdb/serializable/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/crdb/serializable/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..db5a2aa9 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,41 @@ +#### db_type: crdb #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:59:371:862 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:59:375:572 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:59:471:508 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 16:52:59:490:17 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 16:52:59:574:538 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-2 16:52:59:578:375 + Q5 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1648889579.471137871,0 too old; wrote at 1648889579.471137871,2 errcode: HY000 + Q5 failed at: 2022-4-2 16:53:0:88:400 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1648889579.471137871,0 too old; wrote at 1648889579.471137871,2 + diff --git a/test_result/centralizend_result/crdb/serializable/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/crdb/serializable/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..f0389c2c --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/wat_mda_step_wat_c1.txt @@ -0,0 +1,42 @@ +#### db_type: crdb #### +#### test_type: mda_step_wat_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:53:0:452:107 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:53:0:455:384 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:53:0:552:119 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 16:53:0:555:491 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute sql: 'BEGIN TRANSACTION;' + Q6 finished at: 2022-4-2 16:53:0:652:3 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 16:53:0:655:276 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-2 16:53:0:762:614 + Q11-T2 execute sql: 'COMMIT TRANSACTION;' + Q11 finished at: 2022-4-2 16:53:0:854:432 + Q8 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REASON_PUSHER_ABORTED): "sql txn" id=e76ccdd4 key=/Table/324/1/2/0 rw=true pri=0.00480525 stat=ABORTED epo=0 ts=1648889580.651684517 errcode: HY000 + Q8 failed at: 2022-4-2 16:53:1:555:694 +Q9 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REASON_ABORT_SPAN): "sql txn" id=7a95c40f key=/Table/324/1/0/0 rw=true pri=0.01270054 stat=ABORTED epo=0 ts=1648889580.651684517,1 o errcode: HY000 +Q9 failed at: 2022-4-2 16:53:1:662:239 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REASON_PUSHER_ABORTED): "sql txn" id=e76ccdd4 key=/Table/324/1/2/0 rw=true pri=0.00480525 stat=ABORTED epo=0 ts=1648889580.651684517 + diff --git a/test_result/centralizend_result/crdb/serializable/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/crdb/serializable/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..cef6b97a --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/wat_mda_step_wat_c2.txt @@ -0,0 +1,42 @@ +#### db_type: crdb #### +#### test_type: mda_step_wat_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:53:2:11:895 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:53:2:15:947 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:53:2:113:226 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 16:53:2:117:345 + Q5-T3 execute sql: 'BEGIN TRANSACTION;' + Q5 finished at: 2022-4-2 16:53:2:210:128 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 16:53:2:414:924 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q8 finished at: 2022-4-2 16:53:2:520:958 + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-2 16:53:2:814:848 + Q6 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REASON_PUSHER_ABORTED): "sql txn" id=e7f9c264 key=/Table/325/1/1/0 rw=true pri=0.00574430 stat=ABORTED epo=0 ts=1648889582.112823795 errcode: HY000 + Q6 failed at: 2022-4-2 16:53:3:114:416 +Q9 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1648889582.011428435,0 too old; wrote at 1648889582.209768259,1 errcode: HY000 +Q9 failed at: 2022-4-2 16:53:3:724:704 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REASON_PUSHER_ABORTED): "sql txn" id=e7f9c264 key=/Table/325/1/1/0 rw=true pri=0.00574430 stat=ABORTED epo=0 ts=1648889582.112823795 + diff --git a/test_result/centralizend_result/crdb/serializable/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/crdb/serializable/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..92d8a128 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,43 @@ +#### db_type: crdb #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:45:269:798 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:45:273:620 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:45:369:781 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-2 16:52:45:473:538 + Q4 finished at: 2022-4-2 16:52:45:478:464 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-2 16:52:45:572:576 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 16:52:45:576:368 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 16:52:45:664:625 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/crdb/serializable/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..714c1f7f --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,43 @@ +#### db_type: crdb #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 17:5:35:407:121 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 17:5:35:414:26 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 17:5:35:502:377 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'COMMIT TRANSACTION;' +Q5 finished at: 2022-4-2 17:5:35:606:400 + Q4 finished at: 2022-4-2 17:5:35:618:397 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-2 17:5:35:704:339 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 17:5:35:717:642 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 17:5:35:812:352 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/wat_sda_full_write.txt b/test_result/centralizend_result/crdb/serializable/wat_sda_full_write.txt new file mode 100644 index 00000000..efa1e3e5 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/wat_sda_full_write.txt @@ -0,0 +1,43 @@ +#### db_type: crdb #### +#### test_type: sda_full_write #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:46:431:18 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:46:434:925 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:46:531:264 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-2 16:52:46:633:72 +Q6-T1 execute sql: 'COMMIT TRANSACTION;' +Q6 finished at: 2022-4-2 16:52:46:660:813 + Q4 finished at: 2022-4-2 16:52:46:668:526 + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-2 16:52:46:732:830 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 16:52:46:736:459 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/wat_sda_full_write_committed.txt b/test_result/centralizend_result/crdb/serializable/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..8bba31e4 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/wat_sda_full_write_committed.txt @@ -0,0 +1,43 @@ +#### db_type: crdb #### +#### test_type: sda_full_write_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:47:67:354 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:47:71:395 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:47:167:615 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-2 16:52:47:274:472 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-2 16:52:47:278:240 + Q4 finished at: 2022-4-2 16:52:47:285:416 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-2 16:52:47:289:56 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 16:52:47:291:951 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/crdb/serializable/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..6fb6a10e --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,50 @@ +#### db_type: crdb #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:49:915:427 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 16:52:49:918:994 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:50:17:366 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 16:52:50:115:468 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-2 16:52:50:119:496 + Q4 finished at: 2022-4-2 16:52:50:131:463 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-2 16:52:50:135:699 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 16:52:50:139:273 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/crdb/serializable/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/crdb/serializable/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..14d3f34e --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/wat_sda_lost_update_c1.txt @@ -0,0 +1,38 @@ +#### db_type: crdb #### +#### test_type: sda_lost_update_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:47:611:890 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 16:52:47:616:239 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:47:712:408 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 16:52:47:716:327 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-2 16:52:47:914:368 +Q5 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1648889567.611475606,0 too old; wrote at 1648889567.711824399,1 errcode: HY000 +Q5 failed at: 2022-4-2 16:52:48:423:981 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1648889567.611475606,0 too old; wrote at 1648889567.711824399,1 + diff --git a/test_result/centralizend_result/crdb/serializable/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/crdb/serializable/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..9ea41593 --- /dev/null +++ b/test_result/centralizend_result/crdb/serializable/wat_sda_lost_update_c2.txt @@ -0,0 +1,38 @@ +#### db_type: crdb #### +#### test_type: sda_lost_update_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-2 16:52:48:747:850 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 16:52:48:751:882 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-2 16:52:48:847:508 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 16:52:48:851:303 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-2 16:52:49:53:829 +Q5 failed reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1648889568.747395113,0 too old; wrote at 1648889568.847053441,1 errcode: HY000 +Q5 failed at: 2022-4-2 16:52:49:564:48 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1648889568.747395113,0 too old; wrote at 1648889568.847053441,1 + diff --git a/test_result/centralizend_result/mariadb/README.md b/test_result/centralizend_result/mariadb/README.md new file mode 100644 index 00000000..79afcd93 --- /dev/null +++ b/test_result/centralizend_result/mariadb/README.md @@ -0,0 +1,26 @@ +# `MariaDB`数据库测试说明 + +## 测试环境 + +`Ubuntu 20.04` | `MariaDB 10.5.22` | `unixODBC 2.3.6` + +## 数据库简介 + +`MariaDB` 是一个开源的关系数据库管理系统(`RDBMS`),由 `MySQL` 的原始开发者创建,作为 `MySQL` 的一个分支。`MariaDB` 的创建是为了保持开放源代码的自由性,这是由于 Oracle 公司收购了 `MySQL` 的母公司 `Sun Microsystems`。`MariaDB` 的开发目标是与 `MySQL` 数据库完全兼容,保证开源性,以及保持开放和透明的开发模式。 + +`MariaDB` 设计上对 `MySQL` 有很高的兼容性,它能够直接替换 `MySQL`,且大多数 `MySQL` 代码、表和`API`等在 `MariaDB` 中都可以直接使用。`MariaDB` 支持多种存储引擎,包括 `InnoDB`、`MyRocks`、`Aria`等,以满足不同用途的需求。`MariaDB` 提供了一系列的扩展功能,如分区表、虚拟列、联合引擎等。同时,它还支持线性水平扩展,以支持更大的数据集和更高的查询负载。`MariaDB` 提供了适用于多种云平台的解决方案,支持容器化部署,例如在 `Kubernetes` 上运行。 + +## 隔离级别 + +`MariaDB`支持多种事务隔离级别,这些隔离级别决定了多个并发事务如何交互以及在读取数据时可能会看到哪些数据,以下是 `MariaDB` 支持的隔离级别: + +- **`READ UNCOMMITTED`** (读未提交):一个事务可以读取其他未提交事务的修改。这是隔离级别中最低的一种,也是最少使用的一种,因为它可能会导致许多并发问题,如脏读(读取到其他事务未提交的更改)。 +- **`READ COMMITTED`** (读已提交):一个事务只能读取已经提交的其他事务的修改。这意味着它不会看到其他并发事务所做的未提交的更改。这是许多数据库系统的默认隔离级别。 +- **`REPEATABLE READ`** (可重复读):这是 `MariaDB`的默认隔离级别。在此隔离级别下,事务在开始时锁定其读取的所有数据行,确保这些行在事务结束之前不会被其他事务修改。这样,一个事务在其生命周期内多次读取同一行数据时,总是看到相同的信息。 +- **`SERIALIZABLE`** (串行化):这是隔离级别中最高的一种。在此隔离级别下,事务被执行得就像是序列化的,即一个接一个地执行,没有并发。这意味着在一个事务运行时,其他事务不能并发地访问相同的数据。 + +在选择隔离级别时,通常需要在性能和数据的准确性/一致性之间进行权衡。更高的隔离级别通常提供更好的数据一致性保证,但可能降低并发性能。 + +## 实际测试说明 + +由于`MariaDB`和`MySQL`渊源颇深,因此`SQL`语法类似,代码基本无需改动,最终在4种隔离级别,33种数据异常上的结果`MariaDB 10.5.22`也和`MySQL 8.0.20`基本相同。 diff --git a/test_result/centralizend_result/mariadb/read-committed/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/mariadb/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..795c4aeb --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:53:27:273 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:34:53:29:477 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:53:127:649 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:34:53:129:888 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:34:53:131:789 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:34:53:133:493 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2023-9-20 21:34:53:227:933 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:34:53:228:576 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:34:53:230:686 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:53:231:380 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/mariadb/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..f82b728d --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:53:453:897 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:34:53:455:379 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:53:554:750 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:34:53:556:200 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:34:53:557:364 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:34:53:558:470 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2023-9-20 21:34:53:654:674 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:34:53:655:676 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:34:53:657:610 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:53:658:363 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/iat_dda_write_skew.txt b/test_result/centralizend_result/mariadb/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..3c52f6f7 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: mariadb #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:53:876:329 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:34:53:877:689 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:53:976:2 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:34:53:977:496 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:34:53:978:929 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-9-20 21:34:54:77:420 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:34:54:78:689 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:34:54:177:396 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:34:54:179:808 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:34:54:180:381 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/mariadb/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..a3e26fce --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: mariadb #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:55:269:594 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:34:55:274:73 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:55:368:814 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:34:55:371:381 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:34:55:373:958 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:34:55:375:820 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2023-9-20 21:34:55:469:542 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:34:55:472:7 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:34:55:475:638 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:55:477:463 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/mariadb/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..a6374849 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: mariadb #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:54:407:861 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2023-9-20 21:34:54:410:103 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2023-9-20 21:34:54:411:807 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2023-9-20 21:34:54:507:937 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2023-9-20 21:34:54:509:616 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2023-9-20 21:34:54:510:643 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:34:54:512:122 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:34:54:608:461 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2023-9-20 21:34:54:611:234 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2023-9-20 21:34:54:613:104 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:34:54:613:789 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/mariadb/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..236eebe6 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: mariadb #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:54:836:242 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2023-9-20 21:34:54:838:464 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:54:937:279 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2023-9-20 21:34:54:942:78 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2023-9-20 21:34:54:946:481 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:34:54:948:485 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2023-9-20 21:34:55:38:610 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:34:55:40:183 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2023-9-20 21:34:55:42:803 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:55:43:745 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/iat_mda_step_iat.txt b/test_result/centralizend_result/mariadb/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..c1b2e05d --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:55:702:675 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2023-9-20 21:34:55:704:279 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:55:802:618 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2023-9-20 21:34:55:804:121 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:34:55:902:995 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2023-9-20 21:34:55:905:12 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2023-9-20 21:34:56:4:128 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2023-9-20 21:34:56:103:813 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2023-9-20 21:34:56:203:707 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-20 21:34:56:303:453 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:34:56:404:458 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:34:56:504:668 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2023-9-20 21:34:56:507:559 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:34:56:508:639 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/mariadb/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..7d12609b --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,106 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:0:65:600 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:35:0:69:573 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:0:166:388 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2023-9-20 21:35:0:169:513 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:35:0:171:488 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-20 21:35:0:265:224 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2023-9-20 21:35:0:267:1 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2023-9-20 21:35:0:268:371 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:35:0:269:407 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2023-9-20 21:35:0:368:298 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2023-9-20 21:35:0:368:973 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2023-9-20 21:35:0:370:796 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2023-9-20 21:35:0:371:501 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/mariadb/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..77c5c104 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,207 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:59:339:213 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:34:59:342:62 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:59:439:87 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:34:59:443:49 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:34:59:539:727 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2023-9-20 21:34:59:542:662 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:34:59:544:874 + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2023-9-20 21:34:59:639:386 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2023-9-20 21:34:59:641:365 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:59:642:756 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2023-9-20 21:34:59:740:787 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:34:59:741:825 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2023-9-20 21:34:59:841:113 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2023-9-20 21:34:59:842:102 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2023-9-20 21:34:59:845:47 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2023-9-20 21:34:59:845:791 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/mariadb/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..e4619fa1 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:56:739:831 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2023-9-20 21:34:56:741:814 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:56:840:256 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2023-9-20 21:34:56:841:846 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:34:56:940:359 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2023-9-20 21:34:56:943:164 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2023-9-20 21:34:57:42:218 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2023-9-20 21:34:57:140:866 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2023-9-20 21:34:57:240:899 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-20 21:34:57:341:414 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:34:57:441:834 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:34:57:541:393 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2023-9-20 21:34:57:544:141 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:34:57:545:206 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/mariadb/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..64208e9a --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:57:762:998 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2023-9-20 21:34:57:767:78 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:57:864:564 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2023-9-20 21:34:57:868:77 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:34:57:963:230 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2023-9-20 21:34:57:964:506 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2023-9-20 21:34:58:68:92 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2023-9-20 21:34:58:167:88 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2023-9-20 21:34:58:264:151 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-20 21:34:58:364:231 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:34:58:467:811 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:34:58:564:107 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2023-9-20 21:34:58:567:396 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:34:58:568:664 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/mariadb/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..8c393fd2 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:0:589:341 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2023-9-20 21:35:0:591:313 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2023-9-20 21:35:0:592:804 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2023-9-20 21:35:0:689:97 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2023-9-20 21:35:0:691:5 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2023-9-20 21:35:0:692:336 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:35:0:693:424 + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2023-9-20 21:35:0:788:959 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2023-9-20 21:35:0:790:755 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2023-9-20 21:35:0:792:589 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:35:0:793:239 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2023-9-20 21:35:0:890:317 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2023-9-20 21:35:0:891:833 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2023-9-20 21:35:0:894:683 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2023-9-20 21:35:0:895:516 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/mariadb/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..15955c1e --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,162 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:58:796:674 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2023-9-20 21:34:58:799:162 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:58:895:972 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2023-9-20 21:34:58:898:520 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:34:58:900:313 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2023-9-20 21:34:58:902:312 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2023-9-20 21:34:58:903:810 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:34:58:905:116 + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2023-9-20 21:34:58:995:847 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2023-9-20 21:34:58:997:783 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2023-9-20 21:34:58:999:43 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2023-9-20 21:34:59:0:513 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2023-9-20 21:34:59:1:642 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:34:59:2:998 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2023-9-20 21:34:59:99:777 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2023-9-20 21:34:59:101:400 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2023-9-20 21:34:59:105:968 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2023-9-20 21:34:59:107:728 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/mariadb/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..0c4146bd --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: mariadb #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:52:590:547 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2023-9-20 21:34:52:592:236 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:52:691:206 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-9-20 21:34:52:693:967 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:34:52:696:27 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2023-9-20 21:34:52:792:186 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:34:52:793:357 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:34:52:797:301 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:34:52:799:493 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/mariadb/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..3cea5c5b --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,58 @@ +#### db_type: mariadb #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:52:161:374 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:34:52:163:21 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:52:261:906 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2023-9-20 21:34:52:264:74 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:34:52:266:73 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2023-9-20 21:34:52:362:717 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:34:52:363:453 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:34:52:365:454 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:34:52:367:289 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/mariadb/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..3b34f4e9 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,56 @@ +#### db_type: mariadb #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:32:27:787 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:32:29:390 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:32:127:772 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:34:32:129:74 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:34:32:130:384 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2023-9-20 21:34:32:328:654 + Q7 finished at: 2023-9-20 21:34:32:328:768 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:34:32:428:250 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2023-9-20 21:34:32:431:680 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:32:432:790 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/mariadb/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..425deff7 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,56 @@ +#### db_type: mariadb #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:32:655:463 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:32:657:219 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:32:755:722 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:34:32:757:877 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:34:32:759:718 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:34:32:761:198 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2023-9-20 21:34:32:856:221 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:34:32:857:477 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2023-9-20 21:34:32:859:958 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:32:861:858 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-committed/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/mariadb/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..aa91550a --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,56 @@ +#### db_type: mariadb #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:33:83:204 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:33:84:313 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:33:184:490 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:34:33:188:237 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2023-9-20 21:34:33:284:185 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:34:33:285:341 + Q5 finished at: 2023-9-20 21:34:33:285:365 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:34:33:383:249 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:34:33:385:17 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:33:385:629 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-committed/rat_dda_read_skew.txt b/test_result/centralizend_result/mariadb/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..7022d5bc --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:33:603:740 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:34:33:605:551 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:33:704:49 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:34:33:705:708 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:34:33:707:200 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2023-9-20 21:34:33:804:727 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:34:33:907:280 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:34:34:7:897 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:34:34:10:457 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:34:11:753 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-committed/rat_dda_read_skew2.txt b/test_result/centralizend_result/mariadb/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..a08942e9 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:35:80:675 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:35:83:709 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:35:180:411 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:34:35:181:990 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:34:35:183:372 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-9-20 21:34:35:281:911 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:34:35:283:282 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:34:35:380:909 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:34:35:384:963 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:35:386:292 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-committed/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/mariadb/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..ed4f4ec8 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:35:612:803 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:35:614:286 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:35:713:8 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:34:35:714:967 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:34:35:717:680 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:34:35:719:319 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2023-9-20 21:34:35:814:848 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:34:35:816:534 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:34:35:820:918 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:35:822:544 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/mariadb/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..8c888f37 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,61 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:34:234:655 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2023-9-20 21:34:34:235:868 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:34:334:714 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:34:34:335:910 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:34:34:336:850 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:34:34:337:951 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2023-9-20 21:34:34:435:784 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:34:34:436:347 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2023-9-20 21:34:34:438:191 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:34:438:754 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/mariadb/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..8335e394 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,59 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:34:653:648 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2023-9-20 21:34:34:655:950 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:34:752:971 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2023-9-20 21:34:34:754:413 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2023-9-20 21:34:34:755:595 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:34:34:756:760 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2023-9-20 21:34:34:854:683 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:34:34:855:965 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2023-9-20 21:34:34:859:265 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:34:860:859 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/rat_dda_write_read_skew.txt b/test_result/centralizend_result/mariadb/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..a26a91ae --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: mariadb #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:30:969:132 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:30:970:860 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:31:68:811 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:34:31:70:161 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:34:31:71:486 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2023-9-20 21:34:31:169:699 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:34:31:270:171 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:34:31:372:283 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:34:31:375:85 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:31:375:808 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/mariadb/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..1f885061 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: mariadb #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:31:599:708 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:31:601:292 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:31:699:888 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:34:31:702:953 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:34:31:705:870 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:34:31:707:964 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2023-9-20 21:34:31:802:582 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:34:31:804:516 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:34:31:806:601 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:31:807:232 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-committed/rat_mda_step_rat.txt b/test_result/centralizend_result/mariadb/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..da1800da --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: mariadb #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:36:46:866 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:36:48:251 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:36:146:568 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:34:36:147:617 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:34:36:150:14 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-20 21:34:36:247:278 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2023-9-20 21:34:36:248:682 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2023-9-20 21:34:36:250:612 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2023-9-20 21:34:36:349:331 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-20 21:34:36:351:930 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:34:36:447:920 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:34:36:547:842 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2023-9-20 21:34:36:549:927 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:34:36:550:786 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/mariadb/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..898d91cd --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: mariadb #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2023-9-20 21:34:36:772:242 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2023-9-20 21:34:36:777:605 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2023-9-20 21:34:36:871:489 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2023-9-20 21:34:36:872:785 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:34:36:971:329 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2023-9-20 21:34:36:973:309 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2023-9-20 21:34:36:975:450 + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2023-9-20 21:34:37:71:63 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2023-9-20 21:34:37:72:459 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2023-9-20 21:34:37:172:832 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2023-9-20 21:34:37:272:552 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:34:37:371:726 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2023-9-20 21:34:37:471:553 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:34:37:472:819 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2023-9-20 21:34:37:475:766 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2023-9-20 21:34:37:477:414 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/mariadb/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..cd50592b --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: mariadb #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:37:700:970 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:37:704:7 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:37:799:698 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:34:37:801:345 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2023-9-20 21:34:37:803:280 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-20 21:34:37:900:19 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2023-9-20 21:34:37:901:730 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2023-9-20 21:34:37:903:915 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2023-9-20 21:34:38:1:415 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-20 21:34:38:2:605 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:34:38:101:296 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:34:38:200:851 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2023-9-20 21:34:38:204:837 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:34:38:206:547 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/mariadb/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..3e207aa0 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: mariadb #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:38:429:492 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2023-9-20 21:34:38:431:576 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:38:529:332 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2023-9-20 21:34:38:532:659 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2023-9-20 21:34:38:536:896 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-20 21:34:38:629:15 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2023-9-20 21:34:38:630:522 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2023-9-20 21:34:38:632:413 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2023-9-20 21:34:38:730:458 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-20 21:34:38:731:649 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:34:38:831:966 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:34:38:930:505 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2023-9-20 21:34:38:933:216 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:34:38:934:11 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/rat_sda_dirty_read.txt b/test_result/centralizend_result/mariadb/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..b07e3b91 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: mariadb #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:27:408:62 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:27:411:174 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:27:507:186 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2023-9-20 21:34:27:508:575 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2023-9-20 21:34:27:607:956 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:34:27:708:305 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2023-9-20 21:34:27:711:371 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:34:27:712:866 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-committed/rat_sda_intermediate_read.txt b/test_result/centralizend_result/mariadb/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..b5fe57b7 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: mariadb #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:28:554:360 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:28:556:23 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:28:654:645 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2023-9-20 21:34:28:657:29 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2023-9-20 21:34:28:755:579 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:34:28:854:390 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:34:28:954:919 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2023-9-20 21:34:28:956:664 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:34:28:957:362 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/mariadb/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..41603095 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: mariadb #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:29:175:27 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:29:176:331 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:29:275:665 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2023-9-20 21:34:29:277:318 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:34:29:277:957 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2023-9-20 21:34:29:376:17 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:34:29:377:320 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2023-9-20 21:34:29:379:24 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:34:29:379:723 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-committed/rat_sda_lost_self_update.txt b/test_result/centralizend_result/mariadb/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..724d8c84 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: mariadb #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:30:446:154 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:30:447:731 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:30:546:489 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2023-9-20 21:34:30:647:49 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2023-9-20 21:34:30:647:922 +Q6 finished at: 2023-9-20 21:34:30:648:137 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:34:30:746:462 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:34:30:748:121 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:34:30:748:845 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-committed/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/mariadb/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..81c5ec0b --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: mariadb #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:27:932:313 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:34:27:935:484 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:28:32:317 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2023-9-20 21:34:28:34:424 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2023-9-20 21:34:28:133:310 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:34:28:233:14 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:34:28:332:428 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:34:28:334:622 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:34:28:335:332 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/mariadb/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..a0b0c39b --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,58 @@ +#### db_type: mariadb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:29:596:69 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2023-9-20 21:34:29:598:52 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:29:699:372 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2023-9-20 21:34:29:700:864 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:34:29:702:80 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2023-9-20 21:34:29:800:322 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:34:29:801:159 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2023-9-20 21:34:29:802:976 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:34:29:803:723 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/mariadb/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..2d94f61e --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,57 @@ +#### db_type: mariadb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:30:19:617 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2023-9-20 21:34:30:22:81 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:30:119:482 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2023-9-20 21:34:30:120:941 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:34:30:122:206 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2023-9-20 21:34:30:220:121 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:34:30:220:798 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2023-9-20 21:34:30:223:790 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:34:30:225:346 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/mariadb/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..23760c9f --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,56 @@ +#### db_type: mariadb #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:42:748:9 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:42:749:303 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:42:848:874 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:34:42:851:194 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2023-9-20 21:34:42:950:159 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:34:42:951:329 + Q5 finished at: 2023-9-20 21:34:42:951:510 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:34:42:952:641 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:34:42:956:268 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:42:957:964 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/mariadb/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..d5e51f43 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,35 @@ +#### db_type: mariadb #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:43:178:982 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:43:180:428 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:43:279:100 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:34:43:280:635 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:34:43:380:916 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:34:43:480:136 +Q6 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q6 failed at: 2023-9-20 21:34:43:981:835 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/mariadb/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..4673e3e5 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,35 @@ +#### db_type: mariadb #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:44:205:620 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:44:207:326 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:44:305:235 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:34:44:307:160 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:34:44:406:946 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:34:44:505:783 +Q6 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q6 failed at: 2023-9-20 21:34:45:7:362 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/mariadb/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..022dd5e1 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: mariadb #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:45:230:306 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:45:233:505 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:45:331:615 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:34:45:333:460 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:34:45:432:417 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:34:45:433:647 +Q7 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q7 failed at: 2023-9-20 21:34:46:133:139 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/mariadb/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..fad7595b --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:46:357:888 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:34:46:359:519 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:46:458:5 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:34:46:459:428 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:34:46:460:484 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; +Q6 finished at: 2023-9-20 21:34:46:658:631 + Q8 finished at: 2023-9-20 21:34:46:658:826 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:34:46:659:844 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:34:46:662:146 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:46:662:863 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/mariadb/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..7b2d5ebd --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:46:885:831 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:34:46:887:144 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:46:986:227 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:34:46:988:64 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:34:46:989:268 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2023-9-20 21:34:47:186:593 + Q7 finished at: 2023-9-20 21:34:47:186:800 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:34:47:286:587 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:34:47:289:193 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:47:290:390 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/mariadb/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..24f18aa4 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:47:515:375 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:47:516:960 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:47:616:147 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:34:47:619:38 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-9-20 21:34:47:716:384 +Q7-T1 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:34:47:717:366 +Q7 finished at: 2023-9-20 21:34:47:717:560 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:34:47:816:386 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:34:47:819:707 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:47:821:224 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/mariadb/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..4df39c35 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:48:46:485 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:48:48:289 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:48:146:496 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:34:48:148:51 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-9-20 21:34:48:247:308 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:34:48:447:736 +Q8 finished at: 2023-9-20 21:34:48:447:991 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:34:48:449:176 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:34:48:453:230 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:48:454:994 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/mariadb/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..53146e9c --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:48:679:561 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:48:681:354 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:48:779:399 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:34:48:781:267 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2023-9-20 21:34:48:880:807 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:34:48:881:905 +Q8 finished at: 2023-9-20 21:34:48:882:199 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:34:48:883:60 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:34:48:886:913 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:48:888:97 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/mariadb/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..28821a3b --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,44 @@ +#### db_type: mariadb #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:49:113:927 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:49:116:766 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:49:213:176 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:34:49:214:729 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-20 21:34:49:313:204 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2023-9-20 21:34:49:315:271 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2023-9-20 21:34:49:414:439 + Q11-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:34:49:513:329 + Q11 finished at: 2023-9-20 21:34:49:513:665 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:34:49:614:104 +Q9 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q9 failed at: 2023-9-20 21:34:50:315:180 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/read-committed/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/mariadb/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..4ed86311 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,44 @@ +#### db_type: mariadb #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:50:538:755 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:50:540:588 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:50:640:642 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:34:50:643:965 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:34:50:739:381 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2023-9-20 21:34:50:940:438 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2023-9-20 21:34:51:40:250 + Q10-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:34:51:140:4 + Q10 finished at: 2023-9-20 21:34:51:140:368 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:34:51:340:180 +Q9 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q9 failed at: 2023-9-20 21:34:51:941:85 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/mariadb/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..707001f0 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: mariadb #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:39:154:793 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:39:156:222 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:39:254:732 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2023-9-20 21:34:39:356:241 + Q4 finished at: 2023-9-20 21:34:39:356:267 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:34:39:456:160 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2023-9-20 21:34:39:459:298 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2023-9-20 21:34:39:465:317 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:34:39:467:12 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/mariadb/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..9293ac79 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: mariadb #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:39:686:569 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:39:689:99 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:39:786:371 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2023-9-20 21:34:39:886:780 + Q4 finished at: 2023-9-20 21:34:39:886:764 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:34:39:986:474 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2023-9-20 21:34:39:989:319 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2023-9-20 21:34:39:994:893 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:34:39:995:434 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-committed/wat_sda_full_write.txt b/test_result/centralizend_result/mariadb/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..96c6d7c4 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: mariadb #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:40:209:971 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:40:212:487 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:40:310:207 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2023-9-20 21:34:40:410:99 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2023-9-20 21:34:40:411:256 +Q6 finished at: 2023-9-20 21:34:40:411:476 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:34:40:510:218 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2023-9-20 21:34:40:512:319 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:34:40:513:152 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-committed/wat_sda_full_write_committed.txt b/test_result/centralizend_result/mariadb/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..917c228e --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: mariadb #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:40:731:2 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:40:734:137 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:40:832:187 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2023-9-20 21:34:40:931:765 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2023-9-20 21:34:40:932:895 +Q7 finished at: 2023-9-20 21:34:40:933:106 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:34:40:934:47 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2023-9-20 21:34:40:938:3 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:34:40:940:66 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/mariadb/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..c209eae9 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: mariadb #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:42:315:456 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:42:316:787 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:42:415:463 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2023-9-20 21:34:42:517:329 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2023-9-20 21:34:42:518:890 +Q7 finished at: 2023-9-20 21:34:42:519:5 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:34:42:520:91 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:34:42:523:423 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:34:42:525:158 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-committed/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/mariadb/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..0abfd450 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: mariadb #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:41:161:433 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2023-9-20 21:34:41:164:690 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:41:263:618 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-9-20 21:34:41:266:873 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; +Q5 finished at: 2023-9-20 21:34:41:463:875 + Q7 finished at: 2023-9-20 21:34:41:464:190 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2023-9-20 21:34:41:465:67 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:34:41:467:142 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:34:41:468:181 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-committed/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/mariadb/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..f9c4e4b0 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: mariadb #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:41:689:39 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2023-9-20 21:34:41:690:934 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:41:788:582 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-9-20 21:34:41:790:130 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:34:41:989:11 +Q5 finished at: 2023-9-20 21:34:41:989:29 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:34:42:92:248 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:34:42:94:706 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:34:42:95:459 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/mariadb/read-uncommitted/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..d672b7a9 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/iat_dda_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:4:612:15 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:34:4:614:203 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:4:715:573 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:34:4:717:306 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:34:4:718:839 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:34:4:720:134 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2023-9-20 21:34:4:816:569 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:34:4:817:424 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:34:4:819:549 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:4:820:257 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/mariadb/read-uncommitted/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..158957f4 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:5:42:562 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:34:5:44:544 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:5:143:493 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:34:5:145:410 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:34:5:147:137 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:34:5:148:380 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2023-9-20 21:34:5:244:36 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:34:5:245:298 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:34:5:247:377 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:5:247:901 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/iat_dda_write_skew.txt b/test_result/centralizend_result/mariadb/read-uncommitted/iat_dda_write_skew.txt new file mode 100644 index 00000000..63ef785e --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: mariadb #### +#### test_type: dda_write_skew #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:5:469:397 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:34:5:471:402 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:5:571:415 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:34:5:572:819 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:34:5:573:850 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-9-20 21:34:5:672:403 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:34:5:673:659 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:34:5:775:951 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:34:5:778:735 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:34:5:780:124 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/mariadb/read-uncommitted/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..e0582096 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: mariadb #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:6:865:875 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:34:6:867:739 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:6:967:814 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:34:6:969:245 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:34:6:970:308 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:34:6:971:314 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2023-9-20 21:34:7:68:176 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:34:7:69:353 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:34:7:71:450 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:7:72:183 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/mariadb/read-uncommitted/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..fb5e35e4 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,74 @@ +#### db_type: mariadb #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:6:14:236 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2023-9-20 21:34:6:16:578 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2023-9-20 21:34:6:17:976 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2023-9-20 21:34:6:113:477 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + (2) expected_result: + (300,) + + Q5 finished at: 2023-9-20 21:34:6:115:234 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2023-9-20 21:34:6:116:602 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:34:6:117:790 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:34:6:214:510 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2023-9-20 21:34:6:217:285 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2023-9-20 21:34:6:219:131 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:34:6:219:749 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/mariadb/read-uncommitted/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..1101cbc0 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: mariadb #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:6:441:759 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2023-9-20 21:34:6:445:376 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:6:540:783 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2023-9-20 21:34:6:542:634 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2023-9-20 21:34:6:544:506 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:34:6:545:405 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2023-9-20 21:34:6:642:364 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:34:6:643:697 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2023-9-20 21:34:6:645:895 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:6:646:763 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/iat_mda_step_iat.txt b/test_result/centralizend_result/mariadb/read-uncommitted/iat_mda_step_iat.txt new file mode 100644 index 00000000..d5767931 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:7:293:148 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2023-9-20 21:34:7:296:745 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:7:395:869 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2023-9-20 21:34:7:398:152 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:34:7:499:592 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2023-9-20 21:34:7:501:946 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2023-9-20 21:34:7:596:348 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2023-9-20 21:34:7:696:495 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2023-9-20 21:34:7:800:974 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-20 21:34:7:896:690 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:34:7:995:686 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:34:8:101:180 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2023-9-20 21:34:8:105:288 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:34:8:106:815 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/mariadb/read-uncommitted/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..1c1057da --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,106 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:11:647:62 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:34:11:648:616 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:11:747:424 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2023-9-20 21:34:11:749:147 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:34:11:750:508 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-20 21:34:11:847:261 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2023-9-20 21:34:11:849:926 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2023-9-20 21:34:11:851:709 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:34:11:852:945 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2023-9-20 21:34:11:948:954 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2023-9-20 21:34:11:949:752 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2023-9-20 21:34:11:952:63 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2023-9-20 21:34:11:952:821 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/mariadb/read-uncommitted/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..0a09f1dc --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,207 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:10:916:634 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:34:10:918:513 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:11:16:854 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:34:11:21:685 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:34:11:116:781 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2023-9-20 21:34:11:118:443 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:34:11:119:800 + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2023-9-20 21:34:11:216:731 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2023-9-20 21:34:11:217:810 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:11:219:77 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2023-9-20 21:34:11:319:279 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:34:11:320:86 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2023-9-20 21:34:11:418:923 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2023-9-20 21:34:11:419:789 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2023-9-20 21:34:11:425:690 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2023-9-20 21:34:11:427:650 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/mariadb/read-uncommitted/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..32732fff --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:8:332:609 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2023-9-20 21:34:8:334:222 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:8:432:463 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2023-9-20 21:34:8:434:260 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:34:8:532:700 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2023-9-20 21:34:8:534:26 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2023-9-20 21:34:8:634:277 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2023-9-20 21:34:8:733:919 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2023-9-20 21:34:8:833:752 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-20 21:34:8:933:587 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:34:9:34:19 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:34:9:133:936 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2023-9-20 21:34:9:138:388 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:34:9:140:226 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/mariadb/read-uncommitted/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..a11611cd --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:9:359:880 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2023-9-20 21:34:9:362:123 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:9:460:282 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2023-9-20 21:34:9:461:858 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:34:9:560:421 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2023-9-20 21:34:9:564:393 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2023-9-20 21:34:9:660:551 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2023-9-20 21:34:9:760:854 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2023-9-20 21:34:9:862:709 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-20 21:34:9:960:981 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:34:10:62:273 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:34:10:160:947 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2023-9-20 21:34:10:163:565 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:34:10:164:386 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/mariadb/read-uncommitted/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..8ceb66e8 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:12:173:427 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2023-9-20 21:34:12:175:591 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2023-9-20 21:34:12:177:266 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2023-9-20 21:34:12:274:648 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2023-9-20 21:34:12:277:707 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2023-9-20 21:34:12:279:467 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:34:12:281:173 + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2023-9-20 21:34:12:374:702 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2023-9-20 21:34:12:377:117 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2023-9-20 21:34:12:379:205 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:34:12:380:45 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2023-9-20 21:34:12:476:343 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2023-9-20 21:34:12:477:658 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2023-9-20 21:34:12:480:611 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2023-9-20 21:34:12:482:426 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/mariadb/read-uncommitted/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..5295a3eb --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,162 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:10:383:858 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2023-9-20 21:34:10:385:952 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:10:487:918 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2023-9-20 21:34:10:489:577 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:34:10:490:893 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2023-9-20 21:34:10:492:188 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2023-9-20 21:34:10:493:181 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:34:10:494:277 + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2023-9-20 21:34:10:583:753 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2023-9-20 21:34:10:586:377 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2023-9-20 21:34:10:588:138 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2023-9-20 21:34:10:590:417 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2023-9-20 21:34:10:592:264 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:34:10:593:717 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2023-9-20 21:34:10:688:766 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2023-9-20 21:34:10:689:596 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2023-9-20 21:34:10:694:167 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2023-9-20 21:34:10:695:973 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/mariadb/read-uncommitted/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..780f7342 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: mariadb #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:4:186:623 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2023-9-20 21:34:4:188:243 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:4:286:983 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-9-20 21:34:4:288:351 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:34:4:289:396 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2023-9-20 21:34:4:387:409 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:34:4:388:917 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:34:4:391:196 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:34:4:392:518 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/mariadb/read-uncommitted/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..be5d56e2 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,58 @@ +#### db_type: mariadb #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:3:765:306 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:34:3:767:408 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:3:864:519 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2023-9-20 21:34:3:866:18 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:34:3:867:167 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2023-9-20 21:34:3:965:572 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:34:3:966:400 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:34:3:967:986 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:34:3:968:708 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..362449ec --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_double_write_skew1.txt @@ -0,0 +1,54 @@ +#### db_type: mariadb #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:43:659:132 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:43:660:989 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:43:759:349 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:33:43:760:329 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:33:43:761:212 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2023-9-20 21:33:43:959:449 + Q7 finished at: 2023-9-20 21:33:43:960:136 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:33:44:59:929 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2023-9-20 21:33:44:62:263 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:33:44:63:72 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..9f1ceacd --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: mariadb #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:44:288:567 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:44:290:40 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:44:388:623 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:33:44:389:955 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:33:44:391:377 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:33:44:392:397 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2023-9-20 21:33:44:491:329 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:33:44:493:505 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2023-9-20 21:33:44:496:150 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:33:44:497:722 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..e6114230 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_double_write_skew2.txt @@ -0,0 +1,54 @@ +#### db_type: mariadb #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:44:724:204 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:44:725:743 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:44:824:438 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:33:44:825:573 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q6 finished at: 2023-9-20 21:33:44:925:773 +Q7-T1 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:33:44:926:863 +Q7 finished at: 2023-9-20 21:33:44:927:94 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:33:45:25:68 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:33:45:29:158 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:33:45:30:901 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_read_skew.txt b/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_read_skew.txt new file mode 100644 index 00000000..7e0ecba5 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:45:256:919 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:33:45:258:499 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:45:356:623 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:33:45:358:7 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:33:45:359:299 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q6 finished at: 2023-9-20 21:33:45:458:151 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:33:45:558:337 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:33:45:656:940 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:33:45:659:105 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:33:45:659:866 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_read_skew2.txt b/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_read_skew2.txt new file mode 100644 index 00000000..37ac885c --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_read_skew2.txt @@ -0,0 +1,61 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:46:721:874 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:46:723:474 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:46:823:954 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:33:46:825:605 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:33:46:827:270 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-9-20 21:33:46:928:248 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:33:46:929:519 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:33:47:24:339 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:33:47:26:572 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:33:47:28:84 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..a2ff5f95 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_read_skew2_committed.txt @@ -0,0 +1,61 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:47:251:781 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:47:253:439 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:47:351:305 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:33:47:352:637 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:33:47:353:913 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:33:47:354:566 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2023-9-20 21:33:47:452:93 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:33:47:453:231 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:33:47:455:850 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:33:47:457:601 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..b1901db0 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,61 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:45:879:207 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2023-9-20 21:33:45:881:294 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:45:978:996 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:33:45:980:237 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:33:45:981:400 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:33:45:982:469 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2023-9-20 21:33:46:79:963 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:33:46:80:692 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2023-9-20 21:33:46:82:467 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:33:46:83:177 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..b5dae9cf --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,59 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:46:298:355 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2023-9-20 21:33:46:300:892 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:46:400:155 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2023-9-20 21:33:46:403:188 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2023-9-20 21:33:46:405:955 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:33:46:407:261 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2023-9-20 21:33:46:500:329 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:33:46:501:67 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2023-9-20 21:33:46:502:942 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:33:46:503:599 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_write_read_skew.txt b/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..8ef3fe75 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: mariadb #### +#### test_type: dda_write_read_skew #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:42:610:941 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:42:614:116 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:42:709:835 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:33:42:711:569 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:33:42:713:207 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q6 finished at: 2023-9-20 21:33:42:812:621 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:33:42:910:867 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:33:43:10:231 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:33:43:12:207 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:33:43:12:725 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..2a06af1c --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: mariadb #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:43:231:659 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:43:233:370 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:43:330:837 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:33:43:332:516 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:33:43:334:291 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:33:43:335:284 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2023-9-20 21:33:43:432:29 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:33:43:433:196 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:33:43:435:519 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:33:43:436:229 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/rat_mda_step_rat.txt b/test_result/centralizend_result/mariadb/read-uncommitted/rat_mda_step_rat.txt new file mode 100644 index 00000000..491db59a --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: mariadb #### +#### test_type: mda_step_rat #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:47:681:877 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:47:683:579 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:47:781:542 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:33:47:782:656 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + (3) expected_result: + (0,0) + (4) expected_result: + (0,0) + *(5) expected_result: + (0,1) + (6) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:33:47:783:796 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-20 21:33:47:881:517 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2023-9-20 21:33:47:882:888 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + *(1) expected_result: + (1,1) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q8 finished at: 2023-9-20 21:33:47:884:581 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + *(4) expected_result: + (2,1) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q9 finished at: 2023-9-20 21:33:47:984:363 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-20 21:33:47:985:341 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:33:48:82:751 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:33:48:184:88 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2023-9-20 21:33:48:188:906 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:33:48:190:549 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/mariadb/read-uncommitted/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..f94ab72b --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,207 @@ +#### db_type: mariadb #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2023-9-20 21:33:48:415:65 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2023-9-20 21:33:48:417:247 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2023-9-20 21:33:48:515:86 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2023-9-20 21:33:48:516:958 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:33:48:615:105 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2023-9-20 21:33:48:617:417 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + *(5) expected_result: + (0,1) + (6) expected_result: + (0,0) + *(7) expected_result: + (0,1) + *(8) expected_result: + (0,1) + *(9) expected_result: + (0,1) + (10) expected_result: + (0,0) + (11) expected_result: + (0,0) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + (14) expected_result: + (0,0) + + Q7 finished at: 2023-9-20 21:33:48:619:371 + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2023-9-20 21:33:48:714:949 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2023-9-20 21:33:48:716:596 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + (3) expected_result: + (1,0) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + *(6) expected_result: + (1,1) + (7) expected_result: + (1,0) + *(8) expected_result: + (1,1) + *(9) expected_result: + (1,1) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + (12) expected_result: + (1,0) + (13) expected_result: + (1,0) + (14) expected_result: + (1,0) + + Q10 finished at: 2023-9-20 21:33:48:817:12 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2023-9-20 21:33:48:915:883 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:33:49:15:942 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2023-9-20 21:33:49:115:88 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:33:49:116:9 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2023-9-20 21:33:49:118:415 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2023-9-20 21:33:49:119:270 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/mariadb/read-uncommitted/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..8f953586 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: mariadb #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:49:339:868 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:49:341:373 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:49:439:288 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:33:49:441:100 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + (6) expected_result: + (1,) + + Q5 finished at: 2023-9-20 21:33:49:443:489 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-20 21:33:49:539:124 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2023-9-20 21:33:49:540:389 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + *(1) expected_result: + (,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q8 finished at: 2023-9-20 21:33:49:541:923 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + (3) expected_result: + (1,) + *(4) expected_result: + (,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2023-9-20 21:33:49:640:301 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-20 21:33:49:641:503 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:33:49:740:530 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:33:49:840:420 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2023-9-20 21:33:49:843:73 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:33:49:844:861 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/mariadb/read-uncommitted/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..4897bc90 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: mariadb #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:50:66:570 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2023-9-20 21:33:50:68:170 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:50:166:658 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2023-9-20 21:33:50:168:281 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q5 finished at: 2023-9-20 21:33:50:170:27 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-20 21:33:50:267:95 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2023-9-20 21:33:50:269:640 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + (4) expected_result: + (,) + *(5) expected_result: + (1,) + (6) expected_result: + (,) + + Q8 finished at: 2023-9-20 21:33:50:273:710 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2023-9-20 21:33:50:367:998 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-20 21:33:50:369:278 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:33:50:467:474 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:33:50:567:442 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2023-9-20 21:33:50:569:895 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:33:50:570:951 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/rat_sda_dirty_read.txt b/test_result/centralizend_result/mariadb/read-uncommitted/rat_sda_dirty_read.txt new file mode 100644 index 00000000..ad76ea4c --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/rat_sda_dirty_read.txt @@ -0,0 +1,45 @@ +#### db_type: mariadb #### +#### test_type: sda_dirty_read #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:39:40:184 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:39:41:874 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:39:139:718 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + + Q4 finished at: 2023-9-20 21:33:39:141:635 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2023-9-20 21:33:39:240:400 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:33:39:339:641 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2023-9-20 21:33:39:341:499 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:33:39:341:962 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/rat_sda_intermediate_read.txt b/test_result/centralizend_result/mariadb/read-uncommitted/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..6ade2418 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/rat_sda_intermediate_read.txt @@ -0,0 +1,51 @@ +#### db_type: mariadb #### +#### test_type: sda_intermediate_read #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:40:177:262 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:40:178:981 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:40:276:599 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2023-9-20 21:33:40:278:147 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2023-9-20 21:33:40:377:633 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:33:40:477:11 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:33:40:578:234 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2023-9-20 21:33:40:580:503 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:33:40:581:462 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/mariadb/read-uncommitted/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..e477aee6 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,51 @@ +#### db_type: mariadb #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:40:800:265 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:40:801:556 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:40:901:163 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2023-9-20 21:33:40:904:441 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:33:40:906:78 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2023-9-20 21:33:41:1:450 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:33:41:2:744 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2023-9-20 21:33:41:6:433 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:33:41:8:198 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/rat_sda_lost_self_update.txt b/test_result/centralizend_result/mariadb/read-uncommitted/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..aa6bb368 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: mariadb #### +#### test_type: sda_lost_self_update #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:42:80:682 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:42:81:988 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:42:181:304 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2023-9-20 21:33:42:282:418 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2023-9-20 21:33:42:283:519 +Q6 finished at: 2023-9-20 21:33:42:284:32 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:33:42:381:546 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:33:42:384:990 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:33:42:386:504 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/mariadb/read-uncommitted/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..9ef75c63 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/rat_sda_non_repeatable_read.txt @@ -0,0 +1,58 @@ +#### db_type: mariadb #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:39:556:631 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:33:39:558:452 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:39:656:436 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2023-9-20 21:33:39:657:785 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q5 finished at: 2023-9-20 21:33:39:758:745 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:33:39:857:171 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:33:39:956:395 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:33:39:958:474 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:33:39:959:173 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/mariadb/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..3369619a --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,58 @@ +#### db_type: mariadb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:41:228:424 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2023-9-20 21:33:41:229:907 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:41:329:638 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2023-9-20 21:33:41:332:484 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:33:41:333:784 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2023-9-20 21:33:41:429:892 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:33:41:431:80 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2023-9-20 21:33:41:434:582 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:33:41:436:268 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/mariadb/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..81cdd4f2 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,57 @@ +#### db_type: mariadb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:41:654:752 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2023-9-20 21:33:41:656:795 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:41:755:887 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2023-9-20 21:33:41:758:549 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:33:41:760:325 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2023-9-20 21:33:41:857:315 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:33:41:858:846 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2023-9-20 21:33:41:861:10 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:33:41:861:543 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..2b04a8e0 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: mariadb #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:54:380:558 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:54:383:860 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:54:480:452 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:33:54:482:341 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2023-9-20 21:33:54:581:54 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:33:54:582:14 +Q8 finished at: 2023-9-20 21:33:54:582:158 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:33:54:583:59 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:33:54:584:950 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:33:54:585:750 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..e59b1d43 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,35 @@ +#### db_type: mariadb #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:54:804:793 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:54:806:568 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:54:906:670 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:33:54:910:39 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:33:55:7:219 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:33:55:108:373 +Q6 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q6 failed at: 2023-9-20 21:33:55:607:986 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..ae892bb1 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,35 @@ +#### db_type: mariadb #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:55:835:378 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:55:838:534 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:55:934:209 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:33:55:935:625 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:33:56:37:388 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:33:56:136:342 +Q6 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q6 failed at: 2023-9-20 21:33:56:638:48 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..f1369bc1 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: mariadb #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:56:862:80 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:56:863:838 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:56:962:373 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:33:56:963:908 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:33:57:63:982 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:33:57:66:496 +Q7 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q7 failed at: 2023-9-20 21:33:57:764:463 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..3f3b4422 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:57:990:153 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:33:57:993:264 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:58:89:5 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:33:58:90:137 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:33:58:90:993 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; +Q6 finished at: 2023-9-20 21:33:58:289:621 + Q8 finished at: 2023-9-20 21:33:58:289:697 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:33:58:291:404 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:33:58:293:381 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:33:58:294:61 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..91d5b3ea --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:58:513:156 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:33:58:516:350 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:58:613:950 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:33:58:618:298 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:33:58:622:329 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2023-9-20 21:33:58:813:660 + Q7 finished at: 2023-9-20 21:33:58:813:717 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:33:58:913:984 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:33:58:917:994 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:33:58:919:225 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..4b9db6c6 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:59:141:862 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:59:143:87 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:59:241:633 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:33:59:243:787 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-9-20 21:33:59:343:507 +Q7-T1 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:33:59:344:907 +Q7 finished at: 2023-9-20 21:33:59:344:988 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:33:59:442:601 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:33:59:446:146 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:33:59:447:868 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..24fc7687 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:59:669:924 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:59:672:207 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:59:769:860 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:33:59:771:895 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-9-20 21:33:59:870:440 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:34:0:70:27 + Q5 finished at: 2023-9-20 21:34:0:70:246 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:34:0:71:568 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:34:0:73:170 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:0:73:658 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..2f4baaad --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:0:292:509 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:0:296:155 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:0:391:371 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:34:0:393:251 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2023-9-20 21:34:0:492:59 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:34:0:492:955 +Q8 finished at: 2023-9-20 21:34:0:493:211 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:34:0:494:28 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:34:0:496:132 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:34:0:496:808 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/mariadb/read-uncommitted/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..34be6147 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/wat_mda_step_wat_c1.txt @@ -0,0 +1,44 @@ +#### db_type: mariadb #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:0:716:834 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:0:718:641 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:0:817:436 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:34:0:820:692 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-20 21:34:0:916:683 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2023-9-20 21:34:0:918:704 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2023-9-20 21:34:1:17:751 + Q11-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:34:1:117:586 + Q11 finished at: 2023-9-20 21:34:1:117:879 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:34:1:218:366 +Q9 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q9 failed at: 2023-9-20 21:34:1:918:234 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/mariadb/read-uncommitted/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..3c7f8f64 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/wat_mda_step_wat_c2.txt @@ -0,0 +1,44 @@ +#### db_type: mariadb #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:34:2:142:525 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:34:2:143:797 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:34:2:242:480 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:34:2:243:829 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:34:2:342:706 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2023-9-20 21:34:2:545:181 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2023-9-20 21:34:2:643:692 + Q10-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:34:2:743:302 + Q10 finished at: 2023-9-20 21:34:2:743:790 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:34:2:943:690 +Q9 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q9 failed at: 2023-9-20 21:34:3:544:143 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/mariadb/read-uncommitted/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..83c88466 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: mariadb #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:50:794:756 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:50:797:897 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:50:895:467 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; + Q4 finished at: 2023-9-20 21:33:50:995:519 +Q5 finished at: 2023-9-20 21:33:50:995:678 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:33:51:94:379 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2023-9-20 21:33:51:96:329 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2023-9-20 21:33:51:101:670 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:33:51:102:145 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/mariadb/read-uncommitted/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..638488c3 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: mariadb #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:51:319:756 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:51:321:833 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:51:419:451 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; + Q4 finished at: 2023-9-20 21:33:51:519:927 +Q5 finished at: 2023-9-20 21:33:51:520:460 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:33:51:620:804 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2023-9-20 21:33:51:623:609 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2023-9-20 21:33:51:628:26 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:33:51:629:237 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/wat_sda_full_write.txt b/test_result/centralizend_result/mariadb/read-uncommitted/wat_sda_full_write.txt new file mode 100644 index 00000000..eeab26b8 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: mariadb #### +#### test_type: sda_full_write #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:51:850:720 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:51:852:59 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:51:950:833 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2023-9-20 21:33:52:52:54 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2023-9-20 21:33:52:53:70 +Q6 finished at: 2023-9-20 21:33:52:53:276 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:33:52:152:470 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2023-9-20 21:33:52:154:591 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:33:52:155:187 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/wat_sda_full_write_committed.txt b/test_result/centralizend_result/mariadb/read-uncommitted/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..26da2010 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: mariadb #### +#### test_type: sda_full_write_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:52:369:936 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:52:372:245 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:52:470:22 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2023-9-20 21:33:52:571:525 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2023-9-20 21:33:52:572:664 +Q7 finished at: 2023-9-20 21:33:52:572:884 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:33:52:573:847 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2023-9-20 21:33:52:577:17 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:33:52:578:589 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/mariadb/read-uncommitted/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..bcb6d05d --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: mariadb #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:53:951:84 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:33:53:952:539 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:54:51:688 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2023-9-20 21:33:54:152:268 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2023-9-20 21:33:54:153:285 +Q7 finished at: 2023-9-20 21:33:54:153:460 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:33:54:154:707 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:33:54:156:667 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:33:54:157:494 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/mariadb/read-uncommitted/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..ce5c0988 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: mariadb #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:52:798:444 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2023-9-20 21:33:52:800:96 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:52:898:452 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-9-20 21:33:52:899:757 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:33:53:99:656 +Q5 finished at: 2023-9-20 21:33:53:99:819 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2023-9-20 21:33:53:102:230 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:33:53:105:912 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:33:53:107:718 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/read-uncommitted/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/mariadb/read-uncommitted/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..c73353d7 --- /dev/null +++ b/test_result/centralizend_result/mariadb/read-uncommitted/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: mariadb #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:33:53:326:980 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2023-9-20 21:33:53:329:397 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:33:53:426:876 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-9-20 21:33:53:428:566 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:33:53:627:344 +Q5 finished at: 2023-9-20 21:33:53:627:363 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:33:53:727:72 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:33:53:728:664 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:33:53:729:302 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/mariadb/repeatable-read/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..12097b9e --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/iat_dda_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:35:853:969 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:35:35:856:818 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:35:953:558 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:35:35:956:492 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:35:35:959:172 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:35:35:961:233 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2023-9-20 21:35:36:55:365 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:35:36:56:789 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:35:36:60:14 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:35:36:61:588 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/mariadb/repeatable-read/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..8110a3d5 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:36:286:250 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:35:36:288:456 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:36:386:212 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:35:36:388:758 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:35:36:391:121 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:35:36:392:940 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2023-9-20 21:35:36:487:854 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:35:36:489:934 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:35:36:493:86 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:35:36:494:136 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/iat_dda_write_skew.txt b/test_result/centralizend_result/mariadb/repeatable-read/iat_dda_write_skew.txt new file mode 100644 index 00000000..be37b13d --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: mariadb #### +#### test_type: dda_write_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:36:715:315 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:35:36:718:205 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:36:815:439 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:35:36:818:317 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:35:36:821:89 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-9-20 21:35:36:916:857 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:35:36:918:887 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:35:37:15:890 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:35:37:19:365 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:35:37:20:912 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/mariadb/repeatable-read/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..4848fb9b --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: mariadb #### +#### test_type: dda_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:38:107:85 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:35:38:108:336 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:38:207:3 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:35:38:208:276 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:35:38:209:392 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:35:38:210:257 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2023-9-20 21:35:38:307:795 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:35:38:308:797 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:35:38:310:409 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:35:38:311:182 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/mariadb/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..e26674be --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: mariadb #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:37:248:466 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2023-9-20 21:35:37:251:971 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2023-9-20 21:35:37:254:895 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2023-9-20 21:35:37:348:554 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2023-9-20 21:35:37:351:957 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2023-9-20 21:35:37:354:880 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:35:37:356:784 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:35:37:449:36 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2023-9-20 21:35:37:452:891 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2023-9-20 21:35:37:456:308 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:35:37:457:870 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/mariadb/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..0721e7ab --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: mariadb #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:37:677:988 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2023-9-20 21:35:37:681:945 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:37:777:922 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2023-9-20 21:35:37:781:838 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2023-9-20 21:35:37:786:797 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:35:37:788:890 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2023-9-20 21:35:37:881:516 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:35:37:883:523 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2023-9-20 21:35:37:886:551 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:35:37:887:953 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/iat_mda_step_iat.txt b/test_result/centralizend_result/mariadb/repeatable-read/iat_mda_step_iat.txt new file mode 100644 index 00000000..3db93468 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:38:527:24 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2023-9-20 21:35:38:528:411 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:38:629:376 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2023-9-20 21:35:38:630:846 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:35:38:727:77 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2023-9-20 21:35:38:728:569 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2023-9-20 21:35:38:827:714 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2023-9-20 21:35:38:928:61 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2023-9-20 21:35:39:27:877 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-20 21:35:39:127:844 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:35:39:227:710 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:35:39:328:14 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2023-9-20 21:35:39:329:950 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:35:39:330:487 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/mariadb/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..297840de --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:42:846:908 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:35:42:848:566 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:42:946:843 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2023-9-20 21:35:42:948:79 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:35:42:949:542 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-20 21:35:43:46:835 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2023-9-20 21:35:43:48:238 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2023-9-20 21:35:43:49:893 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:35:43:52:90 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2023-9-20 21:35:43:147:895 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2023-9-20 21:35:43:148:533 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2023-9-20 21:35:43:150:573 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2023-9-20 21:35:43:151:224 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/mariadb/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..264a5d36 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,209 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:42:114:307 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:35:42:118:812 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:42:213:996 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:35:42:218:765 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:35:42:313:944 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2023-9-20 21:35:42:316:810 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:35:42:318:749 + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2023-9-20 21:35:42:413:551 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2023-9-20 21:35:42:414:960 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:35:42:416:114 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2023-9-20 21:35:42:517:503 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:35:42:519:226 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2023-9-20 21:35:42:617:867 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2023-9-20 21:35:42:619:982 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2023-9-20 21:35:42:625:243 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2023-9-20 21:35:42:627:122 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/mariadb/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..77d9e960 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:39:546:246 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2023-9-20 21:35:39:547:961 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:39:645:983 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2023-9-20 21:35:39:647:565 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:35:39:746:151 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2023-9-20 21:35:39:747:723 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2023-9-20 21:35:39:846:672 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2023-9-20 21:35:39:947:227 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2023-9-20 21:35:40:47:356 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-20 21:35:40:146:621 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:35:40:246:992 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:35:40:346:892 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2023-9-20 21:35:40:348:656 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:35:40:349:286 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/mariadb/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..046c4d5f --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:40:560:662 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2023-9-20 21:35:40:562:544 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:40:660:647 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2023-9-20 21:35:40:661:950 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:35:40:760:573 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2023-9-20 21:35:40:761:948 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2023-9-20 21:35:40:861:325 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2023-9-20 21:35:40:961:390 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2023-9-20 21:35:41:61:282 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-20 21:35:41:161:809 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:35:41:261:791 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:35:41:361:873 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2023-9-20 21:35:41:365:568 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:35:41:366:897 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/mariadb/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..9315acf0 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:43:367:817 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2023-9-20 21:35:43:369:362 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2023-9-20 21:35:43:370:891 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2023-9-20 21:35:43:467:741 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2023-9-20 21:35:43:469:273 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2023-9-20 21:35:43:470:554 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:35:43:471:450 + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2023-9-20 21:35:43:567:751 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2023-9-20 21:35:43:569:396 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2023-9-20 21:35:43:570:845 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:35:43:571:538 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2023-9-20 21:35:43:668:676 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2023-9-20 21:35:43:669:699 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2023-9-20 21:35:43:671:731 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2023-9-20 21:35:43:672:443 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/mariadb/repeatable-read/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..2de22fdb --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,164 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:41:586:165 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2023-9-20 21:35:41:589:683 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:41:686:278 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2023-9-20 21:35:41:689:589 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:35:41:692:154 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2023-9-20 21:35:41:695:94 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2023-9-20 21:35:41:697:537 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:35:41:698:881 + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2023-9-20 21:35:41:786:403 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2023-9-20 21:35:41:789:629 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2023-9-20 21:35:41:792:175 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2023-9-20 21:35:41:795:124 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2023-9-20 21:35:41:797:563 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:35:41:798:962 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2023-9-20 21:35:41:888:576 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2023-9-20 21:35:41:890:52 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2023-9-20 21:35:41:894:151 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2023-9-20 21:35:41:895:798 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/mariadb/repeatable-read/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..3e4ec7b5 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: mariadb #### +#### test_type: sda_lost_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:35:429:286 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2023-9-20 21:35:35:432:124 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:35:529:223 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-9-20 21:35:35:532:84 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:35:35:534:250 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2023-9-20 21:35:35:628:885 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:35:35:629:914 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:35:35:632:444 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:35:35:634:5 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/mariadb/repeatable-read/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..cd7960ab --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,60 @@ +#### db_type: mariadb #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:35:3:176 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:35:35:6:95 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:35:102:26 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2023-9-20 21:35:35:103:14 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:35:35:104:144 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2023-9-20 21:35:35:204:799 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:35:35:206:404 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:35:35:208:292 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:35:35:209:831 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..442095e2 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_double_write_skew1.txt @@ -0,0 +1,56 @@ +#### db_type: mariadb #### +#### test_type: dda_double_write_skew1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:15:78:785 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:15:79:558 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:15:178:737 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:35:15:179:489 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:35:15:180:244 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2023-9-20 21:35:15:379:273 + Q7 finished at: 2023-9-20 21:35:15:379:304 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:35:15:480:135 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2023-9-20 21:35:15:482:963 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:35:15:484:377 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..9bf40db3 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,56 @@ +#### db_type: mariadb #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:15:700:942 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:15:702:62 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:15:800:736 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:35:15:801:639 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:35:15:802:530 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:35:15:803:449 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2023-9-20 21:35:15:903:315 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:35:15:904:184 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2023-9-20 21:35:15:906:871 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:35:15:908:231 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..2eaf92f4 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_double_write_skew2.txt @@ -0,0 +1,56 @@ +#### db_type: mariadb #### +#### test_type: dda_double_write_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:16:125:894 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:16:126:977 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:16:225:826 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:35:16:226:902 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2023-9-20 21:35:16:326:363 +Q7-T1 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:35:16:327:128 +Q7 finished at: 2023-9-20 21:35:16:327:460 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:35:16:426:386 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:35:16:427:832 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:35:16:428:420 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_read_skew.txt b/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_read_skew.txt new file mode 100644 index 00000000..1fec579e --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:16:641:971 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:35:16:644:751 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:16:742:421 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:35:16:745:178 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:35:16:747:808 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2023-9-20 21:35:16:841:853 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:35:16:941:755 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:35:17:41:350 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:35:17:44:435 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:35:17:45:830 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_read_skew2.txt b/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_read_skew2.txt new file mode 100644 index 00000000..7566d163 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:18:99:574 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:18:100:446 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:18:199:836 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:35:18:201:573 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:35:18:204:120 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-9-20 21:35:18:299:999 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:35:18:300:723 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:35:18:399:882 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:35:18:401:192 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:35:18:401:610 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..8aa4d6ff --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:18:616:98 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:18:617:303 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:18:716:380 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:35:18:717:248 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:35:18:717:955 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:35:18:718:364 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2023-9-20 21:35:18:816:433 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:35:18:817:311 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:35:18:819:532 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:35:18:819:958 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..59eb74f5 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:17:264:67 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2023-9-20 21:35:17:264:896 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:17:363:999 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:35:17:364:873 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:35:17:365:620 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:35:17:366:469 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2023-9-20 21:35:17:464:439 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:35:17:464:928 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2023-9-20 21:35:17:467:853 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:35:17:469:391 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..b181fb63 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:17:683:163 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2023-9-20 21:35:17:684:595 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:17:783:121 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2023-9-20 21:35:17:785:229 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2023-9-20 21:35:17:787:801 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:35:17:789:509 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2023-9-20 21:35:17:883:870 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:35:17:884:532 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2023-9-20 21:35:17:886:115 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:35:17:886:698 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_write_read_skew.txt b/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..38d17324 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: mariadb #### +#### test_type: dda_write_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:14:31:132 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:14:32:310 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:14:131:147 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:35:14:132:184 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:35:14:133:212 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2023-9-20 21:35:14:231:780 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:35:14:331:491 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:35:14:431:575 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:35:14:434:601 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:35:14:435:987 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..2ea951b3 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: mariadb #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:14:652:960 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:14:653:736 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:14:752:851 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:35:14:753:610 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:35:14:754:557 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:35:14:755:617 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2023-9-20 21:35:14:855:284 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:35:14:857:281 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:35:14:859:916 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:35:14:861:288 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/rat_mda_step_rat.txt b/test_result/centralizend_result/mariadb/repeatable-read/rat_mda_step_rat.txt new file mode 100644 index 00000000..fb8cbc4a --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: mariadb #### +#### test_type: mda_step_rat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:19:36:595 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:19:38:499 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:19:136:151 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:35:19:136:981 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:35:19:137:850 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-20 21:35:19:236:54 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2023-9-20 21:35:19:236:789 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2023-9-20 21:35:19:237:709 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2023-9-20 21:35:19:337:263 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-20 21:35:19:338:198 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:35:19:436:531 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:35:19:538:88 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2023-9-20 21:35:19:539:719 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:35:19:541:39 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/mariadb/repeatable-read/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..ce880bd3 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: mariadb #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2023-9-20 21:35:19:761:186 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2023-9-20 21:35:19:762:423 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2023-9-20 21:35:19:862:266 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2023-9-20 21:35:19:864:978 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:35:19:961:124 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2023-9-20 21:35:19:962:264 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2023-9-20 21:35:19:964:590 + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2023-9-20 21:35:20:61:415 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2023-9-20 21:35:20:62:743 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2023-9-20 21:35:20:162:210 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2023-9-20 21:35:20:261:697 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:35:20:361:735 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2023-9-20 21:35:20:461:509 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:35:20:462:459 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2023-9-20 21:35:20:463:736 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2023-9-20 21:35:20:464:150 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/mariadb/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..010b23cd --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: mariadb #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:20:675:71 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:20:675:916 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:20:775:420 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:35:20:776:535 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2023-9-20 21:35:20:778:131 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-20 21:35:20:875:147 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2023-9-20 21:35:20:875:855 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2023-9-20 21:35:20:876:782 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2023-9-20 21:35:20:975:873 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-20 21:35:20:976:673 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:35:21:75:384 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:35:21:175:789 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2023-9-20 21:35:21:177:550 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:35:21:177:980 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/mariadb/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..77b7d54d --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: mariadb #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:21:387:421 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2023-9-20 21:35:21:388:316 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:21:487:795 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2023-9-20 21:35:21:488:953 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2023-9-20 21:35:21:490:376 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-20 21:35:21:587:535 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2023-9-20 21:35:21:588:429 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2023-9-20 21:35:21:589:616 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2023-9-20 21:35:21:688:841 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-20 21:35:21:690:259 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:35:21:788:900 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:35:21:888:111 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2023-9-20 21:35:21:889:599 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:35:21:890:438 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/rat_sda_dirty_read.txt b/test_result/centralizend_result/mariadb/repeatable-read/rat_sda_dirty_read.txt new file mode 100644 index 00000000..b0600b67 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: mariadb #### +#### test_type: sda_dirty_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:10:467:330 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:10:470:15 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:10:566:785 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2023-9-20 21:35:10:568:152 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2023-9-20 21:35:10:667:47 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:35:10:767:767 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2023-9-20 21:35:10:770:696 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:35:10:772:321 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/rat_sda_intermediate_read.txt b/test_result/centralizend_result/mariadb/repeatable-read/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..b1f18e2e --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: mariadb #### +#### test_type: sda_intermediate_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:11:614:693 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:11:615:748 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:11:714:372 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2023-9-20 21:35:11:716:206 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2023-9-20 21:35:11:816:275 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:35:11:914:329 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:35:12:15:84 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2023-9-20 21:35:12:16:625 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:35:12:17:205 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/mariadb/repeatable-read/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..eab3b6b4 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: mariadb #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:12:235:452 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:12:238:397 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:12:334:675 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2023-9-20 21:35:12:335:875 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:35:12:336:490 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2023-9-20 21:35:12:437:160 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:35:12:439:219 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2023-9-20 21:35:12:441:775 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:35:12:443:224 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/rat_sda_lost_self_update.txt b/test_result/centralizend_result/mariadb/repeatable-read/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..1af49503 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: mariadb #### +#### test_type: sda_lost_self_update #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:13:511:67 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:13:512:112 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:13:611:216 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2023-9-20 21:35:13:711:508 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2023-9-20 21:35:13:712:465 + Q4 finished at: 2023-9-20 21:35:13:712:461 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:35:13:812:707 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:35:13:814:20 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:35:13:814:602 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/mariadb/repeatable-read/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..00e517e6 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: mariadb #### +#### test_type: sda_non_repeatable_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:10:994:364 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:35:10:995:833 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:11:94:499 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2023-9-20 21:35:11:95:816 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2023-9-20 21:35:11:195:780 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:35:11:296:69 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:35:11:394:812 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:35:11:396:823 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:35:11:397:519 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/mariadb/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..d0b6f44f --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: mariadb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:12:665:813 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2023-9-20 21:35:12:667:413 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:12:766:386 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2023-9-20 21:35:12:767:442 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:35:12:768:372 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2023-9-20 21:35:12:866:694 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:35:12:867:705 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2023-9-20 21:35:12:869:580 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:35:12:871:267 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/mariadb/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..b2094980 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: mariadb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:13:88:743 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2023-9-20 21:35:13:90:538 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:13:189:491 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2023-9-20 21:35:13:191:960 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:35:13:193:592 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2023-9-20 21:35:13:289:265 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:35:13:289:734 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2023-9-20 21:35:13:292:671 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:35:13:293:849 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..fb906384 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,56 @@ +#### db_type: mariadb #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:25:655:584 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:25:656:878 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:25:755:531 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:35:25:757:466 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2023-9-20 21:35:25:856:317 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:35:25:857:44 +Q8 finished at: 2023-9-20 21:35:25:857:206 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:35:25:857:868 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:35:25:859:149 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:35:25:859:730 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..5814f6ea --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,35 @@ +#### db_type: mariadb #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:26:74:497 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:26:75:977 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:26:174:699 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:35:26:176:52 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:35:26:275:383 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:35:26:375:48 +Q6 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q6 failed at: 2023-9-20 21:35:26:875:892 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..07a736e1 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,35 @@ +#### db_type: mariadb #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:27:91:886 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:27:93:47 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:27:191:956 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:35:27:192:972 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:35:27:292:918 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:35:27:393:350 +Q6 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q6 failed at: 2023-9-20 21:35:27:893:369 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..fc40ced4 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: mariadb #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:28:112:12 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:28:112:974 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:28:212:642 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:35:28:214:893 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:35:28:315:49 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:35:28:317:77 +Q7 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q7 failed at: 2023-9-20 21:35:29:15:653 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..aef2c2f0 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:29:235:562 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:35:29:236:902 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:29:335:607 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:35:29:337:57 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:35:29:338:234 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; +Q6 finished at: 2023-9-20 21:35:29:536:34 + Q8 finished at: 2023-9-20 21:35:29:536:66 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:35:29:537:140 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:35:29:538:986 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:35:29:539:584 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..0c6b07db --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:29:757:681 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:35:29:759:288 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:29:857:676 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:35:29:859:17 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:35:29:860:15 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2023-9-20 21:35:30:58:57 + Q7 finished at: 2023-9-20 21:35:30:58:301 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:35:30:158:251 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:35:30:159:947 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:35:30:160:588 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..f6974d9e --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:30:378:319 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:30:379:715 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:30:478:438 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:35:30:480:185 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-9-20 21:35:30:579:379 +Q7-T1 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:35:30:580:357 +Q7 finished at: 2023-9-20 21:35:30:580:625 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:35:30:679:156 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:35:30:681:527 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:35:30:682:410 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..1bcfe730 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:30:907:262 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:30:909:10 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:31:7:79 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:35:31:8:681 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-9-20 21:35:31:108:121 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:35:31:307:710 +Q8 finished at: 2023-9-20 21:35:31:307:877 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:35:31:309:3 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:35:31:311:45 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:35:31:311:750 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..2e2f328d --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:31:535:375 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:31:536:897 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:31:635:423 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:35:31:637:458 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2023-9-20 21:35:31:736:354 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:35:31:737:307 +Q8 finished at: 2023-9-20 21:35:31:737:543 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:35:31:738:512 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-9-20 21:35:31:740:522 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:35:31:741:217 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/mariadb/repeatable-read/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..fb76c9ef --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/wat_mda_step_wat_c1.txt @@ -0,0 +1,44 @@ +#### db_type: mariadb #### +#### test_type: mda_step_wat_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:31:962:301 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:31:963:942 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:32:61:555 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:35:32:62:950 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-20 21:35:32:161:675 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2023-9-20 21:35:32:163:365 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2023-9-20 21:35:32:263:91 + Q11-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:35:32:362:40 + Q11 finished at: 2023-9-20 21:35:32:362:140 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:35:32:462:252 +Q9 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q9 failed at: 2023-9-20 21:35:33:163:648 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/mariadb/repeatable-read/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..50b8010e --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/wat_mda_step_wat_c2.txt @@ -0,0 +1,44 @@ +#### db_type: mariadb #### +#### test_type: mda_step_wat_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:33:385:796 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:33:388:55 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:33:486:150 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:35:33:488:130 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:35:33:585:704 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2023-9-20 21:35:33:788:64 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2023-9-20 21:35:33:886:887 + Q10-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:35:33:986:14 + Q10 finished at: 2023-9-20 21:35:33:986:826 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:35:34:187:535 +Q9 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q9 failed at: 2023-9-20 21:35:34:787:419 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/mariadb/repeatable-read/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..8863ee22 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: mariadb #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:22:108:242 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:22:109:114 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:22:208:256 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2023-9-20 21:35:22:308:513 + Q4 finished at: 2023-9-20 21:35:22:308:668 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:35:22:408:643 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2023-9-20 21:35:22:411:511 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2023-9-20 21:35:22:415:807 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:35:22:416:188 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/mariadb/repeatable-read/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..d113bbef --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: mariadb #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:22:629:749 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:22:630:592 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:22:729:860 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2023-9-20 21:35:22:830:111 + Q4 finished at: 2023-9-20 21:35:22:830:96 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:35:22:930:575 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2023-9-20 21:35:22:932:501 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2023-9-20 21:35:22:937:721 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:35:22:938:568 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/wat_sda_full_write.txt b/test_result/centralizend_result/mariadb/repeatable-read/wat_sda_full_write.txt new file mode 100644 index 00000000..d264c04e --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: mariadb #### +#### test_type: sda_full_write #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:23:150:61 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:23:150:943 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:23:250:55 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2023-9-20 21:35:23:352:722 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2023-9-20 21:35:23:354:239 +Q6 finished at: 2023-9-20 21:35:23:354:432 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:35:23:451:654 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2023-9-20 21:35:23:453:144 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:35:23:453:674 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/wat_sda_full_write_committed.txt b/test_result/centralizend_result/mariadb/repeatable-read/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..b7c81879 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: mariadb #### +#### test_type: sda_full_write_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:23:690:210 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:23:692:759 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:23:789:191 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2023-9-20 21:35:23:889:841 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2023-9-20 21:35:23:890:511 +Q7 finished at: 2023-9-20 21:35:23:890:837 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:35:23:891:396 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2023-9-20 21:35:23:892:477 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:35:23:892:948 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/mariadb/repeatable-read/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..b6ea0b19 --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: mariadb #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:25:236:922 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:35:25:238:51 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:25:336:981 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2023-9-20 21:35:25:437:961 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2023-9-20 21:35:25:439:1 +Q7 finished at: 2023-9-20 21:35:25:439:217 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:35:25:440:255 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:35:25:441:528 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:35:25:442:325 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/mariadb/repeatable-read/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..e183114b --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: mariadb #### +#### test_type: sda_lost_update_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:24:105:319 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2023-9-20 21:35:24:106:692 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:24:205:348 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-9-20 21:35:24:207:469 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; +Q5 finished at: 2023-9-20 21:35:24:405:907 + Q7 finished at: 2023-9-20 21:35:24:405:960 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2023-9-20 21:35:24:406:757 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:35:24:408:15 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:35:24:408:609 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/repeatable-read/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/mariadb/repeatable-read/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..5ed74d1a --- /dev/null +++ b/test_result/centralizend_result/mariadb/repeatable-read/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: mariadb #### +#### test_type: sda_lost_update_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:35:24:620:652 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2023-9-20 21:35:24:621:851 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:35:24:720:966 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-9-20 21:35:24:722:107 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; +Q5 finished at: 2023-9-20 21:35:24:921:456 + Q6 finished at: 2023-9-20 21:35:24:921:665 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:35:25:21:599 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:35:25:22:900 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:35:25:23:477 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mariadb/result_summary/read-committed_total-result.txt b/test_result/centralizend_result/mariadb/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..38745346 --- /dev/null +++ b/test_result/centralizend_result/mariadb/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/mariadb/result_summary/read-uncommitted_total-result.txt b/test_result/centralizend_result/mariadb/result_summary/read-uncommitted_total-result.txt new file mode 100644 index 00000000..f709ccda --- /dev/null +++ b/test_result/centralizend_result/mariadb/result_summary/read-uncommitted_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Anomaly + +rat_sda_non_repeatable_read: Anomaly + +rat_sda_intermediate_read: Anomaly + +rat_sda_intermediate_read_committed: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Anomaly + +rat_dda_double_write_skew1_committed: Anomaly + +rat_dda_double_write_skew2: Anomaly + +rat_dda_read_skew: Anomaly + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Anomaly + +rat_dda_read_skew2_committed: Anomaly + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Anomaly + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Anomaly + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Avoid + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/mariadb/result_summary/repeatable-read_total-result.txt b/test_result/centralizend_result/mariadb/result_summary/repeatable-read_total-result.txt new file mode 100644 index 00000000..ef182286 --- /dev/null +++ b/test_result/centralizend_result/mariadb/result_summary/repeatable-read_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/mariadb/result_summary/serializable_total-result.txt b/test_result/centralizend_result/mariadb/result_summary/serializable_total-result.txt new file mode 100644 index 00000000..b5b686cf --- /dev/null +++ b/test_result/centralizend_result/mariadb/result_summary/serializable_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Rollback + +rat_dda_write_read_skew_committed: Rollback + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Rollback + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Rollback + +rat_dda_read_skew2_committed: Rollback + +rat_mda_step_rat: Rollback + +rat_mda_step_rat_long_fork: Rollback + +rat_mda_step_rat_predicate_based_delete: Rollback + +rat_mda_step_rat_predicate_based_insert: Rollback + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Rollback + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Rollback + +iat_dda_write_skew_predicate_based-intersecting_data: Avoid + +iat_dda_write_skew_predicate_based-overdraft_protection: Rollback + +iat_dda_write_skew_committed: Rollback + +iat_mda_step_iat: Rollback + +iat_mda_step_iat_predicate_based_delete: Rollback + +iat_mda_step_iat_predicate_based_insert: Rollback + +iat_mda_step_iat_uname_anomaly: Rollback + +iat_mda_step_iat_cross_phenomenon: Rollback + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Rollback + diff --git a/test_result/centralizend_result/mariadb/serializable/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/mariadb/serializable/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..3351536d --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/iat_dda_read_skew_committed.txt @@ -0,0 +1,42 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:36:512:284 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:36:36:514:468 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:36:611:917 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:36:36:613:656 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:36:36:712:883 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:36:36:714:74 +Q7 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q7 failed at: 2023-9-20 21:36:37:413:233 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/mariadb/serializable/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..432eb8fc --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:37:639:966 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:36:37:641:425 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:37:740:266 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:36:37:741:977 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:36:37:841:974 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:36:37:843:562 +Q7 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q7 failed at: 2023-9-20 21:36:38:542:396 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/iat_dda_write_skew.txt b/test_result/centralizend_result/mariadb/serializable/iat_dda_write_skew.txt new file mode 100644 index 00000000..0da2b317 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/iat_dda_write_skew.txt @@ -0,0 +1,49 @@ +#### db_type: mariadb #### +#### test_type: dda_write_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:38:766:878 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:36:38:769:109 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:38:867:942 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:36:38:870:544 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:36:38:969:362 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:36:39:67:611 +Q6 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q6 failed at: 2023-9-20 21:36:39:569:600 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/mariadb/serializable/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..6bb81ca9 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/iat_dda_write_skew_committed.txt @@ -0,0 +1,49 @@ +#### db_type: mariadb #### +#### test_type: dda_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:41:357:522 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:36:41:359:426 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:41:457:266 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:36:41:458:914 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:36:41:558:964 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:36:41:560:507 +Q7 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q7 failed at: 2023-9-20 21:36:42:258:836 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/mariadb/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..e73a80a0 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,74 @@ +#### db_type: mariadb #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:39:798:312 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2023-9-20 21:36:39:801:717 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2023-9-20 21:36:39:803:553 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2023-9-20 21:36:39:899:189 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' +Q8-T1 execute opt: 'COMMIT'; + current_result: + (330,) + *(1) expected_result: + (330,) + (2) expected_result: + (300,) + + Q5 finished at: 2023-9-20 21:36:39:999:699 +Q8 finished at: 2023-9-20 21:36:39:999:719 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2023-9-20 21:36:40:1:89 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:36:40:2:208 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2023-9-20 21:36:40:4:102 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2023-9-20 21:36:40:5:725 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:36:40:6:463 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/mariadb/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..5ed2f281 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,49 @@ +#### db_type: mariadb #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:40:228:428 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2023-9-20 21:36:40:233:159 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:40:328:536 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2023-9-20 21:36:40:333:384 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' + Q5 finished at: 2023-9-20 21:36:40:430:156 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:36:40:432:195 +Q7 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q7 failed at: 2023-9-20 21:36:41:130:580 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/iat_mda_step_iat.txt b/test_result/centralizend_result/mariadb/serializable/iat_mda_step_iat.txt new file mode 100644 index 00000000..8e0e5ac1 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/iat_mda_step_iat.txt @@ -0,0 +1,89 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:42:490:862 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2023-9-20 21:36:42:493:40 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:42:590:683 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2023-9-20 21:36:42:595:57 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:36:42:690:791 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2023-9-20 21:36:42:692:782 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q8 finished at: 2023-9-20 21:36:42:991:590 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:36:43:191:678 +Q7 finished at: 2023-9-20 21:36:43:191:779 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-20 21:36:43:193:332 + Q9 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 + Q9 failed at: 2023-9-20 21:36:43:891:838 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/mariadb/serializable/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..6435f38d --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:50:731:859 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:36:50:735:53 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:50:831:212 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-20 21:36:50:931:640 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2023-9-20 21:36:51:33:473 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2023-9-20 21:36:51:35:223 + Q4 finished at: 2023-9-20 21:36:51:35:523 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:36:51:37:46 + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2023-9-20 21:36:51:37:703 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2023-9-20 21:36:51:41:600 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:36:51:43:873 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2023-9-20 21:36:51:47:220 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2023-9-20 21:36:51:48:331 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/serializable/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/mariadb/serializable/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..67962cce --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,171 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:49:399:624 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:36:49:402:60 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:49:499:972 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:36:49:502:683 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:36:49:600:388 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2023-9-20 21:36:49:700:289 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2023-9-20 21:36:49:903:445 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:36:49:904:802 + Q9 finished at: 2023-9-20 21:36:49:904:978 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:36:49:906:227 + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2023-9-20 21:36:49:906:756 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2023-9-20 21:36:49:907:618 + Q6 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 + Q6 failed at: 2023-9-20 21:36:50:502:407 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/mariadb/serializable/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..b256bcd7 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,89 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:44:116:977 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2023-9-20 21:36:44:119:210 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:44:216:643 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2023-9-20 21:36:44:219:38 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:36:44:316:570 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2023-9-20 21:36:44:318:36 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q8 finished at: 2023-9-20 21:36:44:618:732 + Q11-T2 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:36:44:817:397 + Q11 finished at: 2023-9-20 21:36:44:817:671 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-20 21:36:44:818:991 + Q9 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 + Q9 failed at: 2023-9-20 21:36:45:519:120 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/mariadb/serializable/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..88b23bc0 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,85 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:45:741:72 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2023-9-20 21:36:45:743:459 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:45:841:325 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2023-9-20 21:36:45:843:725 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:36:45:941:481 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2023-9-20 21:36:45:944:234 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q7 finished at: 2023-9-20 21:36:46:242:541 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-9-20 21:36:46:342:237 + Q8 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 + Q8 failed at: 2023-9-20 21:36:46:942:323 + Q9 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 + Q9 failed at: 2023-9-20 21:36:47:142:820 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/mariadb/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..a856273c --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,120 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:51:275:176 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2023-9-20 21:36:51:277:28 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2023-9-20 21:36:51:278:409 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2023-9-20 21:36:51:375:288 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2023-9-20 21:36:51:377:417 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2023-9-20 21:36:51:475:457 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2023-9-20 21:36:51:477:730 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' + Q6 finished at: 2023-9-20 21:36:51:576:986 + Q7-T2 execute opt: 'COMMIT'; + current_result: + Q7 finished at: 2023-9-20 21:36:51:579:455 + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2023-9-20 21:36:51:579:907 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:36:51:580:834 +Q12 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q12 failed at: 2023-9-20 21:36:52:777:355 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/mariadb/serializable/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..d399efc0 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,127 @@ +#### db_type: mariadb #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:47:367:347 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2023-9-20 21:36:47:369:994 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:47:467:645 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2023-9-20 21:36:47:469:837 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:36:47:471:408 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2023-9-20 21:36:47:473:248 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2023-9-20 21:36:47:567:576 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2023-9-20 21:36:47:569:941 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2023-9-20 21:36:47:571:651 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + Q7 finished at: 2023-9-20 21:36:47:670:78 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:36:47:671:218 + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2023-9-20 21:36:47:671:841 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2023-9-20 21:36:47:673:449 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2023-9-20 21:36:47:674:600 +Q15 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q15 failed at: 2023-9-20 21:36:49:170:546 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/mariadb/serializable/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..e62ffa9c --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/iat_sda_lost_update_committed.txt @@ -0,0 +1,39 @@ +#### db_type: mariadb #### +#### test_type: sda_lost_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:35:680:30 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2023-9-20 21:36:35:681:593 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:35:780:79 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2023-9-20 21:36:35:881:720 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:36:35:883:256 + Q4 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 + Q4 failed at: 2023-9-20 21:36:36:282:438 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/mariadb/serializable/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..8710d03f --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,60 @@ +#### db_type: mariadb #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:35:241:165 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:36:35:243:346 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:35:341:335 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2023-9-20 21:36:35:444:282 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:36:35:445:959 + Q4 finished at: 2023-9-20 21:36:35:446:354 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:36:35:449:104 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:36:35:452:613 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:36:35:454:368 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/serializable/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/mariadb/serializable/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..96f10244 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/rat_dda_double_write_skew1.txt @@ -0,0 +1,42 @@ +#### db_type: mariadb #### +#### test_type: dda_double_write_skew1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:6:298:795 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:6:301:650 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:6:398:801 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:36:6:401:559 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:36:6:500:631 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:36:6:599:345 +Q6 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q6 failed at: 2023-9-20 21:36:7:101:33 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/mariadb/serializable/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..4bd66f4f --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: mariadb #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:7:325:698 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:7:328:253 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:7:425:910 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:36:7:428:709 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:36:7:527:770 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:36:7:529:640 +Q7 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q7 failed at: 2023-9-20 21:36:8:227:921 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/mariadb/serializable/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..1bd9e847 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/rat_dda_double_write_skew2.txt @@ -0,0 +1,35 @@ +#### db_type: mariadb #### +#### test_type: dda_double_write_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:8:451:737 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:8:454:552 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:8:551:792 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:36:8:554:592 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:36:8:653:331 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:36:8:752:425 +Q6 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q6 failed at: 2023-9-20 21:36:9:253:713 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/rat_dda_read_skew.txt b/test_result/centralizend_result/mariadb/serializable/rat_dda_read_skew.txt new file mode 100644 index 00000000..7192230c --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/rat_dda_read_skew.txt @@ -0,0 +1,42 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:9:478:801 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:36:9:481:617 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:9:578:783 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:36:9:581:518 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:36:9:680:301 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:36:9:779:536 +Q6 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q6 failed at: 2023-9-20 21:36:10:280:259 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/rat_dda_read_skew2.txt b/test_result/centralizend_result/mariadb/serializable/rat_dda_read_skew2.txt new file mode 100644 index 00000000..ca9a3ad9 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/rat_dda_read_skew2.txt @@ -0,0 +1,42 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:11:365:28 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:11:367:803 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:11:464:950 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:36:11:467:696 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-9-20 21:36:11:566:609 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:36:11:568:558 + Q5 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 + Q5 failed at: 2023-9-20 21:36:12:66:980 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/mariadb/serializable/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..7960f95e --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/rat_dda_read_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:12:291:554 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:12:294:315 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:12:391:600 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:36:12:394:426 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2023-9-20 21:36:12:493:232 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:36:12:495:112 + Q5 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 + Q5 failed at: 2023-9-20 21:36:12:993:619 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/mariadb/serializable/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..653e7a22 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:10:505:448 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2023-9-20 21:36:10:508:481 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:10:605:422 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2023-9-20 21:36:10:706:834 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:36:10:708:408 + Q4 finished at: 2023-9-20 21:36:10:708:673 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2023-9-20 21:36:10:711:347 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:36:10:713:267 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2023-9-20 21:36:10:716:401 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:36:10:717:949 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/serializable/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/mariadb/serializable/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..42cfb60b --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: mariadb #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:10:933:797 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2023-9-20 21:36:10:936:975 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:11:33:785 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2023-9-20 21:36:11:135:100 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-9-20 21:36:11:136:674 + Q4 finished at: 2023-9-20 21:36:11:136:999 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2023-9-20 21:36:11:139:699 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:36:11:141:502 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2023-9-20 21:36:11:144:571 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-9-20 21:36:11:146:125 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/serializable/rat_dda_write_read_skew.txt b/test_result/centralizend_result/mariadb/serializable/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..fee1379e --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/rat_dda_write_read_skew.txt @@ -0,0 +1,42 @@ +#### db_type: mariadb #### +#### test_type: dda_write_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:4:147:619 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:4:150:466 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:4:247:657 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:36:4:250:452 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:36:4:349:432 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:36:4:448:370 +Q6 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q6 failed at: 2023-9-20 21:36:4:949:616 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/mariadb/serializable/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..85d6971b --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,42 @@ +#### db_type: mariadb #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:5:173:818 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:5:176:651 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:5:273:617 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:36:5:275:872 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:36:5:375:538 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:36:5:377:264 +Q7 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q7 failed at: 2023-9-20 21:36:6:75:809 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/rat_mda_step_rat.txt b/test_result/centralizend_result/mariadb/serializable/rat_mda_step_rat.txt new file mode 100644 index 00000000..13b8322f --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/rat_mda_step_rat.txt @@ -0,0 +1,74 @@ +#### db_type: mariadb #### +#### test_type: mda_step_rat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:13:219:475 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:13:222:268 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:13:319:621 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:36:13:322:462 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-20 21:36:13:419:555 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2023-9-20 21:36:13:422:408 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2023-9-20 21:36:13:521:915 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:36:13:620:215 + current_result: + (1,1) + *(1) expected_result: + (1,1) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q8 finished at: 2023-9-20 21:36:13:620:891 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:36:13:720:169 +Q9 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q9 failed at: 2023-9-20 21:36:14:421:561 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/mariadb/serializable/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..2c248135 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,169 @@ +#### db_type: mariadb #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2023-9-20 21:36:14:646:825 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2023-9-20 21:36:14:650:978 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2023-9-20 21:36:14:746:997 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:36:14:847:2 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2023-9-20 21:36:14:851:503 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2023-9-20 21:36:14:947:232 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2023-9-20 21:36:15:50:648 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2023-9-20 21:36:15:347:258 + Q9 finished at: 2023-9-20 21:36:15:347:576 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:36:15:349:635 + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + (3) expected_result: + (1,0) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + *(6) expected_result: + (1,1) + (7) expected_result: + (1,0) + *(8) expected_result: + (1,1) + *(9) expected_result: + (1,1) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + (12) expected_result: + (1,0) + (13) expected_result: + (1,0) + (14) expected_result: + (1,0) + + Q10 finished at: 2023-9-20 21:36:15:351:564 +Q4 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q4 failed at: 2023-9-20 21:36:15:449:344 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/mariadb/serializable/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..e5b5ccbc --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,74 @@ +#### db_type: mariadb #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:15:675:961 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:15:678:989 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:15:775:838 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:36:15:778:555 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-20 21:36:15:875:161 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2023-9-20 21:36:15:876:697 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2023-9-20 21:36:15:977:646 + Q11-T2 execute opt: 'COMMIT'; + current_result: + (,) + *(1) expected_result: + (,) + Q11 finished at: 2023-9-20 21:36:16:75:929 + (2) expected_result: + (1,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q8 finished at: 2023-9-20 21:36:16:76:287 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:36:16:175:634 +Q9 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q9 failed at: 2023-9-20 21:36:16:877:367 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/mariadb/serializable/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..3bcfa49c --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,71 @@ +#### db_type: mariadb #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:17:94:668 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2023-9-20 21:36:17:96:516 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:17:194:578 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2023-9-20 21:36:17:195:962 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-20 21:36:17:294:650 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2023-9-20 21:36:17:295:980 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2023-9-20 21:36:17:396:537 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-9-20 21:36:17:496:339 + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + (4) expected_result: + (,) + *(5) expected_result: + (1,) + (6) expected_result: + (,) + + Q8 finished at: 2023-9-20 21:36:17:496:742 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:36:17:595:19 +Q9 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q9 failed at: 2023-9-20 21:36:18:296:694 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/rat_sda_dirty_read.txt b/test_result/centralizend_result/mariadb/serializable/rat_sda_dirty_read.txt new file mode 100644 index 00000000..3888f7f9 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: mariadb #### +#### test_type: sda_dirty_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:0:568:254 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:0:571:75 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:0:668:133 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' +Q5-T1 execute opt: 'ROLLBACK'; + current_result: + (0,0) + *(1) expected_result: + (0,0) + +Q5 finished at: 2023-9-20 21:36:0:767:624 + Q4 finished at: 2023-9-20 21:36:0:767:612 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:36:0:868:427 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2023-9-20 21:36:0:871:215 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:36:0:872:787 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/serializable/rat_sda_intermediate_read.txt b/test_result/centralizend_result/mariadb/serializable/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..c8ffe506 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: mariadb #### +#### test_type: sda_intermediate_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:1:717:516 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:1:719:666 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:1:817:540 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2023-9-20 21:36:1:919:148 +Q7-T1 execute opt: 'COMMIT'; + current_result: + (0,2) + *(1) expected_result: + (0,2) +Q7 finished at: 2023-9-20 21:36:2:118:750 + (2) expected_result: + (0,0) + + Q4 finished at: 2023-9-20 21:36:2:118:949 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:36:2:120:651 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2023-9-20 21:36:2:123:370 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:36:2:124:935 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/serializable/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/mariadb/serializable/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..f25ca6c9 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: mariadb #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:2:341:474 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:2:344:276 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:2:441:331 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2023-9-20 21:36:2:542:895 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:36:2:544:757 + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2023-9-20 21:36:2:545:172 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:36:2:546:797 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2023-9-20 21:36:2:549:225 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:36:2:550:675 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/serializable/rat_sda_lost_self_update.txt b/test_result/centralizend_result/mariadb/serializable/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..b1c8d750 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: mariadb #### +#### test_type: sda_lost_self_update #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:3:621:479 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:3:624:262 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:3:721:546 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2023-9-20 21:36:3:822:816 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2023-9-20 21:36:3:824:644 +Q6 finished at: 2023-9-20 21:36:3:824:724 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:36:3:922:117 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:36:3:925:47 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:36:3:926:616 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/serializable/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/mariadb/serializable/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..bf5412f6 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: mariadb #### +#### test_type: sda_non_repeatable_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:1:92:366 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:36:1:95:256 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:1:192:287 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2023-9-20 21:36:1:293:559 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:36:1:492:622 + Q4 finished at: 2023-9-20 21:36:1:492:819 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:36:1:495:119 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:36:1:498:28 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:36:1:499:658 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/mariadb/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..027b76f9 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: mariadb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:2:769:388 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2023-9-20 21:36:2:772:156 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:2:869:248 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2023-9-20 21:36:2:970:589 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:36:2:972:164 + Q4 finished at: 2023-9-20 21:36:2:972:600 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:36:2:974:571 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2023-9-20 21:36:2:976:887 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:36:2:978:332 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/mariadb/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..c4b810ff --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: mariadb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:3:195:618 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2023-9-20 21:36:3:198:752 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:3:295:732 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2023-9-20 21:36:3:396:969 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:36:3:398:562 + Q4 finished at: 2023-9-20 21:36:3:398:870 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:36:3:400:800 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2023-9-20 21:36:3:403:469 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:36:3:405:20 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/serializable/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/mariadb/serializable/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..a5bf7c17 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,35 @@ +#### db_type: mariadb #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:22:622:38 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:22:623:621 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:22:721:986 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-9-20 21:36:22:723:766 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:36:22:823:272 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:36:22:824:780 +Q7 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q7 failed at: 2023-9-20 21:36:23:523:978 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/mariadb/serializable/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..7f34f675 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,35 @@ +#### db_type: mariadb #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:23:745:303 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:23:747:229 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:23:844:956 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:36:23:846:615 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:36:23:946:285 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:36:24:45:676 +Q6 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q6 failed at: 2023-9-20 21:36:24:546:953 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/mariadb/serializable/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..9724657c --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,35 @@ +#### db_type: mariadb #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:24:775:78 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:24:776:904 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:24:874:678 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:36:24:876:463 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:36:24:975:769 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:36:25:75:107 +Q6 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q6 failed at: 2023-9-20 21:36:25:576:567 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/mariadb/serializable/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..3a31765a --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: mariadb #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:25:803:976 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:25:805:516 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:25:903:836 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:36:25:905:833 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:36:26:5:534 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:36:26:7:269 +Q7 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q7 failed at: 2023-9-20 21:36:26:706:95 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/mariadb/serializable/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..a0e99be0 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,42 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:26:930:897 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:36:26:932:919 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:27:31:373 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:36:27:32:805 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:36:27:132:199 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:36:27:232:220 +Q6 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q6 failed at: 2023-9-20 21:36:27:732:584 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/mariadb/serializable/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..14dde0b1 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,42 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:27:953:947 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-9-20 21:36:27:956:143 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:28:53:802 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:36:28:55:778 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:36:28:155:235 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:36:28:255:112 +Q6 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q6 failed at: 2023-9-20 21:36:28:755:652 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/mariadb/serializable/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..d1e4195d --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,42 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:28:984:859 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:28:987:26 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:29:84:632 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:36:29:86:132 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:36:29:185:985 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:36:29:286:855 +Q6 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q6 failed at: 2023-9-20 21:36:29:786:775 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/mariadb/serializable/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..3b9be082 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,42 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:30:18:142 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:30:19:449 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:30:118:707 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:36:30:120:731 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:36:30:220:321 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:36:30:319:464 +Q6 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q6 failed at: 2023-9-20 21:36:30:821:136 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/mariadb/serializable/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..277d2e78 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: mariadb #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:31:55:497 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:31:57:436 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:31:156:59 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-9-20 21:36:31:158:723 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2023-9-20 21:36:31:257:713 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:36:31:260:462 +Q7 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q7 failed at: 2023-9-20 21:36:31:958:531 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/mariadb/serializable/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..a1d8cf2c --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/wat_mda_step_wat_c1.txt @@ -0,0 +1,44 @@ +#### db_type: mariadb #### +#### test_type: mda_step_wat_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:32:184:598 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:32:186:521 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:32:284:237 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:36:32:285:891 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-9-20 21:36:32:384:374 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2023-9-20 21:36:32:386:708 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2023-9-20 21:36:32:485:837 + Q11-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:36:32:585:252 + Q11 finished at: 2023-9-20 21:36:32:585:634 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:36:32:685:830 +Q9 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q9 failed at: 2023-9-20 21:36:33:386:588 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/mariadb/serializable/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..9a3e110e --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/wat_mda_step_wat_c2.txt @@ -0,0 +1,44 @@ +#### db_type: mariadb #### +#### test_type: mda_step_wat_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:33:613:999 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:33:616:56 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:33:713:412 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-9-20 21:36:33:714:987 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-9-20 21:36:33:813:689 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2023-9-20 21:36:34:15:675 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2023-9-20 21:36:34:117:219 + Q10-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-9-20 21:36:34:214:122 + Q10 finished at: 2023-9-20 21:36:34:214:391 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-9-20 21:36:34:414:383 +Q9 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 +Q9 failed at: 2023-9-20 21:36:35:17:899 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/mariadb/serializable/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..a175c9b9 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: mariadb #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:18:519:590 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:18:521:602 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:18:619:503 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; + Q4 finished at: 2023-9-20 21:36:18:719:772 +Q5 finished at: 2023-9-20 21:36:18:720:106 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:36:18:820:161 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2023-9-20 21:36:18:822:359 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2023-9-20 21:36:18:826:116 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:36:18:826:941 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/serializable/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/mariadb/serializable/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..63bbfef8 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: mariadb #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:19:44:645 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:19:45:975 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:19:145:670 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; + Q4 finished at: 2023-9-20 21:36:19:244:882 +Q5 finished at: 2023-9-20 21:36:19:245:33 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-9-20 21:36:19:345:271 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2023-9-20 21:36:19:347:346 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2023-9-20 21:36:19:351:249 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:36:19:352:3 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/serializable/wat_sda_full_write.txt b/test_result/centralizend_result/mariadb/serializable/wat_sda_full_write.txt new file mode 100644 index 00000000..3f7ca814 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: mariadb #### +#### test_type: sda_full_write #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:19:571:884 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:19:573:338 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:19:671:985 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2023-9-20 21:36:19:772:701 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2023-9-20 21:36:19:773:625 +Q6 finished at: 2023-9-20 21:36:19:773:971 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-9-20 21:36:19:872:833 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2023-9-20 21:36:19:876:257 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:36:19:877:850 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/serializable/wat_sda_full_write_committed.txt b/test_result/centralizend_result/mariadb/serializable/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..ecd83271 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: mariadb #### +#### test_type: sda_full_write_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:20:100:196 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:20:103:234 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:20:199:327 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2023-9-20 21:36:20:300:214 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2023-9-20 21:36:20:301:905 +Q7 finished at: 2023-9-20 21:36:20:302:105 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:36:20:302:974 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2023-9-20 21:36:20:305:933 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:36:20:307:495 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/serializable/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/mariadb/serializable/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..152c26fc --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: mariadb #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:22:191:749 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-9-20 21:36:22:195:839 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:22:290:385 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2023-9-20 21:36:22:391:743 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:36:22:393:786 + Q4 finished at: 2023-9-20 21:36:22:393:826 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-9-20 21:36:22:396:142 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2023-9-20 21:36:22:399:258 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-9-20 21:36:22:400:778 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mariadb/serializable/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/mariadb/serializable/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..ddeb2660 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/wat_sda_lost_update_c1.txt @@ -0,0 +1,39 @@ +#### db_type: mariadb #### +#### test_type: sda_lost_update_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:20:527:222 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2023-9-20 21:36:20:529:28 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:20:627:128 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2023-9-20 21:36:20:727:729 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2023-9-20 21:36:20:728:875 + Q4 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 + Q4 failed at: 2023-9-20 21:36:21:128:68 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mariadb/serializable/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/mariadb/serializable/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..31fc9954 --- /dev/null +++ b/test_result/centralizend_result/mariadb/serializable/wat_sda_lost_update_c2.txt @@ -0,0 +1,39 @@ +#### db_type: mariadb #### +#### test_type: sda_lost_update_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-9-20 21:36:21:360:177 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2023-9-20 21:36:21:363:449 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-9-20 21:36:21:459:835 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2023-9-20 21:36:21:561:556 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-9-20 21:36:21:760:829 + Q4 failed reason: [ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction errcode: 40001 + Q4 failed at: 2023-9-20 21:36:21:962:86 + +Test Result: Rollback +Reason: Err:[ma-3.1.7][10.5.22-MariaDB-1:10.5.22+maria~ubu2004]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mongodb/mongodb_snapshot_total-result.txt b/test_result/centralizend_result/mongodb/mongodb_snapshot_total-result.txt new file mode 100644 index 00000000..38119496 --- /dev/null +++ b/test_result/centralizend_result/mongodb/mongodb_snapshot_total-result.txt @@ -0,0 +1,96 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Rollback + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Rollback + +rat_sda_lost_self_update: Rollback + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +wat_sda_dirty_write_1abort: Rollback + +wat_sda_dirty_write_2commit: Rollback + +wat_sda_full_write: Rollback + +wat_sda_full_write_committed: Rollback + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Rollback + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_uname_anomaly: Rollback + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/mongodb/snapshot/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/mongodb/snapshot/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..7992c237 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/iat_dda_read_skew_committed.txt @@ -0,0 +1,45 @@ +#### db_type: mongodb #### +#### test_type: dda_read_skew_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + + T2 start transaction success + T2 execute stmt: 't1.put(1, 1)' + T2 execute stmt: 't1.put(0, 1)' + T2 COMMIT transaction success +T1 execute stmt: 't1.get(1)' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mongodb/snapshot/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/mongodb/snapshot/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..ee21b19d --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,28 @@ +#### db_type: mongodb #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + + T2 start transaction success + T2 execute stmt: 't1.put(1, 2)' + T2 execute stmt: 't1.put(0, 1)' + T2 COMMIT transaction success +T1 execute stmt: 't1.put(1, 1)' +[ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/iat_dda_write_skew.txt b/test_result/centralizend_result/mongodb/snapshot/iat_dda_write_skew.txt new file mode 100644 index 00000000..9db24d63 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/iat_dda_write_skew.txt @@ -0,0 +1,43 @@ +#### db_type: mongodb #### +#### test_type: dda_write_skew #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + + T2 start transaction success + T2 execute stmt: 't1.get(1)' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + T2 execute stmt: 't1.put(0, 1)' +T1 execute stmt: 't1.put(1, 1)' +T1 COMMIT transaction success + T2 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mongodb/snapshot/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/mongodb/snapshot/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..08e84475 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/iat_dda_write_skew_committed.txt @@ -0,0 +1,43 @@ +#### db_type: mongodb #### +#### test_type: dda_write_skew_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + + T2 start transaction success + T2 execute stmt: 't1.get(1)' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + T2 execute stmt: 't1.put(0, 1)' +T1 COMMIT transaction success +T1 execute stmt: 't1.put(1, 1)' + T2 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mongodb/snapshot/iat_mda_step_iat.txt b/test_result/centralizend_result/mongodb/snapshot/iat_mda_step_iat.txt new file mode 100644 index 00000000..079793ec --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/iat_mda_step_iat.txt @@ -0,0 +1,87 @@ +#### db_type: mongodb #### +#### test_type: mda_step_iat #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 execute stmt: 't1.put(2, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(2)' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + + T2 start transaction success + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + T3 start transaction success + T3 execute stmt: 't1.get(1)' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + +T1 execute stmt: 't1.put(0, 1)' + T2 execute stmt: 't1.put(1, 1)' + T3 execute stmt: 't1.put(2, 1)' +T1 COMMIT transaction success + T2 COMMIT transaction success + T3 COMMIT transaction success + T4 execute stmt: 't1.get(*)' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mongodb/snapshot/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/mongodb/snapshot/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..1f2e5df0 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,87 @@ +#### db_type: mongodb #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + + T2 start transaction success + T2 execute stmt: 't1.put(0, 1)' + T2 COMMIT transaction success + T3 start transaction success + T3 execute stmt: 't1.get(0)' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + T3 execute stmt: 't1.put(1, 1)' + T3 COMMIT transaction success +T1 execute stmt: 't1.get(1)' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +T1 COMMIT transaction success + T4 execute stmt: 't1.get(*)' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mongodb/snapshot/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/mongodb/snapshot/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..bd28717c --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,185 @@ +#### db_type: mongodb #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + T2 start transaction success + T2 execute stmt: 't1.get(1)' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + T3 start transaction success + T3 execute stmt: 't1.put(0, 1)' + T3 COMMIT transaction success + T4 start transaction success + T4 execute stmt: 't1.put(1, 1)' + T4 COMMIT transaction success + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + T2 COMMIT transaction success +T1 execute stmt: 't1.get(1)' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +T1 COMMIT transaction success + T4 execute stmt: 't1.get(*)' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mongodb/snapshot/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/mongodb/snapshot/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..091e05a5 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,57 @@ +#### db_type: mongodb #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + +T1 execute stmt: 't1.get(1)' + current_result: + (1,0) + (1) expected_result: + (1,20) + + T2 start transaction success + T2 execute stmt: 't1.get(1)' + current_result: + (1,0) + *(1) expected_result: + (1,0) + + T2 execute stmt: 't1.put(1, 20)' + T2 COMMIT transaction success + T3 start transaction success + T3 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + T3 execute stmt: 't1.get(1)' + current_result: + (1,20) + (1) expected_result: + (1,0) + + T3 COMMIT transaction success +T1 execute stmt: 't1.put(0, 11)' +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mongodb/snapshot/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/mongodb/snapshot/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..fde424c5 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,69 @@ +#### db_type: mongodb #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 execute stmt: 't1.put(2, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(1)' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + + T2 start transaction success + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + T2 execute stmt: 't1.put(0, 1)' + T2 execute stmt: 't1.get(1)' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + T2 execute stmt: 't1.put(1,1)' + T3 start transaction success + T3 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/mongodb/snapshot/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..9b004276 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/iat_sda_lost_update_committed.txt @@ -0,0 +1,26 @@ +#### db_type: mongodb #### +#### test_type: sda_lost_update_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + T2 COMMIT transaction success +T1 execute stmt: 't1.put(0, 1)' +[ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/mongodb/snapshot/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..53530f5a --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,43 @@ +#### db_type: mongodb #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + + T2 start transaction success + T2 execute stmt: 't1.put(0, 1)' + T2 COMMIT transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mongodb/snapshot/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/mongodb/snapshot/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..446bd5e5 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/rat_dda_double_write_skew1.txt @@ -0,0 +1,27 @@ +#### db_type: mongodb #### +#### test_type: dda_double_write_skew1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(1, 1)' + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + +T1 execute stmt: 't1.put(1, 2)' +[ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/mongodb/snapshot/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..d94e02d1 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,28 @@ +#### db_type: mongodb #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(1, 1)' + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + T2 COMMIT transaction success +T1 execute stmt: 't1.put(1, 2)' +[ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/mongodb/snapshot/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..ff4cc00a --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/rat_dda_double_write_skew2.txt @@ -0,0 +1,19 @@ +#### db_type: mongodb #### +#### test_type: dda_double_write_skew2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(1, 1)' + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/rat_dda_read_skew.txt b/test_result/centralizend_result/mongodb/snapshot/rat_dda_read_skew.txt new file mode 100644 index 00000000..f678050c --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/rat_dda_read_skew.txt @@ -0,0 +1,43 @@ +#### db_type: mongodb #### +#### test_type: dda_read_skew #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 start transaction success +T1 execute stmt: 't1.getpred(0)' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,1) (1,1) + + T2 start transaction success + T2 execute stmt: 't1.put(1, 1)' + T2 execute stmt: 't1.put(0, 1)' +T1 execute stmt: 't1.getpred(1)' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,1) (1,1) + + T2 COMMIT transaction success +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (1,1) (0,1) + *(1) expected_result: + (1,1) (0,1) + *(2) expected_result: + (1,1) (0,1) + + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mongodb/snapshot/rat_dda_read_skew2.txt b/test_result/centralizend_result/mongodb/snapshot/rat_dda_read_skew2.txt new file mode 100644 index 00000000..0949c602 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/rat_dda_read_skew2.txt @@ -0,0 +1,45 @@ +#### db_type: mongodb #### +#### test_type: dda_read_skew2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.get(1)' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + +T1 execute stmt: 't1.put(1, 1)' + T2 COMMIT transaction success +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mongodb/snapshot/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/mongodb/snapshot/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..7a264ae2 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/rat_dda_read_skew2_committed.txt @@ -0,0 +1,45 @@ +#### db_type: mongodb #### +#### test_type: dda_read_skew2_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.get(1)' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + T2 COMMIT transaction success +T1 execute stmt: 't1.put(1, 1)' +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mongodb/snapshot/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/mongodb/snapshot/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..8f1af041 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,43 @@ +#### db_type: mongodb #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 start transaction success +T1 execute stmt: 't1.getpred(0)' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,1) + + T2 start transaction success + T2 execute stmt: 't1.put(1, 1)' + T2 execute stmt: 't1.put(0, 1)' +T1 execute stmt: 't1.getpred(1)' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (1,1) + + T2 COMMIT transaction success +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (1,1) (0,1) + *(1) expected_result: + (1,1) (0,1) + *(2) expected_result: + (1,1) (0,1) + + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mongodb/snapshot/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/mongodb/snapshot/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..91cd714b --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,43 @@ +#### db_type: mongodb #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 start transaction success +T1 execute stmt: 't1.getpred(0)' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,1) + + T2 start transaction success + T2 execute stmt: 't1.put(1, 1)' + T2 execute stmt: 't1.put(0, 1)' +T1 execute stmt: 't1.getpred(1)' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (1,1) + + T2 COMMIT transaction success +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (1,1) (0,1) + *(1) expected_result: + (1,1) (0,1) + *(2) expected_result: + (1,1) (0,1) + + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mongodb/snapshot/rat_dda_write_read_skew.txt b/test_result/centralizend_result/mongodb/snapshot/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..1f75f989 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/rat_dda_write_read_skew.txt @@ -0,0 +1,43 @@ +#### db_type: mongodb #### +#### test_type: dda_write_read_skew #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(1, 1)' + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + +T1 execute stmt: 't1.get(1)' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + + T2 COMMIT transaction success +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mongodb/snapshot/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/mongodb/snapshot/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..ce414368 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,43 @@ +#### db_type: mongodb #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(1, 1)' + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + T2 COMMIT transaction success +T1 execute stmt: 't1.get(1)' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mongodb/snapshot/rat_mda_step_rat.txt b/test_result/centralizend_result/mongodb/snapshot/rat_mda_step_rat.txt new file mode 100644 index 00000000..173a98be --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/rat_mda_step_rat.txt @@ -0,0 +1,87 @@ +#### db_type: mongodb #### +#### test_type: mda_step_rat #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 execute stmt: 't1.put(2, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(1, 1)' + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + T3 start transaction success + T3 execute stmt: 't1.put(2, 1)' + T3 execute stmt: 't1.get(1)' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + +T1 execute stmt: 't1.get(2)' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +T1 COMMIT transaction success + T2 COMMIT transaction success + T3 COMMIT transaction success + T4 execute stmt: 't1.get(*)' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mongodb/snapshot/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/mongodb/snapshot/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..6812249a --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,115 @@ +#### db_type: mongodb #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' + T4 start transaction success + T4 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T3 start transaction success + T3 execute stmt: 't1.get(1)' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + + T3 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (1,1) + + T2 start transaction success + T2 execute stmt: 't1.put(1, 1)' + T4 execute stmt: 't1.get(1)' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + +T1 COMMIT transaction success + T2 COMMIT transaction success + T3 COMMIT transaction success + T4 COMMIT transaction success + T4 execute stmt: 't1.get(*)' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mongodb/snapshot/rat_sda_dirty_read.txt b/test_result/centralizend_result/mongodb/snapshot/rat_sda_dirty_read.txt new file mode 100644 index 00000000..9c0caa07 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/rat_sda_dirty_read.txt @@ -0,0 +1,29 @@ +#### db_type: mongodb #### +#### test_type: sda_dirty_read #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 start transaction success +T1 execute stmt: 't1.put(0, 0)' + T2 start transaction success + T2 execute stmt: 't1.get(0)' + current_result: + null + *(1) expected_result: + null + + T2 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + null + *(1) expected_result: + null + + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mongodb/snapshot/rat_sda_intermediate_read.txt b/test_result/centralizend_result/mongodb/snapshot/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..ded07c96 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/rat_sda_intermediate_read.txt @@ -0,0 +1,36 @@ +#### db_type: mongodb #### +#### test_type: sda_intermediate_read #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + +T1 execute stmt: 't1.put(0, 2)' + T2 COMMIT transaction success +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mongodb/snapshot/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/mongodb/snapshot/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..74e1fee4 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,36 @@ +#### db_type: mongodb #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + T2 COMMIT transaction success +T1 execute stmt: 't1.put(0, 2)' +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mongodb/snapshot/rat_sda_lost_self_update.txt b/test_result/centralizend_result/mongodb/snapshot/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..943c62cc --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/rat_sda_lost_self_update.txt @@ -0,0 +1,17 @@ +#### db_type: mongodb #### +#### test_type: sda_lost_self_update #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/mongodb/snapshot/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..4d66d15f --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/rat_sda_non_repeatable_read.txt @@ -0,0 +1,43 @@ +#### db_type: mongodb #### +#### test_type: sda_non_repeatable_read #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + + T2 start transaction success + T2 execute stmt: 't1.put(0, 1)' +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + + T2 COMMIT transaction success +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mongodb/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/mongodb/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..dea6ed7f --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,25 @@ +#### db_type: mongodb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 start transaction success +T1 execute stmt: 't1.getpred(0)' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + + T2 start transaction success + T2 execute stmt: 't1.put(0, 0)' + T2 COMMIT transaction success +T1 execute stmt: 't1.getpred(0)' +[ERROR] in MongoConnector::ExecFindkV ->Unable to read from a snapshot due to pending collection catalog changes; please retry the operation. Snapshot timestamp is Timestamp(1651677643, 7). Collection minimum is Timestamp(1651677643, 8): generic server error + +Test Result: Rollback +Reason: Unable to read from a snapshot due to pending collection catalog changes; please retry the operation. Snapshot timestamp is Timestamp(1651677643, 7). Collection minimum is Timestamp(1651677643, 8): generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/mongodb/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..58692d18 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,25 @@ +#### db_type: mongodb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 start transaction success +T1 execute stmt: 't1.getpred(0)' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + + T2 start transaction success + T2 execute stmt: 't1.put(0, 0)' + T2 COMMIT transaction success +T1 execute stmt: 't1.getpred(0)' +[ERROR] in MongoConnector::ExecFindkV ->Unable to read from a snapshot due to pending collection catalog changes; please retry the operation. Snapshot timestamp is Timestamp(1651677643, 3). Collection minimum is Timestamp(1651677643, 4): generic server error + +Test Result: Rollback +Reason: Unable to read from a snapshot due to pending collection catalog changes; please retry the operation. Snapshot timestamp is Timestamp(1651677643, 3). Collection minimum is Timestamp(1651677643, 4): generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/mongodb/snapshot/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..0f58314b --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,19 @@ +#### db_type: mongodb #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(1, 1)' + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/mongodb/snapshot/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..ba6cddb9 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,18 @@ +#### db_type: mongodb #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/mongodb/snapshot/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..10f1b1a5 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,18 @@ +#### db_type: mongodb #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/mongodb/snapshot/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..caa683c7 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,18 @@ +#### db_type: mongodb #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/mongodb/snapshot/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..b5ca6d5a --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,27 @@ +#### db_type: mongodb #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + + T2 start transaction success + T2 execute stmt: 't1.put(1, 2)' + T2 execute stmt: 't1.put(0, 1)' +T1 execute stmt: 't1.put(1, 1)' +[ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/mongodb/snapshot/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..2200a7ab --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,27 @@ +#### db_type: mongodb #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + + T2 start transaction success + T2 execute stmt: 't1.put(1, 2)' + T2 execute stmt: 't1.put(0, 1)' +T1 execute stmt: 't1.put(1, 1)' +[ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/mongodb/snapshot/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..eb37768b --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,26 @@ +#### db_type: mongodb #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.get(1)' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/mongodb/snapshot/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..86a584ba --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,26 @@ +#### db_type: mongodb #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.get(1)' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/mongodb/snapshot/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..87dfd066 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,26 @@ +#### db_type: mongodb #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.get(1)' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/mongodb/snapshot/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..d97861cb --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/wat_mda_step_wat_c1.txt @@ -0,0 +1,20 @@ +#### db_type: mongodb #### +#### test_type: mda_step_wat_c1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 execute stmt: 't1.put(2, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(1, 2)' + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/mongodb/snapshot/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..a72dce7a --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/wat_mda_step_wat_c2.txt @@ -0,0 +1,20 @@ +#### db_type: mongodb #### +#### test_type: mda_step_wat_c2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 execute stmt: 't1.put(2, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(1, 2)' + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/mongodb/snapshot/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..1cc1018d --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,17 @@ +#### db_type: mongodb #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/mongodb/snapshot/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..66d36468 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,17 @@ +#### db_type: mongodb #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/wat_sda_full_write.txt b/test_result/centralizend_result/mongodb/snapshot/wat_sda_full_write.txt new file mode 100644 index 00000000..e057f4c9 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/wat_sda_full_write.txt @@ -0,0 +1,17 @@ +#### db_type: mongodb #### +#### test_type: sda_full_write #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/wat_sda_full_write_committed.txt b/test_result/centralizend_result/mongodb/snapshot/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..65581c56 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/wat_sda_full_write_committed.txt @@ -0,0 +1,17 @@ +#### db_type: mongodb #### +#### test_type: sda_full_write_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/mongodb/snapshot/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..cc27e358 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,17 @@ +#### db_type: mongodb #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/mongodb/snapshot/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..f67f3686 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/wat_sda_lost_update_c1.txt @@ -0,0 +1,17 @@ +#### db_type: mongodb #### +#### test_type: sda_lost_update_c1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/mongodb/snapshot/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/mongodb/snapshot/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..910560b5 --- /dev/null +++ b/test_result/centralizend_result/mongodb/snapshot/wat_sda_lost_update_c2.txt @@ -0,0 +1,17 @@ +#### db_type: mongodb #### +#### test_type: sda_lost_update_c2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/myrocks_si/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..1cc2a2b4 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:30:338:29 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:20:30:338:746 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:30:437:923 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:30:438:586 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:20:30:439:35 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:30:456:391 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 14:20:30:538:184 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:30:546:95 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:20:30:547:46 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:30:548:826 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/myrocks_si/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..92d08ce9 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:30:889:607 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:20:30:890:408 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:30:989:573 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:30:990:246 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:20:30:990:734 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:31:2:441 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 14:20:31:89:669 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:31:118:586 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:20:31:119:514 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:31:131:705 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/iat_dda_write_skew.txt b/test_result/centralizend_result/myrocks_si/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..c614a791 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:31:450:93 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:20:31:450:756 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:31:550:165 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:20:31:550:888 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:20:31:551:383 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 14:20:31:650:264 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:20:31:663:500 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:20:31:768:566 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:20:31:769:584 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:20:31:773:403 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/myrocks_si/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..d1e98c5a --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:33:182:494 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:20:33:183:187 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:33:282:471 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:20:33:283:201 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:20:33:283:732 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:33:301:383 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 14:20:33:382:599 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:33:398:809 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:20:33:399:785 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:33:408:305 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/myrocks_si/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..f4463a4d --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:32:77:579 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-2 14:20:32:78:424 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-2 14:20:32:79:27 + Q4-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q4 finished at: 2022-4-2 14:20:32:177:583 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-2 14:20:32:178:442 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-2 14:20:32:179:13 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:20:32:189:466 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:32:290:301 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-2 14:20:32:291:342 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-2 14:20:32:292:17 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:20:32:294:507 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/myrocks_si/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..fb3da580 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:32:631:536 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-2 14:20:32:632:361 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:32:731:431 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-2 14:20:32:732:304 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-2 14:20:32:733:180 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:32:749:531 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-2 14:20:32:831:732 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:32:853:943 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-2 14:20:32:855:59 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:32:861:481 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/iat_mda_step_iat.txt b/test_result/centralizend_result/myrocks_si/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..659a0cf8 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:33:756:989 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 14:20:33:757:899 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:33:856:955 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:20:33:857:892 + Q5-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q5 finished at: 2022-4-2 14:20:33:957:68 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 14:20:33:958:44 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-2 14:20:34:57:140 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-2 14:20:34:157:188 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-2 14:20:34:257:147 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:20:34:375:952 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:20:34:471:183 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:20:34:570:427 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 14:20:34:571:652 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:20:34:582:987 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/myrocks_si/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..ead6a4f5 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,106 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:38:587:843 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:20:38:588:817 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:38:687:763 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 14:20:38:688:409 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:20:38:700:609 + Q6-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q6 finished at: 2022-4-2 14:20:38:787:757 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 14:20:38:788:653 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-2 14:20:38:789:233 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:38:798:412 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2022-4-2 14:20:38:888:327 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-2 14:20:38:892:825 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-2 14:20:38:893:858 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 14:20:38:897:553 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/myrocks_si/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..df3bb654 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,207 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:37:722:865 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:20:37:724:172 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:37:822:788 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:20:37:823:995 + Q5-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q5 finished at: 2022-4-2 14:20:37:922:866 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-2 14:20:37:923:603 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:20:37:935:330 + Q8-T4 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q8 finished at: 2022-4-2 14:20:38:22:871 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-2 14:20:38:23:595 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:38:39:97 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-4-2 14:20:38:123:648 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:20:38:126:145 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-2 14:20:38:223:887 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-2 14:20:38:233:28 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-2 14:20:38:234:788 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-2 14:20:38:251:946 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/myrocks_si/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..cadeb773 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:34:919:516 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-2 14:20:34:920:487 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:35:19:465 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:20:35:20:387 + Q5-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q5 finished at: 2022-4-2 14:20:35:119:617 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 14:20:35:120:668 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-2 14:20:35:219:694 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-2 14:20:35:319:628 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-2 14:20:35:419:677 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:20:35:529:50 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:20:35:630:333 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:20:35:730:902 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-2 14:20:35:731:977 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:20:35:736:597 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/myrocks_si/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..654ab18c --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:36:11:626 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 14:20:36:12:659 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:36:111:583 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-2 14:20:36:112:462 + Q5-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q5 finished at: 2022-4-2 14:20:36:211:677 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-2 14:20:36:212:618 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-2 14:20:36:311:786 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-2 14:20:36:411:934 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-2 14:20:36:512:77 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:20:36:620:98 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:20:36:721:489 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:20:36:819:491 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 14:20:36:820:723 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:20:36:827:16 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/myrocks_si/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..d7ca1ddf --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:39:168:43 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 14:20:39:168:901 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-2 14:20:39:169:576 + Q4-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q4 finished at: 2022-4-2 14:20:39:268:30 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-2 14:20:39:268:952 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-2 14:20:39:269:478 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:20:39:282:133 + Q8-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q8 finished at: 2022-4-2 14:20:39:368:73 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-2 14:20:39:368:969 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 14:20:39:369:679 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:20:39:380:229 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-2 14:20:39:468:335 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-2 14:20:39:484:296 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-2 14:20:39:485:513 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-2 14:20:39:489:814 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/myrocks_si/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..eba7c60b --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,162 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:37:114:242 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-2 14:20:37:115:109 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:37:213:968 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-2 14:20:37:214:858 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:20:37:215:388 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 14:20:37:216:146 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-2 14:20:37:216:662 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:20:37:226:196 + Q9-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q9 finished at: 2022-4-2 14:20:37:313:976 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-2 14:20:37:314:806 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-2 14:20:37:315:344 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-2 14:20:37:316:104 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-2 14:20:37:316:554 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:20:37:329:606 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2022-4-2 14:20:37:414:501 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-2 14:20:37:418:568 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-2 14:20:37:419:768 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-2 14:20:37:423:610 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/myrocks_si/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..c303c925 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:29:753:456 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 14:20:29:754:109 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:29:853:480 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 14:20:29:854:119 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:20:29:864:718 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-2 14:20:29:953:622 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:20:29:972:818 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:20:29:973:704 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:29:982:221 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/myrocks_si/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..c7759a72 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,60 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:29:184:707 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:20:29:185:569 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:29:284:587 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 14:20:29:285:261 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:20:29:297:949 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 14:20:29:385:58 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:20:29:388:34 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:20:29:388:898 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:29:403:683 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:29:411:385 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..92fb24bb --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,56 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:6:317:720 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:6:318:362 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:6:417:652 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:6:418:287 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:20:6:418:930 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 14:20:6:622:313 + Q7 finished at: 2022-4-2 14:20:6:628:994 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:6:722:828 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-2 14:20:6:723:903 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:6:728:73 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..511c03b5 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,56 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:7:29:207 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:7:29:780 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:7:129:182 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:7:129:869 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:20:7:130:548 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:7:145:506 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-2 14:20:7:229:284 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:7:237:471 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-2 14:20:7:238:456 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:7:242:233 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..a23c24cc --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,56 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:7:532:611 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:7:533:164 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:7:632:507 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:7:633:151 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 14:20:7:732:832 +Q7-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:20:7:739:124 +Q7 finished at: 2022-4-2 14:20:7:742:263 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:20:7:840:135 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:20:7:841:230 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:7:855:515 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_read_skew.txt b/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..f4451d34 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:8:183:277 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:20:8:183:964 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:8:283:232 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:8:283:847 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:20:8:284:316 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 14:20:8:383:557 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:20:8:502:165 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:8:584:656 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:20:8:585:637 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:8:589:751 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_read_skew2.txt b/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..f05d19d3 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:9:899:864 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:9:900:474 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:9:999:830 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:20:10:8:450 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:20:10:9:80 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 14:20:10:100:93 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:20:10:113:696 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:20:10:201:751 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:20:10:202:773 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:10:206:798 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..b84c8a25 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:10:501:544 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:10:502:249 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:10:594:267 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:20:10:595:135 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:20:10:595:842 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:10:603:66 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 14:20:10:694:306 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:10:702:386 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:20:10:703:289 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:10:707:66 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..594dc2a7 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:8:894:529 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 14:20:8:895:293 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:8:994:438 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:8:995:66 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:20:8:995:762 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:9:5:794 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 14:20:9:94:706 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:9:100:304 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-2 14:20:9:101:214 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:9:108:98 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..cf0bda53 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,59 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:9:396:667 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 14:20:9:397:563 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:9:496:636 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-2 14:20:9:497:170 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-2 14:20:9:497:613 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:9:507:287 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 14:20:9:596:927 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:9:607:602 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-2 14:20:9:608:524 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:9:612:55 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_write_read_skew.txt b/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..a9043044 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:5:97:226 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:5:97:923 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:5:197:155 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:5:197:815 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:20:5:198:566 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 14:20:5:297:606 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:20:5:411:433 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:5:503:930 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:20:5:504:921 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:5:511:796 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..f47f9b8c --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: myrocks #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:5:796:729 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:5:797:405 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:5:896:709 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:5:897:297 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:20:5:897:913 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:5:907:311 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 14:20:5:997:45 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:6:12:801 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:20:6:13:847 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:6:18:214 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/rat_mda_step_rat.txt b/test_result/centralizend_result/myrocks_si/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..84802a88 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:10:986:459 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:10:987:65 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:11:86:394 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:11:87:6 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:20:11:87:822 + Q6-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q6 finished at: 2022-4-2 14:20:11:186:394 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-2 14:20:11:186:993 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-2 14:20:11:187:817 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-2 14:20:11:286:861 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:20:11:298:568 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:20:11:395:432 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:20:11:493:794 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 14:20:11:495:37 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:20:11:496:294 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/myrocks_si/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..be70c7a5 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q1 finished at: 2022-4-2 14:20:11:768:595 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-2 14:20:11:769:936 +Q3-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q3 finished at: 2022-4-2 14:20:11:868:623 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-2 14:20:11:869:336 + Q5-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q5 finished at: 2022-4-2 14:20:11:968:559 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-2 14:20:11:970:39 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 14:20:11:971:234 + Q8-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q8 finished at: 2022-4-2 14:20:12:68:605 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-2 14:20:12:69:378 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 14:20:12:169:522 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-2 14:20:12:277:52 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:20:12:376:179 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 14:20:12:476:578 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:20:12:480:911 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-2 14:20:12:482:330 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-2 14:20:12:486:262 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/myrocks_si/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..1264dec2 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:12:784:488 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:12:785:136 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:12:884:465 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:12:885:35 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 14:20:12:887:19 + Q6-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q6 finished at: 2022-4-2 14:20:12:984:472 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-2 14:20:12:985:54 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-2 14:20:12:985:948 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-2 14:20:13:84:964 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:20:13:99:797 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:20:13:197:693 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:20:13:291:984 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-2 14:20:13:293:81 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:20:13:297:548 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/myrocks_si/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..a5012625 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:13:596:10 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-2 14:20:13:596:788 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:13:695:879 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-2 14:20:13:696:451 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 14:20:13:697:544 + Q6-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q6 finished at: 2022-4-2 14:20:13:795:919 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-2 14:20:13:796:444 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-2 14:20:13:797:279 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-2 14:20:13:896:406 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:20:13:907:525 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:20:14:15:406 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:20:14:124:421 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 14:20:14:125:673 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:20:14:133:118 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/rat_sda_dirty_read.txt b/test_result/centralizend_result/myrocks_si/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..6554d06d --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,42 @@ +#### db_type: myrocks #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-11 19:13:58:606:31 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 19:13:58:606:705 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-11 19:13:58:714:894 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + Q4 finished at: 2022-4-11 19:13:58:715:750 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-11 19:13:58:813:169 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 19:13:58:912:542 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + Q7 finished at: 2022-4-11 19:13:58:913:460 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 19:13:58:920:444 + +The current result is consistent with the [(1) expected_result] of serial scheduling +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent \ No newline at end of file diff --git a/test_result/centralizend_result/myrocks_si/read-committed/rat_sda_intermediate_read.txt b/test_result/centralizend_result/myrocks_si/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..8f8af0f5 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: myrocks #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:2:232:994 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:2:233:567 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:2:333:4 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:20:2:333:731 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-2 14:20:2:433:265 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:2:537:991 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:20:2:642:667 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 14:20:2:643:739 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:2:653:806 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/myrocks_si/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..77119394 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: myrocks #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:2:944:217 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:2:944:902 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:3:44:106 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:20:3:44:811 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:20:3:49:586 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-2 14:20:3:144:400 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:20:3:159:624 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 14:20:3:160:663 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:3:169:445 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/rat_sda_lost_self_update.txt b/test_result/centralizend_result/myrocks_si/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..c4db8ced --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:4:459:810 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:4:460:422 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:4:559:778 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 14:20:4:660:178 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 14:20:4:665:608 +Q6 finished at: 2022-4-2 14:20:4:669:403 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:20:4:766:548 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:20:4:767:597 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:4:771:698 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/myrocks_si/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..71f12c44 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:1:498:155 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:20:1:498:965 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:1:598:173 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 14:20:1:598:791 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 14:20:1:698:515 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:1:814:963 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:20:1:903:547 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:20:1:904:600 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:1:911:746 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/myrocks_si/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..adcc5732 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,58 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:3:444:862 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 14:20:3:445:645 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:3:544:759 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-2 14:20:3:545:425 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:20:3:556:368 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 14:20:3:645:30 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:20:3:658:738 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-2 14:20:3:659:656 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:3:665:833 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/myrocks_si/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..365e6c31 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,57 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:3:944:353 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 14:20:3:945:277 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:4:44:250 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-2 14:20:4:44:779 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:20:4:55:463 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 14:20:4:144:614 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:20:4:156:65 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-2 14:20:4:157:136 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:4:169:453 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..12eb80c2 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,56 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:18:608:384 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:18:609:91 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:18:708:317 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:18:708:933 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 14:20:18:808:676 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:20:18:814:82 + Q6-T2 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:18:817:212 + Q6 finished at: 2022-4-2 14:20:18:820:344 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:20:18:821:518 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:18:830:875 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..e3365262 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,35 @@ +#### db_type: myrocks #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:19:129:759 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:19:130:370 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:19:229:667 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:19:230:440 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:20:19:329:979 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:20:19:437:993 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-2 14:20:19:938:648 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..4ae51930 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,35 @@ +#### db_type: myrocks #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:20:228:788 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:20:229:422 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:20:328:733 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:20:329:383 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:20:20:429:83 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:20:20:546:934 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-2 14:20:21:36:406 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..8434f081 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: myrocks #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:21:362:497 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:21:363:115 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:21:462:452 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:21:463:203 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:20:21:562:707 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:21:569:899 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-2 14:20:22:266:951 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..0bb2b276 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:22:567:591 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:20:22:568:384 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:22:667:601 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:22:668:283 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:20:22:668:785 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 14:20:22:871:502 +Q7-T1 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:20:22:876:713 +Q7 finished at: 2022-4-2 14:20:22:879:668 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:20:22:880:631 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:22:884:633 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..0cd0f653 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:23:150:683 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:20:23:151:446 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:23:250:601 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:23:251:221 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:20:23:251:703 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 14:20:23:458:166 + Q7 finished at: 2022-4-2 14:20:23:465:297 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:23:558:659 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:20:23:559:726 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:23:563:696 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..3e1223df --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:23:883:165 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:23:883:875 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:23:983:60 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:20:23:983:764 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 14:20:24:83:176 +Q7-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:20:24:88:405 +Q7 finished at: 2022-4-2 14:20:24:94:932 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:20:24:201:381 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:20:24:202:347 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:24:208:528 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..793a4371 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:24:561:332 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:24:561:924 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:24:661:382 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:20:24:662:190 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 14:20:24:761:480 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:20:24:965:398 + Q7-T2 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:24:971:775 + Q7 finished at: 2022-4-2 14:20:24:975:316 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:20:24:976:286 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:24:980:93 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..51adc376 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:25:302:264 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:25:302:832 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:25:402:273 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:20:25:402:970 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 14:20:25:502:391 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:20:25:514:504 + Q6-T2 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:25:523:237 + Q6 finished at: 2022-4-2 14:20:25:527:273 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:20:25:528:247 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:25:532:526 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/myrocks_si/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..6c14baf1 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,44 @@ +#### db_type: myrocks #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:25:840:385 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:25:840:987 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:25:940:414 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:25:941:80 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q6 finished at: 2022-4-2 14:20:26:40:316 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 14:20:26:40:936 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-2 14:20:26:140:688 + Q11-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:20:26:245:616 + Q11 finished at: 2022-4-2 14:20:26:250:154 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:20:26:361:829 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-2 14:20:27:53:883 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/myrocks_si/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..1dfaee5a --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,44 @@ +#### db_type: myrocks #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:27:476:405 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:27:477:49 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:27:576:418 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:27:577:28 + Q5-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q5 finished at: 2022-4-2 14:20:27:676:430 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 14:20:27:876:674 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-2 14:20:27:976:773 + Q10-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:20:28:89:46 + Q10 finished at: 2022-4-2 14:20:28:101:299 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:20:28:301:526 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-2 14:20:28:882:98 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/myrocks_si/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..4dfdc7c9 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:14:429:763 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:14:430:344 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:14:529:755 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; + Q4 finished at: 2022-4-2 14:20:14:629:813 +Q5 finished at: 2022-4-2 14:20:14:635:129 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:14:741:164 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 14:20:14:742:89 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 14:20:14:773:851 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:14:778:322 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/myrocks_si/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..de01c62a --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:15:48:217 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:15:48:961 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:15:148:86 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 14:20:15:254:120 +Q5 finished at: 2022-4-2 14:20:15:259:177 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:15:361:728 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 14:20:15:362:727 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 14:20:15:392:366 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:15:397:419 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/wat_sda_full_write.txt b/test_result/centralizend_result/myrocks_si/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..975310b2 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:15:654:366 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:15:654:927 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:15:754:349 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-2 14:20:15:854:524 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 14:20:15:861:263 +Q6 finished at: 2022-4-2 14:20:15:866:286 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:20:15:962:111 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 14:20:15:963:14 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:15:970:326 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/wat_sda_full_write_committed.txt b/test_result/centralizend_result/myrocks_si/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..d68b80a5 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:16:255:301 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:16:255:930 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:16:355:242 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-2 14:20:16:455:455 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 14:20:16:460:618 + Q5-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:20:16:465:477 + Q5 finished at: 2022-4-2 14:20:16:473:480 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 14:20:16:474:428 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:16:478:760 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/myrocks_si/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..6b568485 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:18:85:627 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:18:86:252 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:18:185:658 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 14:20:18:285:850 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 14:20:18:292:360 + Q5-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:20:18:295:889 + Q5 finished at: 2022-4-2 14:20:18:302:762 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:20:18:303:621 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:18:307:298 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/myrocks_si/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..d8e934ac --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:16:748:309 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 14:20:16:749:4 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:16:848:371 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 14:20:16:849:50 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-2 14:20:17:53:823 +Q6-T1 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:20:17:59:900 +Q6 finished at: 2022-4-2 14:20:17:63:206 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:20:17:64:163 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:17:67:642 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/read-committed/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/myrocks_si/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..364079ea --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:17:370:195 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 14:20:17:370:918 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:17:470:112 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 14:20:17:470:689 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-2 14:20:17:674:203 + Q6 finished at: 2022-4-2 14:20:17:677:223 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:20:17:779:907 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:20:17:780:938 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:17:787:29 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..0de24b84 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_dda_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:21:8:797:635 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:21:8:798:420 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:21:8:897:743 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:21:8:898:435 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:21:8:898:863 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:21:8:910:910 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 14:21:8:998:86 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:21:9:6:845 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:21:9:7:879 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:21:9:9:421 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..e70b7c06 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:21:9:332:670 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:21:9:333:373 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:21:9:432:667 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:21:9:433:289 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:21:9:433:800 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:21:9:440:970 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 14:21:9:532:863 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:21:9:540:892 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:21:9:541:884 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:21:9:549:996 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/iat_dda_write_skew.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_dda_write_skew.txt new file mode 100644 index 00000000..59497743 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:21:9:834:903 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:21:9:835:639 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:21:9:934:938 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:21:9:935:750 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:21:9:936:326 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 14:21:10:35:210 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:21:10:49:79 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:21:10:150:313 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:21:10:151:276 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:21:10:161:85 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..15703650 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:21:11:480:129 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:21:11:480:878 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:21:11:580:258 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:21:11:581:14 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:21:11:581:610 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:21:11:589:621 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 14:21:11:680:274 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:21:11:698:220 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:21:11:699:147 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:21:11:703:234 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..39a4a2f2 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:21:10:489:73 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-2 14:21:10:489:840 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-2 14:21:10:490:350 + Q4-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q4 finished at: 2022-4-2 14:21:10:589:51 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-2 14:21:10:589:901 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-2 14:21:10:590:386 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:21:10:599:236 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:21:10:698:522 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-2 14:21:10:699:538 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-2 14:21:10:700:191 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:21:10:704:591 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..a91b5cba --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:21:11:8:181 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-2 14:21:11:9:35 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:21:11:100:444 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-2 14:21:11:101:378 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-2 14:21:11:102:91 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:21:11:109:714 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-2 14:21:11:200:935 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:21:11:208:528 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-2 14:21:11:209:453 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:21:11:213:300 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/iat_mda_step_iat.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_mda_step_iat.txt new file mode 100644 index 00000000..e759327a --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:21:11:995:858 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 14:21:11:996:785 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:21:12:95:691 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:21:12:96:887 + Q5-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q5 finished at: 2022-4-2 14:21:12:195:683 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 14:21:12:196:693 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-2 14:21:12:295:890 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-2 14:21:12:395:955 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-2 14:21:12:495:938 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:21:12:604:61 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:21:12:703:499 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:21:12:804:433 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 14:21:12:805:709 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:21:12:824:224 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..a9d68bb7 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:21:16:743:144 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:21:16:744:361 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:21:16:843:116 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 14:21:16:843:909 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:21:16:856:345 + Q6-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q6 finished at: 2022-4-2 14:21:16:943:24 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 14:21:16:943:971 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-2 14:21:16:944:537 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:21:16:955:536 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-2 14:21:17:43:534 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-2 14:21:17:48:608 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-2 14:21:17:49:963 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 14:21:17:57:836 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..194ffdce --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,209 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:21:15:942:648 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:21:15:943:896 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:21:16:42:666 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:21:16:43:952 + Q5-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q5 finished at: 2022-4-2 14:21:16:142:620 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-2 14:21:16:143:365 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:21:16:152:84 + Q8-T4 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q8 finished at: 2022-4-2 14:21:16:242:686 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-2 14:21:16:243:334 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:21:16:253:269 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-2 14:21:16:343:689 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:21:16:348:368 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-2 14:21:16:443:538 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-2 14:21:16:451:671 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-2 14:21:16:453:362 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-2 14:21:16:459:839 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..9689a1ce --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:21:13:109:873 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-2 14:21:13:110:733 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:21:13:209:855 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:21:13:210:763 + Q5-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q5 finished at: 2022-4-2 14:21:13:309:797 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 14:21:13:310:788 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-2 14:21:13:409:970 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-2 14:21:13:510:7 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-2 14:21:13:610:72 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:21:13:719:27 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:21:13:819:724 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:21:13:920:613 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-2 14:21:13:921:946 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:21:13:927:340 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..91a118ce --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:21:14:252:82 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 14:21:14:253:81 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:21:14:352:129 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-2 14:21:14:352:963 + Q5-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q5 finished at: 2022-4-2 14:21:14:452:37 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-2 14:21:14:452:925 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-2 14:21:14:552:246 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-2 14:21:14:652:266 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-2 14:21:14:752:240 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:21:14:859:524 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:21:14:958:821 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:21:15:57:391 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 14:21:15:58:455 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:21:15:62:545 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..879464fb --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:21:17:391:743 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 14:21:17:392:663 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-2 14:21:17:393:522 + Q4-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q4 finished at: 2022-4-2 14:21:17:491:626 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-2 14:21:17:492:534 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-2 14:21:17:493:24 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:21:17:500:783 + Q8-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q8 finished at: 2022-4-2 14:21:17:591:634 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-2 14:21:17:592:632 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 14:21:17:593:439 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:21:17:595:756 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-2 14:21:17:691:882 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-2 14:21:17:699:426 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-2 14:21:17:700:577 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-2 14:21:17:705:26 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..733e34a7 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,164 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:21:15:350:636 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-2 14:21:15:351:578 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:21:15:450:521 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-2 14:21:15:451:504 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:21:15:452:151 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 14:21:15:452:919 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-2 14:21:15:453:378 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:21:15:470:613 + Q9-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q9 finished at: 2022-4-2 14:21:15:550:581 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-2 14:21:15:551:462 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-2 14:21:15:552:2 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-2 14:21:15:552:789 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-2 14:21:15:553:349 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:21:15:562:962 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-2 14:21:15:651:155 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-2 14:21:15:655:234 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-2 14:21:15:656:310 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-2 14:21:15:669:530 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..29b04f1d --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:21:8:320:730 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 14:21:8:321:433 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:21:8:420:701 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 14:21:8:421:392 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:21:8:432:470 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-2 14:21:8:520:891 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:21:8:529:120 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:21:8:529:995 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:21:8:534:149 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..4058fe0f --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:21:7:835:273 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:21:7:836:8 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:21:7:935:269 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 14:21:7:935:948 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:21:7:942:536 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 14:21:8:35:540 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:21:8:37:805 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:21:8:38:598 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:21:8:43:593 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:21:8:47:205 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..5fd20694 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_double_write_skew1.txt @@ -0,0 +1,56 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:45:326:30 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:45:326:638 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:45:426:78 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:45:426:782 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:20:45:427:499 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 14:20:45:630:310 + Q7 finished at: 2022-4-2 14:20:45:636:608 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:45:737:218 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-2 14:20:45:738:289 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:45:742:916 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..c888d758 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,56 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:46:57:391 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:46:57:990 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:46:157:355 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:46:158:80 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:20:46:158:782 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:46:172:257 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-2 14:20:46:257:606 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:46:265:765 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-2 14:20:46:266:709 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:46:270:798 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..0d4c2b85 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_double_write_skew2.txt @@ -0,0 +1,56 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:46:566:132 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:46:566:753 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:46:666:60 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:46:666:641 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 14:20:46:766:441 +Q7-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:20:46:771:157 +Q7 finished at: 2022-4-2 14:20:46:778:284 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:20:46:876:374 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:20:46:877:292 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:46:880:671 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_read_skew.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_read_skew.txt new file mode 100644 index 00000000..95ac26ef --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:47:165:384 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:20:47:166:103 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:47:265:362 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:47:265:942 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:20:47:266:371 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 14:20:47:365:726 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:20:47:480:782 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:47:566:660 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:20:47:567:560 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:47:574:485 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_read_skew2.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_read_skew2.txt new file mode 100644 index 00000000..364684c2 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:48:844:786 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:48:845:387 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:48:944:800 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:20:48:945:597 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:20:48:946:225 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 14:20:49:44:993 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:20:49:58:505 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:20:49:146:403 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:20:49:147:367 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:49:153:139 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..c4f8a2ba --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:49:441:217 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:49:441:795 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:49:541:138 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:20:49:541:880 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:20:49:542:629 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:49:547:631 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 14:20:49:641:375 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:49:653:351 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:20:49:654:387 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:49:664:12 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..14e04be0 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:47:851:787 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 14:20:47:852:496 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:47:951:733 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:47:952:359 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:20:47:952:876 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:47:964:362 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 14:20:48:52:74 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:48:60:316 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-2 14:20:48:61:266 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:48:70:741 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..b1ba257c --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:48:362:195 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 14:20:48:363:59 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:48:462:286 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-2 14:20:48:462:944 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-2 14:20:48:463:470 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:48:477:159 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 14:20:48:562:480 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:48:566:477 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-2 14:20:48:567:468 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:48:572:119 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_write_read_skew.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..4231925b --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_write_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:44:114:564 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:44:115:188 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:44:214:484 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:44:215:103 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:20:44:215:704 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 14:20:44:314:807 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:20:44:426:233 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:44:521:545 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:20:44:522:523 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:44:526:106 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..2a255cd8 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:44:812:53 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:44:812:642 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:44:912:62 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:44:913:605 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:20:44:914:275 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:44:922:730 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 14:20:45:12:322 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:45:22:3 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:20:45:22:927 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:45:26:853 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/rat_mda_step_rat.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_mda_step_rat.txt new file mode 100644 index 00000000..7e37bf25 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:49:976:159 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:49:976:746 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:50:76:169 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:50:76:783 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:20:50:77:517 + Q6-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q6 finished at: 2022-4-2 14:20:50:176:214 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-2 14:20:50:176:925 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-2 14:20:50:177:857 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-2 14:20:50:276:669 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:20:50:284:356 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:20:50:382:396 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:20:50:486:29 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 14:20:50:487:224 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:20:50:489:81 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..68fa91ef --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q1 finished at: 2022-4-2 14:20:50:791:331 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-2 14:20:50:792:636 +Q3-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q3 finished at: 2022-4-2 14:20:50:891:413 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-2 14:20:50:892:62 + Q5-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q5 finished at: 2022-4-2 14:20:50:991:381 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-2 14:20:50:992:619 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 14:20:50:993:701 + Q8-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q8 finished at: 2022-4-2 14:20:51:91:391 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-2 14:20:51:92:26 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 14:20:51:192:462 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-2 14:20:51:299:679 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:20:51:400:736 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 14:20:51:495:498 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:20:51:510:137 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-2 14:20:51:511:515 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-2 14:20:51:516:666 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..f1e5b7db --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:51:844:878 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:51:845:517 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:51:944:889 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:51:945:519 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 14:20:51:946:302 + Q6-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q6 finished at: 2022-4-2 14:20:52:44:921 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-2 14:20:52:45:562 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-2 14:20:52:46:472 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-2 14:20:52:145:426 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:20:52:169:586 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:20:52:255:848 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:20:52:351:481 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-2 14:20:52:352:633 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:20:52:356:411 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..6fa67cf7 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:52:630:75 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-2 14:20:52:630:763 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:52:730:72 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-2 14:20:52:730:738 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 14:20:52:731:538 + Q6-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q6 finished at: 2022-4-2 14:20:52:830:32 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-2 14:20:52:830:576 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-2 14:20:52:831:428 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-2 14:20:52:930:649 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:20:52:938:129 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:20:53:37:937 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:20:53:140:513 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 14:20:53:141:741 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:20:53:145:386 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/rat_sda_dirty_read.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_sda_dirty_read.txt new file mode 100644 index 00000000..b69fd01f --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: myrocks #### +#### test_type: sda_dirty_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:39:870:553 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:39:871:129 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:39:970:597 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:20:39:971:368 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-2 14:20:40:82:700 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:40:175:241 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 14:20:40:176:254 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:20:40:180:55 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/rat_sda_intermediate_read.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..d477662c --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: myrocks #### +#### test_type: sda_intermediate_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:41:182:953 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:41:183:547 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:41:282:749 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:20:41:283:639 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-2 14:20:41:382:894 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:41:487:96 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:20:41:596:510 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 14:20:41:597:493 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:41:606:191 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..6240a96a --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: myrocks #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:41:878:424 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:41:879:58 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:41:978:363 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:20:41:979:210 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:20:41:983:646 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-2 14:20:42:78:559 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:20:42:96:270 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 14:20:42:97:93 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:42:108:789 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/rat_sda_lost_self_update.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..9703d8da --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_self_update #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:43:438:205 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:43:438:753 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:43:538:174 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 14:20:43:638:473 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 14:20:43:643:10 +Q6 finished at: 2022-4-2 14:20:43:651:870 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:20:43:747:259 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:20:43:748:124 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:43:754:979 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..f885e432 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:40:479:857 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:20:40:480:582 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:40:579:896 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 14:20:40:580:514 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 14:20:40:680:228 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:40:790:495 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:20:40:885:713 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:20:40:886:605 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:40:890:255 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..b568bbcf --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:42:429:482 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 14:20:42:430:239 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:42:529:518 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-2 14:20:42:530:191 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:20:42:538:453 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 14:20:42:629:856 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:20:42:635:80 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-2 14:20:42:635:971 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:42:641:27 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..285d9193 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:42:922:322 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 14:20:42:923:280 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:43:22:285 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-2 14:20:43:22:843 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:20:43:41:550 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 14:20:43:122:596 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:20:43:130:455 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-2 14:20:43:131:387 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:43:135:607 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..b0051d3c --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,56 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:57:552:481 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:57:553:83 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:57:652:444 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:57:653:80 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 14:20:57:752:742 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:20:57:757:599 + Q6-T2 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:20:57:763:900 + Q6 finished at: 2022-4-2 14:20:57:767:117 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:20:57:767:959 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:20:57:771:417 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..160adcd2 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,35 @@ +#### db_type: myrocks #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:58:41:341 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:58:41:968 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:58:141:281 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:58:141:908 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:20:58:241:613 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:20:58:349:471 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-2 14:20:58:847:666 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..4c6313a5 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,35 @@ +#### db_type: myrocks #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:59:139:358 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:59:139:954 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:59:239:250 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:20:59:239:900 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:20:59:339:509 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:20:59:446:535 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-2 14:20:59:950:574 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..15b7237e --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: myrocks #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:21:0:224:102 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:21:0:224:660 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:21:0:324:151 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:21:0:324:842 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:21:0:424:304 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:21:0:431:493 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-2 14:21:1:128:326 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..43aa7114 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:21:1:407:134 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:21:1:407:861 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:21:1:507:137 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:21:1:507:926 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:21:1:508:593 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 14:21:1:713:242 +Q7-T1 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:21:1:719:917 +Q7 finished at: 2022-4-2 14:21:1:722:910 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:21:1:723:913 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:21:1:730:969 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..4d7ad86a --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:21:2:21:583 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:21:2:22:299 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:21:2:121:464 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:21:2:122:185 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:21:2:122:657 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 14:21:2:327:308 + Q7 finished at: 2022-4-2 14:21:2:330:848 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:21:2:439:101 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:21:2:440:99 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:21:2:444:119 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..bd4d5231 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:21:2:732:86 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:21:2:732:707 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:21:2:832:40 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:21:2:832:767 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 14:21:2:932:228 +Q7-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:21:2:936:913 +Q7 finished at: 2022-4-2 14:21:2:941:880 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:21:3:46:65 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:21:3:47:60 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:21:3:51:403 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..569aaffd --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:21:3:386:754 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:21:3:387:587 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:21:3:486:795 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:21:3:487:508 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 14:21:3:586:902 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:21:3:793:883 + Q7-T2 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:21:3:797:398 + Q7 finished at: 2022-4-2 14:21:3:801:85 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:21:3:802:152 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:21:3:806:538 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..2c622360 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:21:4:120:32 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:21:4:120:609 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:21:4:220:63 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:21:4:220:743 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 14:21:4:320:266 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:21:4:326:7 + Q6-T2 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:21:4:329:935 + Q6 finished at: 2022-4-2 14:21:4:336:564 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:21:4:337:504 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:21:4:348:437 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..d558f2cd --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_mda_step_wat_c1.txt @@ -0,0 +1,44 @@ +#### db_type: myrocks #### +#### test_type: mda_step_wat_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:21:4:642:77 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:21:4:642:638 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:21:4:742:70 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:21:4:742:686 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q6 finished at: 2022-4-2 14:21:4:842:92 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 14:21:4:842:747 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-2 14:21:4:942:585 + Q11-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:21:5:46:794 + Q11 finished at: 2022-4-2 14:21:5:50:621 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:21:5:152:990 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-2 14:21:5:848:47 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..b000233a --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_mda_step_wat_c2.txt @@ -0,0 +1,44 @@ +#### db_type: myrocks #### +#### test_type: mda_step_wat_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:21:6:160:950 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:21:6:161:544 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:21:6:261:35 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:21:6:261:719 + Q5-T3 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q5 finished at: 2022-4-2 14:21:6:360:721 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 14:21:6:561:0 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-2 14:21:6:661:153 + Q10-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:21:6:767:196 + Q10 finished at: 2022-4-2 14:21:6:770:590 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:21:6:967:930 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-2 14:21:7:565:969 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..ab9f8efc --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:53:436:218 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:53:436:792 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:53:536:194 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; + Q4 finished at: 2022-4-2 14:20:53:636:223 +Q5 finished at: 2022-4-2 14:20:53:640:530 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:53:746:166 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 14:20:53:747:64 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 14:20:53:769:167 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:53:773:381 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..851c0a68 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:54:27:932 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:54:28:574 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:54:127:669 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 14:20:54:241:593 +Q5 finished at: 2022-4-2 14:20:54:246:98 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:20:54:336:52 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 14:20:54:336:926 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 14:20:54:375:27 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:54:382:225 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/wat_sda_full_write.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_sda_full_write.txt new file mode 100644 index 00000000..e5da334d --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_full_write #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:54:652:729 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:54:653:397 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:54:743:309 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-2 14:20:54:843:514 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 14:20:54:847:697 +Q6 finished at: 2022-4-2 14:20:54:851:398 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:20:54:950:932 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 14:20:54:952:70 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:54:957:341 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/wat_sda_full_write_committed.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..84836335 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_full_write_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:55:266:45 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:55:266:743 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:55:365:916 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-2 14:20:55:466:108 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 14:20:55:473:939 + Q5-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:20:55:477:186 + Q5 finished at: 2022-4-2 14:20:55:480:617 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 14:20:55:481:448 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:55:486:5 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..e4b50633 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:57:62:288 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:20:57:62:885 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:57:162:293 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 14:20:57:262:521 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 14:20:57:267:351 + Q5-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:20:57:270:466 + Q5 finished at: 2022-4-2 14:20:57:275:256 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:20:57:276:133 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:57:282:346 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..e787ad43 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_update_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:55:763:858 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 14:20:55:764:589 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:55:863:693 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 14:20:55:864:357 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-2 14:20:56:74:573 +Q6-T1 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:20:56:77:355 +Q6 finished at: 2022-4-2 14:20:56:81:42 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:20:56:81:888 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:56:87:402 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/repeatable-read/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..c931960b --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/repeatable-read/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_update_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' +Q1 finished at: 2022-4-2 14:20:56:372:683 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 14:20:56:373:372 + Q3-T2 execute sql: 'START TRANSACTION WITH CONSISTENT SNAPSHOT;' + Q3 finished at: 2022-4-2 14:20:56:472:499 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 14:20:56:473:270 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-2 14:20:56:677:845 + Q6 finished at: 2022-4-2 14:20:56:683:59 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:20:56:777:823 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:20:56:778:661 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:20:56:785:502 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrocks_si/result_summary/read-committed_total-result.txt b/test_result/centralizend_result/myrocks_si/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..38745346 --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/myrocks_si/result_summary/repeatable-read_total-result.txt b/test_result/centralizend_result/myrocks_si/result_summary/repeatable-read_total-result.txt new file mode 100644 index 00000000..42d5fc7b --- /dev/null +++ b/test_result/centralizend_result/myrocks_si/result_summary/repeatable-read_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/myrockss/read-committed/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/myrockss/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..e8fbc326 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:45:667:873 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:7:45:668:657 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:45:767:860 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:45:768:596 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:7:45:769:47 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:7:45:776:968 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 11:7:45:868:464 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:45:883:773 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:45:884:848 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:45:887:461 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/myrockss/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..355c54c9 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:46:159:215 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:7:46:164:405 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:46:259:47 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:46:259:789 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:7:46:260:284 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:7:46:268:628 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 11:7:46:359:476 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:46:372:344 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:46:373:256 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:46:376:635 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/iat_dda_write_skew.txt b/test_result/centralizend_result/myrockss/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..a0b84a26 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:46:658:393 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:7:46:659:270 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:46:758:429 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:7:46:759:387 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:7:46:759:972 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 11:7:46:858:800 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:7:46:872:476 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:7:46:969:591 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:46:970:599 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:7:46:974:350 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/myrockss/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..75279811 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:48:301:972 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:7:48:302:908 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:48:401:812 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:7:48:402:669 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:7:48:403:235 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:7:48:413:155 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 11:7:48:502:226 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:48:511:523 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:48:512:576 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:48:516:187 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/myrockss/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..d1df63f4 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:47:307:116 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-2 11:7:47:308:109 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-2 11:7:47:308:683 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-2 11:7:47:407:79 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-2 11:7:47:408:71 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-2 11:7:47:408:616 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:7:47:426:713 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:47:516:453 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-2 11:7:47:517:434 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-2 11:7:47:518:93 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:7:47:520:784 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/myrockss/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..6e68d22c --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:47:800:978 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-2 11:7:47:802:12 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:47:900:873 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-2 11:7:47:901:953 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-2 11:7:47:902:593 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:7:47:909:576 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-2 11:7:48:6:722 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:48:14:565 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-2 11:7:48:15:590 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:48:19:603 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/iat_mda_step_iat.txt b/test_result/centralizend_result/myrockss/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..0c371727 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:48:814:308 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 11:7:48:815:275 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:48:914:259 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 11:7:48:915:347 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:7:49:14:211 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 11:7:49:15:316 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-2 11:7:49:114:845 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-2 11:7:49:214:954 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-2 11:7:49:314:931 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 11:7:49:429:215 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 11:7:49:532:259 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:7:49:620:662 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 11:7:49:622:8 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:7:49:632:480 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/myrockss/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..60c15975 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,106 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:53:525:46 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:7:53:526:144 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:53:624:918 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 11:7:53:625:660 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:7:53:633:29 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 11:7:53:725:36 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 11:7:53:726:72 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-2 11:7:53:726:631 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:53:734:756 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2022-4-2 11:7:53:825:823 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-2 11:7:53:832:384 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-2 11:7:53:833:417 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 11:7:53:839:190 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/myrockss/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..a10c161a --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,207 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:52:744:245 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:7:52:745:517 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:52:844:225 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:7:52:845:727 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:7:52:944:226 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-2 11:7:52:944:912 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:7:52:952:191 + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 11:7:53:44:261 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-2 11:7:53:45:26 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:53:67:566 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-4-2 11:7:53:145:251 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:7:53:149:891 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-2 11:7:53:245:462 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-2 11:7:53:249:845 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-2 11:7:53:251:377 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-2 11:7:53:255:157 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/myrockss/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..b625e729 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:49:934:996 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-2 11:7:49:935:966 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:50:34:961 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 11:7:50:35:960 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:7:50:135:56 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 11:7:50:135:995 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-2 11:7:50:235:504 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-2 11:7:50:335:506 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-2 11:7:50:435:486 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 11:7:50:541:708 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 11:7:50:645:797 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:7:50:741:270 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-2 11:7:50:742:297 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:7:50:746:29 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/myrockss/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..23051cbb --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:51:33:34 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 11:7:51:34:384 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:51:133:25 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-2 11:7:51:133:995 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:7:51:233:61 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-2 11:7:51:234:86 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-2 11:7:51:333:418 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-2 11:7:51:433:488 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-2 11:7:51:533:548 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 11:7:51:642:160 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 11:7:51:742:146 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:7:51:842:1 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 11:7:51:843:185 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:7:51:851:662 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/myrockss/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..3ff1a41c --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:54:121:269 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 11:7:54:122:288 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-2 11:7:54:123:46 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-2 11:7:54:221:402 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-2 11:7:54:222:735 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-2 11:7:54:223:317 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:7:54:232:711 + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 11:7:54:321:312 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-2 11:7:54:322:534 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 11:7:54:323:282 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 11:7:54:325:2 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-2 11:7:54:421:732 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-2 11:7:54:431:442 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-2 11:7:54:432:525 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-2 11:7:54:436:134 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/myrockss/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..1400ebd2 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,162 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:52:129:607 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-2 11:7:52:130:821 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:52:229:617 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-2 11:7:52:230:708 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:7:52:231:273 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 11:7:52:232:98 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-2 11:7:52:232:584 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:7:52:249:930 + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2022-4-2 11:7:52:329:560 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-2 11:7:52:330:601 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-2 11:7:52:331:178 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-2 11:7:52:332:31 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-2 11:7:52:332:584 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:7:52:341:676 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2022-4-2 11:7:52:430:230 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-2 11:7:52:437:278 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-2 11:7:52:438:369 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-2 11:7:52:441:968 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/myrockss/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..6604794e --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:45:154:326 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 11:7:45:155:141 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:45:254:272 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 11:7:45:255:74 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:7:45:263:465 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-2 11:7:45:354:697 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:7:45:366:835 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:7:45:367:749 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:45:379:53 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/myrockss/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..ebe42747 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,60 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:44:669:577 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:7:44:670:384 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:44:769:445 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 11:7:44:770:313 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:7:44:795:429 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 11:7:44:870:397 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:7:44:872:132 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:7:44:872:973 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:44:877:415 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:44:882:902 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/myrockss/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..2f4c53b6 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,56 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:22:402:987 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:22:403:668 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:22:503:12 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:22:503:690 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:7:22:504:319 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 11:7:22:712:271 + Q7 finished at: 2022-4-2 11:7:22:715:971 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:22:810:744 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-2 11:7:22:811:764 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:22:820:723 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/myrockss/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..ef074195 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,56 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:23:109:480 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:23:110:167 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:23:209:509 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:23:210:299 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:7:23:211:93 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:7:23:220:734 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-2 11:7:23:310:0 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:23:318:373 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-2 11:7:23:319:252 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:23:322:901 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-committed/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/myrockss/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..f46afd56 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,56 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:23:613:655 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:23:614:349 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:23:713:593 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:23:714:358 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 11:7:23:814:151 +Q7-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:7:23:822:459 +Q7 finished at: 2022-4-2 11:7:23:827:157 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:7:23:923:547 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:23:924:551 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:23:928:212 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-committed/rat_dda_read_skew.txt b/test_result/centralizend_result/myrockss/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..aeb94d77 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:24:213:33 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:7:24:213:896 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:24:313:27 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:24:313:777 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:7:24:314:223 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 11:7:24:413:643 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:7:24:521:928 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:24:615:67 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:24:615:979 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:24:624:429 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-committed/rat_dda_read_skew2.txt b/test_result/centralizend_result/myrockss/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..a9895205 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:25:872:295 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:25:873:17 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:25:972:222 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:7:25:973:3 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:7:25:973:561 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 11:7:26:72:729 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:7:26:82:449 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:7:26:174:424 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:26:175:412 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:26:179:372 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-committed/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/myrockss/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..c20b2ec9 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:26:448:472 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:26:449:173 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:26:548:528 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:7:26:549:518 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:7:26:550:122 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:7:26:554:986 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 11:7:26:648:994 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:26:666:828 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:26:667:889 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:26:672:35 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/myrockss/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..e6b64bfb --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:24:896:675 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 11:7:24:897:449 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:24:996:679 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:24:997:371 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:7:24:997:847 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:7:25:8:316 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 11:7:25:97:298 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:25:102:261 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-2 11:7:25:103:214 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:25:106:717 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/myrockss/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..08134f2a --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,59 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:25:404:164 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 11:7:25:405:179 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:25:504:69 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-2 11:7:25:504:758 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-2 11:7:25:505:182 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:7:25:513:120 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 11:7:25:604:805 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:25:608:533 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-2 11:7:25:609:422 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:25:612:505 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/rat_dda_write_read_skew.txt b/test_result/centralizend_result/myrockss/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..5f5c3578 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:21:155:645 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:21:156:385 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:21:255:704 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:21:256:554 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:7:21:257:300 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 11:7:21:356:297 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:7:21:463:484 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:21:567:990 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:21:568:981 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:21:573:799 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/myrockss/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..f67e3542 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: myrocks #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:21:864:298 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:21:865:56 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:21:964:288 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:21:965:20 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:7:21:965:694 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:7:21:975:363 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 11:7:22:64:928 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:22:75:211 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:22:76:256 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:22:84:86 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-committed/rat_mda_step_rat.txt b/test_result/centralizend_result/myrockss/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..a29ae0dc --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:26:936:259 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:26:937:3 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:27:36:234 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:27:36:920 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:7:27:37:752 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 11:7:27:136:438 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-2 11:7:27:137:66 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-2 11:7:27:137:862 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-2 11:7:27:237:72 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 11:7:27:244:376 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 11:7:27:342:508 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:7:27:445:457 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 11:7:27:446:803 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:7:27:448:390 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/myrockss/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..de25b62c --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2022-4-2 11:7:27:719:37 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-2 11:7:27:720:309 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2022-4-2 11:7:27:818:792 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-2 11:7:27:819:503 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:7:27:918:839 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-2 11:7:27:920:345 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 11:7:27:921:406 + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 11:7:28:18:814 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-2 11:7:28:19:535 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 11:7:28:119:918 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-2 11:7:28:225:722 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:7:28:327:751 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 11:7:28:427:786 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:7:28:433:18 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-2 11:7:28:434:206 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-2 11:7:28:438:962 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/myrockss/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..1ccc0827 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:28:715:490 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:28:716:136 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:28:815:474 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:28:816:193 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 11:7:28:817:105 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 11:7:28:915:516 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-2 11:7:28:916:248 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-2 11:7:28:917:67 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-2 11:7:29:16:352 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 11:7:29:25:737 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 11:7:29:127:632 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:7:29:221:99 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-2 11:7:29:222:132 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:7:29:225:779 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/myrockss/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..fb4bf0ab --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:29:487:453 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-2 11:7:29:488:379 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:29:587:416 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-2 11:7:29:588:120 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 11:7:29:588:987 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 11:7:29:687:455 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-2 11:7:29:688:276 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-2 11:7:29:689:190 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-2 11:7:29:788:218 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 11:7:29:802:636 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 11:7:29:894:963 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:7:30:10:868 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 11:7:30:12:152 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:7:30:16:128 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/rat_sda_dirty_read.txt b/test_result/centralizend_result/myrockss/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..c48013b3 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: myrocks #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:17:29:235 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:17:29:836 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:17:129:220 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 11:7:17:130:294 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-2 11:7:17:237:594 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:7:17:331:633 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 11:7:17:332:557 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:7:17:336:724 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-committed/rat_sda_intermediate_read.txt b/test_result/centralizend_result/myrockss/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..3240909e --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: myrocks #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:18:354:249 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:18:354:944 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:18:454:219 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 11:7:18:455:106 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-2 11:7:18:554:728 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:7:18:657:638 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:7:18:761:428 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 11:7:18:762:346 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:18:765:786 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/myrockss/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..736ac698 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: myrocks #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:19:59:752 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:19:60:456 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:19:159:770 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 11:7:19:160:705 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:7:19:169:76 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-2 11:7:19:260:237 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:7:19:269:165 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 11:7:19:270:179 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:19:281:487 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-committed/rat_sda_lost_self_update.txt b/test_result/centralizend_result/myrockss/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..dcb63958 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:20:569:511 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:20:570:218 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:20:669:462 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 11:7:20:770:136 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 11:7:20:774:616 +Q6 finished at: 2022-4-2 11:7:20:777:383 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:7:20:874:189 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:7:20:875:163 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:20:879:355 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-committed/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/myrockss/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..83e8b89f --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:17:642:676 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:7:17:643:482 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:17:742:662 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 11:7:17:743:381 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 11:7:17:843:264 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:7:17:953:11 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:7:18:50:110 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:7:18:51:99 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:18:55:276 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/myrockss/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..072b9ab9 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,58 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:19:580:770 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 11:7:19:581:636 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:19:680:801 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-2 11:7:19:681:579 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:7:19:691:510 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 11:7:19:781:451 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:7:19:788:167 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-2 11:7:19:788:936 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:19:792:765 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/myrockss/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..7f1cd9de --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,57 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:20:73:189 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 11:7:20:74:352 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:20:173:131 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-2 11:7:20:173:839 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:7:20:186:668 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 11:7:20:273:859 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:7:20:279:493 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-2 11:7:20:280:430 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:20:285:29 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/myrockss/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..76e8b886 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,56 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:34:418:979 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:34:419:704 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:34:518:987 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:34:519:846 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 11:7:34:619:513 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:7:34:623:649 + Q6-T2 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:34:626:247 + Q6 finished at: 2022-4-2 11:7:34:630:893 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:34:631:799 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:34:635:248 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/myrockss/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..6a65778b --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,35 @@ +#### db_type: myrocks #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:34:916:751 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:34:917:424 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:35:16:886 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:35:17:703 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:7:35:117:298 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:7:35:231:856 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-2 11:7:35:723:84 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/myrockss/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..3ab33fd3 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,35 @@ +#### db_type: myrocks #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:35:988:620 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:35:989:376 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:36:88:759 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:36:89:508 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:7:36:189:179 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:7:36:295:319 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-2 11:7:36:794:551 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/myrockss/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..6ed216f2 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: myrocks #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:37:83:309 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:37:84:81 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:37:183:235 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:37:184:59 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:7:37:283:743 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:7:37:295:941 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-2 11:7:37:990:367 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/myrockss/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..1bd4f4ec --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:38:291:674 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:7:38:292:571 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:38:391:570 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:38:392:446 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:7:38:393:33 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 11:7:38:596:578 +Q7-T1 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:7:38:599:932 +Q7 finished at: 2022-4-2 11:7:38:603:150 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:38:604:85 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:38:610:875 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/myrockss/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..ea77f378 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:38:907:604 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:7:38:908:429 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:39:7:582 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:39:8:445 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:7:39:9:128 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 11:7:39:217:933 + Q7 finished at: 2022-4-2 11:7:39:222:591 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:39:318:243 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:39:319:200 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:39:328:360 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/myrockss/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..c728341f --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:39:634:274 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:39:634:937 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:39:734:231 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:7:39:735:58 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 11:7:39:834:688 +Q7-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:7:39:840:682 +Q7 finished at: 2022-4-2 11:7:39:846:702 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:7:39:943:813 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:39:944:963 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:39:948:415 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/myrockss/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..3617e4bf --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:40:251:40 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:40:251:895 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:40:351:66 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:7:40:352:182 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 11:7:40:451:589 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:7:40:654:974 + Q7-T2 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:40:658:170 + Q7 finished at: 2022-4-2 11:7:40:661:719 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:40:662:581 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:40:667:251 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/myrockss/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..d9016710 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:40:944:376 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:40:945:252 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:41:44:308 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:7:41:45:214 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 11:7:41:147:748 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:7:41:154:695 + Q6-T2 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:41:164:17 + Q6 finished at: 2022-4-2 11:7:41:170:335 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:41:171:231 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:41:176:589 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/myrockss/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..ab5022a9 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,44 @@ +#### db_type: myrocks #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:41:451:86 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:41:451:933 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:41:551:128 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:41:551:971 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 11:7:41:651:143 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 11:7:41:651:956 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-2 11:7:41:751:771 + Q11-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:7:41:856:395 + Q11 finished at: 2022-4-2 11:7:41:859:707 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:7:41:963:206 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-2 11:7:42:656:543 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/read-committed/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/myrockss/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..dd610223 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,44 @@ +#### db_type: myrocks #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:42:959:628 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:42:960:428 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:43:59:666 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:43:60:494 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:7:43:159:640 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 11:7:43:360:149 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-2 11:7:43:460:346 + Q10-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:7:43:564:191 + Q10 finished at: 2022-4-2 11:7:43:570:282 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:7:43:768:4 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-2 11:7:44:365:598 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/myrockss/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..9f5a046f --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:30:320:901 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:30:321:669 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:30:420:819 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; + Q4 finished at: 2022-4-2 11:7:30:521:387 +Q5 finished at: 2022-4-2 11:7:30:525:168 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:7:30:629:603 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 11:7:30:630:545 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 11:7:30:649:408 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:30:653:942 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/myrockss/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..af9a5b88 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:30:909:503 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:30:910:226 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:31:9:508 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 11:7:31:117:584 +Q5 finished at: 2022-4-2 11:7:31:121:45 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:7:31:216:751 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 11:7:31:217:599 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 11:7:31:239:388 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:31:242:994 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-committed/wat_sda_full_write.txt b/test_result/centralizend_result/myrockss/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..91124df4 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:31:494:449 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:31:495:124 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:31:594:410 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-2 11:7:31:694:847 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 11:7:31:706:865 +Q6 finished at: 2022-4-2 11:7:31:711:116 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:7:31:802:529 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 11:7:31:803:444 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:31:810:91 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-committed/wat_sda_full_write_committed.txt b/test_result/centralizend_result/myrockss/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..fd4601b6 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:32:81:535 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:32:82:277 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:32:181:526 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-2 11:7:32:281:960 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 11:7:32:286:702 + Q5-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:7:32:289:779 + Q5 finished at: 2022-4-2 11:7:32:292:819 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 11:7:32:293:741 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:32:297:737 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/myrockss/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..c4f64f58 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:33:875:295 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:33:875:977 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:33:975:246 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 11:7:34:75:943 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 11:7:34:82:320 + Q5-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:7:34:85:688 + Q5 finished at: 2022-4-2 11:7:34:95:316 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:7:34:96:230 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:34:99:899 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-committed/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/myrockss/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..15dd4c81 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:32:575:78 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 11:7:32:575:957 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:32:675:28 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 11:7:32:675:839 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-2 11:7:32:880:176 +Q6-T1 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:7:32:884:55 +Q6 finished at: 2022-4-2 11:7:32:890:368 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:7:32:891:397 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:32:895:861 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-committed/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/myrockss/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..0f263338 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:33:162:956 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 11:7:33:163:790 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:33:262:846 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 11:7:33:263:585 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-2 11:7:33:466:797 + Q6 finished at: 2022-4-2 11:7:33:470:652 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:7:33:568:518 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:7:33:569:488 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:33:573:294 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/myrockss/read-uncommitted/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..854be0aa --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/iat_dda_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:7:864:299 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:7:7:865:240 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:7:964:227 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:7:965:8 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:7:7:965:527 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:7:8:8:328 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 11:7:8:64:885 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:8:71:195 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:8:72:66 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:8:73:895 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/myrockss/read-uncommitted/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..e2294f00 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:8:361:730 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:7:8:362:739 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:8:461:632 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:8:462:502 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:7:8:463:58 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:7:8:472:126 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 11:7:8:561:986 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:8:574:438 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:8:575:337 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:8:579:53 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/iat_dda_write_skew.txt b/test_result/centralizend_result/myrockss/read-uncommitted/iat_dda_write_skew.txt new file mode 100644 index 00000000..bd9ec014 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:8:886:103 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:7:8:886:984 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:8:985:949 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:7:8:986:763 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:7:8:987:226 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 11:7:9:86:500 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:7:9:95:547 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:7:9:194:412 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:9:195:366 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:7:9:199:439 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/myrockss/read-uncommitted/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..34a00465 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:10:528:27 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:7:10:528:850 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:10:628:14 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:7:10:628:868 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:7:10:629:466 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:7:10:641:499 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 11:7:10:728:466 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:10:739:981 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:10:740:941 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:10:751:813 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/myrockss/read-uncommitted/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..163e995e --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,74 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:9:513:489 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-2 11:7:9:514:351 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-2 11:7:9:514:798 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-2 11:7:9:613:390 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + (2) expected_result: + (300,) + + Q5 finished at: 2022-4-2 11:7:9:614:281 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-2 11:7:9:614:769 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:7:9:623:295 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:9:723:921 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-2 11:7:9:724:895 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-2 11:7:9:725:464 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:7:9:726:953 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/myrockss/read-uncommitted/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..22551446 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:10:15:920 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-2 11:7:10:16:958 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:10:109:60 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-2 11:7:10:110:253 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-2 11:7:10:111:163 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:7:10:120:515 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-2 11:7:10:209:740 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:10:222:583 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-2 11:7:10:223:536 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:10:230:144 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/iat_mda_step_iat.txt b/test_result/centralizend_result/myrockss/read-uncommitted/iat_mda_step_iat.txt new file mode 100644 index 00000000..86b41b13 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:11:49:131 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 11:7:11:50:92 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:11:149:146 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 11:7:11:150:181 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:7:11:249:131 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 11:7:11:250:190 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-2 11:7:11:349:579 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-2 11:7:11:449:540 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-2 11:7:11:549:678 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 11:7:11:661:189 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 11:7:11:760:870 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:7:11:854:831 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 11:7:11:855:924 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:7:11:859:356 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/myrockss/read-uncommitted/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..8fdf032d --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,106 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:15:757:776 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:7:15:758:823 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:15:857:499 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 11:7:15:858:416 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:7:15:866:635 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 11:7:15:957:532 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 11:7:15:958:552 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-2 11:7:15:959:153 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:15:968:412 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2022-4-2 11:7:16:58:256 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-2 11:7:16:68:957 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-2 11:7:16:70:181 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 11:7:16:80:987 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/myrockss/read-uncommitted/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..b32f1af8 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,207 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:14:947:18 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:7:14:948:194 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:15:47:13 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:7:15:48:458 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:7:15:147:27 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-2 11:7:15:147:812 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:7:15:175:627 + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 11:7:15:247:29 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-2 11:7:15:247:837 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:15:255:866 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-4-2 11:7:15:348:141 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:7:15:350:112 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-2 11:7:15:448:180 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-2 11:7:15:452:268 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-2 11:7:15:453:750 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-2 11:7:15:457:306 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/myrockss/read-uncommitted/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..a1839cb9 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:12:143:893 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-2 11:7:12:144:910 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:12:243:880 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 11:7:12:244:937 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:7:12:343:875 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 11:7:12:344:905 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-2 11:7:12:444:351 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-2 11:7:12:544:274 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-2 11:7:12:644:334 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 11:7:12:757:431 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 11:7:12:853:933 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:7:12:951:101 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-2 11:7:12:952:226 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:7:12:956:66 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/myrockss/read-uncommitted/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..b4e4aa45 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:13:225:343 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 11:7:13:226:599 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:13:325:290 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-2 11:7:13:326:355 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:7:13:425:327 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-2 11:7:13:426:473 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-2 11:7:13:525:646 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-2 11:7:13:625:683 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-2 11:7:13:725:691 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 11:7:13:840:705 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 11:7:13:933:242 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:7:14:34:934 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 11:7:14:36:96 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:7:14:39:576 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/myrockss/read-uncommitted/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..c01a7172 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:16:374:985 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 11:7:16:376:80 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-2 11:7:16:376:835 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-2 11:7:16:488:201 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-2 11:7:16:489:151 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-2 11:7:16:489:647 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:7:16:506:570 + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 11:7:16:596:180 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-2 11:7:16:597:220 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 11:7:16:597:944 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 11:7:16:599:950 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-2 11:7:16:675:406 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-2 11:7:16:689:30 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-2 11:7:16:690:99 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-2 11:7:16:694:109 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/myrockss/read-uncommitted/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..3a674bda --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,162 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:14:332:843 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-2 11:7:14:333:861 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:14:432:832 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-2 11:7:14:434:5 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:7:14:434:638 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 11:7:14:435:568 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-2 11:7:14:436:31 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:7:14:447:700 + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2022-4-2 11:7:14:532:845 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-2 11:7:14:533:861 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-2 11:7:14:534:345 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-2 11:7:14:535:41 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-2 11:7:14:535:515 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:7:14:543:627 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2022-4-2 11:7:14:633:570 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-2 11:7:14:649:210 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-2 11:7:14:650:431 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-2 11:7:14:657:90 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/myrockss/read-uncommitted/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..02a461b2 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:7:342:513 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 11:7:7:343:368 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:7:442:527 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 11:7:7:443:377 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:7:7:464:612 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-2 11:7:7:543:7 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:7:7:558:311 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:7:7:559:374 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:7:563:837 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/myrockss/read-uncommitted/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..68a31d3c --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,60 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:6:781:947 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:7:6:782:830 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:6:881:847 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 11:7:6:882:576 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:7:6:897:644 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 11:7:6:982:601 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:7:6:985:89 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:7:6:986:60 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:6:991:354 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:6:996:156 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..b6b91463 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_double_write_skew1.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:44:111:881 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:6:44:112:595 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:44:211:883 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:6:44:212:622 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:6:44:213:221 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 11:6:44:415:841 + Q7 finished at: 2022-4-2 11:6:44:419:23 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:6:44:517:507 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-2 11:6:44:518:651 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:6:44:522:575 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..3db0145a --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:44:813:948 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:6:44:814:705 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:44:913:852 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:6:44:914:595 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:6:44:915:293 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:6:44:927:639 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-2 11:6:45:14:402 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:6:45:23:653 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-2 11:6:45:24:564 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:6:45:29:59 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..b4db5bc9 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_double_write_skew2.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:45:360:876 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:6:45:361:638 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:45:460:874 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:6:45:461:679 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 11:6:45:561:457 +Q7-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:6:45:585:200 +Q7 finished at: 2022-4-2 11:6:45:591:983 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:6:45:667:901 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:6:45:668:778 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:6:45:672:659 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_read_skew.txt b/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_read_skew.txt new file mode 100644 index 00000000..8b9ad8a9 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:45:976:382 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:6:45:977:241 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:46:76:299 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:6:46:77:78 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:6:46:77:570 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 11:6:46:176:975 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:6:46:285:709 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:6:46:378:160 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:6:46:379:229 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:6:46:383:464 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_read_skew2.txt b/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_read_skew2.txt new file mode 100644 index 00000000..f6c64bb3 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_read_skew2.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:47:680:890 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:6:47:681:754 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:47:780:851 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:6:47:781:740 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:6:47:782:398 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 11:6:47:881:397 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:6:47:890:477 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:6:47:985:974 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:6:47:986:965 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:6:47:992:365 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..6efd92e7 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_read_skew2_committed.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:48:288:685 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:6:48:289:453 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:48:388:655 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:6:48:389:496 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:6:48:390:150 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:6:48:393:938 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 11:6:48:489:194 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:6:48:498:972 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:6:48:499:906 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:6:48:503:168 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..0d0e9e92 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:46:698:199 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 11:6:46:699:135 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:46:798:223 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:6:46:798:930 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:6:46:799:446 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:6:46:809:696 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 11:6:46:898:810 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:6:46:902:944 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-2 11:6:46:903:725 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:6:46:907:625 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..550ea609 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,59 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:47:203:401 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 11:6:47:204:389 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:47:303:353 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-2 11:6:47:304:49 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-2 11:6:47:304:536 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:6:47:312:368 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 11:6:47:403:975 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:6:47:408:219 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-2 11:6:47:409:189 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:6:47:413:65 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_write_read_skew.txt b/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..d111d122 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_write_read_skew #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:42:904:178 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:6:42:904:895 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:43:4:374 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:6:43:5:431 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:6:43:6:174 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 11:6:43:104:877 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:6:43:211:113 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:6:43:317:822 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:6:43:318:823 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:6:43:322:868 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..b9e3b4e1 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:43:611:538 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:6:43:612:270 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:43:711:539 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:6:43:712:636 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:6:43:713:192 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:6:43:721:280 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 11:6:43:812:121 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:6:43:820:283 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:6:43:821:199 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:6:43:824:769 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/rat_mda_step_rat.txt b/test_result/centralizend_result/myrockss/read-uncommitted/rat_mda_step_rat.txt new file mode 100644 index 00000000..4dd84f5b --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:48:761:99 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:6:48:761:824 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:48:861:66 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:6:48:861:829 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + (3) expected_result: + (0,0) + (4) expected_result: + (0,0) + *(5) expected_result: + (0,1) + (6) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:6:48:862:666 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 11:6:48:961:403 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-2 11:6:48:962:82 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + *(1) expected_result: + (1,1) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q8 finished at: 2022-4-2 11:6:48:962:900 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + *(4) expected_result: + (2,1) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q9 finished at: 2022-4-2 11:6:49:61:960 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 11:6:49:87:748 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 11:6:49:168:306 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:6:49:274:493 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 11:6:49:275:776 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:6:49:277:591 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/myrockss/read-uncommitted/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..d6bb57f6 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,207 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2022-4-2 11:6:49:582:181 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-2 11:6:49:583:532 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2022-4-2 11:6:49:682:71 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-2 11:6:49:682:929 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:6:49:782:38 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-2 11:6:49:783:629 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + *(5) expected_result: + (0,1) + (6) expected_result: + (0,0) + *(7) expected_result: + (0,1) + *(8) expected_result: + (0,1) + *(9) expected_result: + (0,1) + (10) expected_result: + (0,0) + (11) expected_result: + (0,0) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + (14) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 11:6:49:784:954 + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 11:6:49:882:137 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-2 11:6:49:882:862 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + (3) expected_result: + (1,0) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + *(6) expected_result: + (1,1) + (7) expected_result: + (1,0) + *(8) expected_result: + (1,1) + *(9) expected_result: + (1,1) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + (12) expected_result: + (1,0) + (13) expected_result: + (1,0) + (14) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 11:6:49:983:183 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-2 11:6:50:92:437 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:6:50:193:820 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 11:6:50:286:440 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:6:50:291:537 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-2 11:6:50:292:762 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-2 11:6:50:296:633 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/myrockss/read-uncommitted/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..41e9b4aa --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:50:576:630 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:6:50:577:327 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:50:676:633 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:6:50:677:353 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 11:6:50:678:133 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 11:6:50:776:649 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-2 11:6:50:777:393 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + *(1) expected_result: + (,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q8 finished at: 2022-4-2 11:6:50:778:188 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + (3) expected_result: + (1,) + *(4) expected_result: + (,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-2 11:6:50:877:635 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 11:6:50:888:165 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 11:6:50:989:97 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:6:51:87:480 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-2 11:6:51:88:578 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:6:51:94:508 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/myrockss/read-uncommitted/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..971b8e35 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:51:406:105 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-2 11:6:51:406:978 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:51:505:975 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-2 11:6:51:506:637 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 11:6:51:507:664 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 11:6:51:606:31 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-2 11:6:51:606:662 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + (4) expected_result: + (,) + *(5) expected_result: + (1,) + (6) expected_result: + (,) + + Q8 finished at: 2022-4-2 11:6:51:607:504 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-2 11:6:51:706:907 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 11:6:51:714:953 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 11:6:51:821:716 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:6:51:934:908 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 11:6:51:936:57 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:6:51:942:36 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/rat_sda_dirty_read.txt b/test_result/centralizend_result/myrockss/read-uncommitted/rat_sda_dirty_read.txt new file mode 100644 index 00000000..77bf0090 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/rat_sda_dirty_read.txt @@ -0,0 +1,45 @@ +#### db_type: myrocks #### +#### test_type: sda_dirty_read #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:38:642:614 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:6:38:643:217 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:38:742:658 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 11:6:38:743:637 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-2 11:6:38:850:102 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:6:38:944:122 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 11:6:38:945:77 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:6:38:953:392 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/rat_sda_intermediate_read.txt b/test_result/centralizend_result/myrockss/read-uncommitted/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..c5ff27d2 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/rat_sda_intermediate_read.txt @@ -0,0 +1,51 @@ +#### db_type: myrocks #### +#### test_type: sda_intermediate_read #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:40:47:38 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:6:40:47:727 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:40:147:13 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 11:6:40:147:926 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-2 11:6:40:247:645 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:6:40:353:55 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:6:40:457:521 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 11:6:40:458:467 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:6:40:474:141 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/myrockss/read-uncommitted/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..8be05dea --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,51 @@ +#### db_type: myrocks #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:40:784:975 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:6:40:785:644 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:40:884:874 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 11:6:40:885:681 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:6:40:892:24 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-2 11:6:40:985:478 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:6:40:990:503 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 11:6:40:991:355 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:6:40:994:684 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/rat_sda_lost_self_update.txt b/test_result/centralizend_result/myrockss/read-uncommitted/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..666fd609 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_self_update #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:42:303:573 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:6:42:304:282 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:42:403:559 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 11:6:42:504:176 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 11:6:42:514:564 +Q6 finished at: 2022-4-2 11:6:42:518:117 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:6:42:611:236 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:6:42:612:124 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:6:42:616:388 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/myrockss/read-uncommitted/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..21a785fe --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/rat_sda_non_repeatable_read.txt @@ -0,0 +1,58 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:39:288:802 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:6:39:289:676 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:39:388:756 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 11:6:39:389:486 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 11:6:39:489:344 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:6:39:600:730 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:6:39:703:661 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:6:39:704:573 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:6:39:714:814 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/myrockss/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..3b691c75 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,58 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:41:305:628 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 11:6:41:306:419 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:41:405:514 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-2 11:6:41:406:250 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:6:41:415:95 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 11:6:41:506:107 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:6:41:510:37 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-2 11:6:41:510:851 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:6:41:514:997 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/myrockss/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..55bf3710 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,57 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:41:785:724 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 11:6:41:786:651 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:41:885:726 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-2 11:6:41:886:397 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:6:41:896:626 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 11:6:41:986:284 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:6:41:991:30 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-2 11:6:41:991:748 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:6:41:996:220 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..134598bd --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:56:435:566 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:6:56:436:272 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:56:535:569 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:6:56:536:287 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 11:6:56:636:142 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:6:56:639:945 + Q6-T2 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:6:56:644:289 + Q6 finished at: 2022-4-2 11:6:56:647:996 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:6:56:649:26 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:6:56:653:198 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..8430b280 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,35 @@ +#### db_type: myrocks #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:56:941:270 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:6:56:942:62 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:57:41:343 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:6:57:42:179 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:6:57:141:750 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:6:57:248:229 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-2 11:6:57:752:966 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..ff34857c --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,35 @@ +#### db_type: myrocks #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:58:35:180 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:6:58:35:904 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:58:135:168 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:6:58:135:878 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:6:58:235:729 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:6:58:342:781 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-2 11:6:58:840:372 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..f36d80c6 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: myrocks #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:59:122:192 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:6:59:122:917 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:59:222:178 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:6:59:223:25 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:6:59:322:766 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:6:59:332:418 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-2 11:7:0:29:211 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..47f01067 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:0:338:484 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:7:0:339:283 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:0:438:502 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:0:439:231 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:7:0:439:730 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 11:7:0:645:185 +Q7-T1 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:7:0:649:265 +Q7 finished at: 2022-4-2 11:7:0:653:661 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:0:654:674 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:0:658:385 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..790ea3af --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:0:937:716 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:7:0:938:511 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:1:37:757 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:1:38:558 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:7:1:39:1 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 11:7:1:242:962 + Q7 finished at: 2022-4-2 11:7:1:246:31 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:1:346:986 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:1:347:972 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:1:352:740 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..bfaa4189 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:1:659:903 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:1:660:575 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:1:759:930 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:7:1:760:835 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 11:7:1:862:482 +Q7-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:7:1:875:929 +Q7 finished at: 2022-4-2 11:7:1:882:111 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:7:1:969:540 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:1:970:584 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:1:976:834 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..d03b514a --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:2:316:777 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:2:317:489 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:2:416:794 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:7:2:417:842 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 11:7:2:517:142 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:7:2:726:2 + Q7-T2 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:2:730:926 + Q7 finished at: 2022-4-2 11:7:2:746:22 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:2:746:999 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:2:757:586 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..2bae8673 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:3:34:87 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:3:34:820 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:3:134:139 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:7:3:135:78 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 11:7:3:234:651 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:7:3:249:238 + Q6-T2 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:3:258:511 + Q6 finished at: 2022-4-2 11:7:3:272:783 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:3:273:696 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:3:284:229 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/myrockss/read-uncommitted/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..ea91f3ba --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/wat_mda_step_wat_c1.txt @@ -0,0 +1,44 @@ +#### db_type: myrocks #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:3:605:341 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:3:606:70 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:3:705:355 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:3:706:130 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 11:7:3:805:393 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 11:7:3:806:180 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-2 11:7:3:906:14 + Q11-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:7:4:9:947 + Q11 finished at: 2022-4-2 11:7:4:13:179 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:7:4:117:98 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-2 11:7:4:812:768 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/myrockss/read-uncommitted/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..649ae5d0 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/wat_mda_step_wat_c2.txt @@ -0,0 +1,44 @@ +#### db_type: myrocks #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:5:90:470 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:5:91:122 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:5:190:593 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:5:191:426 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:7:5:290:443 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 11:7:5:490:951 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-2 11:7:5:591:81 + Q10-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:7:5:697:777 + Q10 finished at: 2022-4-2 11:7:5:701:539 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:7:5:903:269 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-2 11:7:6:495:23 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/myrockss/read-uncommitted/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..ed1e38a0 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:52:235:675 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:6:52:236:413 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:52:335:668 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; + Q4 finished at: 2022-4-2 11:6:52:436:26 +Q5 finished at: 2022-4-2 11:6:52:439:932 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:6:52:552:497 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 11:6:52:553:486 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 11:6:52:574:844 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:6:52:584:32 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/myrockss/read-uncommitted/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..df2a0f2c --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:52:884:520 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:6:52:885:253 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:52:984:484 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 11:6:53:89:339 +Q5 finished at: 2022-4-2 11:6:53:99:767 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:6:53:197:979 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 11:6:53:198:923 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 11:6:53:231:174 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:6:53:238:543 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/wat_sda_full_write.txt b/test_result/centralizend_result/myrockss/read-uncommitted/wat_sda_full_write.txt new file mode 100644 index 00000000..89c0df77 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_full_write #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:53:505:379 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:6:53:506:95 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:53:605:361 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-2 11:6:53:705:765 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 11:6:53:717:820 +Q6 finished at: 2022-4-2 11:6:53:723:651 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:6:53:812:585 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 11:6:53:813:509 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:6:53:817:1 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/wat_sda_full_write_committed.txt b/test_result/centralizend_result/myrockss/read-uncommitted/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..539563d6 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_full_write_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:54:94:0 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:6:54:94:722 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:54:194:31 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-2 11:6:54:294:558 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 11:6:54:299:695 + Q5-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:6:54:304:13 + Q5 finished at: 2022-4-2 11:6:54:309:7 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 11:6:54:309:857 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:6:54:314:512 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/myrockss/read-uncommitted/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..fc044d0a --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:55:876:191 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:6:55:876:905 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:55:976:167 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 11:6:56:76:775 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 11:6:56:81:598 + Q5-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:6:56:84:479 + Q5 finished at: 2022-4-2 11:6:56:87:975 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:6:56:88:779 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:6:56:94:707 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/myrockss/read-uncommitted/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..39a63d59 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:54:579:769 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 11:6:54:580:599 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:54:679:702 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 11:6:54:680:467 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-2 11:6:54:884:880 +Q6-T1 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:6:54:888:77 +Q6 finished at: 2022-4-2 11:6:54:891:220 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:6:54:892:233 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:6:54:896:414 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/read-uncommitted/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/myrockss/read-uncommitted/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..f0a2a2a7 --- /dev/null +++ b/test_result/centralizend_result/myrockss/read-uncommitted/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:6:55:174:509 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 11:6:55:175:331 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:6:55:274:451 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 11:6:55:275:226 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-2 11:6:55:479:203 + Q6 finished at: 2022-4-2 11:6:55:489:484 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:6:55:588:52 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:6:55:589:203 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:6:55:595:188 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/myrockss/repeatable-read/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..baf23007 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/iat_dda_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:23:687:664 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:8:23:688:476 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:23:787:651 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:23:788:537 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:8:23:789:66 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:8:23:796:356 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 11:8:23:888:251 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:8:23:893:952 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:8:23:894:908 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:8:23:896:322 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/myrockss/repeatable-read/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..1118f91f --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:24:169:902 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:8:24:170:696 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:24:269:902 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:24:270:719 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:8:24:271:242 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:8:24:278:630 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 11:8:24:370:401 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:8:24:377:510 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:8:24:378:485 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:8:24:384:224 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/iat_dda_write_skew.txt b/test_result/centralizend_result/myrockss/repeatable-read/iat_dda_write_skew.txt new file mode 100644 index 00000000..8110e480 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:24:653:359 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:8:24:654:400 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:24:753:387 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:8:24:754:521 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:8:24:755:67 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 11:8:24:853:853 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:8:24:861:334 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:8:24:960:272 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:8:24:961:309 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:8:24:965:147 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/myrockss/repeatable-read/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..6f3415c1 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:26:270:912 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:8:26:271:754 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:26:370:803 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:8:26:371:680 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:8:26:372:219 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:8:26:382:665 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 11:8:26:471:280 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:8:26:480:593 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:8:26:481:412 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:8:26:485:157 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/myrockss/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..bba08a36 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:25:242:402 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-2 11:8:25:243:304 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-2 11:8:25:243:839 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-2 11:8:25:342:382 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-2 11:8:25:343:289 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-2 11:8:25:343:827 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:8:25:351:14 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:8:25:449:377 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-2 11:8:25:450:316 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-2 11:8:25:450:949 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:8:25:452:616 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/myrockss/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..b0de6e5f --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:25:738:167 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-2 11:8:25:739:87 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:25:838:154 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-2 11:8:25:839:274 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-2 11:8:25:840:36 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:8:25:845:391 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-2 11:8:25:938:738 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:8:25:947:795 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-2 11:8:25:948:733 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:8:25:952:592 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/iat_mda_step_iat.txt b/test_result/centralizend_result/myrockss/repeatable-read/iat_mda_step_iat.txt new file mode 100644 index 00000000..9a24db4a --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:26:759:773 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 11:8:26:760:782 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:26:859:708 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 11:8:26:860:760 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:8:26:959:679 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 11:8:26:960:773 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-2 11:8:27:60:176 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-2 11:8:27:160:129 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-2 11:8:27:260:238 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 11:8:27:376:617 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 11:8:27:472:39 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:8:27:566:69 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 11:8:27:567:234 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:8:27:571:183 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/myrockss/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..7c11ec3d --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:31:419:476 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:8:31:420:433 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:31:519:426 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 11:8:31:520:226 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:8:31:529:296 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 11:8:31:619:509 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 11:8:31:620:645 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-2 11:8:31:621:156 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:8:31:639:314 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-2 11:8:31:720:285 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-2 11:8:31:729:189 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-2 11:8:31:730:288 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 11:8:31:735:404 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/myrockss/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..532ae9c4 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,209 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:30:592:911 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:8:30:594:280 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:30:692:940 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:8:30:694:302 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:8:30:792:918 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-2 11:8:30:793:570 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:8:30:800:74 + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 11:8:30:892:967 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-2 11:8:30:893:767 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:8:30:901:613 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-2 11:8:30:993:911 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:8:30:995:963 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-2 11:8:31:94:31 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-2 11:8:31:101:9 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-2 11:8:31:102:714 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-2 11:8:31:106:116 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/myrockss/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..c3bbd353 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:27:849:40 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-2 11:8:27:850:75 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:27:949:40 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 11:8:27:950:251 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:8:28:49:43 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 11:8:28:50:294 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-2 11:8:28:149:439 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-2 11:8:28:249:409 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-2 11:8:28:349:613 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 11:8:28:458:138 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 11:8:28:556:222 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:8:28:655:321 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-2 11:8:28:656:379 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:8:28:660:142 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/myrockss/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..ac70bf44 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:28:922:432 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 11:8:28:923:587 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:29:22:439 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-2 11:8:29:23:405 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:8:29:122:460 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-2 11:8:29:123:466 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-2 11:8:29:222:808 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-2 11:8:29:322:961 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-2 11:8:29:422:851 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 11:8:29:529:869 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 11:8:29:629:952 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:8:29:728:426 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 11:8:29:729:517 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:8:29:733:202 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/myrockss/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..9c04ff7d --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:32:34:495 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 11:8:32:35:592 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-2 11:8:32:36:404 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-2 11:8:32:134:478 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-2 11:8:32:135:609 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-2 11:8:32:136:138 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:8:32:170:576 + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 11:8:32:234:410 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-2 11:8:32:235:477 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 11:8:32:236:332 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 11:8:32:238:721 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-2 11:8:32:334:814 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-2 11:8:32:343:572 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-2 11:8:32:344:703 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-2 11:8:32:349:705 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/myrockss/repeatable-read/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..7a9dc4cf --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,164 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:30:15:182 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-2 11:8:30:16:318 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:30:115:186 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-2 11:8:30:116:266 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:8:30:116:806 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 11:8:30:117:945 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-2 11:8:30:118:427 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:8:30:128:464 + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2022-4-2 11:8:30:215:129 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-2 11:8:30:216:500 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-2 11:8:30:217:151 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-2 11:8:30:218:97 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-2 11:8:30:218:698 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:8:30:230:166 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-2 11:8:30:315:960 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-2 11:8:30:319:917 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-2 11:8:30:321:37 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-2 11:8:30:324:659 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/myrockss/repeatable-read/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..cd1fcc46 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:23:168:505 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 11:8:23:169:274 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:23:268:506 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 11:8:23:269:276 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:8:23:285:777 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-2 11:8:23:368:983 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:8:23:389:562 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:8:23:390:437 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:8:23:398:574 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/myrockss/repeatable-read/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..71e1c9ef --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:22:646:65 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:8:22:646:989 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:22:745:988 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 11:8:22:746:731 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:8:22:758:336 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 11:8:22:846:568 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:8:22:848:352 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:8:22:849:109 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:8:22:853:464 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:8:22:863:612 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..f34aee42 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_double_write_skew1.txt @@ -0,0 +1,56 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:0:150:916 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:0:151:633 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:0:250:929 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:0:251:761 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:8:0:252:411 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 11:8:0:455:824 + Q7 finished at: 2022-4-2 11:8:0:461:678 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:8:0:555:556 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-2 11:8:0:556:468 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:8:0:560:157 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..5a042986 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,56 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:0:832:843 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:0:833:518 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:0:932:787 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:0:933:529 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:8:0:934:184 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:8:0:949:633 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-2 11:8:1:33:414 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:8:1:48:235 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-2 11:8:1:49:129 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:8:1:56:48 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..3b77a80e --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_double_write_skew2.txt @@ -0,0 +1,56 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:1:398:881 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:1:399:575 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:1:498:941 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:1:499:986 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 11:8:1:599:543 +Q7-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:8:1:614:598 +Q7 finished at: 2022-4-2 11:8:1:619:160 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:8:1:719:948 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:8:1:720:987 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:8:1:738:548 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_read_skew.txt b/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_read_skew.txt new file mode 100644 index 00000000..2b66f286 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:2:41:367 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:8:2:42:169 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:2:141:345 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:2:142:75 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:8:2:142:601 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 11:8:2:242:44 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:8:2:351:896 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:8:2:443:913 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:8:2:445:21 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:8:2:449:130 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_read_skew2.txt b/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_read_skew2.txt new file mode 100644 index 00000000..5ca94dc9 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:3:757:658 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:3:758:381 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:3:857:695 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:8:3:858:604 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:8:3:859:254 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 11:8:3:958:205 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:8:3:972:656 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:8:4:61:323 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:8:4:62:293 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:8:4:70:550 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..bcd35616 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:4:353:507 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:4:354:183 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:4:453:478 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:8:4:454:262 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:8:4:454:846 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:8:4:461:920 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 11:8:4:554:32 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:8:4:562:247 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:8:4:563:300 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:8:4:568:518 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..92ec9ed2 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:2:734:491 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 11:8:2:735:299 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:2:834:537 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:2:835:319 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:8:2:835:818 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:8:2:846:950 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 11:8:2:935:222 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:8:2:939:915 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-2 11:8:2:940:779 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:8:2:945:921 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..1557f5b4 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:3:242:499 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 11:8:3:243:536 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:3:342:475 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-2 11:8:3:343:201 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-2 11:8:3:343:730 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:8:3:358:426 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 11:8:3:443:21 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:8:3:450:629 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-2 11:8:3:451:597 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:8:3:457:839 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_write_read_skew.txt b/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..483264de --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_write_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:58:921:285 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:58:921:995 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:59:21:239 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:59:22:40 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:7:59:22:739 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 11:7:59:122:9 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:7:59:228:389 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:59:328:286 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:59:329:513 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:59:333:95 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..ac195807 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: myrocks #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:59:606:47 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:59:606:811 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:59:705:980 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:7:59:706:704 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:7:59:707:360 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:7:59:726:76 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 11:7:59:806:614 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:7:59:816:11 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:7:59:816:984 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:7:59:828:409 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/rat_mda_step_rat.txt b/test_result/centralizend_result/myrockss/repeatable-read/rat_mda_step_rat.txt new file mode 100644 index 00000000..fa6ae70e --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:4:855:914 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:4:856:584 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:4:955:901 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:4:956:643 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:8:4:957:506 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 11:8:5:56:70 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-2 11:8:5:56:657 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-2 11:8:5:57:446 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-2 11:8:5:156:629 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 11:8:5:171:265 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 11:8:5:264:969 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:8:5:368:542 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 11:8:5:369:713 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:8:5:371:269 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/myrockss/repeatable-read/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..0c6ef2fe --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2022-4-2 11:8:5:658:904 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-2 11:8:5:660:162 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2022-4-2 11:8:5:758:735 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-2 11:8:5:759:445 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:8:5:858:757 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-2 11:8:5:860:133 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 11:8:5:861:204 + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 11:8:5:958:781 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-2 11:8:5:959:571 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 11:8:6:59:815 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-2 11:8:6:166:525 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:8:6:265:635 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 11:8:6:363:72 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:8:6:366:630 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-2 11:8:6:368:22 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-2 11:8:6:371:479 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/myrockss/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..5d42f494 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:6:636:389 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:6:637:146 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:6:736:331 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:6:737:145 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 11:8:6:737:946 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 11:8:6:836:318 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-2 11:8:6:837:111 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-2 11:8:6:837:959 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-2 11:8:6:937:92 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 11:8:6:952:547 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 11:8:7:49:608 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:8:7:152:54 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-2 11:8:7:153:146 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:8:7:159:516 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/myrockss/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..616eac3a --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:7:441:962 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-2 11:8:7:442:786 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:7:541:938 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-2 11:8:7:542:683 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 11:8:7:543:646 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 11:8:7:641:952 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-2 11:8:7:642:665 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-2 11:8:7:643:547 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-2 11:8:7:742:845 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 11:8:7:765:328 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 11:8:7:869:975 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:8:7:953:130 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 11:8:7:954:349 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 11:8:7:963:553 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/rat_sda_dirty_read.txt b/test_result/centralizend_result/myrockss/repeatable-read/rat_sda_dirty_read.txt new file mode 100644 index 00000000..cd5576b2 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: myrocks #### +#### test_type: sda_dirty_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:54:795:644 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:54:796:229 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:54:895:609 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 11:7:54:896:372 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-2 11:7:55:7:17 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:7:55:97:107 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 11:7:55:98:13 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:7:55:102:161 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/rat_sda_intermediate_read.txt b/test_result/centralizend_result/myrockss/repeatable-read/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..7726055a --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: myrocks #### +#### test_type: sda_intermediate_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:56:88:794 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:56:89:550 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:56:188:725 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 11:7:56:189:695 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-2 11:7:56:289:362 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:7:56:393:229 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:7:56:495:117 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 11:7:56:495:996 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:56:499:374 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/myrockss/repeatable-read/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..b2767375 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: myrocks #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:56:804:15 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:56:804:757 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:56:904:22 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 11:7:56:904:981 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:7:56:909:455 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-2 11:7:57:4:633 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:7:57:11:351 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 11:7:57:12:299 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:57:16:87 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/rat_sda_lost_self_update.txt b/test_result/centralizend_result/myrockss/repeatable-read/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..457fe501 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_self_update #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:58:308:16 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:7:58:308:711 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:58:408:63 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 11:7:58:508:639 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 11:7:58:515:512 +Q6 finished at: 2022-4-2 11:7:58:518:958 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:7:58:616:757 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:7:58:617:774 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:58:624:312 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/myrockss/repeatable-read/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..a6995f26 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:55:409:106 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:7:55:409:951 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:55:509:137 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 11:7:55:509:836 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 11:7:55:609:746 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:7:55:729:635 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:7:55:815:23 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:7:55:816:27 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:55:820:112 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/myrockss/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..936f4a4a --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:57:303:267 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 11:7:57:304:120 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:57:403:261 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-2 11:7:57:404:27 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:7:57:411:627 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 11:7:57:503:835 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:7:57:512:634 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-2 11:7:57:513:480 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:57:519:190 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/myrockss/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..b1b7c4b0 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:7:57:790:398 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 11:7:57:791:382 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:7:57:890:425 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-2 11:7:57:891:98 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:7:57:910:782 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 11:7:57:991:122 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:7:57:996:139 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-2 11:7:57:996:887 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:7:58:8:775 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..62ee7a51 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,56 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:12:461:170 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:12:461:858 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:12:561:138 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:12:561:975 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 11:8:12:661:806 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:8:12:665:772 + Q6-T2 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:8:12:668:696 + Q6 finished at: 2022-4-2 11:8:12:671:497 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:8:12:672:490 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:8:12:675:636 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..2c8699dc --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,35 @@ +#### db_type: myrocks #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:12:939:854 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:12:940:699 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:13:39:860 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:13:40:723 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:8:13:140:459 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:8:13:254:185 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-2 11:8:13:754:308 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..6e96da1f --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,35 @@ +#### db_type: myrocks #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:14:44:621 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:14:45:382 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:14:144:639 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:14:145:482 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:8:14:245:315 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:8:14:355:722 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-2 11:8:14:849:561 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..a5ddb856 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: myrocks #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:15:141:817 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:15:142:532 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:15:241:853 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:15:242:691 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:8:15:342:522 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:8:15:350:395 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-2 11:8:16:46:891 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..3aa4b768 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:16:347:968 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:8:16:348:976 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:16:447:924 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:16:448:748 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:8:16:449:238 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 11:8:16:660:912 +Q7-T1 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:8:16:665:500 +Q7 finished at: 2022-4-2 11:8:16:668:369 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:8:16:669:354 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:8:16:677:576 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..7fd6f58e --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:16:933:637 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:8:16:934:538 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:17:33:605 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:17:34:318 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:8:17:34:798 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 11:8:17:237:514 + Q7 finished at: 2022-4-2 11:8:17:240:411 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:8:17:340:973 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:8:17:341:939 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:8:17:345:266 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..b29cf0d5 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:17:636:967 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:17:637:683 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:17:736:975 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:8:17:737:926 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 11:8:17:837:404 +Q7-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:8:17:842:984 +Q7 finished at: 2022-4-2 11:8:17:846:878 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:8:17:944:754 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:8:17:945:700 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:8:17:949:8 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..ec0ab3e8 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:18:218:441 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:18:219:177 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:18:318:427 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:8:18:319:294 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 11:8:18:418:776 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:8:18:629:475 + Q7-T2 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:8:18:639:311 + Q7 finished at: 2022-4-2 11:8:18:644:539 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:8:18:645:560 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:8:18:655:457 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..605c760b --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:18:964:505 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:18:965:259 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:19:64:492 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:8:19:65:404 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 11:8:19:164:883 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:8:19:170:569 + Q6-T2 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:8:19:177:27 + Q6 finished at: 2022-4-2 11:8:19:180:421 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 11:8:19:181:387 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:8:19:184:978 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/myrockss/repeatable-read/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..d18d05f4 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/wat_mda_step_wat_c1.txt @@ -0,0 +1,44 @@ +#### db_type: myrocks #### +#### test_type: mda_step_wat_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:19:469:567 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:19:470:358 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:19:569:522 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:19:570:260 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 11:8:19:669:546 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 11:8:19:670:313 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-2 11:8:19:770:157 + Q11-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:8:19:879:241 + Q11 finished at: 2022-4-2 11:8:19:882:615 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:8:19:975:603 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-2 11:8:20:674:333 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/myrockss/repeatable-read/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..076371a2 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/wat_mda_step_wat_c2.txt @@ -0,0 +1,44 @@ +#### db_type: myrocks #### +#### test_type: mda_step_wat_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:20:945:495 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:20:946:330 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:21:45:431 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:21:46:318 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:8:21:145:355 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 11:8:21:345:971 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-2 11:8:21:446:67 + Q10-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:8:21:552:811 + Q10 finished at: 2022-4-2 11:8:21:559:762 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:8:21:752:962 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-2 11:8:22:353:623 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/myrockss/repeatable-read/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..827df83a --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:8:297:488 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:8:298:158 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:8:397:439 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; + Q4 finished at: 2022-4-2 11:8:8:497:870 +Q5 finished at: 2022-4-2 11:8:8:501:405 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:8:8:608:716 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 11:8:8:609:598 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 11:8:8:634:669 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:8:8:641:837 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/myrockss/repeatable-read/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..84a3b9eb --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:8:893:549 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:8:894:358 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:8:993:492 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 11:8:9:105:703 +Q5 finished at: 2022-4-2 11:8:9:111:128 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:8:9:202:872 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 11:8:9:203:773 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 11:8:9:237:34 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:8:9:242:779 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/wat_sda_full_write.txt b/test_result/centralizend_result/myrockss/repeatable-read/wat_sda_full_write.txt new file mode 100644 index 00000000..55c4dfc5 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_full_write #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:9:509:970 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:9:510:696 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:9:609:909 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-2 11:8:9:710:416 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 11:8:9:717:149 +Q6 finished at: 2022-4-2 11:8:9:720:554 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:8:9:815:216 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 11:8:9:816:94 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:8:9:822:228 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/wat_sda_full_write_committed.txt b/test_result/centralizend_result/myrockss/repeatable-read/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..885ad8e6 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_full_write_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:10:81:468 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:10:82:237 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:10:181:465 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-2 11:8:10:281:977 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 11:8:10:286:200 + Q5-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:8:10:289:28 + Q5 finished at: 2022-4-2 11:8:10:292:532 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 11:8:10:293:504 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:8:10:297:85 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/myrockss/repeatable-read/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..a725a706 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:11:918:75 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:11:918:796 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:12:18:19 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 11:8:12:118:723 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 11:8:12:149:10 + Q5-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:8:12:158:44 + Q5 finished at: 2022-4-2 11:8:12:163:79 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:8:12:163:981 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:8:12:168:700 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/myrockss/repeatable-read/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..f47112f0 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_update_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:10:555:956 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 11:8:10:556:889 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:10:655:943 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 11:8:10:656:718 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-2 11:8:10:860:699 +Q6-T1 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:8:10:865:226 +Q6 finished at: 2022-4-2 11:8:10:871:876 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:8:10:872:824 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:8:10:886:631 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/repeatable-read/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/myrockss/repeatable-read/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..3dc5f513 --- /dev/null +++ b/test_result/centralizend_result/myrockss/repeatable-read/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_update_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:11:226:913 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 11:8:11:227:789 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:11:326:820 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 11:8:11:327:614 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-2 11:8:11:531:50 + Q6 finished at: 2022-4-2 11:8:11:534:686 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:8:11:639:665 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:8:11:640:755 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:8:11:644:334 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/myrockss/result_summary/read-committed_total-result.txt b/test_result/centralizend_result/myrockss/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..38745346 --- /dev/null +++ b/test_result/centralizend_result/myrockss/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/myrockss/result_summary/read-uncommitted_total-result.txt b/test_result/centralizend_result/myrockss/result_summary/read-uncommitted_total-result.txt new file mode 100644 index 00000000..f709ccda --- /dev/null +++ b/test_result/centralizend_result/myrockss/result_summary/read-uncommitted_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Anomaly + +rat_sda_non_repeatable_read: Anomaly + +rat_sda_intermediate_read: Anomaly + +rat_sda_intermediate_read_committed: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Anomaly + +rat_dda_double_write_skew1_committed: Anomaly + +rat_dda_double_write_skew2: Anomaly + +rat_dda_read_skew: Anomaly + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Anomaly + +rat_dda_read_skew2_committed: Anomaly + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Anomaly + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Anomaly + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Avoid + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/myrockss/result_summary/repeatable-read_total-result.txt b/test_result/centralizend_result/myrockss/result_summary/repeatable-read_total-result.txt new file mode 100644 index 00000000..ef182286 --- /dev/null +++ b/test_result/centralizend_result/myrockss/result_summary/repeatable-read_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/myrockss/result_summary/serializable_total-result.txt b/test_result/centralizend_result/myrockss/result_summary/serializable_total-result.txt new file mode 100644 index 00000000..b5b686cf --- /dev/null +++ b/test_result/centralizend_result/myrockss/result_summary/serializable_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Rollback + +rat_dda_write_read_skew_committed: Rollback + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Rollback + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Rollback + +rat_dda_read_skew2_committed: Rollback + +rat_mda_step_rat: Rollback + +rat_mda_step_rat_long_fork: Rollback + +rat_mda_step_rat_predicate_based_delete: Rollback + +rat_mda_step_rat_predicate_based_insert: Rollback + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Rollback + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Rollback + +iat_dda_write_skew_predicate_based-intersecting_data: Avoid + +iat_dda_write_skew_predicate_based-overdraft_protection: Rollback + +iat_dda_write_skew_committed: Rollback + +iat_mda_step_iat: Rollback + +iat_mda_step_iat_predicate_based_delete: Rollback + +iat_mda_step_iat_predicate_based_insert: Rollback + +iat_mda_step_iat_uname_anomaly: Rollback + +iat_mda_step_iat_cross_phenomenon: Rollback + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Rollback + diff --git a/test_result/centralizend_result/myrockss/serializable/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/myrockss/serializable/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..bad23c9a --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/iat_dda_read_skew_committed.txt @@ -0,0 +1,42 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:9:11:737:443 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:9:11:738:336 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:9:11:837:411 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:9:11:838:72 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:9:11:937:920 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:9:11:946:111 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-2 11:9:12:638:63 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/myrockss/serializable/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..378f6589 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:9:12:938:43 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:9:12:938:902 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:9:13:37:977 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:9:13:38:753 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:9:13:138:510 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:9:13:164:130 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-2 11:9:13:838:632 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/iat_dda_write_skew.txt b/test_result/centralizend_result/myrockss/serializable/iat_dda_write_skew.txt new file mode 100644 index 00000000..24ab6a11 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/iat_dda_write_skew.txt @@ -0,0 +1,49 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:9:14:153:583 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:9:14:156:600 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:9:14:253:612 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:9:14:254:503 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:9:14:354:110 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:9:14:462:209 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-2 11:9:14:954:214 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/myrockss/serializable/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..9d18f0f7 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/iat_dda_write_skew_committed.txt @@ -0,0 +1,49 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:9:16:931:83 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:9:16:931:971 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:9:17:31:40 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:9:17:31:874 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:9:17:131:541 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:9:17:148:216 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-2 11:9:17:831:643 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/myrockss/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..67c11f47 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,74 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:9:15:243:702 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-2 11:9:15:244:600 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-2 11:9:15:245:156 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-2 11:9:15:343:706 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' +Q8-T1 execute opt: 'COMMIT'; + current_result: + (330,) + *(1) expected_result: + (330,) + (2) expected_result: + (300,) + + Q5 finished at: 2022-4-2 11:9:15:448:636 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-2 11:9:15:449:176 + Q7-T2 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:9:15:454:763 + Q7 finished at: 2022-4-2 11:9:15:458:445 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-2 11:9:15:459:512 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-2 11:9:15:460:145 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:9:15:467:68 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/myrockss/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..5a4957d0 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,49 @@ +#### db_type: myrocks #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:9:15:751:986 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-2 11:9:15:752:955 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:9:15:851:984 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-2 11:9:15:853:12 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' + Q5 finished at: 2022-4-2 11:9:15:952:625 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:9:15:963:630 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-2 11:9:16:652:723 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/iat_mda_step_iat.txt b/test_result/centralizend_result/myrockss/serializable/iat_mda_step_iat.txt new file mode 100644 index 00000000..7d8f3d27 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/iat_mda_step_iat.txt @@ -0,0 +1,89 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:9:18:106:946 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 11:9:18:107:880 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:9:18:206:931 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 11:9:18:207:945 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:9:18:307:86 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 11:9:18:308:142 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q8 finished at: 2022-4-2 11:9:18:607:562 + Q11-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:9:18:812:697 +Q10-T1 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 11:9:18:815:821 +Q10 finished at: 2022-4-2 11:9:18:816:947 + Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 + Q9 failed at: 2022-4-2 11:9:19:507:694 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/myrockss/serializable/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..b24bcbee --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:9:26:604:635 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:9:26:605:532 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:9:26:704:638 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 11:9:26:804:616 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-2 11:9:26:905:298 +Q11-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 11:9:26:912:554 +Q11 finished at: 2022-4-2 11:9:26:912:569 + Q5-T2 execute opt: 'COMMIT'; + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 11:9:26:916:505 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-2 11:9:26:917:79 + Q9-T3 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:9:26:930:77 + Q9 finished at: 2022-4-2 11:9:26:933:672 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-2 11:9:26:935:16 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 11:9:26:939:750 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/serializable/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/myrockss/serializable/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..a2814e73 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,171 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:9:25:227:940 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:9:25:229:401 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:9:25:327:980 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:9:25:329:248 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:9:25:427:967 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 11:9:25:527:983 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-2 11:9:25:729:339 + Q12-T2 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:9:25:734:489 + Q12 finished at: 2022-4-2 11:9:25:734:500 + Q10-T4 execute opt: 'COMMIT'; + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-2 11:9:25:738:956 +Q14-T1 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:9:25:740:974 +Q14 finished at: 2022-4-2 11:9:25:743:747 + Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 + Q6 failed at: 2022-4-2 11:9:26:328:789 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/myrockss/serializable/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..142ac590 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,89 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:9:19:796:135 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-2 11:9:19:797:162 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:9:19:896:73 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 11:9:19:897:102 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:9:19:996:82 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 11:9:19:997:115 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q8 finished at: 2022-4-2 11:9:20:296:678 + Q11-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:9:20:498:339 +Q10-T1 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 11:9:20:503:938 +Q10 finished at: 2022-4-2 11:9:20:506:922 + Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 + Q9 failed at: 2022-4-2 11:9:21:196:777 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/myrockss/serializable/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..003ea8dd --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,85 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:9:21:476:226 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 11:9:21:477:387 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:9:21:576:130 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-2 11:9:21:577:237 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:9:21:676:155 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-2 11:9:21:677:293 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q7 finished at: 2022-4-2 11:9:21:976:648 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 11:9:22:92:158 + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 + Q8 failed at: 2022-4-2 11:9:22:676:749 + Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 + Q9 failed at: 2022-4-2 11:9:22:876:945 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/myrockss/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..7215878b --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,120 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:9:27:213:626 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 11:9:27:214:640 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-2 11:9:27:215:435 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-2 11:9:27:313:591 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-2 11:9:27:314:610 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 11:9:27:413:596 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-2 11:9:27:414:654 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' + Q6 finished at: 2022-4-2 11:9:27:514:95 + Q7-T2 execute opt: 'COMMIT'; + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 11:9:27:520:673 + Q11-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:9:27:527:321 + Q11 finished at: 2022-4-2 11:9:27:527:333 +Q12 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q12 failed at: 2022-4-2 11:9:28:714:226 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/myrockss/serializable/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..348a3efa --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,127 @@ +#### db_type: myrocks #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:9:23:154:163 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-2 11:9:23:155:280 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:9:23:254:129 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-2 11:9:23:255:249 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:9:23:255:804 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 11:9:23:256:543 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2022-4-2 11:9:23:354:132 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-2 11:9:23:355:166 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-2 11:9:23:355:669 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-2 11:9:23:454:599 + Q8-T2 execute opt: 'COMMIT'; + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-2 11:9:23:463:522 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-2 11:9:23:464:104 + Q14-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:9:23:466:51 + Q14 finished at: 2022-4-2 11:9:23:476:121 +Q15 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q15 failed at: 2022-4-2 11:9:24:954:752 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/myrockss/serializable/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..ec4c2313 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/iat_sda_lost_update_committed.txt @@ -0,0 +1,39 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:9:10:870:756 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 11:9:10:871:607 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:9:10:970:743 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-2 11:9:11:71:233 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:9:11:81:861 + Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 + Q4 failed at: 2022-4-2 11:9:11:471:412 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/myrockss/serializable/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..1da43254 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:9:10:352:253 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:9:10:353:53 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:9:10:452:262 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 11:9:10:552:832 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:9:10:554:683 + Q4 finished at: 2022-4-2 11:9:10:554:744 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:9:10:564:613 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:9:10:565:652 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:9:10:572:350 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:9:10:580:415 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/serializable/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/myrockss/serializable/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..40e821f3 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/rat_dda_double_write_skew1.txt @@ -0,0 +1,42 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:39:207:984 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:39:208:730 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:39:308:25 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:39:308:865 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:8:39:408:785 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:8:39:514:910 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-2 11:8:40:12:340 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/myrockss/serializable/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..e48407e8 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:40:304:963 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:40:305:788 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:40:404:977 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:40:405:813 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:8:40:505:694 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:8:40:514:513 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-2 11:8:41:210:37 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/myrockss/serializable/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..608342f0 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/rat_dda_double_write_skew2.txt @@ -0,0 +1,35 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:41:481:395 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:41:482:71 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:41:581:330 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:41:582:78 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:8:41:681:961 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:8:41:792:168 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-2 11:8:42:286:404 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/rat_dda_read_skew.txt b/test_result/centralizend_result/myrockss/serializable/rat_dda_read_skew.txt new file mode 100644 index 00000000..7561b934 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/rat_dda_read_skew.txt @@ -0,0 +1,42 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:42:561:618 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:8:42:562:453 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:42:661:676 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:42:662:469 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:8:42:762:134 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:8:42:868:639 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-2 11:8:43:362:229 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/rat_dda_read_skew2.txt b/test_result/centralizend_result/myrockss/serializable/rat_dda_read_skew2.txt new file mode 100644 index 00000000..2a2eacdf --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/rat_dda_read_skew2.txt @@ -0,0 +1,42 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:44:605:590 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:44:606:240 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:44:705:549 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:8:44:706:385 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 11:8:44:806:86 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:8:44:813:190 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-2 11:8:45:306:229 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/myrockss/serializable/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..ef32048c --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/rat_dda_read_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:45:589:624 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:45:590:408 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:45:689:648 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:8:45:690:600 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 11:8:45:790:285 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:8:45:801:187 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-2 11:8:46:290:388 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/myrockss/serializable/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..d08eb3e1 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:43:647:367 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 11:8:43:648:366 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:43:747:283 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 11:8:43:848:110 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:8:43:853:104 + Q4 finished at: 2022-4-2 11:8:43:853:144 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-2 11:8:43:853:719 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:8:43:859:378 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-2 11:8:43:860:174 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:8:43:863:328 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/serializable/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/myrockss/serializable/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..85da2bdd --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: myrocks #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:44:117:438 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 11:8:44:118:492 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:44:217:479 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 11:8:44:318:157 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 11:8:44:322:101 + Q4 finished at: 2022-4-2 11:8:44:322:114 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-2 11:8:44:322:760 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:8:44:334:527 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-2 11:8:44:337:601 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 11:8:44:340:892 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/serializable/rat_dda_write_read_skew.txt b/test_result/centralizend_result/myrockss/serializable/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..a6fdd2f3 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/rat_dda_write_read_skew.txt @@ -0,0 +1,42 @@ +#### db_type: myrocks #### +#### test_type: dda_write_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:36:912:804 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:36:913:546 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:37:12:817 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:37:13:656 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:8:37:113:552 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:8:37:228:234 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-2 11:8:37:722:667 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/myrockss/serializable/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..8e116ac6 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,42 @@ +#### db_type: myrocks #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:37:993:992 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:37:994:738 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:38:93:976 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:38:94:780 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:8:38:194:837 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:8:38:201:624 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-2 11:8:38:898:312 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/rat_mda_step_rat.txt b/test_result/centralizend_result/myrockss/serializable/rat_mda_step_rat.txt new file mode 100644 index 00000000..9b91f9e7 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/rat_mda_step_rat.txt @@ -0,0 +1,74 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:46:568:760 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:46:569:522 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:46:668:673 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:46:669:388 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 11:8:46:768:969 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-2 11:8:46:769:581 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 11:8:46:869:585 + Q11-T2 execute opt: 'COMMIT'; + current_result: + (1,1) + *(1) expected_result: + (1,1) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q8 finished at: 2022-4-2 11:8:46:973:894 + Q11 finished at: 2022-4-2 11:8:46:976:624 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:8:47:78:651 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-2 11:8:47:774:625 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/myrockss/serializable/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..2dc7e42c --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,169 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2022-4-2 11:8:48:110:275 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-2 11:8:48:111:812 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2022-4-2 11:8:48:209:958 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:8:48:310:6 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-2 11:8:48:311:477 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 11:8:48:410:39 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 11:8:48:511:238 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 11:8:48:812:305 + Q9 finished at: 2022-4-2 11:8:48:812:388 + Q12-T2 execute opt: 'COMMIT'; + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + (3) expected_result: + (1,0) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + *(6) expected_result: + (1,1) + (7) expected_result: + (1,0) + *(8) expected_result: + (1,1) + *(9) expected_result: + (1,1) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + (12) expected_result: + (1,0) + (13) expected_result: + (1,0) + (14) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 11:8:48:818:376 + Q12 finished at: 2022-4-2 11:8:48:823:676 +Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q4 failed at: 2022-4-2 11:8:48:910:718 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/myrockss/serializable/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..58b37a81 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,74 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:49:238:772 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:49:239:589 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:49:338:734 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:49:339:545 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 11:8:49:438:741 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-2 11:8:49:439:478 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 11:8:49:539:967 + Q11-T2 execute opt: 'COMMIT'; + current_result: + (,) + *(1) expected_result: + (,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q8 finished at: 2022-4-2 11:8:49:644:286 + Q11 finished at: 2022-4-2 11:8:49:646:966 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:8:49:754:66 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-2 11:8:50:444:511 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/myrockss/serializable/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..0317bf9e --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,71 @@ +#### db_type: myrocks #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:50:712:664 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-2 11:8:50:713:454 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:50:812:676 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-2 11:8:50:813:620 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 11:8:50:912:628 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-2 11:8:50:913:279 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 11:8:51:13:540 + Q11-T2 execute opt: 'COMMIT'; + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + (4) expected_result: + (,) + *(5) expected_result: + (1,) + (6) expected_result: + (,) + + Q8 finished at: 2022-4-2 11:8:51:118:665 + Q11 finished at: 2022-4-2 11:8:51:122:535 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:8:51:223:163 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-2 11:8:51:924:212 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/rat_sda_dirty_read.txt b/test_result/centralizend_result/myrockss/serializable/rat_sda_dirty_read.txt new file mode 100644 index 00000000..547b1b58 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: myrocks #### +#### test_type: sda_dirty_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:32:701:628 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:32:702:212 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:32:801:554 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' +Q5-T1 execute opt: 'ROLLBACK'; + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 11:8:32:901:921 +Q5 finished at: 2022-4-2 11:8:32:905:59 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:8:33:8:155 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 11:8:33:9:194 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:8:33:16:916 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/serializable/rat_sda_intermediate_read.txt b/test_result/centralizend_result/myrockss/serializable/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..aa2d252c --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: myrocks #### +#### test_type: sda_intermediate_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:34:55:775 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:34:56:644 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:34:155:779 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-2 11:8:34:256:292 +Q7-T1 execute opt: 'COMMIT'; + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 11:8:34:459:853 + Q6-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:8:34:462:664 + Q6 finished at: 2022-4-2 11:8:34:464:656 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 11:8:34:465:575 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:8:34:469:503 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/serializable/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/myrockss/serializable/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..fe1acea6 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: myrocks #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:34:741:32 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:34:742:4 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:34:840:962 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-2 11:8:34:941:558 +Q7-T1 execute opt: 'COMMIT'; + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 11:8:34:949:206 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:8:34:952:936 +Q7 finished at: 2022-4-2 11:8:34:955:483 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 11:8:34:956:324 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:8:34:963:44 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/serializable/rat_sda_lost_self_update.txt b/test_result/centralizend_result/myrockss/serializable/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..cce36b90 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_self_update #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:36:327:698 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:36:328:546 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:36:427:656 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 11:8:36:528:279 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 11:8:36:533:617 +Q6 finished at: 2022-4-2 11:8:36:539:850 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:8:36:632:789 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:8:36:633:618 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:8:36:637:33 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/serializable/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/myrockss/serializable/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..c38460ec --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:33:333:995 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:8:33:334:751 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:33:434:23 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 11:8:33:534:624 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:8:33:745:440 + Q4 finished at: 2022-4-2 11:8:33:745:462 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:8:33:757:815 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:8:33:758:772 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:8:33:762:322 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/myrockss/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..37bfe9df --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:35:310:795 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 11:8:35:311:793 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:35:410:746 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 11:8:35:511:467 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:8:35:517:229 + Q4 finished at: 2022-4-2 11:8:35:517:287 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:8:35:527:236 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-2 11:8:35:531:657 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:8:35:536:372 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/myrockss/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..a7a567a7 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: myrocks #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:35:813:337 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 11:8:35:814:487 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:35:913:217 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 11:8:36:13:960 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:8:36:18:997 + Q4 finished at: 2022-4-2 11:8:36:19:20 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 11:8:36:35:166 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-2 11:8:36:36:54 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:8:36:39:980 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/serializable/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/myrockss/serializable/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..7235db7f --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,35 @@ +#### db_type: myrocks #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:56:887:814 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:56:888:502 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:56:987:890 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:56:988:663 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:8:57:88:374 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:8:57:94:988 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-2 11:8:57:792:377 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/myrockss/serializable/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..60f3d62c --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,35 @@ +#### db_type: myrocks #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:58:81:764 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:58:82:449 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:58:181:754 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:58:182:480 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:8:58:282:342 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:8:58:393:737 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-2 11:8:58:891:565 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/myrockss/serializable/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..22b166fc --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,35 @@ +#### db_type: myrocks #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:59:186:271 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:59:187:119 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:59:286:197 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:8:59:286:954 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:8:59:386:840 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:8:59:494:87 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-2 11:8:59:990:461 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/myrockss/serializable/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..fabca386 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: myrocks #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:9:0:289:519 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:9:0:290:298 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:9:0:389:491 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:9:0:390:347 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:9:0:489:963 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:9:0:497:440 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-2 11:9:1:194:396 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/myrockss/serializable/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..64fe36f1 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,42 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:9:1:470:903 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:9:1:471:725 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:9:1:570:924 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:9:1:571:740 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:9:1:671:414 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:9:1:781:875 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-2 11:9:2:271:533 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/myrockss/serializable/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..3d3edfff --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,42 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:9:2:587:34 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 11:9:2:587:927 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:9:2:686:989 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:9:2:687:772 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:9:2:787:604 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:9:2:898:162 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-2 11:9:3:387:725 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/myrockss/serializable/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..1afc2bdf --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,42 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:9:3:713:916 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:9:3:714:673 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:9:3:813:916 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:9:3:814:774 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:9:3:914:418 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:9:4:20:941 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-2 11:9:4:518:303 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/myrockss/serializable/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..27602adb --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,42 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:9:4:827:884 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:9:4:828:589 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:9:4:927:893 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:9:4:928:725 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:9:5:28:452 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:9:5:135:659 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-2 11:9:5:634:279 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/myrockss/serializable/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..adc7c8b5 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: myrocks #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:9:5:915:939 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:9:5:916:633 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:9:6:15:937 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 11:9:6:16:832 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 11:9:6:116:587 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:9:6:127:199 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-2 11:9:6:823:549 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/myrockss/serializable/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..1692e477 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/wat_mda_step_wat_c1.txt @@ -0,0 +1,44 @@ +#### db_type: myrocks #### +#### test_type: mda_step_wat_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:9:7:127:479 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:9:7:128:209 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:9:7:227:484 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:9:7:228:229 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 11:9:7:327:569 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 11:9:7:328:398 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-2 11:9:7:428:94 + Q11-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:9:7:532:822 + Q11 finished at: 2022-4-2 11:9:7:536:483 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:9:7:637:531 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-2 11:9:8:333:941 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/myrockss/serializable/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..57b438ca --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/wat_mda_step_wat_c2.txt @@ -0,0 +1,44 @@ +#### db_type: myrocks #### +#### test_type: mda_step_wat_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:9:8:619:204 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:9:8:620:49 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:9:8:719:139 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 11:9:8:719:884 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 11:9:8:819:134 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 11:9:9:19:748 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-2 11:9:9:119:788 + Q10-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 11:9:9:224:749 + Q10 finished at: 2022-4-2 11:9:9:229:470 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 11:9:9:429:526 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-2 11:9:10:25:884 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/myrockss/serializable/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..886672f9 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:52:243:958 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:52:244:730 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:52:343:879 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; + Q4 finished at: 2022-4-2 11:8:52:444:310 +Q5 finished at: 2022-4-2 11:8:52:447:761 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:8:52:554:450 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 11:8:52:555:312 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 11:8:52:589:809 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:8:52:591:629 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/serializable/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/myrockss/serializable/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..3c006f17 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:52:900:979 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:52:901:697 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:53:0:989 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 11:8:53:102:708 +Q5 finished at: 2022-4-2 11:8:53:108:891 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 11:8:53:210:469 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 11:8:53:211:370 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 11:8:53:226:450 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:8:53:229:620 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/serializable/wat_sda_full_write.txt b/test_result/centralizend_result/myrockss/serializable/wat_sda_full_write.txt new file mode 100644 index 00000000..a2b56b9a --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_full_write #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:53:474:162 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:53:474:866 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:53:574:67 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-2 11:8:53:674:538 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 11:8:53:678:892 +Q6 finished at: 2022-4-2 11:8:53:681:788 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 11:8:53:780:627 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 11:8:53:781:509 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:8:53:783:255 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/serializable/wat_sda_full_write_committed.txt b/test_result/centralizend_result/myrockss/serializable/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..46c245e2 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: myrocks #### +#### test_type: sda_full_write_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:54:61:703 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:54:62:428 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:54:161:689 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-2 11:8:54:262:246 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 11:8:54:264:743 + Q5-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:8:54:280:573 + Q5 finished at: 2022-4-2 11:8:54:290:421 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 11:8:54:291:460 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:8:54:299:181 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/serializable/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/myrockss/serializable/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..78a80ad3 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:56:371:131 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 11:8:56:371:864 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:56:471:108 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 11:8:56:571:788 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 11:8:56:575:665 + Q5-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:8:56:579:220 + Q5 finished at: 2022-4-2 11:8:56:582:863 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 11:8:56:583:784 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 11:8:56:587:658 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/myrockss/serializable/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/myrockss/serializable/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..5ed58e0d --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/wat_sda_lost_update_c1.txt @@ -0,0 +1,39 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_update_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:54:586:468 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 11:8:54:587:416 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:54:686:443 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-2 11:8:54:787:19 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 11:8:54:795:3 + Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 + Q4 failed at: 2022-4-2 11:8:55:187:138 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/myrockss/serializable/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/myrockss/serializable/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..7caf2d21 --- /dev/null +++ b/test_result/centralizend_result/myrockss/serializable/wat_sda_lost_update_c2.txt @@ -0,0 +1,39 @@ +#### db_type: myrocks #### +#### test_type: sda_lost_update_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 11:8:55:479:84 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 11:8:55:479:866 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 11:8:55:579:107 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-2 11:8:55:679:657 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 11:8:55:892:492 + Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 + Q4 failed at: 2022-4-2 11:8:56:79:839 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.35-38]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/read-committed/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/mysql/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..30b7ba41 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:43:774:210 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:40:43:775:942 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:43:874:270 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:43:876:139 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:40:43:877:710 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:43:884:333 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 17:40:43:975:186 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:43:976:170 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:43:977:952 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:43:978:863 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/mysql/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..a8d9b2af --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:44:255:190 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:40:44:256:724 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:44:359:510 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:44:361:141 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:40:44:362:538 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:44:369:54 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:40:44:456:190 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:44:462:330 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:44:464:513 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:44:465:340 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/iat_dda_write_skew.txt b/test_result/centralizend_result/mysql/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..6fe72c8c --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: mysql #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:44:741:392 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:40:44:743:32 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:44:841:455 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:40:44:843:257 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:40:44:844:754 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:40:44:942:346 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:40:44:948:830 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:40:45:47:173 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:45:49:581 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:40:45:50:661 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/mysql/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..f7c38655 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: mysql #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:46:347:661 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:40:46:349:326 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:46:447:697 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:40:46:449:384 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:40:46:450:863 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:46:457:488 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:40:46:548:649 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:46:554:913 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:46:557:277 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:46:558:154 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/mysql/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..3bd95d86 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: mysql #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:45:368:754 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-1 17:40:45:370:644 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-1 17:40:45:372:228 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-1 17:40:45:468:758 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-1 17:40:45:470:714 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-1 17:40:45:472:206 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:40:45:477:882 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:45:576:86 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-1 17:40:45:578:817 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-1 17:40:45:580:513 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:40:45:581:452 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/mysql/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..9bf6680c --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: mysql #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:45:859:577 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-1 17:40:45:861:800 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:45:959:567 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-1 17:40:45:962:1 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-1 17:40:45:964:421 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:45:971:354 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-1 17:40:46:61:501 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:46:70:6 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-1 17:40:46:72:377 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:46:73:483 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/iat_mda_step_iat.txt b/test_result/centralizend_result/mysql/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..ce340f85 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:46:823:250 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 17:40:46:825:386 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:46:924:79 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:40:46:926:475 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:40:47:23:157 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 17:40:47:25:321 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-1 17:40:47:124:498 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 17:40:47:225:93 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-1 17:40:47:328:444 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:40:47:429:676 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:40:47:534:153 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:40:47:629:338 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:40:47:631:778 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:40:47:632:822 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/mysql/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..061cc64c --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,106 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:51:440:451 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:40:51:442:366 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:51:540:516 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:40:51:542:188 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:40:51:549:325 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 17:40:51:640:648 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 17:40:51:642:881 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 17:40:51:644:462 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:51:651:352 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2022-4-1 17:40:51:741:901 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 17:40:51:742:976 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-1 17:40:51:745:336 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 17:40:51:746:373 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/mysql/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..8254711a --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,207 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:50:639:649 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:40:50:642:214 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:50:739:664 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:40:50:742:355 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:40:50:839:913 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-1 17:40:50:841:825 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:40:50:849:36 + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 17:40:50:939:808 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 17:40:50:941:694 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:50:949:265 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-4-1 17:40:51:41:868 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:40:51:42:968 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-1 17:40:51:141:815 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-1 17:40:51:143:40 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 17:40:51:146:203 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 17:40:51:147:268 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/mysql/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..4b516abf --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:47:910:455 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-1 17:40:47:912:590 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:48:13:476 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:40:48:15:588 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:40:48:110:349 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 17:40:48:112:487 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-1 17:40:48:213:587 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-1 17:40:48:311:428 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-1 17:40:48:411:619 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:40:48:516:885 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:40:48:618:352 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:40:48:716:709 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 17:40:48:719:137 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:40:48:720:923 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/mysql/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..42203e93 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:48:981:47 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 17:40:48:984:14 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:49:81:695 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-1 17:40:49:83:908 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:40:49:181:107 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-1 17:40:49:183:411 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-1 17:40:49:282:139 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-1 17:40:49:388:35 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-1 17:40:49:481:900 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:40:49:586:607 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:40:49:686:966 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:40:49:786:958 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:40:49:789:469 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:40:49:790:394 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/mysql/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..e45e5ad9 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:52:22:706 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 17:40:52:24:614 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-1 17:40:52:26:414 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-1 17:40:52:122:733 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-1 17:40:52:127:285 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-1 17:40:52:129:3 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:40:52:147:64 + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 17:40:52:222:792 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-1 17:40:52:225:83 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 17:40:52:227:106 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:40:52:228:284 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-1 17:40:52:323:534 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-1 17:40:52:332:309 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-1 17:40:52:336:713 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-1 17:40:52:337:850 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/mysql/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..65e52e7d --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,162 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:50:61:804 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-1 17:40:50:63:844 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:50:163:673 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-1 17:40:50:166:140 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:40:50:167:884 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 17:40:50:170:399 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-1 17:40:50:172:371 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:40:50:180:15 + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2022-4-1 17:40:50:261:731 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-1 17:40:50:263:895 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-1 17:40:50:265:341 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-1 17:40:50:267:98 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-1 17:40:50:268:542 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:40:50:279:329 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2022-4-1 17:40:50:363:41 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-1 17:40:50:364:28 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-1 17:40:50:366:651 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-1 17:40:50:367:822 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/mysql/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..374cd63d --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: mysql #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:43:301:803 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 17:40:43:303:442 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:43:401:817 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:40:43:403:744 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:40:43:410:98 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-1 17:40:43:502:605 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:40:43:510:741 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:40:43:512:448 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:43:513:814 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/mysql/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..20b4032f --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,60 @@ +#### db_type: mysql #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:42:834:341 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:40:42:836:254 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:42:934:300 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:40:42:936:87 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:40:42:942:910 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 17:40:43:35:191 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:40:43:36:163 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:40:43:37:866 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:43:38:779 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:43:39:599 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/mysql/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..fe17017a --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,56 @@ +#### db_type: mysql #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:21:57:517 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:21:59:574 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:21:157:412 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:21:159:216 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:40:21:160:933 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:40:21:363:529 +Q6 finished at: 2022-4-1 17:40:21:363:660 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:21:463:393 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-1 17:40:21:465:417 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:21:467:45 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/mysql/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..d76c40c1 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,56 @@ +#### db_type: mysql #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:21:743:975 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:21:745:953 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:21:843:820 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:21:845:479 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:40:21:846:952 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:21:853:340 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-1 17:40:21:944:817 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:21:952:284 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-1 17:40:21:955:352 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:21:956:178 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-committed/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/mysql/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..a8a49597 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,56 @@ +#### db_type: mysql #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:22:227:920 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:22:229:458 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:22:327:949 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:22:329:679 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 17:40:22:430:129 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:40:22:436:666 + Q5 finished at: 2022-4-1 17:40:22:436:734 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:40:22:537:263 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:22:539:144 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:22:539:916 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-committed/rat_dda_read_skew.txt b/test_result/centralizend_result/mysql/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..e0a2e357 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:22:805:890 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:40:22:807:577 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:22:905:831 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:22:907:532 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:40:22:908:961 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 17:40:23:6:990 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:40:23:112:721 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:23:206:196 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:23:208:129 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:23:208:944 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-committed/rat_dda_read_skew2.txt b/test_result/centralizend_result/mysql/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..ec0dcf9c --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:24:422:541 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:24:424:342 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:24:522:542 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:40:24:524:529 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:40:24:526:226 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:40:24:627:580 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:40:24:634:355 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:40:24:723:88 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:24:725:135 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:24:726:70 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-committed/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/mysql/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..6a34338b --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:25:2:94 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:25:3:816 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:25:102:162 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:40:25:104:311 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:40:25:105:936 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:25:107:65 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:40:25:202:890 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:25:209:14 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:25:211:466 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:25:212:262 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/mysql/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..c733a9bf --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,61 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:23:474:410 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 17:40:23:476:291 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:23:575:520 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:23:577:167 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:40:23:578:440 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:23:585:79 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 17:40:23:675:515 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:23:676:471 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-1 17:40:23:678:347 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:23:679:173 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/mysql/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..72d206be --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,59 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:23:942:580 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 17:40:23:945:195 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:24:43:434 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-1 17:40:24:45:96 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-1 17:40:24:46:410 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:24:58:843 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 17:40:24:143:830 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:24:144:886 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-1 17:40:24:146:898 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:24:147:760 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/rat_dda_write_read_skew.txt b/test_result/centralizend_result/mysql/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..3f9f30a5 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: mysql #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:19:891:1 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:19:892:678 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:19:991:5 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:19:992:753 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:40:19:994:310 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 17:40:20:92:495 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:40:20:197:561 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:20:297:390 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:20:299:473 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:20:300:262 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/mysql/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..41f6b904 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: mysql #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:20:577:791 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:20:579:499 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:20:679:573 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:20:681:313 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:40:20:682:831 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:20:688:686 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 17:40:20:780:421 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:20:786:799 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:20:788:817 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:20:789:638 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-committed/rat_mda_step_rat.txt b/test_result/centralizend_result/mysql/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..7f607c36 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: mysql #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:25:478:13 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:25:480:35 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:25:577:913 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:25:579:764 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:40:25:581:773 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 17:40:25:679:779 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-1 17:40:25:681:504 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-1 17:40:25:683:454 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-1 17:40:25:779:383 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:40:25:787:218 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:40:25:883:744 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:40:25:983:901 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:40:25:987:432 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:40:25:988:388 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/mysql/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..c723348c --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: mysql #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2022-4-1 17:40:26:255:828 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-1 17:40:26:258:487 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2022-4-1 17:40:26:355:730 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-1 17:40:26:357:463 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:40:26:455:632 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-1 17:40:26:458:531 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 17:40:26:461:61 + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 17:40:26:555:584 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 17:40:26:557:408 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 17:40:26:658:687 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 17:40:26:765:797 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:40:26:861:590 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 17:40:26:956:62 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:40:26:957:150 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 17:40:26:959:667 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 17:40:26:960:558 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/mysql/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..51f42de0 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: mysql #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:27:229:291 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:27:230:812 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:27:329:286 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:27:330:988 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 17:40:27:332:963 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 17:40:27:429:344 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-1 17:40:27:430:936 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-1 17:40:27:433:751 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-1 17:40:27:532:872 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:40:27:539:179 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:40:27:637:598 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:40:27:737:685 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 17:40:27:739:851 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:40:27:741:305 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/mysql/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..298b52a7 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: mysql #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:28:16:120 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-1 17:40:28:18:499 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:28:115:950 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-1 17:40:28:117:544 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 17:40:28:121:428 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 17:40:28:216:31 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-1 17:40:28:217:629 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-1 17:40:28:219:489 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-1 17:40:28:317:496 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:40:28:323:109 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:40:28:421:825 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:40:28:524:273 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:40:28:527:990 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:40:28:529:95 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/rat_sda_dirty_read.txt b/test_result/centralizend_result/mysql/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..1986c857 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: mysql #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:15:890:980 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:15:892:589 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:15:993:861 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:40:15:995:742 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-1 17:40:16:94:495 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:16:190:828 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 17:40:16:192:564 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:40:16:193:381 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-committed/rat_sda_intermediate_read.txt b/test_result/centralizend_result/mysql/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..a7e8469b --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: mysql #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:17:154:927 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:17:156:654 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:17:254:999 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:40:17:256:983 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-1 17:40:17:356:724 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:17:455:302 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:40:17:566:305 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 17:40:17:567:993 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:17:569:950 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/mysql/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..0cf5e574 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: mysql #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:17:848:79 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:17:849:656 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:17:948:99 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:40:17:949:820 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:40:17:950:718 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-1 17:40:18:48:940 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:40:18:55:929 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 17:40:18:57:528 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:18:59:232 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-committed/rat_sda_lost_self_update.txt b/test_result/centralizend_result/mysql/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..f240e0fd --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: mysql #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:19:301:868 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:19:303:666 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:19:401:780 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 17:40:19:502:910 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 17:40:19:510:767 + Q4 finished at: 2022-4-1 17:40:19:510:909 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:40:19:608:883 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:40:19:610:797 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:19:612:479 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-committed/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/mysql/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..f88e19f1 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: mysql #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:16:468:343 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:40:16:470:207 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:16:568:157 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:40:16:569:902 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 17:40:16:669:308 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:16:775:69 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:40:16:868:607 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:40:16:870:357 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:16:871:302 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/mysql/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..ff494e5b --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,58 @@ +#### db_type: mysql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:18:341:911 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 17:40:18:343:853 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:18:442:80 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:40:18:443:753 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:40:18:452:393 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 17:40:18:544:640 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:40:18:545:495 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-1 17:40:18:549:357 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:18:550:300 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/mysql/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..8a54dac0 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,57 @@ +#### db_type: mysql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:18:813:974 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 17:40:18:816:480 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:18:915:494 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-1 17:40:18:917:236 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:40:18:923:630 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 17:40:19:15:104 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:40:19:16:0 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-1 17:40:19:17:632 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:19:18:350 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/mysql/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..20a66e32 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,56 @@ +#### db_type: mysql #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:32:811:166 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:32:814:255 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:32:911:631 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:32:913:625 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 17:40:33:16:894 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:40:33:26:994 +Q8 finished at: 2022-4-1 17:40:33:27:6 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:33:34:272 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:33:37:176 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:33:38:144 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/mysql/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..d729419c --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,35 @@ +#### db_type: mysql #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:33:314:306 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:33:316:20 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:33:415:734 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:33:417:608 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:40:33:517:654 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:40:33:621:671 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-1 17:40:34:120:473 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/mysql/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..a603fdd5 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,35 @@ +#### db_type: mysql #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:34:415:439 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:34:417:262 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:34:515:115 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:34:516:853 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:40:34:615:687 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:40:34:733:699 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-1 17:40:35:219:901 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/mysql/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..51c32066 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: mysql #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:35:498:266 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:35:499:937 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:35:598:226 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:35:600:340 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:40:35:699:497 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:35:705:227 +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-1 17:40:36:403:84 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/mysql/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..f37cb41b --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:36:678:591 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:40:36:680:243 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:36:778:582 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:36:780:505 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:40:36:782:412 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:40:36:984:743 +Q6 finished at: 2022-4-1 17:40:36:984:792 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:40:36:990:533 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:36:993:583 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:36:994:533 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/mysql/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..8e5c8913 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:37:265:517 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:40:37:267:369 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:37:364:469 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:37:366:303 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:40:37:367:954 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:40:37:570:542 +Q6 finished at: 2022-4-1 17:40:37:570:573 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:37:669:435 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:37:672:194 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:37:673:83 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/mysql/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..17b53bf2 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:37:939:77 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:37:940:754 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:38:39:8 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:40:38:40:786 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:40:38:139:821 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:40:38:146:59 + Q5 finished at: 2022-4-1 17:40:38:146:72 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:40:38:244:715 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:38:247:219 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:38:248:174 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/mysql/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..5611e392 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:38:514:709 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:38:516:569 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:38:618:557 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:40:38:620:415 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:40:38:716:402 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:38:920:194 + Q5 finished at: 2022-4-1 17:40:38:920:225 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:40:38:925:816 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:38:928:176 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:38:929:179 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/mysql/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..bdcf551c --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:39:190:504 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:39:192:207 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:39:290:544 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:40:39:292:414 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:40:39:391:408 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:39:397:728 + Q5 finished at: 2022-4-1 17:40:39:397:769 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:39:405:143 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:39:407:25 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:39:407:915 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/mysql/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..58074662 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,44 @@ +#### db_type: mysql #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:39:677:713 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:39:679:316 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:39:777:870 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:39:780:117 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 17:40:39:877:899 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 17:40:39:880:124 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-1 17:40:39:979:319 + Q11-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:40:40:84:249 + Q11 finished at: 2022-4-1 17:40:40:84:270 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:40:40:184:366 +Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-1 17:40:40:892:678 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/read-committed/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/mysql/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..331a0499 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,44 @@ +#### db_type: mysql #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:41:161:985 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:41:163:597 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:41:261:892 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:41:263:657 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:40:41:362:212 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 17:40:41:563:79 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-1 17:40:41:663:267 + Q10-T2 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:41:768:371 + Q8 finished at: 2022-4-1 17:40:41:768:384 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:40:41:967:628 +Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-1 17:40:42:566:315 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/mysql/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..4f6c06b9 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: mysql #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:28:797:597 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:28:799:409 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:28:897:606 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; + Q4 finished at: 2022-4-1 17:40:28:998:137 +Q5 finished at: 2022-4-1 17:40:29:2:388 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:29:103:414 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 17:40:29:105:394 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-1 17:40:29:130:212 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:29:131:260 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/mysql/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..09637b67 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: mysql #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:29:375:328 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:29:377:97 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:29:475:388 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-1 17:40:29:580:856 + Q4 finished at: 2022-4-1 17:40:29:580:863 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:29:681:49 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 17:40:29:683:282 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-1 17:40:29:712:910 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:29:715:362 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-committed/wat_sda_full_write.txt b/test_result/centralizend_result/mysql/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..b841677d --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: mysql #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:29:963:442 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:29:965:119 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:30:63:538 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-1 17:40:30:164:826 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 17:40:30:172:905 + Q4 finished at: 2022-4-1 17:40:30:172:957 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:40:30:269:21 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-1 17:40:30:271:269 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:30:272:152 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-committed/wat_sda_full_write_committed.txt b/test_result/centralizend_result/mysql/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..d853b4dd --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: mysql #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:30:541:214 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:30:542:884 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:30:641:207 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-1 17:40:30:742:84 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:40:30:748:958 + Q4 finished at: 2022-4-1 17:40:30:749:11 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:40:30:755:567 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-1 17:40:30:757:212 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:30:757:970 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/mysql/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..4c1c5e1a --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: mysql #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:32:326:409 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:32:328:422 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:32:426:243 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 17:40:32:527:179 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-1 17:40:32:533:615 +Q7 finished at: 2022-4-1 17:40:32:533:750 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:40:32:541:442 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:40:32:543:400 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:32:544:293 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-committed/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/mysql/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..1a98cf28 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: mysql #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:31:30:713 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 17:40:31:32:434 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:31:130:886 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:40:31:132:780 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:40:31:336:301 +Q5 finished at: 2022-4-1 17:40:31:336:374 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 17:40:31:342:485 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:40:31:344:918 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:31:345:863 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-committed/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/mysql/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..c8c85c62 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: mysql #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:31:623:518 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 17:40:31:625:306 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:31:723:592 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:40:31:725:645 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-1 17:40:31:931:279 + Q6 finished at: 2022-4-1 17:40:31:931:602 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:40:32:30:442 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:40:32:32:443 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:32:34:87 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/mysql/read-uncommitted/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..477a84a5 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/iat_dda_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:6:826:866 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:40:6:828:598 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:6:927:53 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:6:928:821 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:40:6:930:353 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:6:936:966 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 17:40:7:28:523 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:7:29:561 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:7:31:360 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:7:32:280 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/mysql/read-uncommitted/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..da363c98 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:7:323:223 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:40:7:324:987 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:7:424:32 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:7:425:952 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:40:7:427:488 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:7:435:62 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:40:7:524:469 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:7:531:562 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:7:533:325 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:7:534:962 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/iat_dda_write_skew.txt b/test_result/centralizend_result/mysql/read-uncommitted/iat_dda_write_skew.txt new file mode 100644 index 00000000..b7c82da9 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: mysql #### +#### test_type: dda_write_skew #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:7:813:987 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:40:7:815:673 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:7:913:997 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:40:7:915:718 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:40:7:917:258 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:40:8:14:812 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:40:8:21:505 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:40:8:123:498 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:8:126:739 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:40:8:127:937 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/mysql/read-uncommitted/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..2a5f4641 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: mysql #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:9:396:707 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:40:9:398:285 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:9:496:639 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:40:9:498:294 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:40:9:499:851 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:9:508:219 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:40:9:597:593 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:9:604:144 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:9:606:78 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:9:607:17 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/mysql/read-uncommitted/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..fdd1bbe8 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,74 @@ +#### db_type: mysql #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:8:393:222 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-1 17:40:8:395:259 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-1 17:40:8:397:10 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-1 17:40:8:493:84 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + (2) expected_result: + (300,) + + Q5 finished at: 2022-4-1 17:40:8:495:116 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-1 17:40:8:496:571 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:40:8:503:942 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:8:598:422 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-1 17:40:8:601:118 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-1 17:40:8:602:779 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:40:8:603:591 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/mysql/read-uncommitted/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..32b3ae6f --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: mysql #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:8:891:288 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-1 17:40:8:893:541 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:8:991:348 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-1 17:40:8:993:784 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-1 17:40:8:996:69 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:9:3:928 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-1 17:40:9:93:245 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:9:100:217 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-1 17:40:9:102:214 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:9:103:752 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/iat_mda_step_iat.txt b/test_result/centralizend_result/mysql/read-uncommitted/iat_mda_step_iat.txt new file mode 100644 index 00000000..e045e94e --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:9:887:349 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 17:40:9:889:366 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:9:987:371 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:40:9:989:375 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:40:10:87:580 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 17:40:10:89:732 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-1 17:40:10:188:262 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 17:40:10:288:399 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-1 17:40:10:388:502 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:40:10:493:435 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:40:10:593:802 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:40:10:694:521 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:40:10:696:870 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:40:10:697:785 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/mysql/read-uncommitted/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..248193a8 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,106 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:14:522:914 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:40:14:524:834 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:14:623:141 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:40:14:624:842 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:40:14:630:942 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 17:40:14:723:29 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 17:40:14:725:496 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 17:40:14:727:345 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:14:741:803 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2022-4-1 17:40:14:824:207 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 17:40:14:825:279 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-1 17:40:14:827:749 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 17:40:14:828:641 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/mysql/read-uncommitted/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..cf4a4f32 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,207 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:13:731:403 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:40:13:733:945 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:13:831:332 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:40:13:834:78 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:40:13:931:394 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-1 17:40:13:933:148 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:40:13:940:425 + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 17:40:14:31:493 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 17:40:14:33:321 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:14:40:772 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-4-1 17:40:14:133:446 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:40:14:134:589 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-1 17:40:14:237:288 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-1 17:40:14:238:808 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 17:40:14:243:362 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 17:40:14:244:368 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/mysql/read-uncommitted/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..6e1f37b5 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:10:977:933 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-1 17:40:10:979:939 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:11:77:462 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:40:11:79:656 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:40:11:177:570 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 17:40:11:179:675 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-1 17:40:11:278:708 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-1 17:40:11:380:283 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-1 17:40:11:478:747 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:40:11:584:444 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:40:11:688:160 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:40:11:784:536 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 17:40:11:786:622 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:40:11:787:844 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/mysql/read-uncommitted/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..7404e52d --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:12:59:257 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 17:40:12:62:249 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:12:159:163 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-1 17:40:12:161:215 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:40:12:259:213 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-1 17:40:12:261:310 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-1 17:40:12:360:30 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-1 17:40:12:460:226 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-1 17:40:12:560:133 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:40:12:665:725 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:40:12:765:470 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:40:12:865:602 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:40:12:869:58 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:40:12:870:2 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/mysql/read-uncommitted/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..67722dfa --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:15:132:593 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 17:40:15:134:730 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-1 17:40:15:136:893 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-1 17:40:15:232:934 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-1 17:40:15:235:601 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-1 17:40:15:237:353 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:40:15:244:628 + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 17:40:15:332:690 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-1 17:40:15:335:173 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 17:40:15:337:283 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:40:15:338:280 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-1 17:40:15:433:711 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-1 17:40:15:441:25 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-1 17:40:15:443:352 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-1 17:40:15:445:10 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/mysql/read-uncommitted/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..9800e172 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,162 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:13:152:23 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-1 17:40:13:153:960 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:13:252:29 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-1 17:40:13:254:496 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:40:13:256:167 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 17:40:13:258:160 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-1 17:40:13:259:654 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:40:13:266:525 + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2022-4-1 17:40:13:352:45 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-1 17:40:13:354:423 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-1 17:40:13:356:62 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-1 17:40:13:357:915 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-1 17:40:13:359:283 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:40:13:365:617 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2022-4-1 17:40:13:453:513 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-1 17:40:13:454:557 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-1 17:40:13:457:119 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-1 17:40:13:458:114 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/mysql/read-uncommitted/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..292b57b8 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: mysql #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:6:333:610 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 17:40:6:335:263 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:6:433:566 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:40:6:435:358 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:40:6:447:846 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-1 17:40:6:534:503 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:40:6:542:540 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:40:6:544:859 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:6:545:794 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/mysql/read-uncommitted/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..0504d43b --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,60 @@ +#### db_type: mysql #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:5:854:385 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:40:5:855:975 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:5:954:380 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:40:5:956:152 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:40:5:964:276 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 17:40:6:55:277 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:40:6:56:173 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:40:6:57:769 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:6:58:614 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:6:59:389 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..8a7c4803 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_double_write_skew1.txt @@ -0,0 +1,54 @@ +#### db_type: mysql #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:43:833:232 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:39:43:835:98 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:43:933:132 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:39:43:934:977 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:39:43:936:597 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:39:44:141:732 +Q6 finished at: 2022-4-1 17:39:44:141:792 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:39:44:239:636 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-1 17:39:44:242:685 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:39:44:243:535 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..10a5748f --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: mysql #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:44:529:880 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:39:44:531:601 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:44:629:807 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:39:44:631:572 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:39:44:633:373 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:39:44:641:689 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-1 17:39:44:730:780 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:39:44:736:877 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-1 17:39:44:739:198 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:39:44:740:138 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..89be7cb3 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_double_write_skew2.txt @@ -0,0 +1,54 @@ +#### db_type: mysql #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:44:997:822 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:39:44:999:448 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:45:97:765 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:39:45:99:524 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 17:39:45:200:480 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:39:45:206:816 + Q5 finished at: 2022-4-1 17:39:45:206:876 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:39:45:303:507 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:39:45:306:282 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:39:45:307:266 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_read_skew.txt b/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_read_skew.txt new file mode 100644 index 00000000..0137f173 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:45:584:923 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:39:45:586:606 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:45:684:972 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:39:45:686:706 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:39:45:688:258 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 17:39:45:786:201 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:39:45:891:940 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:39:45:985:438 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:39:45:987:478 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:39:45:988:330 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_read_skew2.txt b/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_read_skew2.txt new file mode 100644 index 00000000..0c5eddf9 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_read_skew2.txt @@ -0,0 +1,61 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:47:226:388 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:39:47:228:91 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:47:327:184 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:39:47:329:215 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:39:47:330:953 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:39:47:430:931 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:39:47:440:49 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:39:47:526:773 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:39:47:528:821 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:39:47:529:780 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..8ad1094c --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_read_skew2_committed.txt @@ -0,0 +1,61 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:47:808:337 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:39:47:810:69 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:47:911:10 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:39:47:912:808 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:39:47:914:294 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:39:47:915:205 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:39:48:11:680 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:39:48:19:580 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:39:48:22:499 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:39:48:23:502 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..b5ff46a2 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,61 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:46:275:991 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 17:39:46:277:929 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:46:382:27 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:39:46:383:840 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:39:46:385:392 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:39:46:392:277 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 17:39:46:477:142 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:39:46:478:64 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-1 17:39:46:479:909 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:39:46:480:733 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..8fcc0981 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,59 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:46:751:597 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 17:39:46:754:336 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:46:851:383 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-1 17:39:46:852:934 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-1 17:39:46:854:303 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:39:46:863:884 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 17:39:46:952:521 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:39:46:953:402 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-1 17:39:46:955:356 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:39:46:956:409 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_write_read_skew.txt b/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..150dd007 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: mysql #### +#### test_type: dda_write_read_skew #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:42:629:945 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:39:42:631:733 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:42:729:877 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:39:42:731:587 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:39:42:733:230 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 17:39:42:830:860 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:39:42:935:539 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:39:43:38:156 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:39:43:40:192 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:39:43:41:56 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..c9813c8c --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: mysql #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:43:326:747 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:39:43:328:401 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:43:426:897 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:39:43:428:961 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:39:43:430:689 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:39:43:437:575 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 17:39:43:528:49 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:39:43:533:988 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:39:43:536:506 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:39:43:538:169 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/rat_mda_step_rat.txt b/test_result/centralizend_result/mysql/read-uncommitted/rat_mda_step_rat.txt new file mode 100644 index 00000000..b47261a0 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: mysql #### +#### test_type: mda_step_rat #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:48:297:107 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:39:48:298:785 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:48:397:82 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:39:48:399:148 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + (3) expected_result: + (0,0) + (4) expected_result: + (0,0) + *(5) expected_result: + (0,1) + (6) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:39:48:400:951 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 17:39:48:497:440 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-1 17:39:48:499:479 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + *(1) expected_result: + (1,1) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q8 finished at: 2022-4-1 17:39:48:501:655 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + *(4) expected_result: + (2,1) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q9 finished at: 2022-4-1 17:39:48:598:447 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:39:48:604:583 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:39:48:702:268 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:39:48:802:397 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:39:48:805:401 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:39:48:806:254 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/mysql/read-uncommitted/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..4384965e --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,207 @@ +#### db_type: mysql #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2022-4-1 17:39:49:70:157 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-1 17:39:49:72:745 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2022-4-1 17:39:49:170:313 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-1 17:39:49:172:370 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:39:49:269:832 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-1 17:39:49:272:775 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + *(5) expected_result: + (0,1) + (6) expected_result: + (0,0) + *(7) expected_result: + (0,1) + *(8) expected_result: + (0,1) + *(9) expected_result: + (0,1) + (10) expected_result: + (0,0) + (11) expected_result: + (0,0) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + (14) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 17:39:49:275:702 + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 17:39:49:372:581 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 17:39:49:374:575 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + (3) expected_result: + (1,0) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + *(6) expected_result: + (1,1) + (7) expected_result: + (1,0) + *(8) expected_result: + (1,1) + *(9) expected_result: + (1,1) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + (12) expected_result: + (1,0) + (13) expected_result: + (1,0) + (14) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 17:39:49:472:182 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 17:39:49:576:318 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:39:49:681:15 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 17:39:49:770:326 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:39:49:771:475 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 17:39:49:774:505 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 17:39:49:775:363 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/mysql/read-uncommitted/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..5f4a01c4 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: mysql #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:50:65:653 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:39:50:67:202 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:50:165:660 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:39:50:167:457 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 17:39:50:169:402 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 17:39:50:265:743 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-1 17:39:50:267:480 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + *(1) expected_result: + (,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q8 finished at: 2022-4-1 17:39:50:269:538 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + (3) expected_result: + (1,) + *(4) expected_result: + (,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-1 17:39:50:367:234 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:39:50:374:16 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:39:50:471:785 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:39:50:573:688 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 17:39:50:575:770 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:39:50:577:729 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/mysql/read-uncommitted/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..9e0a0fc9 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: mysql #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:50:846:572 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-1 17:39:50:848:910 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:50:946:728 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-1 17:39:50:948:411 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 17:39:50:950:518 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 17:39:51:46:832 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-1 17:39:51:48:412 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + (4) expected_result: + (,) + *(5) expected_result: + (1,) + (6) expected_result: + (,) + + Q8 finished at: 2022-4-1 17:39:51:50:205 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-1 17:39:51:148:12 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:39:51:154:124 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:39:51:252:223 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:39:51:353:698 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:39:51:355:904 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:39:51:356:836 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/rat_sda_dirty_read.txt b/test_result/centralizend_result/mysql/read-uncommitted/rat_sda_dirty_read.txt new file mode 100644 index 00000000..14a67a80 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/rat_sda_dirty_read.txt @@ -0,0 +1,45 @@ +#### db_type: mysql #### +#### test_type: sda_dirty_read #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:38:681:749 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:39:38:728:904 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:38:781:667 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:39:38:784:510 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-1 17:39:38:884:460 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:39:38:981:744 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 17:39:38:984:441 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:39:38:985:337 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/rat_sda_intermediate_read.txt b/test_result/centralizend_result/mysql/read-uncommitted/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..d854b0f0 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/rat_sda_intermediate_read.txt @@ -0,0 +1,51 @@ +#### db_type: mysql #### +#### test_type: sda_intermediate_read #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:39:920:717 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:39:39:922:316 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:40:20:713 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:39:40:22:658 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-1 17:39:40:124:431 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:39:40:221:187 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:39:40:326:344 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 17:39:40:328:689 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:39:40:329:445 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/mysql/read-uncommitted/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..9d80ed59 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,51 @@ +#### db_type: mysql #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:40:589:388 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:39:40:590:920 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:40:689:556 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:39:40:691:661 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:39:40:692:779 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-1 17:39:40:790:634 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:39:40:801:155 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 17:39:40:803:543 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:39:40:804:400 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/rat_sda_lost_self_update.txt b/test_result/centralizend_result/mysql/read-uncommitted/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..183ba2af --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: mysql #### +#### test_type: sda_lost_self_update #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:42:46:206 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:39:42:48:285 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:42:147:672 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 17:39:42:248:5 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-1 17:39:42:254:419 +Q6 finished at: 2022-4-1 17:39:42:254:459 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:39:42:352:863 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:39:42:354:771 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:39:42:356:109 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/mysql/read-uncommitted/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..7703699d --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/rat_sda_non_repeatable_read.txt @@ -0,0 +1,58 @@ +#### db_type: mysql #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:39:251:736 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:39:39:253:862 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:39:351:455 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:39:39:353:220 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 17:39:39:452:462 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:39:39:557:141 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:39:39:652:739 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:39:39:654:613 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:39:39:655:480 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/mysql/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..3434dab0 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,58 @@ +#### db_type: mysql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:41:67:322 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 17:39:41:69:302 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:41:167:216 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:39:41:169:93 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:39:41:182:198 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 17:39:41:268:726 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:39:41:269:725 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-1 17:39:41:271:340 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:39:41:272:234 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/mysql/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..73456bb7 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,57 @@ +#### db_type: mysql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:41:575:649 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 17:39:41:578:224 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:41:675:821 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-1 17:39:41:677:584 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:39:41:684:10 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 17:39:41:776:680 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:39:41:777:495 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-1 17:39:41:779:79 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:39:41:779:909 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..df85a5d4 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: mysql #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:55:593:938 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:39:55:595:533 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:55:694:10 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:39:55:695:841 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 17:39:55:794:942 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:39:55:800:887 + Q5 finished at: 2022-4-1 17:39:55:800:911 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:39:55:806:851 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:39:55:809:483 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:39:55:810:313 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..3e9c4489 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,35 @@ +#### db_type: mysql #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:56:78:714 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:39:56:80:295 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:56:178:895 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:39:56:180:828 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:39:56:324:376 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:39:56:383:898 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-1 17:39:56:927:783 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..06c93f4b --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,35 @@ +#### db_type: mysql #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:57:199:724 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:39:57:201:344 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:57:299:599 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:39:57:301:243 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:39:57:401:49 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:39:57:505:341 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-1 17:39:58:4:636 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..a5639f2e --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: mysql #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:58:274:340 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:39:58:276:82 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:58:374:272 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:39:58:376:210 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:39:58:475:509 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:39:58:487:155 +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-1 17:39:59:182:225 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..75e9d872 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:59:472:577 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:39:59:474:229 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:59:575:607 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:39:59:577:348 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:39:59:578:985 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:39:59:780:453 +Q6 finished at: 2022-4-1 17:39:59:780:490 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:39:59:794:56 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:39:59:796:290 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:39:59:797:269 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..bd8bb911 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:0:78:939 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:40:0:80:761 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:0:183:683 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:0:185:525 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:40:0:187:129 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:40:0:389:242 +Q6 finished at: 2022-4-1 17:40:0:389:313 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:0:492:693 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:0:494:946 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:0:496:67 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..e6af5785 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:0:777:705 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:0:779:369 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:0:891:423 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:40:0:893:299 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:40:0:979:991 +Q7-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:40:0:991:431 +Q7 finished at: 2022-4-1 17:40:0:991:506 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:40:1:96:797 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:1:98:993 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:1:100:54 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..faaa43cc --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:1:454:914 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:1:456:613 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:1:555:594 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:40:1:558:660 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:40:1:660:418 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:40:1:862:820 +Q8 finished at: 2022-4-1 17:40:1:863:225 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:40:1:870:777 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:1:872:856 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:1:873:781 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..51f9bb82 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:2:181:45 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:2:183:4 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:2:281:674 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:40:2:283:545 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:40:2:384:228 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:2:391:19 + Q5 finished at: 2022-4-1 17:40:2:391:32 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:2:397:974 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:2:400:68 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:2:402:52 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/mysql/read-uncommitted/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..c6b6be40 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/wat_mda_step_wat_c1.txt @@ -0,0 +1,44 @@ +#### db_type: mysql #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:2:685:118 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:2:686:998 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:2:785:25 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:2:786:749 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 17:40:2:885:393 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 17:40:2:887:437 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-1 17:40:2:988:770 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:40:3:91:707 + Q8 finished at: 2022-4-1 17:40:3:91:696 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:40:3:190:779 +Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-1 17:40:3:891:829 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/mysql/read-uncommitted/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..d1dcf17d --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/wat_mda_step_wat_c2.txt @@ -0,0 +1,44 @@ +#### db_type: mysql #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:4:166:194 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:4:168:44 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:4:266:160 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:4:267:900 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:40:4:366:205 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 17:40:4:567:463 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-1 17:40:4:667:558 + Q10-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:40:4:773:53 + Q10 finished at: 2022-4-1 17:40:4:773:100 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:40:4:972:580 +Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-1 17:40:5:572:326 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/mysql/read-uncommitted/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..d144d54e --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: mysql #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:51:619:701 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:39:51:621:288 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:51:719:849 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; + Q4 finished at: 2022-4-1 17:39:51:820:253 +Q5 finished at: 2022-4-1 17:39:51:822:958 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:39:51:926:925 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 17:39:51:929:393 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-1 17:39:51:951:194 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:39:51:952:125 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/mysql/read-uncommitted/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..6da04e2c --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: mysql #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:52:204:716 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:39:52:206:304 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:52:304:769 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-1 17:39:52:410:410 + Q4 finished at: 2022-4-1 17:39:52:410:472 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:39:52:510:582 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 17:39:52:512:812 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-1 17:39:52:534:171 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:39:52:535:69 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/wat_sda_full_write.txt b/test_result/centralizend_result/mysql/read-uncommitted/wat_sda_full_write.txt new file mode 100644 index 00000000..a9aa7cb5 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: mysql #### +#### test_type: sda_full_write #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:52:786:722 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:39:52:788:377 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:52:886:685 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-1 17:39:52:987:623 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 17:39:52:997:172 + Q4 finished at: 2022-4-1 17:39:52:997:163 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:39:53:93:286 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-1 17:39:53:95:175 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:39:53:96:625 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/wat_sda_full_write_committed.txt b/test_result/centralizend_result/mysql/read-uncommitted/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..36e3b654 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: mysql #### +#### test_type: sda_full_write_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:53:363:712 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:39:53:365:761 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:53:463:620 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-1 17:39:53:564:485 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:39:53:570:956 + Q4 finished at: 2022-4-1 17:39:53:571:21 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:39:53:577:44 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-1 17:39:53:579:341 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:39:53:580:197 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/mysql/read-uncommitted/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..b00112fb --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: mysql #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:55:97:661 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:39:55:99:275 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:55:197:702 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 17:39:55:298:737 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:39:55:305:633 + Q4 finished at: 2022-4-1 17:39:55:305:712 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:39:55:312:522 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:39:55:314:177 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:39:55:315:819 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/mysql/read-uncommitted/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..4abfdd13 --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: mysql #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:53:842:95 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 17:39:53:843:805 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:53:941:978 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:39:53:943:582 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:39:54:148:195 +Q5 finished at: 2022-4-1 17:39:54:148:203 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 17:39:54:155:277 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:39:54:157:35 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:39:54:158:492 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/read-uncommitted/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/mysql/read-uncommitted/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..694305aa --- /dev/null +++ b/test_result/centralizend_result/mysql/read-uncommitted/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: mysql #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:39:54:424:768 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 17:39:54:426:385 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:39:54:524:680 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:39:54:526:881 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-1 17:39:54:730:776 + Q6 finished at: 2022-4-1 17:39:54:730:752 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:39:54:830:937 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:39:54:832:815 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:39:54:834:745 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/repeatable-read/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/mysql/repeatable-read/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..73966363 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/iat_dda_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:20:925:714 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:41:20:927:605 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:21:26:49 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:21:27:855 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:41:21:29:318 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:21:36:421 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 17:41:21:126:615 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:41:21:127:670 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:41:21:130:115 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:41:21:131:57 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/mysql/repeatable-read/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..4bfbb67c --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:21:398:261 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:41:21:400:123 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:21:500:613 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:21:502:707 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:41:21:504:354 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:21:515:760 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:41:21:600:656 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:41:21:607:540 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:41:21:609:468 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:41:21:611:427 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/repeatable-read/iat_dda_write_skew.txt b/test_result/centralizend_result/mysql/repeatable-read/iat_dda_write_skew.txt new file mode 100644 index 00000000..47755e54 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: mysql #### +#### test_type: dda_write_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:21:887:33 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:41:21:888:752 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:21:987:283 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:41:21:989:286 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:41:21:990:864 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:41:22:87:965 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:41:22:93:993 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:41:22:192:411 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:41:22:195:215 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:41:22:196:184 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/repeatable-read/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/mysql/repeatable-read/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..04a9228e --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: mysql #### +#### test_type: dda_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:23:445:726 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:41:23:447:501 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:23:545:756 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:41:23:547:542 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:41:23:549:9 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:23:555:483 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:41:23:646:872 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:41:23:656:882 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:41:23:659:540 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:41:23:660:569 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/mysql/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..9c350e70 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: mysql #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:22:466:988 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-1 17:41:22:469:190 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-1 17:41:22:470:919 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-1 17:41:22:567:99 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-1 17:41:22:569:639 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-1 17:41:22:571:566 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:41:22:578:441 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:41:22:676:3 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-1 17:41:22:679:98 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-1 17:41:22:680:928 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:41:22:681:879 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/mysql/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..20a776ed --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: mysql #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:22:956:213 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-1 17:41:22:958:708 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:23:59:645 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-1 17:41:23:62:72 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-1 17:41:23:64:565 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:23:70:692 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-1 17:41:23:158:79 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:41:23:163:692 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-1 17:41:23:166:333 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:41:23:167:261 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/repeatable-read/iat_mda_step_iat.txt b/test_result/centralizend_result/mysql/repeatable-read/iat_mda_step_iat.txt new file mode 100644 index 00000000..976074be --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:23:921:833 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 17:41:23:923:973 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:24:21:862 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:41:24:24:234 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:41:24:122:195 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 17:41:24:124:267 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-1 17:41:24:223:185 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 17:41:24:324:514 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-1 17:41:24:423:297 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:41:24:527:717 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:41:24:627:593 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:41:24:729:275 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:41:24:732:379 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:41:24:733:423 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/mysql/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..e5b3ef53 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:28:568:514 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:41:28:576:755 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:28:668:537 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:41:28:670:298 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:41:28:676:209 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 17:41:28:768:719 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 17:41:28:771:138 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 17:41:28:772:877 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:41:28:782:26 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-1 17:41:28:869:681 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 17:41:28:870:768 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-1 17:41:28:872:873 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 17:41:28:873:768 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/mysql/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..6499ed26 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,209 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:27:781:36 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:41:27:783:766 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:27:881:659 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:41:27:884:628 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:41:27:981:126 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-1 17:41:27:983:12 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:41:27:994:250 + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 17:41:28:81:380 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 17:41:28:83:467 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:41:28:89:921 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-1 17:41:28:183:362 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:41:28:184:699 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-1 17:41:28:283:283 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-1 17:41:28:284:809 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 17:41:28:287:964 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 17:41:28:289:10 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/mysql/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..21a264de --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:25:16:96 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-1 17:41:25:18:5 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:25:116:203 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:41:25:118:513 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:41:25:216:182 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 17:41:25:218:338 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-1 17:41:25:317:184 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-1 17:41:25:417:141 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-1 17:41:25:517:211 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:41:25:622:959 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:41:25:723:140 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:41:25:823:660 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 17:41:25:826:887 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:41:25:828:239 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/mysql/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..c3312682 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:26:92:118 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 17:41:26:95:43 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:26:193:50 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-1 17:41:26:195:209 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:41:26:292:167 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-1 17:41:26:294:370 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-1 17:41:26:393:206 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-1 17:41:26:493:243 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-1 17:41:26:593:114 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:41:26:698:792 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:41:26:798:168 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:41:26:900:198 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:41:26:902:865 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:41:26:903:950 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/mysql/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..66d3b6cb --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:29:141:92 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 17:41:29:143:46 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-1 17:41:29:144:839 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-1 17:41:29:240:921 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-1 17:41:29:243:103 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-1 17:41:29:244:672 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:41:29:252:368 + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 17:41:29:340:946 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-1 17:41:29:343:15 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 17:41:29:344:961 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:41:29:345:937 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-1 17:41:29:441:822 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-1 17:41:29:448:398 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-1 17:41:29:450:805 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-1 17:41:29:452:247 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/repeatable-read/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/mysql/repeatable-read/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..1182f47d --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,164 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:27:195:256 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-1 17:41:27:197:427 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:27:295:238 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-1 17:41:27:297:615 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:41:27:299:95 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 17:41:27:300:959 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-1 17:41:27:302:499 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:41:27:309:448 + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2022-4-1 17:41:27:395:332 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-1 17:41:27:397:765 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-1 17:41:27:399:466 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-1 17:41:27:401:529 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-1 17:41:27:402:977 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:41:27:411:361 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-1 17:41:27:496:715 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-1 17:41:27:497:882 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-1 17:41:27:500:265 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-1 17:41:27:501:214 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/mysql/repeatable-read/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..6ae309b1 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: mysql #### +#### test_type: sda_lost_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:20:438:682 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 17:41:20:440:302 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:20:538:633 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:41:20:540:369 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:41:20:547:567 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-1 17:41:20:639:702 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:41:20:646:556 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:41:20:648:540 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:41:20:650:74 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/repeatable-read/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/mysql/repeatable-read/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..6f93c59e --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: mysql #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:19:967:2 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:41:19:968:735 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:20:67:605 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:41:20:69:469 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:41:20:81:370 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 17:41:20:167:790 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:41:20:168:828 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:41:20:170:758 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:41:20:171:636 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:41:20:172:470 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/mysql/repeatable-read/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..f0df128f --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/rat_dda_double_write_skew1.txt @@ -0,0 +1,56 @@ +#### db_type: mysql #### +#### test_type: dda_double_write_skew1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:58:16:0 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:58:17:883 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:58:115:771 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:58:117:479 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:40:58:119:93 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 17:40:58:321:891 + Q7 finished at: 2022-4-1 17:40:58:322:330 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:58:421:882 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-1 17:40:58:423:843 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:58:424:713 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/mysql/repeatable-read/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..e9446a07 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,56 @@ +#### db_type: mysql #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:58:701:38 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:58:702:692 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:58:800:944 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:58:802:615 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:40:58:804:137 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:58:809:909 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-1 17:40:58:901:861 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:58:908:334 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-1 17:40:58:910:468 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:58:912:41 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/mysql/repeatable-read/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..b1ae7deb --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/rat_dda_double_write_skew2.txt @@ -0,0 +1,56 @@ +#### db_type: mysql #### +#### test_type: dda_double_write_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:59:183:187 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:59:185:163 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:59:283:114 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:59:284:864 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 17:40:59:384:209 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:40:59:391:507 + Q5 finished at: 2022-4-1 17:40:59:391:568 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:40:59:490:956 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:59:493:555 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:59:494:337 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/rat_dda_read_skew.txt b/test_result/centralizend_result/mysql/repeatable-read/rat_dda_read_skew.txt new file mode 100644 index 00000000..21838f02 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:59:762:97 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:40:59:763:811 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:59:862:133 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:59:863:912 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:40:59:865:325 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 17:40:59:963:226 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:41:0:67:597 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:41:0:162:527 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:41:0:164:613 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:41:0:165:455 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/rat_dda_read_skew2.txt b/test_result/centralizend_result/mysql/repeatable-read/rat_dda_read_skew2.txt new file mode 100644 index 00000000..3397bada --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:1:376:85 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:1:377:788 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:1:476:70 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:41:1:477:972 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:41:1:479:634 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:41:1:577:233 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:41:1:585:115 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:41:1:679:738 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:41:1:681:610 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:41:1:682:426 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/mysql/repeatable-read/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..3ade1796 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:1:985:744 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:1:987:334 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:2:84:463 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:41:2:86:691 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:41:2:88:244 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:2:89:124 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:41:2:186:969 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:41:2:224:224 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:41:2:226:220 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:41:2:227:27 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/mysql/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..1b91b6c8 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:0:429:798 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 17:41:0:431:510 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:0:529:801 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:0:531:568 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:41:0:532:966 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:0:539:587 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 17:41:0:631:148 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:41:0:632:123 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-1 17:41:0:633:870 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:41:0:635:555 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/mysql/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..9347cb70 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:0:890:604 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 17:41:0:893:7 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:0:990:534 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-1 17:41:0:992:78 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-1 17:41:0:993:374 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:1:5:325 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 17:41:1:91:681 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:41:1:92:627 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-1 17:41:1:94:416 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:41:1:95:220 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/rat_dda_write_read_skew.txt b/test_result/centralizend_result/mysql/repeatable-read/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..99e3035f --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: mysql #### +#### test_type: dda_write_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:56:862:683 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:56:864:322 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:56:962:743 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:56:964:747 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:40:56:967:978 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 17:40:57:64:746 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:40:57:168:408 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:57:268:557 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:57:271:179 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:57:272:122 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/repeatable-read/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/mysql/repeatable-read/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..7ac35b5a --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: mysql #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:57:538:874 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:57:540:466 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:57:638:903 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:40:57:640:610 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:40:57:643:37 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:57:648:517 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 17:40:57:740:68 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:40:57:746:412 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:40:57:748:227 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:40:57:749:70 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/rat_mda_step_rat.txt b/test_result/centralizend_result/mysql/repeatable-read/rat_mda_step_rat.txt new file mode 100644 index 00000000..310822cf --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: mysql #### +#### test_type: mda_step_rat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:2:551:705 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:2:553:374 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:2:651:670 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:2:653:390 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:41:2:655:356 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 17:41:2:751:923 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-1 17:41:2:753:647 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-1 17:41:2:756:609 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-1 17:41:2:853:108 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:41:2:860:21 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:41:2:957:826 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:41:3:57:649 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:41:3:60:113 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:41:3:62:172 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/repeatable-read/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/mysql/repeatable-read/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..3544d936 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: mysql #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2022-4-1 17:41:3:345:877 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-1 17:41:3:348:596 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2022-4-1 17:41:3:445:790 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-1 17:41:3:447:481 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:41:3:545:708 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-1 17:41:3:548:528 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 17:41:3:551:155 + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 17:41:3:645:765 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 17:41:3:647:417 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 17:41:3:747:790 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 17:41:3:851:401 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:41:3:952:576 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 17:41:4:46:290 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:41:4:48:499 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 17:41:4:51:16 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 17:41:4:51:877 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/mysql/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..b6615d93 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: mysql #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:4:319:792 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:4:321:384 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:4:419:809 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:4:421:651 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 17:41:4:423:832 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 17:41:4:519:824 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-1 17:41:4:521:398 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-1 17:41:4:523:308 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-1 17:41:4:621:427 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:41:4:628:105 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:41:4:737:319 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:41:4:830:397 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 17:41:4:833:606 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:41:4:834:754 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/mysql/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..fe4f73cb --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: mysql #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:5:94:615 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-1 17:41:5:96:915 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:5:194:839 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-1 17:41:5:196:928 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 17:41:5:199:898 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 17:41:5:294:794 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-1 17:41:5:296:474 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-1 17:41:5:298:445 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-1 17:41:5:396:203 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:41:5:402:534 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:41:5:500:522 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:41:5:601:227 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:41:5:604:441 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:41:5:605:368 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/repeatable-read/rat_sda_dirty_read.txt b/test_result/centralizend_result/mysql/repeatable-read/rat_sda_dirty_read.txt new file mode 100644 index 00000000..49dceac2 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: mysql #### +#### test_type: sda_dirty_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:52:785:213 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:52:786:983 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:52:886:208 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:40:52:888:238 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-1 17:40:52:991:192 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:53:84:746 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 17:40:53:86:903 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:40:53:87:875 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/rat_sda_intermediate_read.txt b/test_result/centralizend_result/mysql/repeatable-read/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..6a2ac94f --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: mysql #### +#### test_type: sda_intermediate_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:54:29:887 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:54:31:590 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:54:129:669 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:40:54:131:636 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-1 17:40:54:230:804 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:54:330:39 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:40:54:438:364 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 17:40:54:440:324 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:54:441:504 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/mysql/repeatable-read/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..a7db0e22 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: mysql #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:54:757:542 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:54:759:333 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:54:856:977 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:40:54:858:804 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:40:54:859:687 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-1 17:40:54:959:698 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:40:54:966:539 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 17:40:54:968:451 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:54:969:341 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/rat_sda_lost_self_update.txt b/test_result/centralizend_result/mysql/repeatable-read/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..ad38f1da --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: mysql #### +#### test_type: sda_lost_self_update #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:56:277:702 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:40:56:279:390 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:56:377:601 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 17:40:56:478:823 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 17:40:56:484:943 + Q4 finished at: 2022-4-1 17:40:56:485:135 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:40:56:582:794 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:40:56:584:675 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:56:585:526 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/mysql/repeatable-read/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..871ca4c7 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: mysql #### +#### test_type: sda_non_repeatable_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:53:353:285 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:40:53:355:143 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:53:453:214 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:40:53:454:988 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 17:40:53:559:86 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:40:53:659:391 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:40:53:753:914 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:40:53:756:99 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:53:757:244 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/mysql/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..9b5ba6d2 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: mysql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:55:244:756 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 17:40:55:246:567 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:55:344:713 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:40:55:346:446 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:40:55:354:890 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 17:40:55:446:856 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:40:55:447:747 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-1 17:40:55:449:514 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:55:450:323 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/mysql/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..4cbc80e1 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: mysql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:40:55:725:340 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 17:40:55:727:931 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:40:55:825:264 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-1 17:40:55:826:955 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:40:55:841:475 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 17:40:55:926:181 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:40:55:927:46 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-1 17:40:55:928:726 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:40:55:929:557 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/mysql/repeatable-read/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..de9b81d3 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,56 @@ +#### db_type: mysql #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:9:949:309 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:9:951:73 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:10:49:313 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:10:51:149 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 17:41:10:150:634 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:41:10:159:657 + Q5 finished at: 2022-4-1 17:41:10:159:769 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:10:165:716 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:41:10:167:660 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:41:10:168:621 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/mysql/repeatable-read/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..0c1f5bd2 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,35 @@ +#### db_type: mysql #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:10:458:512 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:10:460:402 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:10:558:358 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:10:560:338 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:41:10:659:705 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:41:10:769:193 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-1 17:41:11:266:333 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/repeatable-read/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/mysql/repeatable-read/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..7f3d2da0 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,35 @@ +#### db_type: mysql #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:11:542:140 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:11:543:753 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:11:642:183 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:11:643:872 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:41:11:744:707 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:41:11:848:11 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-1 17:41:12:347:797 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/repeatable-read/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/mysql/repeatable-read/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..1e756ddf --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: mysql #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:12:618:252 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:12:619:970 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:12:718:55 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:12:719:869 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:41:12:819:383 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:12:825:466 +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-1 17:41:13:522:540 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/repeatable-read/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/mysql/repeatable-read/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..480f33ad --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:13:789:844 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:41:13:791:525 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:13:889:899 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:13:891:934 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:41:13:893:617 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:41:14:95:594 +Q6 finished at: 2022-4-1 17:41:14:95:645 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:41:14:101:311 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:41:14:103:679 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:41:14:104:625 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/repeatable-read/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/mysql/repeatable-read/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..5d373f07 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:14:374:75 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:41:14:375:831 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:14:474:49 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:14:475:889 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:41:14:477:343 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:41:14:679:984 +Q6 finished at: 2022-4-1 17:41:14:680:26 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:41:14:790:748 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:41:14:794:168 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:41:14:795:118 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/repeatable-read/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/mysql/repeatable-read/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..18e31d03 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:15:62:119 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:15:64:125 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:15:162:76 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:41:15:164:279 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:41:15:262:986 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:41:15:269:956 + Q5 finished at: 2022-4-1 17:41:15:269:990 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:41:15:367:669 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:41:15:370:22 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:41:15:371:66 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/repeatable-read/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/mysql/repeatable-read/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..5cceefeb --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:15:642:786 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:15:644:373 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:15:742:785 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:41:15:744:698 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:41:15:843:831 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:41:16:50:57 + Q5 finished at: 2022-4-1 17:41:16:50:88 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:41:16:57:412 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:41:16:59:392 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:41:16:60:741 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/repeatable-read/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/mysql/repeatable-read/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..d94ca8d2 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:16:333:724 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:16:335:460 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:16:433:777 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:41:16:435:573 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:41:16:534:632 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:41:16:541:75 + Q5 finished at: 2022-4-1 17:41:16:541:122 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:16:547:354 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:41:16:549:678 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:41:16:550:519 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/repeatable-read/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/mysql/repeatable-read/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..0b8c173c --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/wat_mda_step_wat_c1.txt @@ -0,0 +1,44 @@ +#### db_type: mysql #### +#### test_type: mda_step_wat_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:16:811:365 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:16:812:861 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:16:911:673 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:16:913:768 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 17:41:17:11:424 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 17:41:17:13:175 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-1 17:41:17:112:920 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:41:17:217:602 + Q8 finished at: 2022-4-1 17:41:17:217:685 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:41:17:317:218 +Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-1 17:41:18:15:762 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/repeatable-read/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/mysql/repeatable-read/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..199e35a8 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/wat_mda_step_wat_c2.txt @@ -0,0 +1,44 @@ +#### db_type: mysql #### +#### test_type: mda_step_wat_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:18:289:639 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:18:291:276 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:18:389:595 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:18:391:330 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:41:18:491:558 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 17:41:18:691:16 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-1 17:41:18:791:65 + Q10-T2 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:41:18:895:111 + Q8 finished at: 2022-4-1 17:41:18:895:136 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:41:19:98:171 +Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-1 17:41:19:693:844 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/repeatable-read/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/mysql/repeatable-read/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..ac890cf5 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: mysql #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:5:880:900 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:5:882:621 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:5:981:755 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; + Q4 finished at: 2022-4-1 17:41:6:84:638 +Q5 finished at: 2022-4-1 17:41:6:87:991 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:6:189:788 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 17:41:6:191:759 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-1 17:41:6:211:626 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:41:6:212:873 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/mysql/repeatable-read/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..3146d9a5 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: mysql #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:6:483:266 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:6:485:211 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:6:583:24 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-1 17:41:6:689:404 +Q5 finished at: 2022-4-1 17:41:6:689:460 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:6:789:544 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 17:41:6:791:372 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-1 17:41:6:810:731 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:41:6:811:874 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/wat_sda_full_write.txt b/test_result/centralizend_result/mysql/repeatable-read/wat_sda_full_write.txt new file mode 100644 index 00000000..504b886e --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: mysql #### +#### test_type: sda_full_write #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:7:78:630 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:7:80:736 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:7:179:670 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-1 17:41:7:280:750 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 17:41:7:294:793 + Q4 finished at: 2022-4-1 17:41:7:294:846 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:41:7:385:655 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-1 17:41:7:387:658 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:41:7:388:771 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/wat_sda_full_write_committed.txt b/test_result/centralizend_result/mysql/repeatable-read/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..e9daf4c9 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: mysql #### +#### test_type: sda_full_write_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:7:667:163 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:7:668:890 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:7:771:601 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-1 17:41:7:868:451 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:41:7:874:214 + Q4 finished at: 2022-4-1 17:41:7:874:286 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:41:7:880:177 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-1 17:41:7:882:176 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:41:7:883:946 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/mysql/repeatable-read/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..37a71435 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: mysql #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:9:461:428 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:9:462:927 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:9:561:416 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 17:41:9:662:414 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:41:9:668:895 + Q4 finished at: 2022-4-1 17:41:9:669:18 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:41:9:675:304 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:41:9:677:478 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:41:9:678:318 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/repeatable-read/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/mysql/repeatable-read/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..4b6bc958 --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: mysql #### +#### test_type: sda_lost_update_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:8:162:942 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 17:41:8:164:772 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:8:262:848 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:41:8:265:92 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:41:8:470:733 +Q5 finished at: 2022-4-1 17:41:8:470:780 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 17:41:8:478:390 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:41:8:480:208 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:41:8:481:890 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/repeatable-read/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/mysql/repeatable-read/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..cae557ef --- /dev/null +++ b/test_result/centralizend_result/mysql/repeatable-read/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: mysql #### +#### test_type: sda_lost_update_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:8:782:160 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 17:41:8:784:47 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:8:882:378 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:41:8:884:451 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:9:88:968 +Q5 finished at: 2022-4-1 17:41:9:88:995 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:41:9:188:692 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:41:9:190:892 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:41:9:193:13 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/mysql/result_summary/read-committed_total-result.txt b/test_result/centralizend_result/mysql/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..38745346 --- /dev/null +++ b/test_result/centralizend_result/mysql/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/mysql/result_summary/read-uncommitted_total-result.txt b/test_result/centralizend_result/mysql/result_summary/read-uncommitted_total-result.txt new file mode 100644 index 00000000..f709ccda --- /dev/null +++ b/test_result/centralizend_result/mysql/result_summary/read-uncommitted_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Anomaly + +rat_sda_non_repeatable_read: Anomaly + +rat_sda_intermediate_read: Anomaly + +rat_sda_intermediate_read_committed: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Anomaly + +rat_dda_double_write_skew1_committed: Anomaly + +rat_dda_double_write_skew2: Anomaly + +rat_dda_read_skew: Anomaly + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Anomaly + +rat_dda_read_skew2_committed: Anomaly + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Anomaly + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Anomaly + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Avoid + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/mysql/result_summary/repeatable-read_total-result.txt b/test_result/centralizend_result/mysql/result_summary/repeatable-read_total-result.txt new file mode 100644 index 00000000..ef182286 --- /dev/null +++ b/test_result/centralizend_result/mysql/result_summary/repeatable-read_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/mysql/result_summary/serializable_total-result.txt b/test_result/centralizend_result/mysql/result_summary/serializable_total-result.txt new file mode 100644 index 00000000..b5b686cf --- /dev/null +++ b/test_result/centralizend_result/mysql/result_summary/serializable_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Rollback + +rat_dda_write_read_skew_committed: Rollback + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Rollback + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Rollback + +rat_dda_read_skew2_committed: Rollback + +rat_mda_step_rat: Rollback + +rat_mda_step_rat_long_fork: Rollback + +rat_mda_step_rat_predicate_based_delete: Rollback + +rat_mda_step_rat_predicate_based_insert: Rollback + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Rollback + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Rollback + +iat_dda_write_skew_predicate_based-intersecting_data: Avoid + +iat_dda_write_skew_predicate_based-overdraft_protection: Rollback + +iat_dda_write_skew_committed: Rollback + +iat_mda_step_iat: Rollback + +iat_mda_step_iat_predicate_based_delete: Rollback + +iat_mda_step_iat_predicate_based_insert: Rollback + +iat_mda_step_iat_uname_anomaly: Rollback + +iat_mda_step_iat_cross_phenomenon: Rollback + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Rollback + diff --git a/test_result/centralizend_result/mysql/serializable/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/mysql/serializable/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..e0b53796 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/iat_dda_read_skew_committed.txt @@ -0,0 +1,42 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:42:8:25:707 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:42:8:27:361 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:42:8:125:799 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:42:8:127:830 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:42:8:228:473 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:42:8:234:781 +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-1 17:42:8:928:633 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/mysql/serializable/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..8a78f41c --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:42:9:207:392 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:42:9:209:102 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:42:9:307:383 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:42:9:309:74 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:42:9:408:592 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:42:9:415:624 +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-1 17:42:10:108:725 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/iat_dda_write_skew.txt b/test_result/centralizend_result/mysql/serializable/iat_dda_write_skew.txt new file mode 100644 index 00000000..0f3ae3bd --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/iat_dda_write_skew.txt @@ -0,0 +1,49 @@ +#### db_type: mysql #### +#### test_type: dda_write_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:42:10:382:465 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:42:10:384:278 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:42:10:482:443 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:42:10:484:206 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:42:10:583:656 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:42:10:693:391 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-1 17:42:11:183:797 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/mysql/serializable/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..b452e7fd --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/iat_dda_write_skew_committed.txt @@ -0,0 +1,49 @@ +#### db_type: mysql #### +#### test_type: dda_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:42:13:130:199 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:42:13:132:963 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:42:13:231:637 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:42:13:233:633 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:42:13:333:102 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:42:13:339:928 +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-1 17:42:14:33:67 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/mysql/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..69a11cd6 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,74 @@ +#### db_type: mysql #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:42:11:459:600 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-1 17:42:11:461:475 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-1 17:42:11:462:884 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-1 17:42:11:559:586 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:42:11:666:67 + current_result: + (330,) + *(1) expected_result: + (330,) + (2) expected_result: + (300,) + + Q5 finished at: 2022-4-1 17:42:11:666:330 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-1 17:42:11:668:262 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:42:11:673:435 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-1 17:42:11:675:836 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-1 17:42:11:678:593 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:42:11:679:584 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/mysql/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..ed636e29 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,49 @@ +#### db_type: mysql #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:42:11:958:859 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-1 17:42:11:961:651 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:42:12:58:825 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-1 17:42:12:61:640 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' + Q5 finished at: 2022-4-1 17:42:12:161:585 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:42:12:168:826 +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-1 17:42:12:861:827 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/iat_mda_step_iat.txt b/test_result/centralizend_result/mysql/serializable/iat_mda_step_iat.txt new file mode 100644 index 00000000..38413186 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/iat_mda_step_iat.txt @@ -0,0 +1,89 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:42:14:332:357 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 17:42:14:334:774 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:42:14:432:758 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:42:14:435:199 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:42:14:533:212 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 17:42:14:535:337 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q8 finished at: 2022-4-1 17:42:14:834:916 + Q11-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:42:15:45:452 + Q11 finished at: 2022-4-1 17:42:15:45:475 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:42:15:53:360 + Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 + Q9 failed at: 2022-4-1 17:42:15:734:864 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/mysql/serializable/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..d0602268 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:42:22:942:657 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:42:22:944:626 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:42:23:42:577 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 17:42:23:142:686 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-1 17:42:23:244:149 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 17:42:23:245:318 + Q4 finished at: 2022-4-1 17:42:23:245:391 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:42:23:250:920 + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 17:42:23:251:494 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 17:42:23:253:644 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:42:23:257:953 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-1 17:42:23:260:52 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 17:42:23:261:386 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/serializable/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/mysql/serializable/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..c6f8f44e --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,171 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:42:21:575:144 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:42:21:577:667 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:42:21:675:94 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:42:21:677:800 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:42:21:775:204 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 17:42:21:875:539 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-1 17:42:22:77:874 + Q12-T2 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:42:22:79:154 + Q12 finished at: 2022-4-1 17:42:22:79:135 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:42:22:85:726 + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-1 17:42:22:86:641 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-1 17:42:22:87:800 + Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 + Q6 failed at: 2022-4-1 17:42:22:676:982 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/mysql/serializable/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..ec79f9e5 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,89 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:42:16:15:347 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-1 17:42:16:17:345 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:42:16:115:280 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:42:16:117:484 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:42:16:218:851 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 17:42:16:221:60 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q8 finished at: 2022-4-1 17:42:16:516:568 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:42:16:722:240 +Q7 finished at: 2022-4-1 17:42:16:722:447 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:42:16:730:211 + Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 + Q9 failed at: 2022-4-1 17:42:17:416:605 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/mysql/serializable/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..1647aa2d --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,85 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:42:17:706:872 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 17:42:17:709:871 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:42:17:806:813 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-1 17:42:17:809:46 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:42:17:906:773 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-1 17:42:17:908:812 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q7 finished at: 2022-4-1 17:42:18:208:94 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:42:18:320:428 + Q8 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 + Q8 failed at: 2022-4-1 17:42:19:8:90 + Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 + Q9 failed at: 2022-4-1 17:42:19:108:264 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/mysql/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..2f8ba04c --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,105 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:42:23:521:178 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 17:42:23:523:349 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-1 17:42:23:525:372 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-1 17:42:23:620:959 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-1 17:42:23:623:186 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 17:42:23:721:130 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-1 17:42:23:723:536 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-1 17:42:23:823:75 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-1 17:42:23:831:676 + Q6 finished at: 2022-4-1 17:42:23:831:732 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:42:23:838:601 + Q10 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 + Q10 failed at: 2022-4-1 17:42:24:823:261 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/mysql/serializable/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..1de048b5 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,127 @@ +#### db_type: mysql #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:42:19:454:404 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-1 17:42:19:456:562 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:42:19:554:353 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-1 17:42:19:556:571 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:42:19:558:179 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 17:42:19:560:195 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2022-4-1 17:42:19:654:409 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-1 17:42:19:656:728 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-1 17:42:19:658:206 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-1 17:42:19:755:691 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:42:19:763:422 + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-1 17:42:19:764:136 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-1 17:42:19:765:752 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:42:19:779:603 +Q15 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q15 failed at: 2022-4-1 17:42:21:255:752 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/mysql/serializable/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..b02d6556 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/iat_sda_lost_update_committed.txt @@ -0,0 +1,39 @@ +#### db_type: mysql #### +#### test_type: sda_lost_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:42:7:157:422 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 17:42:7:159:286 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:42:7:257:397 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-1 17:42:7:358:313 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:42:7:364:857 + Q4 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 + Q4 failed at: 2022-4-1 17:42:7:758:442 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/mysql/serializable/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..5768b4cf --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: mysql #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:42:6:671:13 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:42:6:672:696 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:42:6:771:118 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 17:42:6:874:573 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:42:6:875:560 + Q4 finished at: 2022-4-1 17:42:6:875:640 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:42:6:883:427 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:42:6:885:819 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:42:6:886:698 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:42:6:887:450 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/serializable/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/mysql/serializable/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..b0c0ec57 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/rat_dda_double_write_skew1.txt @@ -0,0 +1,42 @@ +#### db_type: mysql #### +#### test_type: dda_double_write_skew1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:36:72:810 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:36:74:503 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:36:172:707 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:36:174:556 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:41:36:274:474 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:41:36:379:701 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-1 17:41:36:877:176 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/mysql/serializable/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..0877edc9 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: mysql #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:37:146:696 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:37:148:379 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:37:246:809 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:37:248:829 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:41:37:348:230 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:37:354:963 +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-1 17:41:38:51:230 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/mysql/serializable/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..e7d208bc --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/rat_dda_double_write_skew2.txt @@ -0,0 +1,35 @@ +#### db_type: mysql #### +#### test_type: dda_double_write_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:38:325:985 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:38:327:720 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:38:425:965 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:38:427:701 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:41:38:527:285 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:41:38:633:313 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-1 17:41:39:130:385 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/rat_dda_read_skew.txt b/test_result/centralizend_result/mysql/serializable/rat_dda_read_skew.txt new file mode 100644 index 00000000..757def2b --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/rat_dda_read_skew.txt @@ -0,0 +1,42 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:39:414:333 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:41:39:416:324 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:39:514:365 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:39:516:258 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:41:39:615:527 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:41:39:722:139 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-1 17:41:40:215:668 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/rat_dda_read_skew2.txt b/test_result/centralizend_result/mysql/serializable/rat_dda_read_skew2.txt new file mode 100644 index 00000000..2c29de85 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/rat_dda_read_skew2.txt @@ -0,0 +1,42 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:41:487:735 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:41:489:539 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:41:587:733 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:41:41:589:730 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:41:41:689:701 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:41:41:698:391 + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-1 17:41:42:190:183 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/mysql/serializable/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..212ddd91 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/rat_dda_read_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:42:461:357 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:42:462:979 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:42:561:402 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:41:42:563:299 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:41:42:664:952 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:41:42:670:849 + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-1 17:41:43:165:75 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/mysql/serializable/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..52f11fa5 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:40:512:588 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 17:41:40:514:356 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:40:614:23 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 17:41:40:715:175 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:41:40:716:723 + Q4 finished at: 2022-4-1 17:41:40:716:844 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:41:40:718:366 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:40:725:19 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-1 17:41:40:727:5 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:41:40:727:951 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/serializable/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/mysql/serializable/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..a05ab5bc --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: mysql #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:41:3:753 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 17:41:41:6:456 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:41:104:98 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 17:41:41:209:666 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:41:41:211:717 + Q4 finished at: 2022-4-1 17:41:41:211:906 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-1 17:41:41:213:588 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:41:221:79 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-1 17:41:41:223:512 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:41:41:224:517 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/serializable/rat_dda_write_read_skew.txt b/test_result/centralizend_result/mysql/serializable/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..ecf4eb06 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/rat_dda_write_read_skew.txt @@ -0,0 +1,42 @@ +#### db_type: mysql #### +#### test_type: dda_write_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:33:817:277 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:33:818:859 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:33:917:313 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:33:919:31 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:41:34:18:965 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:41:34:124:938 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-1 17:41:34:622:434 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/mysql/serializable/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..635132e6 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,42 @@ +#### db_type: mysql #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:34:899:58 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:34:900:598 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:34:999:88 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:35:0:747 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:41:35:100:539 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:35:106:173 +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-1 17:41:35:803:95 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/rat_mda_step_rat.txt b/test_result/centralizend_result/mysql/serializable/rat_mda_step_rat.txt new file mode 100644 index 00000000..7f36962e --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/rat_mda_step_rat.txt @@ -0,0 +1,74 @@ +#### db_type: mysql #### +#### test_type: mda_step_rat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:43:437:745 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:43:439:334 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:43:539:23 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:43:540:848 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 17:41:43:639:816 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-1 17:41:43:641:587 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:41:43:739:462 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:41:43:844:617 + current_result: + (1,1) + *(1) expected_result: + (1,1) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q8 finished at: 2022-4-1 17:41:43:845:190 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:41:43:943:656 +Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-1 17:41:44:642:471 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/mysql/serializable/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..602d06f2 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,169 @@ +#### db_type: mysql #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2022-4-1 17:41:44:906:691 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-1 17:41:44:909:579 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2022-4-1 17:41:45:6:307 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:41:45:106:381 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-1 17:41:45:109:229 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 17:41:45:206:433 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 17:41:45:308:780 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 17:41:45:606:891 + Q9 finished at: 2022-4-1 17:41:45:607:101 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:41:45:613:644 + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + (3) expected_result: + (1,0) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + *(6) expected_result: + (1,1) + (7) expected_result: + (1,0) + *(8) expected_result: + (1,1) + *(9) expected_result: + (1,1) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + (12) expected_result: + (1,0) + (13) expected_result: + (1,0) + (14) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 17:41:45:614:867 +Q4 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q4 failed at: 2022-4-1 17:41:45:707:950 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/mysql/serializable/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..3aa905cb --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,74 @@ +#### db_type: mysql #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:45:976:146 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:45:977:698 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:46:76:301 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:46:78:210 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 17:41:46:176:118 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-1 17:41:46:177:726 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 17:41:46:288:818 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:41:46:381:346 + current_result: + (,) + *(1) expected_result: + (,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q8 finished at: 2022-4-1 17:41:46:382:20 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:41:46:484:1 +Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-1 17:41:47:191:175 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/mysql/serializable/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..29a3b639 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,71 @@ +#### db_type: mysql #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:47:446:656 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-1 17:41:47:449:76 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:47:546:738 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-1 17:41:47:548:474 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 17:41:47:651:532 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-1 17:41:47:653:280 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 17:41:47:748:738 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:41:47:852:489 + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + (4) expected_result: + (,) + *(5) expected_result: + (1,) + (6) expected_result: + (,) + + Q8 finished at: 2022-4-1 17:41:47:853:72 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:41:47:952:352 +Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-1 17:41:48:651:150 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/rat_sda_dirty_read.txt b/test_result/centralizend_result/mysql/serializable/rat_sda_dirty_read.txt new file mode 100644 index 00000000..fd8f3ed6 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: mysql #### +#### test_type: sda_dirty_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:29:872:206 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:29:873:776 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:29:972:28 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' +Q5-T1 execute opt: 'ROLLBACK'; + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:41:30:72:843 +Q5 finished at: 2022-4-1 17:41:30:75:864 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:30:172:234 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 17:41:30:174:16 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:41:30:174:777 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/serializable/rat_sda_intermediate_read.txt b/test_result/centralizend_result/mysql/serializable/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..43a392b9 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: mysql #### +#### test_type: sda_intermediate_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:31:127:608 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:31:129:511 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:31:227:583 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-1 17:41:31:328:824 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:41:31:533:92 + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:41:31:533:351 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:31:535:252 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 17:41:31:537:322 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:41:31:538:328 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/serializable/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/mysql/serializable/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..27354e80 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: mysql #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:31:804:186 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:31:805:768 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:31:904:470 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-1 17:41:32:5:152 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:41:32:15:748 + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:41:32:16:62 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:41:32:16:849 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 17:41:32:18:365 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:41:32:19:651 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/serializable/rat_sda_lost_self_update.txt b/test_result/centralizend_result/mysql/serializable/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..6a33e43a --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: mysql #### +#### test_type: sda_lost_self_update #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:33:238:408 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:33:240:186 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:33:339:238 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 17:41:33:439:491 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 17:41:33:447:842 + Q4 finished at: 2022-4-1 17:41:33:447:907 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:41:33:544:384 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:41:33:546:261 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:41:33:547:127 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/serializable/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/mysql/serializable/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..6aa8d05e --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: mysql #### +#### test_type: sda_non_repeatable_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:30:443:285 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:41:30:444:838 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:30:543:488 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 17:41:30:644:514 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:41:30:843:672 + Q4 finished at: 2022-4-1 17:41:30:843:866 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:30:850:540 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:41:30:852:243 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:41:30:853:40 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/mysql/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..9d0a6998 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: mysql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:32:303:405 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 17:41:32:305:37 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:32:403:362 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 17:41:32:504:497 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:41:32:505:462 + Q4 finished at: 2022-4-1 17:41:32:505:653 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:41:32:511:208 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-1 17:41:32:512:761 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:41:32:513:906 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/mysql/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..957ed888 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: mysql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:32:766:140 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 17:41:32:768:731 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:32:866:170 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 17:41:32:967:290 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:41:32:968:231 + Q4 finished at: 2022-4-1 17:41:32:968:372 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:41:32:974:70 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-1 17:41:32:975:700 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:41:32:976:469 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/serializable/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/mysql/serializable/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..93e53b1e --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,35 @@ +#### db_type: mysql #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:53:396:109 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:53:397:807 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:53:496:223 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:53:498:268 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:41:53:597:375 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:53:603:154 +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-1 17:41:54:300:308 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/mysql/serializable/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..bbe69855 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,35 @@ +#### db_type: mysql #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:54:600:944 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:54:602:630 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:54:700:902 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:54:702:621 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:41:54:802:193 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:41:54:907:609 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-1 17:41:55:405:992 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/mysql/serializable/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..ed0ac8a1 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,35 @@ +#### db_type: mysql #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:55:689:611 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:55:691:452 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:55:790:648 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:55:792:517 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:41:55:890:429 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:41:55:996:768 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-1 17:41:56:494:17 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/mysql/serializable/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..2a53175b --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: mysql #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:56:782:597 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:56:784:231 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:56:882:796 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:56:884:531 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:41:56:983:892 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:56:992:279 +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-1 17:41:57:688:947 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/mysql/serializable/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..bdf4f323 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,42 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:57:959:160 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:41:57:961:152 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:58:58:984 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:58:60:682 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:41:58:160:692 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:41:58:265:685 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-1 17:41:58:760:762 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/mysql/serializable/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..53c58b8f --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,42 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:59:42:696 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:41:59:44:470 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:59:142:624 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:41:59:144:352 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:41:59:243:787 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:41:59:349:516 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-1 17:41:59:843:891 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/mysql/serializable/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..3ed715ab --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,42 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:42:0:118:686 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:42:0:120:266 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:42:0:218:693 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:42:0:220:463 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:42:0:320:313 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:42:0:425:623 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-1 17:42:0:923:308 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/mysql/serializable/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..b9c23446 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,42 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:42:1:227:79 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:42:1:228:691 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:42:1:327:69 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:42:1:329:0 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:42:1:428:354 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:42:1:535:671 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-1 17:42:2:31:629 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/mysql/serializable/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..4e43d8bb --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: mysql #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:42:2:342:425 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:42:2:344:361 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:42:2:442:324 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:42:2:444:15 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:42:2:543:641 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:42:2:552:629 +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-1 17:42:3:247:566 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/mysql/serializable/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..133e0382 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/wat_mda_step_wat_c1.txt @@ -0,0 +1,44 @@ +#### db_type: mysql #### +#### test_type: mda_step_wat_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:42:3:522:950 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:42:3:524:706 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:42:3:623:3 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:42:3:624:826 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 17:42:3:722:887 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 17:42:3:724:756 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-1 17:42:3:824:193 + Q11-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:42:3:929:742 + Q11 finished at: 2022-4-1 17:42:3:929:757 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:42:4:29:976 +Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-1 17:42:4:726:732 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/mysql/serializable/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..1ae36ebb --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/wat_mda_step_wat_c2.txt @@ -0,0 +1,44 @@ +#### db_type: mysql #### +#### test_type: mda_step_wat_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:42:4:993:22 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:42:4:994:695 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:42:5:93:263 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:42:5:95:109 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 17:42:5:193:119 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 17:42:5:395:230 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-1 17:42:5:494:845 + Q10-T2 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:42:5:598:592 + Q8 finished at: 2022-4-1 17:42:5:598:739 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:42:5:798:557 +Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-1 17:42:6:398:341 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/mysql/serializable/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..341b81f9 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: mysql #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:48:926:496 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:48:928:336 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:49:26:363 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; + Q4 finished at: 2022-4-1 17:41:49:127:102 +Q5 finished at: 2022-4-1 17:41:49:128:927 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:49:232:48 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 17:41:49:234:634 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-1 17:41:49:254:491 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:41:49:255:455 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/serializable/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/mysql/serializable/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..c5a0e332 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: mysql #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:49:497:454 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:49:499:150 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:49:597:360 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-1 17:41:49:705:710 + Q4 finished at: 2022-4-1 17:41:49:705:807 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:41:49:804:207 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 17:41:49:806:919 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-1 17:41:49:830:104 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:41:49:831:101 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/serializable/wat_sda_full_write.txt b/test_result/centralizend_result/mysql/serializable/wat_sda_full_write.txt new file mode 100644 index 00000000..6e19dd28 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: mysql #### +#### test_type: sda_full_write #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:50:80:303 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:50:81:937 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:50:183:592 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-1 17:41:50:281:182 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 17:41:50:288:20 + Q4 finished at: 2022-4-1 17:41:50:288:126 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:41:50:386:61 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-1 17:41:50:388:843 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:41:50:389:793 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/serializable/wat_sda_full_write_committed.txt b/test_result/centralizend_result/mysql/serializable/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..f5160036 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: mysql #### +#### test_type: sda_full_write_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:50:653:111 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:50:654:699 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:50:755:533 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-1 17:41:50:853:857 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:41:50:867:144 + Q4 finished at: 2022-4-1 17:41:50:867:233 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:41:50:873:679 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-1 17:41:50:875:483 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:41:50:876:362 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/serializable/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/mysql/serializable/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..cf6fbba5 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: mysql #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:52:901:776 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:41:52:903:375 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:53:1:693 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 17:41:53:102:801 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:41:53:110:237 + Q4 finished at: 2022-4-1 17:41:53:110:326 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:41:53:118:411 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:41:53:121:82 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:41:53:121:912 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/mysql/serializable/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/mysql/serializable/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..83d92063 --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/wat_sda_lost_update_c1.txt @@ -0,0 +1,39 @@ +#### db_type: mysql #### +#### test_type: sda_lost_update_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:51:157:127 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 17:41:51:158:796 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:51:257:113 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-1 17:41:51:358:278 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 17:41:51:365:242 + Q4 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 + Q4 failed at: 2022-4-1 17:41:51:758:360 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/mysql/serializable/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/mysql/serializable/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..554cc05a --- /dev/null +++ b/test_result/centralizend_result/mysql/serializable/wat_sda_lost_update_c2.txt @@ -0,0 +1,39 @@ +#### db_type: mysql #### +#### test_type: sda_lost_update_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 17:41:52:28:69 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 17:41:52:29:698 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 17:41:52:128:280 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-1 17:41:52:232:792 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:41:52:434:555 + Q4 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 + Q4 failed at: 2022-4-1 17:41:52:632:899 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.20]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/ob_mysql/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..466352bd --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:16:16:877:955 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:16:16:881:228 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:16:16:977:730 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:16:16:980:402 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:16:16:981:886 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:16:16:984:308 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 15:16:17:78:408 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:16:17:79:574 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:16:17:82:233 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:16:17:83:229 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/ob_mysql/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..c9b9786a --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:16:17:363:16 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:16:17:367:125 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:16:17:462:867 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 15:16:17:465:625 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:16:17:467:75 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:16:17:469:424 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 15:16:17:563:403 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:16:17:565:781 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:16:17:568:384 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:16:17:569:439 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/iat_dda_write_skew.txt b/test_result/centralizend_result/ob_mysql/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..bab3760e --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:16:17:850:444 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:16:17:859:657 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:16:17:950:853 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:16:17:952:718 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:16:17:955:268 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 15:16:18:50:876 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:16:18:56:246 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 15:16:18:151:978 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:16:18:154:935 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 15:16:18:156:47 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/ob_mysql/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..66161f58 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:16:19:410:243 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:16:19:413:403 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:16:19:510:477 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:16:19:512:376 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:16:19:515:114 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:16:19:517:686 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 15:16:19:610:924 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:16:19:613:846 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:16:19:616:681 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:16:19:617:759 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/ob_mysql/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..0d0cec09 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,71 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:16:18:437:454 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-1 15:16:18:441:293 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-1 15:16:18:442:875 + Q4-T2 execute sql: 'BEGIN;' + Q4 finished at: 2022-4-1 15:16:18:537:458 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-1 15:16:18:539:424 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-1 15:16:18:543:56 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:16:18:545:584 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:16:18:638:622 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-1 15:16:18:640:696 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-1 15:16:18:642:574 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:16:18:643:723 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/ob_mysql/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..8f02f9ec --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:16:18:926:176 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-1 15:16:18:930:103 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:16:19:26:529 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-1 15:16:19:28:859 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-1 15:16:19:33:692 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:16:19:36:39 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-1 15:16:19:127:529 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:16:19:129:980 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-1 15:16:19:132:851 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:16:19:133:960 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/iat_mda_step_iat.txt b/test_result/centralizend_result/ob_mysql/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..f87131a5 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:16:19:902:618 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 15:16:19:906:560 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:16:20:5:236 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 15:16:20:7:633 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-1 15:16:20:102:615 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 15:16:20:104:780 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-1 15:16:20:204:97 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 15:16:20:303:556 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-1 15:16:20:403:85 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 15:16:20:504:450 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 15:16:20:603:541 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:16:20:704:914 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 15:16:20:714:924 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 15:16:20:716:669 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/ob_mysql/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..f5204c69 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:16:24:540:368 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:16:24:543:934 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:16:24:640:555 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 15:16:24:643:424 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 15:16:24:645:825 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-1 15:16:24:740:472 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 15:16:24:742:572 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 15:16:24:744:157 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:16:24:746:965 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2022-4-1 15:16:24:841:457 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 15:16:24:842:804 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-1 15:16:24:845:781 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 15:16:24:846:886 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/ob_mysql/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..c6c642e6 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,206 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:16:23:750:703 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:16:23:755:386 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:16:23:850:839 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:16:23:853:886 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-1 15:16:23:950:820 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-1 15:16:23:953:958 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:16:23:956:805 + Q8-T4 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-1 15:16:24:51:172 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 15:16:24:53:494 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:16:24:56:597 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-4-1 15:16:24:152:670 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:16:24:154:106 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-1 15:16:24:252:321 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-1 15:16:24:253:670 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 15:16:24:257:689 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 15:16:24:258:813 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/ob_mysql/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..e23c0113 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:16:20:999:260 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-1 15:16:21:4:460 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:16:21:98:944 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 15:16:21:101:77 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-1 15:16:21:200:117 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 15:16:21:202:237 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-1 15:16:21:303:78 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-1 15:16:21:399:468 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-1 15:16:21:499:790 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 15:16:21:600:649 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 15:16:21:700:812 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:16:21:801:271 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 15:16:21:804:317 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 15:16:21:805:703 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/ob_mysql/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..a550f9a9 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:16:22:72:437 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 15:16:22:76:754 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:16:22:172:605 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-1 15:16:22:174:579 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-1 15:16:22:272:431 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-1 15:16:22:274:280 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-1 15:16:22:374:174 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-1 15:16:22:473:320 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-1 15:16:22:576:370 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 15:16:22:673:913 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 15:16:22:774:229 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:16:22:873:903 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 15:16:22:877:53 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 15:16:22:878:196 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/ob_mysql/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..5b221c71 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,139 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:16:25:136:321 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 15:16:25:141:28 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-1 15:16:25:143:414 + Q4-T2 execute sql: 'BEGIN;' + Q4 finished at: 2022-4-1 15:16:25:236:742 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-1 15:16:25:238:820 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-1 15:16:25:241:585 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:16:25:244:75 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-1 15:16:25:336:939 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-1 15:16:25:339:82 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 15:16:25:341:262 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 15:16:25:342:591 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-1 15:16:25:437:629 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-1 15:16:25:440:404 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-1 15:16:25:443:644 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-1 15:16:25:444:849 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/ob_mysql/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..a62972a9 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,161 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:16:23:160:514 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-1 15:16:23:164:230 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:16:23:264:23 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-1 15:16:23:266:438 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:16:23:269:85 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 15:16:23:271:76 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-1 15:16:23:272:606 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 15:16:23:275:125 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-4-1 15:16:23:364:138 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-1 15:16:23:366:444 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-1 15:16:23:368:161 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-1 15:16:23:370:971 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-1 15:16:23:372:576 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 15:16:23:374:946 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2022-4-1 15:16:23:465:231 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-1 15:16:23:466:533 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-1 15:16:23:470:46 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-1 15:16:23:471:305 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/ob_mysql/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..1eaa2a20 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,50 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:16:16:389:325 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 15:16:16:393:52 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:16:16:489:313 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 15:16:16:496:668 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 15:16:16:501:566 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-1 15:16:16:589:831 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:16:16:592:395 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 15:16:16:594:998 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:16:16:596:84 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/ob_mysql/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..66bb7d5d --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,59 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:16:15:906:634 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:16:15:910:453 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:16:16:10:2 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 15:16:16:12:751 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 15:16:16:15:92 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 15:16:16:107:217 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:16:16:108:338 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 15:16:16:111:166 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:16:16:113:936 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:16:16:115:101 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..70287c21 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,55 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:4:531:220 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:4:534:483 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:4:631:204 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:15:4:632:855 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:15:4:635:472 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:15:4:832:722 +Q6 finished at: 2022-4-1 15:15:4:832:993 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:15:4:933:134 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-1 15:15:4:935:872 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:15:4:936:869 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..a949f69a --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,55 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:5:210:300 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:5:213:648 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:5:310:269 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:15:5:311:933 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:15:5:314:315 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:15:5:316:639 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-1 15:15:5:410:824 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:15:5:412:788 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-1 15:15:5:415:640 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:15:5:416:555 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..dfb84dff --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,55 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:5:691:854 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:5:695:252 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:5:791:828 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:15:5:793:734 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 15:15:5:893:460 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:15:5:895:899 + Q5 finished at: 2022-4-1 15:15:5:896:145 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 15:15:5:992:953 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:15:5:996:59 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:15:5:997:57 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_read_skew.txt b/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..124838a6 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:6:284:819 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:15:6:293:672 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:6:385:65 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:15:6:387:818 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:15:6:389:377 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 15:15:6:485:37 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:15:6:585:834 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:15:6:684:540 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:15:6:687:466 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:15:6:688:415 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_read_skew2.txt b/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..52648a49 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:7:925:691 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:7:929:58 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:8:25:712 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:15:8:28:686 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:15:8:30:403 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 15:15:8:126:110 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:15:8:128:703 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 15:15:8:225:753 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:15:8:228:989 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:15:8:230:130 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..8dcc954b --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:8:510:63 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:8:513:91 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:8:610:231 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:15:8:612:728 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:15:8:614:263 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:15:8:615:448 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 15:15:8:710:801 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:15:8:713:227 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:15:8:716:114 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:15:8:717:266 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..58f4af6b --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:6:964:604 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 15:15:6:967:862 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:7:64:620 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:15:7:67:771 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:15:7:69:239 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:15:7:71:581 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 15:15:7:165:157 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:15:7:166:159 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-1 15:15:7:168:761 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:15:7:169:698 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..14aadf51 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,58 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:7:438:736 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 15:15:7:442:653 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:7:538:909 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-1 15:15:7:541:324 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-1 15:15:7:544:22 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:15:7:546:473 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 15:15:7:639:420 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:15:7:640:476 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-1 15:15:7:643:268 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:15:7:644:311 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_write_read_skew.txt b/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..b605b1df --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:3:350:928 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:3:354:556 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:3:450:855 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:15:3:452:502 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:15:3:455:79 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 15:15:3:569:145 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:15:3:652:308 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:15:3:753:536 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:15:3:756:775 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:15:3:757:851 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..7f08afe9 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:4:48:211 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:4:51:962 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:4:152:215 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:15:4:154:606 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:15:4:157:421 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:15:4:159:909 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 15:15:4:248:824 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:15:4:251:201 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:15:4:254:150 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:15:4:255:263 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/rat_mda_step_rat.txt b/test_result/centralizend_result/ob_mysql/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..47004537 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:8:996:37 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:8:999:643 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:9:96:42 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:15:9:97:749 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:15:9:100:843 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-1 15:15:9:196:320 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-1 15:15:9:198:281 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-1 15:15:9:200:382 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-1 15:15:9:296:950 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 15:15:9:299:380 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 15:15:9:397:12 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:15:9:497:342 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 15:15:9:500:469 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 15:15:9:501:621 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/ob_mysql/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..cb147631 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,208 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN;' + Q1 finished at: 2022-4-1 15:15:9:779:245 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-1 15:15:9:783:388 +Q3-T1 execute sql: 'BEGIN;' +Q3 finished at: 2022-4-1 15:15:9:884:228 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-1 15:15:9:887:425 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-1 15:15:9:979:553 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-1 15:15:9:982:335 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 15:15:9:984:924 + Q8-T2 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-1 15:15:10:79:662 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 15:15:10:81:420 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 15:15:10:181:147 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 15:15:10:280:589 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:15:10:380:785 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 15:15:10:479:392 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 15:15:10:480:877 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 15:15:10:484:470 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 15:15:10:485:520 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/ob_mysql/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..6f029d19 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:10:764:311 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:10:767:334 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:10:864:450 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:15:10:866:21 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 15:15:10:869:66 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-1 15:15:10:964:357 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-1 15:15:10:965:951 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-1 15:15:10:967:965 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-1 15:15:11:65:479 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 15:15:11:67:914 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 15:15:11:165:843 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:15:11:265:526 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 15:15:11:268:431 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 15:15:11:269:394 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/ob_mysql/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..d2c76e04 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:11:530:585 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-1 15:15:11:537:945 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:11:630:782 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-1 15:15:11:632:403 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 15:15:11:636:135 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-1 15:15:11:730:819 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-1 15:15:11:732:501 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-1 15:15:11:734:573 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-1 15:15:11:831:730 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 15:15:11:834:695 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 15:15:11:933:236 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:15:12:37:421 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 15:15:12:41:127 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 15:15:12:42:483 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/rat_sda_dirty_read.txt b/test_result/centralizend_result/ob_mysql/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..69b34e1f --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,46 @@ +#### db_type: ob #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:14:59:231:253 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:14:59:235:167 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:14:59:332:62 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 15:14:59:334:967 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-1 15:14:59:431:225 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:14:59:532:534 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 15:14:59:535:731 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 15:14:59:536:966 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/rat_sda_intermediate_read.txt b/test_result/centralizend_result/ob_mysql/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..0568b32f --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:0:487:646 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:0:490:965 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:0:586:762 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 15:15:0:589:399 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-1 15:15:0:688:514 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:15:0:787:482 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:15:0:888:386 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 15:15:0:891:333 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:15:0:892:693 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/ob_mysql/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..ffb0af73 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:1:189:309 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:1:193:151 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:1:288:832 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 15:15:1:292:41 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 15:15:1:293:945 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-1 15:15:1:389:439 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:15:1:392:177 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 15:15:1:394:623 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:15:1:395:662 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/rat_sda_lost_self_update.txt b/test_result/centralizend_result/ob_mysql/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..f36e654b --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:2:748:904 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:2:752:60 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:2:848:922 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 15:15:2:950:453 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 15:15:2:957:540 + Q4 finished at: 2022-4-1 15:15:2:957:647 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:15:3:52:182 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 15:15:3:54:934 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:15:3:55:889 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/ob_mysql/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..7dcded64 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,59 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:14:59:807:644 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:14:59:810:952 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:14:59:907:500 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 15:14:59:910:227 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 15:15:0:7:950 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:15:0:108:614 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:15:0:207:363 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 15:15:0:210:196 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:15:0:211:162 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/ob_mysql/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..b99a8c0f --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,57 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:1:736:986 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 15:15:1:741:83 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:1:836:979 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-1 15:15:1:840:525 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 15:15:1:843:196 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 15:15:1:940:248 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:15:1:941:395 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-1 15:15:1:944:488 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:15:1:945:727 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/ob_mysql/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..7149360b --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,56 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:2:238:622 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 15:15:2:246:78 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:2:339:354 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-1 15:15:2:342:343 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 15:15:2:345:693 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 15:15:2:439:257 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:15:2:440:404 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-1 15:15:2:443:357 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:15:2:444:359 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..9a50c594 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,55 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:16:296:747 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:16:299:981 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:16:396:827 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:15:16:398:554 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 15:15:16:498:299 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:15:16:503:911 + Q5 finished at: 2022-4-1 15:15:16:504:104 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:15:16:507:677 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:15:16:510:423 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:15:16:511:496 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..513e0dcc --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:16:798:312 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:16:801:510 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:16:898:190 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 15:15:16:899:736 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-1 15:15:27:312:492 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-1 15:15:27:504:399 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..62f3ed53 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:27:784:722 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:27:788:562 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:27:886:241 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 15:15:27:887:858 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-1 15:15:38:295:615 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-1 15:15:38:487:748 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..e5bc6cdb --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:38:783:425 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:38:786:615 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:38:884:766 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 15:15:38:886:493 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-1 15:15:49:294:780 +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-1 15:15:49:587:63 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..e373892f --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:49:867:820 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:15:49:870:990 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:49:968:951 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 15:15:49:971:551 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:15:49:973:136 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 15:15:50:169:268 +Q6 finished at: 2022-4-1 15:15:50:169:410 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:15:50:174:956 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:15:50:177:681 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:15:50:178:700 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..3806fea9 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:50:458:169 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:15:50:461:493 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:50:560:208 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 15:15:50:563:487 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:15:50:565:335 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:15:50:764:500 +Q6 finished at: 2022-4-1 15:15:50:764:656 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:15:50:859:396 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:15:50:862:341 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:15:50:863:389 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..c03d64a9 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:51:145:884 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:51:149:508 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:51:248:177 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:15:51:250:750 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 15:15:51:346:273 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:15:51:348:714 + Q5 finished at: 2022-4-1 15:15:51:348:831 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 15:15:51:447:528 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:15:51:450:458 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:15:51:451:680 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..f41e10d5 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:51:727:206 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:51:732:683 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:51:827:233 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:15:51:829:762 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 15:15:51:927:806 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:15:52:129:321 + Q5 finished at: 2022-4-1 15:15:52:129:623 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:15:52:132:186 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:15:52:134:832 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:15:52:135:896 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..600f25f6 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:52:419:98 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:52:422:438 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:52:519:121 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:15:52:521:659 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 15:15:52:619:580 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:15:52:621:801 + Q5 finished at: 2022-4-1 15:15:52:621:917 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:15:52:624:425 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:15:52:627:140 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:15:52:628:121 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/ob_mysql/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..ecc4fc10 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:52:920:782 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:52:925:552 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:53:20:674 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 15:15:53:22:316 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-1 15:15:53:120:811 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 15:15:53:122:469 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-1 15:16:3:427:749 + Q8 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q8 failed at: 2022-4-1 15:16:3:835:193 +Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-1 15:16:4:27:335 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/ob_mysql/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..1cea06e6 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:16:4:328:808 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:16:4:331:946 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:16:4:430:364 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 15:16:4:431:942 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-1 15:16:4:534:307 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 15:16:4:729:762 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q6 failed at: 2022-4-1 15:16:15:135:691 + Q8 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q8 failed at: 2022-4-1 15:16:15:441:519 +Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-1 15:16:15:633:767 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/ob_mysql/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..ffd3600e --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:12:317:691 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:12:321:327 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:12:417:628 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-1 15:15:12:517:772 + Q4 finished at: 2022-4-1 15:15:12:517:966 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:15:12:619:280 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 15:15:12:621:930 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-1 15:15:12:636:250 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:15:12:637:277 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/ob_mysql/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..d9a8ca84 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:12:899:98 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:12:902:405 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:12:999:197 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-1 15:15:13:100:329 + Q4 finished at: 2022-4-1 15:15:13:100:602 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:15:13:201:128 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 15:15:13:203:835 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-1 15:15:13:218:356 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:15:13:219:403 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/wat_sda_full_write.txt b/test_result/centralizend_result/ob_mysql/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..d2c21617 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/wat_sda_full_write.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:13:481:979 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:13:485:690 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:13:581:530 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-1 15:15:13:683:526 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 15:15:13:685:839 + Q4 finished at: 2022-4-1 15:15:13:686:123 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:15:13:782:858 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-1 15:15:13:785:772 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:15:13:787:3 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/wat_sda_full_write_committed.txt b/test_result/centralizend_result/ob_mysql/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..73f15223 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:14:57:930 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:14:61:281 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:14:158:178 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-1 15:15:14:258:705 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:15:14:261:109 + Q4 finished at: 2022-4-1 15:15:14:261:244 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 15:15:14:263:778 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-1 15:15:14:266:855 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:15:14:268:35 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/ob_mysql/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..ec1da529 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:15:801:622 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:15:15:805:82 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:15:901:746 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 15:15:16:3:439 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:15:16:5:667 + Q4 finished at: 2022-4-1 15:15:16:6:121 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 15:15:16:8:470 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 15:15:16:11:197 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:15:16:12:282 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/ob_mysql/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..d8f4d74b --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,50 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:14:539:601 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 15:15:14:542:917 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:14:639:762 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 15:15:14:642:855 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:15:14:841:519 +Q5 finished at: 2022-4-1 15:15:14:841:693 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 15:15:14:843:904 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 15:15:14:846:471 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:15:14:848:93 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/read-committed/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/ob_mysql/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..239175af --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,50 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:15:15:126:82 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 15:15:15:129:519 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:15:15:225:867 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 15:15:15:228:667 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:15:15:427:290 +Q5 finished at: 2022-4-1 15:15:15:427:778 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:15:15:527:287 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 15:15:15:529:946 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:15:15:531:26 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_mysql/result_summary/read-committed_total-result.txt b/test_result/centralizend_result/ob_mysql/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..a5e025b4 --- /dev/null +++ b/test_result/centralizend_result/ob_mysql/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Timeout + +wat_dda_full_write_skew_c2: Timeout + +wat_dda_full_write_skew_committed: Timeout + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Timeout + +wat_mda_step_wat_c2: Timeout + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/ob_oracle/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..8d4c8790 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:15:59:924:302 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:15:59:927:659 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:16:0:24:224 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 16:16:0:27:226 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:16:0:28:867 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 16:16:0:31:195 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 16:16:0:124:980 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 16:16:0:126:106 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:16:0:129:235 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 16:16:0:130:304 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/ob_oracle/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..70f00c4f --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:16:0:467:631 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:16:0:470:856 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:16:0:567:660 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 16:16:0:570:497 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:16:0:572:285 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 16:16:0:574:508 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 16:16:0:668:435 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 16:16:0:670:889 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:16:0:674:195 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 16:16:0:675:474 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/iat_dda_write_skew.txt b/test_result/centralizend_result/ob_oracle/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..82e6b692 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:16:0:960:297 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:16:0:963:685 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:16:1:61:110 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 16:16:1:62:930 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:16:1:65:952 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 16:16:1:163:182 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 16:16:1:165:706 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 16:16:1:266:205 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:16:1:271:503 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 16:16:1:272:977 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/ob_oracle/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..704cc89c --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:16:2:629:703 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:16:2:633:285 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:16:2:729:823 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 16:16:2:731:923 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:16:2:735:506 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 16:16:2:738:158 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 16:16:2:830:126 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 16:16:2:832:471 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:16:2:835:405 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 16:16:2:836:494 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/ob_oracle/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..d3ff0d52 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,71 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:16:1:605:391 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-1 16:16:1:609:566 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-1 16:16:1:611:253 + Q4-T2 execute sql: 'BEGIN;' + Q4 finished at: 2022-4-1 16:16:1:705:957 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-1 16:16:1:710:223 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-1 16:16:1:712:122 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 16:16:1:714:801 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 16:16:1:807:420 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-1 16:16:1:809:552 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-1 16:16:1:811:481 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 16:16:1:812:454 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/ob_oracle/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..5da274e2 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:16:2:124:989 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-1 16:16:2:130:405 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:16:2:224:553 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-1 16:16:2:226:720 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-1 16:16:2:231:667 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 16:16:2:234:176 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-1 16:16:2:329:826 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 16:16:2:332:991 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-1 16:16:2:336:176 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 16:16:2:337:183 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/iat_mda_step_iat.txt b/test_result/centralizend_result/ob_oracle/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..82f24f5c --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:16:3:120:98 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 16:16:3:124:157 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:16:3:220:50 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 16:16:3:222:156 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-1 16:16:3:320:287 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 16:16:3:323:431 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-1 16:16:3:426:17 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 16:16:3:525:133 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-1 16:16:3:620:713 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 16:16:3:721:496 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 16:16:3:824:575 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 16:16:3:921:692 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 16:16:3:925:501 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 16:16:3:926:819 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/ob_oracle/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..014205f2 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:16:7:762:442 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:16:7:765:908 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:16:7:862:417 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 16:16:7:865:238 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 16:16:7:867:438 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-1 16:16:7:964:232 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 16:16:7:966:214 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 16:16:7:967:758 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 16:16:7:969:976 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2022-4-1 16:16:8:63:422 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 16:16:8:64:550 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-1 16:16:8:67:614 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 16:16:8:68:581 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/ob_oracle/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..d71f8e45 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,206 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:16:6:974:569 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:16:6:978:667 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:16:7:74:701 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 16:16:7:77:285 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-1 16:16:7:174:712 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-1 16:16:7:177:938 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 16:16:7:180:318 + Q8-T4 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-1 16:16:7:274:573 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 16:16:7:276:265 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 16:16:7:282:756 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-4-1 16:16:7:376:21 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 16:16:7:377:106 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-1 16:16:7:476:356 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-1 16:16:7:477:507 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 16:16:7:481:311 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 16:16:7:482:255 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/ob_oracle/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..aef34d1c --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:16:4:214:263 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-1 16:16:4:218:597 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:16:4:314:256 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 16:16:4:316:185 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-1 16:16:4:420:26 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 16:16:4:421:994 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-1 16:16:4:516:243 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-1 16:16:4:616:544 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-1 16:16:4:715:48 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 16:16:4:815:656 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 16:16:4:915:696 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 16:16:5:15:521 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 16:16:5:18:846 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 16:16:5:19:921 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/ob_oracle/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..b49b993a --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:16:5:297:978 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 16:16:5:302:510 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:16:5:400:124 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-1 16:16:5:402:267 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-1 16:16:5:497:896 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-1 16:16:5:499:924 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-1 16:16:5:600:11 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-1 16:16:5:698:955 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-1 16:16:5:798:489 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 16:16:5:899:633 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 16:16:5:999:272 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 16:16:6:99:750 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 16:16:6:103:264 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 16:16:6:104:398 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/ob_oracle/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..84f05a8c --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,139 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:16:8:345:182 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 16:16:8:349:338 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-1 16:16:8:351:913 + Q4-T2 execute sql: 'BEGIN;' + Q4 finished at: 2022-4-1 16:16:8:445:165 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-1 16:16:8:447:232 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-1 16:16:8:454:924 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 16:16:8:457:559 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-1 16:16:8:545:166 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-1 16:16:8:547:237 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 16:16:8:549:184 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 16:16:8:550:265 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-1 16:16:8:645:695 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-1 16:16:8:648:261 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-1 16:16:8:651:909 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-1 16:16:8:653:125 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/ob_oracle/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..95c85168 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,161 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:16:6:391:394 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-1 16:16:6:395:77 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:16:6:492:246 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-1 16:16:6:494:309 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:16:6:497:583 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 16:16:6:499:637 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-1 16:16:6:501:331 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 16:16:6:503:529 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-4-1 16:16:6:595:725 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-1 16:16:6:598:189 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-1 16:16:6:600:17 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-1 16:16:6:602:260 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-1 16:16:6:604:153 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 16:16:6:610:190 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2022-4-1 16:16:6:692:385 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-1 16:16:6:693:547 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-1 16:16:6:696:963 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-1 16:16:6:698:10 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/ob_oracle/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..c6b92996 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,50 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:15:59:430:573 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 16:15:59:434:222 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:15:59:530:633 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 16:15:59:533:707 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 16:15:59:535:701 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-1 16:15:59:632:746 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 16:15:59:635:440 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 16:15:59:638:125 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 16:15:59:639:206 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/ob_oracle/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..c759f273 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,59 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:15:58:945:344 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:15:58:949:75 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:15:59:45:305 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 16:15:59:48:352 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 16:15:59:50:982 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 16:15:59:145:571 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 16:15:59:146:567 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 16:15:59:149:372 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 16:15:59:150:356 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 16:15:59:151:560 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..dc535a31 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,55 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:14:784:117 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:14:788:429 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:14:884:190 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:32:14:886:5 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:32:14:888:982 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:32:15:88:993 +Q6 finished at: 2022-4-1 15:32:15:90:499 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:32:15:189:281 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-1 15:32:15:192:218 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:32:15:193:97 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..9d292aed --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,55 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:15:464:71 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:15:472:109 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:15:564:20 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:32:15:565:589 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:32:15:568:192 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:32:15:570:401 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-1 15:32:15:664:758 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:32:15:667:18 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-1 15:32:15:669:795 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:32:15:670:918 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..bd01321b --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,55 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:16:2:628 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:16:8:288 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:16:102:607 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:32:16:104:389 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 15:32:16:203:944 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:32:16:206:359 + Q5 finished at: 2022-4-1 15:32:16:206:646 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 15:32:16:304:526 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:32:16:307:323 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:32:16:308:324 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_read_skew.txt b/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..147071b9 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:16:589:807 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:32:16:593:513 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:16:690:58 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:32:16:694:82 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:32:16:695:842 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 15:32:16:790:920 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:32:16:891:28 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:32:16:991:148 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:32:16:993:898 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:32:16:994:865 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_read_skew2.txt b/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..a407ef2e --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:18:285:785 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:18:292:265 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:18:388:225 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:32:18:391:286 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:32:18:393:59 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 15:32:18:497:68 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:32:18:500:96 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 15:32:18:584:581 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:32:18:587:680 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:32:18:588:765 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..899c9c14 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:18:872:964 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:18:877:36 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:18:973:872 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:32:18:977:62 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:32:18:979:71 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:32:18:980:323 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 15:32:19:73:247 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:32:19:75:981 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:32:19:79:132 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:32:19:80:438 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..94133857 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:17:275:488 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 15:32:17:278:617 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:17:377:795 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:32:17:381:596 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:32:17:383:418 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:32:17:385:706 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 15:32:17:477:139 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:32:17:478:762 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-1 15:32:17:493:594 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:32:17:494:882 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..8708d1c7 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,58 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:17:774:914 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 15:32:17:778:790 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:17:875:235 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-1 15:32:17:877:803 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-1 15:32:17:879:316 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:32:17:881:683 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 15:32:17:987:828 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:32:17:989:146 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-1 15:32:17:993:121 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:32:17:994:517 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_write_read_skew.txt b/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..492579f5 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:13:551:873 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:13:555:535 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:13:651:832 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:32:13:653:546 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:32:13:656:365 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 15:32:13:752:488 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:32:13:858:843 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:32:13:953:209 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:32:13:956:244 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:32:13:957:342 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..50928516 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:14:294:845 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:14:298:566 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:14:394:867 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:32:14:396:534 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:32:14:399:292 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:32:14:401:483 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 15:32:14:495:396 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:32:14:497:737 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:32:14:500:449 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:32:14:501:370 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/rat_mda_step_rat.txt b/test_result/centralizend_result/ob_oracle/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..c815e0f1 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:19:386:856 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:19:390:939 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:19:490:94 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:32:19:491:891 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:32:19:504:619 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-1 15:32:19:588:78 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-1 15:32:19:589:695 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-1 15:32:19:591:743 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-1 15:32:19:689:174 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 15:32:19:691:806 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 15:32:19:787:964 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:32:19:887:727 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 15:32:19:890:994 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 15:32:19:892:140 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/ob_oracle/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..a4208a59 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,208 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN;' + Q1 finished at: 2022-4-1 15:32:20:192:564 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-1 15:32:20:197:542 +Q3-T1 execute sql: 'BEGIN;' +Q3 finished at: 2022-4-1 15:32:20:296:153 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-1 15:32:20:299:915 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-1 15:32:20:392:564 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-1 15:32:20:395:423 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 15:32:20:398:404 + Q8-T2 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-1 15:32:20:496:147 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 15:32:20:498:309 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 15:32:20:598:442 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 15:32:20:693:916 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:32:20:793:996 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 15:32:20:892:703 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 15:32:20:893:937 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 15:32:20:897:531 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 15:32:20:898:598 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/ob_oracle/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..5206a745 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:21:179:140 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:21:183:339 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:21:278:730 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:32:21:280:731 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 15:32:21:284:79 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-1 15:32:21:378:605 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-1 15:32:21:380:174 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-1 15:32:21:382:269 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-1 15:32:21:480:666 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 15:32:21:482:928 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 15:32:21:581:195 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:32:21:681:768 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 15:32:21:685:240 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 15:32:21:686:588 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/ob_oracle/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..90eeeb4c --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:21:958:490 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-1 15:32:21:962:611 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:22:58:469 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-1 15:32:22:60:492 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 15:32:22:64:531 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-1 15:32:22:158:557 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-1 15:32:22:160:424 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-1 15:32:22:162:611 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-1 15:32:22:259:713 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 15:32:22:262:221 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 15:32:22:359:683 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:32:22:459:564 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 15:32:22:468:798 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 15:32:22:469:926 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/rat_sda_dirty_read.txt b/test_result/centralizend_result/ob_oracle/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..38092682 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,46 @@ +#### db_type: ob #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:9:439:403 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:9:442:737 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:9:539:339 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 15:32:9:542:60 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-1 15:32:9:639:359 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:32:9:739:396 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 15:32:9:742:40 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 15:32:9:743:63 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/rat_sda_intermediate_read.txt b/test_result/centralizend_result/ob_oracle/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..0ea168d0 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:10:745:860 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:10:749:313 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:10:845:895 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 15:32:10:848:369 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-1 15:32:10:946:421 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:32:11:45:894 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:32:11:148:484 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 15:32:11:151:104 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:32:11:151:990 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/ob_oracle/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..9534ed8f --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:11:491:979 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:11:495:464 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:11:592:52 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 15:32:11:594:628 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 15:32:11:595:656 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-1 15:32:11:692:508 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:32:11:699:40 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 15:32:11:701:653 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:32:11:702:641 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/rat_sda_lost_self_update.txt b/test_result/centralizend_result/ob_oracle/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..c32d25f3 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:12:963:731 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:12:967:708 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:13:63:684 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 15:32:13:165:569 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 15:32:13:167:962 + Q4 finished at: 2022-4-1 15:32:13:168:189 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:32:13:268:888 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 15:32:13:271:733 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:32:13:272:815 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/ob_oracle/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..1ef423e2 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,59 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:10:66:659 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:32:10:69:939 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:10:166:589 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 15:32:10:169:795 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 15:32:10:268:723 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:32:10:368:251 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:32:10:466:613 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 15:32:10:469:550 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:32:10:470:659 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/ob_oracle/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..3d5a9906 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,57 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:11:982:859 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 15:32:11:986:314 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:12:81:543 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-1 15:32:12:86:556 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 15:32:12:88:897 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 15:32:12:182:200 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:32:12:183:465 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-1 15:32:12:186:123 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:32:12:187:115 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/ob_oracle/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..5ffa138e --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,56 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:12:453:858 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 15:32:12:457:693 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:12:553:831 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-1 15:32:12:556:527 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 15:32:12:558:846 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 15:32:12:654:464 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:32:12:655:450 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-1 15:32:12:657:928 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:32:12:658:893 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..8dffd822 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,55 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:26:725:967 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:26:729:950 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:26:826:321 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:32:26:828:426 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 15:32:26:927:777 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:32:26:930:825 + Q5 finished at: 2022-4-1 15:32:26:931:117 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:32:26:941:60 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:32:26:944:233 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:32:26:945:186 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..c71decf4 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:27:226:78 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:27:229:624 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:27:326:257 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 15:32:27:328:121 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-4-1 15:32:48:16:637 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 +Q6 failed at: 2022-4-1 15:32:48:664:408 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..76011893 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,31 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-11 19:10:19:627:135 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 19:10:19:631:31 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-11 19:10:19:726:905 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 19:10:19:728:467 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-4-11 19:10:40:315:538 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 +Q6 failed at: 2022-4-11 19:10:40:750:479 +Test Result: Timeout +Reason: Transaction execution timeout \ No newline at end of file diff --git a/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..30bbe2cc --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,31 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-11 19:9:33:378:326 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 19:9:33:382:743 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-11 19:9:33:477:869 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 19:9:33:479:660 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-4-11 19:9:54:73:826 +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 +Q7 failed at: 2022-4-11 19:9:54:679:325 +Test Result: Timeout +Reason: Transaction execution timeout \ No newline at end of file diff --git a/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..163c26ea --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:50:228:908 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:32:50:232:622 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:50:328:17 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 15:32:50:331:399 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:32:50:333:71 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 15:32:50:529:910 +Q6 finished at: 2022-4-1 15:32:50:529:944 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:32:50:532:343 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:32:50:535:236 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:32:50:536:783 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..cd8504e8 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:50:818:524 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:32:50:822:620 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:50:918:94 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 15:32:50:934:318 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:32:50:938:979 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:32:51:121:861 +Q6 finished at: 2022-4-1 15:32:51:122:627 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:32:51:219:439 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:32:51:222:913 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:32:51:224:149 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..f0a5a7cd --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:51:514:530 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:51:518:857 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:51:615:349 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:32:51:618:189 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 15:32:51:716:619 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:32:51:718:957 + Q5 finished at: 2022-4-1 15:32:51:719:411 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 15:32:51:817:642 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:32:51:820:855 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:32:51:822:96 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..a17c57e4 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:52:114:418 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:52:117:838 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:52:214:354 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:32:52:216:906 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 15:32:52:316:817 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:32:52:517:203 + Q5 finished at: 2022-4-1 15:32:52:517:573 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:32:52:519:777 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:32:52:522:511 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:32:52:523:605 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..daaf700f --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:52:816:39 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:52:820:455 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:52:916:77 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:32:52:918:652 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 15:32:53:17:64 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:32:53:19:659 + Q5 finished at: 2022-4-1 15:32:53:19:824 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:32:53:21:979 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:32:53:31:208 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:32:53:32:305 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/ob_oracle/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..266b410f --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:53:325:567 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:53:329:406 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:53:425:500 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 15:32:53:427:404 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-1 15:32:53:527:853 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 15:32:53:529:882 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-4-1 15:33:14:172:722 +Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 +Q9 failed at: 2022-4-1 15:33:14:712:924 + Q8 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 + Q8 failed at: 2022-4-1 15:33:15:168:895 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/ob_oracle/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..894be381 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,39 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-11 19:11:33:492:409 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 19:11:33:496:33 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-11 19:11:33:592:480 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 19:11:33:594:140 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-11 19:11:33:692:579 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-11 19:11:33:893:26 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 +Q9 failed at: 2022-4-11 19:11:54:737:886 + Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 + Q6 failed at: 2022-4-11 19:11:54:754:707 + Q8 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 + Q8 failed at: 2022-4-11 19:11:55:279:448 +Test Result: Timeout +Reason: Transaction execution timeout \ No newline at end of file diff --git a/test_result/centralizend_result/ob_oracle/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/ob_oracle/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..094367dd --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:22:742:266 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:22:745:758 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:22:842:206 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-1 15:32:22:942:371 + Q4 finished at: 2022-4-1 15:32:22:942:640 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:32:23:43:758 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 15:32:23:46:703 + Q8-T3 execute sql: 'DROP TABLE t1;' + Q8 finished at: 2022-4-1 15:32:23:59:344 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:32:23:60:483 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/ob_oracle/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..5ab2d736 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:23:324:522 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:23:328:592 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:23:424:352 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-1 15:32:23:525:878 + Q4 finished at: 2022-4-1 15:32:23:525:899 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:32:23:625:569 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 15:32:23:628:394 + Q8-T3 execute sql: 'DROP TABLE t1;' + Q8 finished at: 2022-4-1 15:32:23:642:315 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:32:23:643:365 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/wat_sda_full_write.txt b/test_result/centralizend_result/ob_oracle/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..643cda0e --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/wat_sda_full_write.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:23:906:525 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:23:910:344 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:24:6:546 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-1 15:32:24:107:27 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 15:32:24:109:458 + Q4 finished at: 2022-4-1 15:32:24:109:617 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:32:24:207:390 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-1 15:32:24:210:135 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:32:24:211:223 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/wat_sda_full_write_committed.txt b/test_result/centralizend_result/ob_oracle/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..db8050ab --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:24:484:103 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:24:487:977 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:24:583:852 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-1 15:32:24:684:432 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:32:24:686:579 + Q4 finished at: 2022-4-1 15:32:24:686:746 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 15:32:24:688:621 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-1 15:32:24:691:162 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:32:24:692:182 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/ob_oracle/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..3089e5af --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:26:231:702 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:32:26:235:464 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:26:331:615 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 15:32:26:433:486 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:32:26:436:10 + Q4 finished at: 2022-4-1 15:32:26:436:249 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 15:32:26:438:345 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 15:32:26:440:906 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:32:26:441:988 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/ob_oracle/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..11fe8d50 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,50 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:24:965:534 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 15:32:24:969:461 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:25:65:337 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 15:32:25:68:560 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:32:25:270:444 +Q5 finished at: 2022-4-1 15:32:25:270:686 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 15:32:25:273:157 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 15:32:25:275:781 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:32:25:276:758 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/read-committed/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/ob_oracle/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..ac28061d --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,50 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:32:25:554:295 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 15:32:25:563:3 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:32:25:654:332 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 15:32:25:657:704 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:32:25:855:664 +Q5 finished at: 2022-4-1 15:32:25:855:898 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:32:25:955:454 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 15:32:25:958:14 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:32:25:959:57 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..7fe007d0 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_dda_read_skew_committed.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:14:14:282:251 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:14:14:285:620 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:14:14:382:139 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 16:14:14:385:181 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:14:14:386:879 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 16:14:14:389:16 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 16:14:14:484:564 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 16:14:14:485:584 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:14:14:488:450 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 16:14:14:489:377 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..eabad7bb --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:14:14:765:356 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:14:14:768:691 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:14:14:865:238 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 16:14:14:868:81 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:14:14:869:590 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 16:14:14:871:641 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 +Q7 failed at: 2022-4-1 16:14:15:666:358 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/iat_dda_write_skew.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_dda_write_skew.txt new file mode 100644 index 00000000..1021e3b0 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_dda_write_skew.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:14:15:948:95 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:14:15:951:418 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:14:16:48:48 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 16:14:16:49:756 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:14:16:52:721 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 16:14:16:148:626 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 16:14:16:150:730 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 16:14:16:250:320 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:14:16:253:243 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 16:14:16:254:265 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..9f2679bc --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_dda_write_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:14:17:566:415 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:14:17:569:657 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:14:17:666:419 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 16:14:17:668:267 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:14:17:671:591 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 16:14:17:673:986 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 16:14:17:766:942 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 16:14:17:769:374 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:14:17:772:206 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 16:14:17:773:225 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..fcf9204a --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,71 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:14:16:582:730 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-1 16:14:16:586:851 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-1 16:14:16:588:519 + Q4-T2 execute sql: 'BEGIN;' + Q4 finished at: 2022-4-1 16:14:16:683:60 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-1 16:14:16:685:227 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-1 16:14:16:687:346 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 16:14:16:693:119 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 16:14:16:784:1 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-1 16:14:16:786:210 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-1 16:14:16:788:92 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 16:14:16:789:45 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..265c8779 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:14:17:80:733 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-1 16:14:17:85:140 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:14:17:181:177 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-1 16:14:17:183:471 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-1 16:14:17:188:512 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 16:14:17:190:755 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-1 16:14:17:282:523 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 16:14:17:284:859 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-1 16:14:17:287:884 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 16:14:17:288:915 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/iat_mda_step_iat.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_mda_step_iat.txt new file mode 100644 index 00000000..ff4fad6e --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_mda_step_iat.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_iat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:14:18:95:110 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 16:14:18:98:523 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:14:18:195:88 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 16:14:18:197:209 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-1 16:14:18:294:870 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 16:14:18:296:843 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-1 16:14:18:402:740 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 16:14:18:496:537 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-1 16:14:18:595:676 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 16:14:18:696:557 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 16:14:18:796:495 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 16:14:18:896:468 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 16:14:18:899:747 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 16:14:18:900:762 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..d1133cce --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,107 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:14:22:808:574 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:14:22:812:580 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:14:22:909:264 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 16:14:22:912:348 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 16:14:22:914:639 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-1 16:14:23:12:375 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 16:14:23:14:759 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 16:14:23:16:699 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 16:14:23:19:406 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-1 16:14:23:111:433 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 16:14:23:112:620 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-1 16:14:23:116:507 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 16:14:23:117:632 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..82f35c6c --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,208 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:14:21:992:233 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:14:21:996:667 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:14:22:92:485 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 16:14:22:95:499 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-1 16:14:22:194:918 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-1 16:14:22:198:454 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 16:14:22:201:36 + Q8-T4 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-1 16:14:22:295:206 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 16:14:22:297:93 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 16:14:22:299:641 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-1 16:14:22:394:502 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 16:14:22:395:726 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-1 16:14:22:494:48 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-1 16:14:22:495:329 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 16:14:22:503:499 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 16:14:22:504:661 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..ecbe1692 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:14:19:229:324 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-1 16:14:19:232:849 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:14:19:329:497 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 16:14:19:331:670 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-1 16:14:19:429:729 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 16:14:19:432:219 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-1 16:14:19:531:21 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-1 16:14:19:629:809 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-1 16:14:19:732:562 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 16:14:19:830:841 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 16:14:19:930:658 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 16:14:20:31:954 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 16:14:20:34:829 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 16:14:20:35:851 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..91d06fc9 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:14:20:316:518 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 16:14:20:320:856 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:14:20:417:211 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-1 16:14:20:419:117 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-1 16:14:20:517:927 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-1 16:14:20:519:909 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-1 16:14:20:622:564 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-1 16:14:20:720:538 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-1 16:14:20:817:229 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 16:14:20:921:429 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 16:14:21:17:963 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 16:14:21:118:376 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 16:14:21:121:681 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 16:14:21:122:775 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..24d863e4 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,139 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:14:23:435:862 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 16:14:23:440:279 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-1 16:14:23:442:749 + Q4-T2 execute sql: 'BEGIN;' + Q4 finished at: 2022-4-1 16:14:23:536:237 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-1 16:14:23:538:309 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-1 16:14:23:541:651 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 16:14:23:544:228 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-1 16:14:23:635:748 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-1 16:14:23:637:777 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 16:14:23:639:816 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 16:14:23:640:899 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-1 16:14:23:736:575 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-1 16:14:23:738:902 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-1 16:14:23:741:941 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-1 16:14:23:742:931 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..62a47ea3 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,163 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:14:21:403:997 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-1 16:14:21:407:441 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:14:21:504:126 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-1 16:14:21:506:179 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:14:21:509:48 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 16:14:21:511:599 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-1 16:14:21:513:165 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 16:14:21:515:513 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-4-1 16:14:21:604:269 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-1 16:14:21:606:528 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-1 16:14:21:608:323 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-1 16:14:21:610:346 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-1 16:14:21:612:180 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 16:14:21:615:13 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-1 16:14:21:705:154 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-1 16:14:21:706:216 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-1 16:14:21:709:255 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-1 16:14:21:710:238 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..481f12cb --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_sda_lost_update_committed.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:14:13:145:102 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 16:14:13:148:217 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:14:13:245:39 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 16:14:13:248:226 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 16:14:13:250:547 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 +Q6 failed at: 2022-4-1 16:14:13:946:134 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..a59437e8 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,61 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:14:12:658:944 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:14:12:662:267 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:14:12:758:817 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 16:14:12:761:773 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 16:14:12:763:761 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 16:14:12:859:346 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 16:14:12:860:320 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 16:14:12:862:721 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 16:14:12:863:649 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 16:14:12:864:624 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..d2735d5d --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_double_write_skew1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:38:261:902 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:33:38:265:492 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:38:364:439 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:33:38:366:249 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:33:38:369:267 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:33:38:563:760 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 +Q6 failed at: 2022-4-1 15:33:39:164:601 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..633789f4 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:39:438:786 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:33:39:442:533 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:39:538:653 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:33:39:540:311 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:33:39:543:22 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:33:39:545:258 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 +Q7 failed at: 2022-4-1 15:33:40:339:894 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..045ccbdb --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_double_write_skew2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:40:626:403 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:33:40:630:59 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:40:726:559 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:33:40:728:436 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 15:33:40:828:211 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:33:40:830:769 + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-1 15:33:41:331:806 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_read_skew.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_read_skew.txt new file mode 100644 index 00000000..ddfda279 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_read_skew.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:41:607:64 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:33:41:610:320 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:41:708:424 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:33:41:711:894 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:33:41:713:705 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 15:33:41:807:710 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:33:41:908:312 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:33:42:7:88 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:33:42:10:564 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:33:42:11:737 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_read_skew2.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_read_skew2.txt new file mode 100644 index 00000000..af09fbd9 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_read_skew2.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:43:258:791 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:33:43:262:595 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:43:358:731 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:33:43:361:579 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:33:43:363:480 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 15:33:43:459:464 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:33:43:462:401 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 15:33:43:558:654 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:33:43:561:593 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:33:43:562:611 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..7ad770da --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_read_skew2_committed.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:43:839:953 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:33:43:843:582 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:43:940:287 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:33:43:943:131 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:33:43:944:972 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:33:43:946:57 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 15:33:44:40:710 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:33:44:43:250 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:33:44:46:252 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:33:44:47:232 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..3c9af767 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:42:287:576 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 15:33:42:291:797 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:42:386:555 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:33:42:389:917 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:33:42:391:566 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:33:42:393:855 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 15:33:42:487:585 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:33:42:488:700 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-1 15:33:42:491:726 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:33:42:492:794 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..8e27bf46 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:42:768:944 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 15:33:42:772:739 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:42:869:16 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-1 15:33:42:872:65 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-1 15:33:42:873:621 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:33:42:875:963 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 15:33:42:969:678 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:33:42:970:869 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-1 15:33:42:973:981 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:33:42:975:130 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_write_read_skew.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..2024d25b --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_write_read_skew.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:37:82:430 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:33:37:85:975 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:37:182:549 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:33:37:184:85 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:33:37:186:666 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 15:33:37:283:52 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:33:37:383:650 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:33:37:483:444 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:33:37:486:400 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:33:37:487:351 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..de381b1a --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:37:763:850 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:33:37:767:913 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:37:871:840 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:33:37:873:605 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:33:37:876:485 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:33:37:879:303 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 15:33:37:964:142 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:33:37:966:429 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:33:37:969:306 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:33:37:970:312 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/rat_mda_step_rat.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_mda_step_rat.txt new file mode 100644 index 00000000..86837830 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_mda_step_rat.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_rat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:44:325:722 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:33:44:329:380 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:44:428:516 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:33:44:430:311 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:33:44:433:434 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-1 15:33:44:525:795 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-1 15:33:44:527:422 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-1 15:33:44:529:290 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-1 15:33:44:626:654 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 15:33:44:628:988 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 15:33:44:733:28 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:33:44:829:590 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 15:33:44:834:133 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 15:33:44:835:545 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..c439e7c9 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,208 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN;' + Q1 finished at: 2022-4-1 15:33:45:109:437 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-1 15:33:45:113:729 +Q3-T1 execute sql: 'BEGIN;' +Q3 finished at: 2022-4-1 15:33:45:209:374 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-1 15:33:45:212:286 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-1 15:33:45:310:383 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-1 15:33:45:313:203 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 15:33:45:315:838 + Q8-T2 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-1 15:33:45:409:548 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 15:33:45:411:241 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 15:33:45:511:243 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 15:33:45:610:948 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:33:45:710:543 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 15:33:45:809:576 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 15:33:45:810:907 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 15:33:45:814:665 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 15:33:45:815:752 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..d7212d10 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:46:95:704 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:33:46:103:686 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:46:195:696 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:33:46:197:218 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 15:33:46:200:95 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-1 15:33:46:295:875 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-1 15:33:46:297:561 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-1 15:33:46:299:705 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-1 15:33:46:396:834 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 15:33:46:399:660 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 15:33:46:497:222 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:33:46:596:968 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 15:33:46:600:13 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 15:33:46:601:61 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..a312ead1 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:46:861:255 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-1 15:33:46:864:873 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:46:961:218 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-1 15:33:46:962:814 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 15:33:46:966:830 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-1 15:33:47:61:439 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-1 15:33:47:63:260 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-1 15:33:47:65:576 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-1 15:33:47:164:14 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 15:33:47:166:688 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 15:33:47:266:155 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:33:47:362:318 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 15:33:47:365:708 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 15:33:47:366:825 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/rat_sda_dirty_read.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_sda_dirty_read.txt new file mode 100644 index 00000000..2fcca5d5 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_sda_dirty_read.txt @@ -0,0 +1,46 @@ +#### db_type: ob #### +#### test_type: sda_dirty_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:32:825:236 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:33:32:828:778 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:32:925:150 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 15:33:32:927:703 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-1 15:33:33:25:187 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:33:33:125:104 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 15:33:33:127:838 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 15:33:33:128:817 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/rat_sda_intermediate_read.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..daaf65a0 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_sda_intermediate_read.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:34:70:928 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:33:34:74:705 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:34:170:966 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 15:33:34:174:714 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-1 15:33:34:272:346 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:33:34:370:779 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:33:34:472:380 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 15:33:34:475:203 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:33:34:476:136 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..1cd95e18 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:34:746:589 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:33:34:750:282 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:34:846:502 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 15:33:34:849:209 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 15:33:34:850:225 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-1 15:33:34:946:958 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:33:34:949:519 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 15:33:34:952:42 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:33:34:952:922 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/rat_sda_lost_self_update.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..6d8d60ff --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_sda_lost_self_update.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:36:199:223 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:33:36:207:233 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:36:298:981 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 15:33:36:400:589 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 15:33:36:402:880 + Q4 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-1 15:33:36:803:775 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..f1e4f8ff --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_sda_non_repeatable_read.txt @@ -0,0 +1,59 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:33:395:638 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:33:33:398:905 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:33:495:661 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 15:33:33:498:642 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 15:33:33:600:430 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:33:33:696:916 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:33:33:795:643 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 15:33:33:798:397 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:33:33:799:380 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..21698c18 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,59 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:35:224:969 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 15:33:35:228:527 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:35:324:800 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-1 15:33:35:328:308 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 15:33:35:330:622 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 15:33:35:425:353 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:33:35:426:354 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-1 15:33:35:428:837 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:33:35:429:867 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..dfb0d729 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,58 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:35:701:263 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 15:33:35:705:352 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:35:801:168 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-1 15:33:35:803:971 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 15:33:35:806:288 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 15:33:35:901:768 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:33:35:902:852 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-1 15:33:35:905:482 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:33:35:906:401 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..9b128af3 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:53:908:347 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:33:53:911:816 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:54:8:476 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:33:54:10:204 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 15:33:54:109:861 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:33:54:112:569 + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-1 15:33:54:613:272 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..4c20f73a --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:54:906:510 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:33:54:910:50 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:55:8:97 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 15:33:55:9:897 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 +Q6 failed at: 2022-4-1 15:34:16:93:224 + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-4-1 15:34:16:138:40 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..2feae540 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,31 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-11 19:7:38:667:579 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 19:7:38:671:359 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-11 19:7:38:767:514 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 19:7:38:769:136 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-4-11 19:7:59:620:15 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 +Q6 failed at: 2022-4-11 19:8:0:60:162 +Test Result: Timeout +Reason: Transaction execution timeout \ No newline at end of file diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..cdd6d25e --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,31 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-11 19:8:35:322:421 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 19:8:35:326:151 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-11 19:8:35:422:329 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 19:8:35:423:985 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-4-11 19:8:56:296:960 +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 +Q7 failed at: 2022-4-11 19:8:56:831:533 +Test Result: Timeout +Reason: Transaction execution timeout \ No newline at end of file diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..67f34441 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:34:17:835:549 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:34:17:838:837 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:34:17:935:641 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 15:34:17:938:689 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:34:17:940:349 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 15:34:18:137:70 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 +Q6 failed at: 2022-4-1 15:34:18:737:786 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..d54bf98b --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:34:19:20:461 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:34:19:24:340 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:34:19:124:117 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 15:34:19:127:822 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:34:19:129:421 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:34:19:322:68 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 +Q6 failed at: 2022-4-1 15:34:19:922:871 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..6343a004 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:34:20:241:594 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:34:20:245:372 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:34:20:341:445 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:34:20:344:257 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 15:34:20:441:981 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:34:20:445:115 + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-1 15:34:20:945:727 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..d72cd524 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:34:21:265:258 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:34:21:269:754 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:34:21:365:312 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:34:21:368:3 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 15:34:21:465:738 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:34:21:666:541 + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-1 15:34:22:167:239 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..cb2b3c21 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:34:22:488:538 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:34:22:492:79 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:34:22:588:910 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:34:22:591:536 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 15:34:22:692:564 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:34:22:695:17 + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-1 15:34:23:195:759 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..2518e2cc --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_mda_step_wat_c1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:34:23:466:852 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:34:23:470:429 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:34:23:566:870 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 15:34:23:568:489 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-1 15:34:23:666:851 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 15:34:23:668:477 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-4-1 15:34:44:550:95 +Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 +Q9 failed at: 2022-4-1 15:34:44:953:834 + Q8 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 + Q8 failed at: 2022-4-1 15:34:45:251:266 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..499b2a06 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_mda_step_wat_c2.txt @@ -0,0 +1,39 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-11 19:6:13:406:564 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 19:6:13:410:210 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-11 19:6:13:506:551 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 19:6:13:508:189 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-11 19:6:13:608:169 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-11 19:6:13:807:180 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 + Q6 failed at: 2022-4-11 19:6:34:226:584 + Q8 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 + Q8 failed at: 2022-4-11 19:6:34:768:445 +Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 +Q9 failed at: 2022-4-11 19:6:35:329:731 +Test Result: Timeout +Reason: Transaction execution timeout \ No newline at end of file diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..99b33bea --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:47:642:610 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:33:47:646:389 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:47:742:955 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-1 15:33:47:842:610 + Q4 finished at: 2022-4-1 15:33:47:842:961 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:33:47:943:522 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 15:33:47:946:367 + Q8-T3 execute sql: 'DROP TABLE t1;' + Q8 finished at: 2022-4-1 15:33:47:959:819 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:33:47:961:0 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..4a538952 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,29 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:48:234:421 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:33:48:238:180 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:48:334:186 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-1 15:33:48:435:851 + Q4 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-1 15:33:48:836:683 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/wat_sda_full_write.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_sda_full_write.txt new file mode 100644 index 00000000..8b9d0624 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_sda_full_write.txt @@ -0,0 +1,31 @@ +#### db_type: ob #### +#### test_type: sda_full_write #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:49:107:125 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:33:49:110:820 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:49:207:351 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-1 15:33:49:307:622 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 15:33:49:309:659 + Q4 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-1 15:33:49:710:406 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/wat_sda_full_write_committed.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..f630d117 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_sda_full_write_committed.txt @@ -0,0 +1,31 @@ +#### db_type: ob #### +#### test_type: sda_full_write_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:49:992:150 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:33:49:995:696 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:50:92:239 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-1 15:33:50:193:100 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:33:50:195:716 + Q4 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-1 15:33:50:596:459 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..b6e39135 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:53:28:732 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:33:53:33:116 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:53:128:789 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 15:33:53:230:60 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:33:53:232:575 + Q4 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-1 15:33:53:633:246 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..93fd792d --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_sda_lost_update_c1.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:50:870:966 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 15:33:50:874:188 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:50:970:964 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 15:33:50:974:33 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:33:51:172:185 +Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 +Q5 failed at: 2022-4-1 15:33:51:672:940 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/repeatable-read/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..13484fe7 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/repeatable-read/wat_sda_lost_update_c2.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:33:51:945:619 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 15:33:51:948:748 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:33:52:45:672 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 15:33:52:52:290 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:33:52:247:381 +Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 +Q5 failed at: 2022-4-1 15:33:52:748:264 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/result_summary/read-committed_total-result.txt b/test_result/centralizend_result/ob_oracle/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..a5e025b4 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Timeout + +wat_dda_full_write_skew_c2: Timeout + +wat_dda_full_write_skew_committed: Timeout + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Timeout + +wat_mda_step_wat_c2: Timeout + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/ob_oracle/result_summary/repeatable-read_total-result.txt b/test_result/centralizend_result/ob_oracle/result_summary/repeatable-read_total-result.txt new file mode 100644 index 00000000..4139416e --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/result_summary/repeatable-read_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Rollback + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Rollback + +wat_sda_full_write: Rollback + +wat_sda_full_write_committed: Rollback + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Rollback + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Timeout + +wat_dda_full_write_skew_c2: Timeout + +wat_dda_full_write_skew_committed: Timeout + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Timeout + +wat_mda_step_wat_c2: Timeout + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/ob_oracle/result_summary/serializable_total-result.txt b/test_result/centralizend_result/ob_oracle/result_summary/serializable_total-result.txt new file mode 100644 index 00000000..4139416e --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/result_summary/serializable_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Rollback + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Rollback + +wat_sda_full_write: Rollback + +wat_sda_full_write_committed: Rollback + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Rollback + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Timeout + +wat_dda_full_write_skew_c2: Timeout + +wat_dda_full_write_skew_committed: Timeout + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Timeout + +wat_mda_step_wat_c2: Timeout + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/ob_oracle/serializable/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/ob_oracle/serializable/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..84c76e45 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/iat_dda_read_skew_committed.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:36:17:983:65 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:36:17:986:182 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:36:18:83:166 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:36:18:86:111 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:36:18:87:835 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:36:18:90:930 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 15:36:18:183:676 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:36:18:184:849 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:36:18:187:567 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:36:18:188:598 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/serializable/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/ob_oracle/serializable/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..18d7acb8 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:36:18:467:25 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:36:18:470:331 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:36:18:567:152 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 15:36:18:570:447 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:36:18:572:109 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:36:18:574:628 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 +Q7 failed at: 2022-4-1 15:36:19:369:77 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/serializable/iat_dda_write_skew.txt b/test_result/centralizend_result/ob_oracle/serializable/iat_dda_write_skew.txt new file mode 100644 index 00000000..49a7dcbb --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/iat_dda_write_skew.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:36:19:661:27 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:36:19:664:430 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:36:19:761:213 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:36:19:763:32 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:36:19:766:828 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 15:36:19:861:569 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:36:19:864:6 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 15:36:19:964:668 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:36:19:967:823 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 15:36:19:968:923 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/serializable/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/ob_oracle/serializable/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..7c5b7e31 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/iat_dda_write_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:36:21:234:636 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:36:21:238:486 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:36:21:334:476 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:36:21:336:212 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:36:21:339:79 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:36:21:341:945 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 15:36:21:435:158 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:36:21:437:914 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:36:21:440:993 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:36:21:442:264 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/ob_oracle/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..75d13f8f --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,71 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:36:20:258:272 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-1 15:36:20:267:129 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-1 15:36:20:268:943 + Q4-T2 execute sql: 'BEGIN;' + Q4 finished at: 2022-4-1 15:36:20:357:951 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-1 15:36:20:359:965 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-1 15:36:20:361:555 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:36:20:365:762 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:36:20:459:562 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-1 15:36:20:461:908 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-1 15:36:20:463:938 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:36:20:465:291 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/ob_oracle/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..ea0f4e70 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:36:20:747:105 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-1 15:36:20:752:4 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:36:20:847:17 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-1 15:36:20:849:122 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-1 15:36:20:854:146 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:36:20:856:802 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-1 15:36:20:948:854 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:36:20:951:190 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-1 15:36:20:954:570 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:36:20:955:841 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/serializable/iat_mda_step_iat.txt b/test_result/centralizend_result/ob_oracle/serializable/iat_mda_step_iat.txt new file mode 100644 index 00000000..1b79972f --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/iat_mda_step_iat.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_iat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:36:21:724:84 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 15:36:21:727:643 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:36:21:824:139 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 15:36:21:825:985 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-1 15:36:21:924:371 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 15:36:21:926:516 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-1 15:36:22:26:167 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 15:36:22:128:962 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-1 15:36:22:224:859 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 15:36:22:325:775 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 15:36:22:425:841 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:36:22:526:313 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 15:36:22:530:125 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 15:36:22:531:320 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/serializable/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/ob_oracle/serializable/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..4b36d7e4 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,107 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:36:26:368:885 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:36:26:372:467 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:36:26:469:72 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 15:36:26:472:269 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 15:36:26:474:932 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-1 15:36:26:569:27 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 15:36:26:571:62 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 15:36:26:572:612 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:36:26:575:405 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-1 15:36:26:669:817 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 15:36:26:671:72 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-1 15:36:26:674:91 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 15:36:26:675:147 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/serializable/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/ob_oracle/serializable/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..5bba8f18 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,208 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:36:25:587:721 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:36:25:592:382 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:36:25:687:761 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:36:25:690:739 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-1 15:36:25:788:48 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-1 15:36:25:791:222 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:36:25:793:717 + Q8-T4 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-1 15:36:25:888:151 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 15:36:25:889:871 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:36:25:892:819 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-1 15:36:25:989:642 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:36:25:991:181 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-1 15:36:26:89:172 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-1 15:36:26:90:757 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 15:36:26:94:455 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 15:36:26:95:631 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/serializable/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/ob_oracle/serializable/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..d6242e4a --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:36:22:817:658 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-1 15:36:22:821:412 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:36:22:917:631 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 15:36:22:919:749 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-1 15:36:23:20:147 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 15:36:23:22:260 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-1 15:36:23:119:609 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-1 15:36:23:218:357 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-1 15:36:23:318:321 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 15:36:23:420:128 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 15:36:23:519:18 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:36:23:619:142 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 15:36:23:622:917 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 15:36:23:623:994 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/serializable/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/ob_oracle/serializable/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..bbf1f83c --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:36:23:890:905 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 15:36:23:895:698 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:36:23:990:502 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-1 15:36:23:992:534 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-1 15:36:24:90:740 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-1 15:36:24:92:901 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-1 15:36:24:191:916 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-1 15:36:24:292:737 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-1 15:36:24:392:609 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 15:36:24:492:156 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 15:36:24:592:74 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:36:24:692:69 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 15:36:24:695:430 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 15:36:24:696:567 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/ob_oracle/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..34850bab --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,139 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:36:26:963:931 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 15:36:26:968:68 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-1 15:36:26:970:853 + Q4-T2 execute sql: 'BEGIN;' + Q4 finished at: 2022-4-1 15:36:27:63:842 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-1 15:36:27:65:913 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-1 15:36:27:69:16 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:36:27:71:672 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-1 15:36:27:164:226 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-1 15:36:27:166:521 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 15:36:27:168:632 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 15:36:27:170:128 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-1 15:36:27:264:664 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-1 15:36:27:267:331 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-1 15:36:27:270:643 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-1 15:36:27:271:899 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/serializable/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/ob_oracle/serializable/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..f80c333d --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,163 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:6:30:314:538 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-1 16:6:30:322:725 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:6:30:414:473 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-1 16:6:30:416:527 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:6:30:419:501 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 16:6:30:421:510 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-1 16:6:30:423:6 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 16:6:30:425:151 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-4-1 16:6:30:514:525 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-1 16:6:30:516:525 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-1 16:6:30:518:143 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-1 16:6:30:520:154 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-1 16:6:30:521:665 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 16:6:30:523:942 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-1 16:6:30:615:745 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-1 16:6:30:616:771 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-1 16:6:30:619:943 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-1 16:6:30:620:896 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/serializable/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/ob_oracle/serializable/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..c03e535b --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/iat_sda_lost_update_committed.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:36:16:907:519 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 15:36:16:917:592 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:36:17:7:488 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 15:36:17:10:526 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 15:36:17:13:352 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 +Q6 failed at: 2022-4-1 15:36:17:708:571 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/serializable/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/ob_oracle/serializable/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..2e93210b --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,61 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 16:6:2:642:49 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:6:2:650:336 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 16:6:2:742:678 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 16:6:2:745:768 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 16:6:2:748:89 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 16:6:2:842:494 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 16:6:2:843:474 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 16:6:2:845:961 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 16:6:2:846:868 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 16:6:2:847:692 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/serializable/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/ob_oracle/serializable/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..6416ac46 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/rat_dda_double_write_skew1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:8:294:944 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:8:298:537 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:8:395:543 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:35:8:397:121 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:35:8:399:917 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:35:8:598:530 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 +Q6 failed at: 2022-4-1 15:35:9:199:289 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/serializable/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/ob_oracle/serializable/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..6aeafe26 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:9:484:904 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:9:488:676 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:9:583:649 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:35:9:585:209 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:35:9:587:770 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:35:9:590:31 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 +Q7 failed at: 2022-4-1 15:35:10:384:870 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/serializable/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/ob_oracle/serializable/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..417a2f1b --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/rat_dda_double_write_skew2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:10:668:407 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:10:672:29 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:10:768:211 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:35:10:770:16 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 15:35:10:869:698 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:35:10:872:407 + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-1 15:35:11:373:209 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/serializable/rat_dda_read_skew.txt b/test_result/centralizend_result/ob_oracle/serializable/rat_dda_read_skew.txt new file mode 100644 index 00000000..bb09bc10 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/rat_dda_read_skew.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:11:665:105 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:35:11:668:435 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:11:766:641 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:35:11:769:651 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:35:11:771:296 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 15:35:11:865:921 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:35:11:966:713 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:35:12:65:310 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:35:12:68:274 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:35:12:69:284 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/serializable/rat_dda_read_skew2.txt b/test_result/centralizend_result/ob_oracle/serializable/rat_dda_read_skew2.txt new file mode 100644 index 00000000..a7a32480 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/rat_dda_read_skew2.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:13:366:639 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:13:370:41 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:13:466:590 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:35:13:469:8 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:35:13:470:578 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 15:35:13:567:296 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:35:13:569:647 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 15:35:13:666:580 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:35:13:669:752 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:35:13:670:738 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/serializable/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/ob_oracle/serializable/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..3eeb7f59 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/rat_dda_read_skew2_committed.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:13:946:993 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:13:950:932 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:14:46:935 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:35:14:49:693 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:35:14:51:431 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:35:14:52:414 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 15:35:14:147:432 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:35:14:149:878 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:35:14:153:800 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:35:14:154:854 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/serializable/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/ob_oracle/serializable/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..2ee98582 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:12:344:568 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 15:35:12:347:952 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:12:444:585 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:35:12:453:996 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:35:12:455:549 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:35:12:457:532 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 15:35:12:545:88 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:35:12:546:134 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-1 15:35:12:548:738 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:35:12:549:743 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/serializable/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/ob_oracle/serializable/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..43bb6992 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:12:828:112 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 15:35:12:832:478 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:12:928:54 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-1 15:35:12:931:101 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-1 15:35:12:932:819 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:35:12:935:307 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 15:35:13:28:567 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:35:13:29:564 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-1 15:35:13:32:483 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:35:13:33:446 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/serializable/rat_dda_write_read_skew.txt b/test_result/centralizend_result/ob_oracle/serializable/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..df83da40 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/rat_dda_write_read_skew.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:7:116:604 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:7:120:169 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:7:216:558 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:35:7:218:222 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:35:7:221:124 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 15:35:7:317:575 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:35:7:417:648 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:35:7:521:115 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:35:7:524:210 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:35:7:525:298 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/serializable/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/ob_oracle/serializable/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..333ded88 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:7:809:7 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:7:817:44 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:7:908:950 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:35:7:910:574 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:35:7:913:79 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:35:7:915:675 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 15:35:8:9:537 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:35:8:11:859 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 15:35:8:14:667 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 15:35:8:19:702 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/serializable/rat_mda_step_rat.txt b/test_result/centralizend_result/ob_oracle/serializable/rat_mda_step_rat.txt new file mode 100644 index 00000000..13c478bc --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/rat_mda_step_rat.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_rat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:14:429:390 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:14:432:901 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:14:529:616 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:35:14:531:911 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 15:35:14:535:243 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-1 15:35:14:629:227 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-1 15:35:14:630:704 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-1 15:35:14:632:479 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-1 15:35:14:733:318 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 15:35:14:735:837 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 15:35:14:830:686 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:35:14:930:748 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 15:35:14:933:705 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 15:35:14:934:720 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/serializable/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/ob_oracle/serializable/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..eaf3076c --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,208 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN;' + Q1 finished at: 2022-4-1 15:35:15:218:29 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-1 15:35:15:222:954 +Q3-T1 execute sql: 'BEGIN;' +Q3 finished at: 2022-4-1 15:35:15:318:229 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-1 15:35:15:321:352 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-1 15:35:15:418:323 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-1 15:35:15:421:8 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 15:35:15:423:562 + Q8-T2 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-1 15:35:15:518:119 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 15:35:15:519:869 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 15:35:15:619:478 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 15:35:15:722:635 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:35:15:819:58 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 15:35:15:918:121 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 15:35:15:919:419 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 15:35:15:922:970 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 15:35:15:923:948 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/serializable/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/ob_oracle/serializable/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..c4887572 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:16:210:471 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:16:214:96 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:16:310:773 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:35:16:312:351 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 15:35:16:315:717 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-1 15:35:16:410:696 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-1 15:35:16:412:364 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-1 15:35:16:414:587 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-1 15:35:16:511:800 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 15:35:16:517:285 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 15:35:16:611:996 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:35:16:712:290 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 15:35:16:715:599 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 15:35:16:717:62 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/serializable/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/ob_oracle/serializable/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..3290f7cd --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:16:993:434 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-1 15:35:16:997:70 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:17:91:370 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-1 15:35:17:92:895 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 15:35:17:97:66 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-1 15:35:17:192:276 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-1 15:35:17:194:99 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-1 15:35:17:196:618 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-1 15:35:17:292:857 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 15:35:17:295:539 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 15:35:17:392:916 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:35:17:493:244 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 15:35:17:496:443 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 15:35:17:497:608 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/ob_oracle/serializable/rat_sda_dirty_read.txt b/test_result/centralizend_result/ob_oracle/serializable/rat_sda_dirty_read.txt new file mode 100644 index 00000000..a2305e47 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/rat_sda_dirty_read.txt @@ -0,0 +1,46 @@ +#### db_type: ob #### +#### test_type: sda_dirty_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:2:789:115 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:2:793:498 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:2:890:163 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 15:35:2:897:301 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-1 15:35:2:989:716 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:35:3:88:726 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 15:35:3:91:893 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 15:35:3:92:931 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/serializable/rat_sda_intermediate_read.txt b/test_result/centralizend_result/ob_oracle/serializable/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..23d4f8c4 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/rat_sda_intermediate_read.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:4:101:417 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:4:104:893 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:4:201:524 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 15:35:4:204:98 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-1 15:35:4:304:529 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:35:4:403:868 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:35:4:503:168 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 15:35:4:506:4 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:35:4:507:175 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/serializable/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/ob_oracle/serializable/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..36dc2a11 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:4:792:293 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:4:795:804 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:4:892:117 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 15:35:4:894:763 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 15:35:4:895:748 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-1 15:35:4:994:75 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:35:4:996:592 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 15:35:4:999:244 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:35:5:0:184 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/serializable/rat_sda_lost_self_update.txt b/test_result/centralizend_result/ob_oracle/serializable/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..91acd602 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/rat_sda_lost_self_update.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:6:236:996 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:6:240:831 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:6:337:135 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 15:35:6:438:761 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 15:35:6:441:134 + Q4 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-1 15:35:6:841:914 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/serializable/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/ob_oracle/serializable/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..69e42c02 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/rat_sda_non_repeatable_read.txt @@ -0,0 +1,59 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:3:401:724 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:35:3:405:663 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:3:504:489 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 15:35:3:507:808 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 15:35:3:602:587 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:35:3:704:814 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:35:3:802:296 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 15:35:3:805:202 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:35:3:806:263 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/ob_oracle/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..c6bd9542 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,59 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:5:270:1 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 15:35:5:274:153 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:5:369:424 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-1 15:35:5:373:140 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 15:35:5:375:530 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 15:35:5:472:88 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:35:5:473:169 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-1 15:35:5:475:959 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:35:5:476:937 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/ob_oracle/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..7604391f --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,58 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:5:743:768 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 15:35:5:747:790 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:5:843:822 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-1 15:35:5:846:473 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 15:35:5:853:892 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 15:35:5:944:671 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:35:5:946:860 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-1 15:35:5:949:632 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:35:5:950:615 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/serializable/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/ob_oracle/serializable/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..f46bc6ef --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:24:84:370 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:24:88:15 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:24:184:11 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 15:35:24:185:600 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 15:35:24:285:544 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:35:24:288:264 + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-1 15:35:24:789:54 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/serializable/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/ob_oracle/serializable/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..a48c1f3d --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:25:64:861 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:25:68:626 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:25:166:391 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 15:35:25:168:187 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 +Q6 failed at: 2022-4-1 15:35:45:883:846 + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-4-1 15:35:46:531:512 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/centralizend_result/ob_oracle/serializable/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/ob_oracle/serializable/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..fc91c011 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,31 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-11 17:31:45:886:601 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 17:31:45:890:438 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-11 17:31:45:986:620 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 17:31:45:988:522 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 +Q6 failed at: 2022-4-11 17:32:6:660:212 + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-4-11 17:32:7:56:358 +Test Result: Timeout +Reason: Transaction execution timeout diff --git a/test_result/centralizend_result/ob_oracle/serializable/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/ob_oracle/serializable/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..b381608d --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-11 17:33:28:910:901 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 17:33:28:914:583 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-11 17:33:29:10:733 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 17:33:29:12:372 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-11 17:33:48:944:709 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 17:33:48:947:42 +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 +Q7 failed at: 2022-4-11 17:33:49:647:629 +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/centralizend_result/ob_oracle/serializable/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/ob_oracle/serializable/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..bee62b89 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:48:95:373 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:35:48:98:791 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:48:195:385 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 15:35:48:198:270 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:35:48:199:795 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 15:35:48:396:916 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 +Q6 failed at: 2022-4-1 15:35:48:997:829 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/serializable/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/ob_oracle/serializable/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..780d91f1 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:49:283:678 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 15:35:49:287:250 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:49:383:951 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 15:35:49:387:267 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 15:35:49:388:996 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:35:49:585:229 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 +Q6 failed at: 2022-4-1 15:35:50:186:158 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/serializable/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/ob_oracle/serializable/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..c207dd2e --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:50:468:744 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:50:481:797 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:50:568:972 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:35:50:571:612 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 15:35:50:669:617 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:35:50:674:668 + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-1 15:35:51:174:881 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/serializable/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/ob_oracle/serializable/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..37aebd87 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:51:462:549 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:51:466:861 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:51:562:788 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:35:51:565:859 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 15:35:51:663:29 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:35:51:868:551 + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-1 15:35:52:369:432 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/serializable/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/ob_oracle/serializable/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..04c5bb1c --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:52:652:965 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:52:656:884 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:52:753:214 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 15:35:52:755:916 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 15:35:52:853:552 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 15:35:52:856:901 + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-1 15:35:53:357:42 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/serializable/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/ob_oracle/serializable/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..c77eaa87 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/wat_mda_step_wat_c1.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:53:644:949 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:53:648:496 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:53:745:275 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 15:35:53:747:391 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-1 15:35:53:844:927 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 15:35:53:846:590 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q8 finished at: 2022-4-1 15:36:13:789:632 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 15:36:13:792:316 +Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 +Q9 failed at: 2022-4-1 15:36:14:692:852 + Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-4-1 15:36:14:944:948 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/centralizend_result/ob_oracle/serializable/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/ob_oracle/serializable/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..d7a5b688 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/wat_mda_step_wat_c2.txt @@ -0,0 +1,39 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-11 19:4:56:771:626 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 19:4:56:775:549 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-11 19:4:56:871:543 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 19:4:56:873:298 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-11 19:4:56:976:447 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-11 19:4:57:173:107 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 + Q6 failed at: 2022-4-11 19:5:17:716:196 +Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 +Q9 failed at: 2022-4-11 19:5:18:144:657 + Q8 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]resource busy; acquire with WAIT timeout expired errcode: HY000 + Q8 failed at: 2022-4-11 19:5:18:638:647 +Test Result: Timeout +Reason: Transaction execution timeout diff --git a/test_result/centralizend_result/ob_oracle/serializable/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/ob_oracle/serializable/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..4dde6bd8 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:17:783:311 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:17:787:270 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:17:883:55 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-1 15:35:17:983:375 + Q4 finished at: 2022-4-1 15:35:17:983:758 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:35:18:85:943 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 15:35:18:88:880 + Q8-T3 execute sql: 'DROP TABLE t1;' + Q8 finished at: 2022-4-1 15:35:18:103:957 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 15:35:18:105:129 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/ob_oracle/serializable/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/ob_oracle/serializable/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..9e9fc9fa --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,29 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:18:381:354 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:18:385:127 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:18:481:139 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-1 15:35:18:583:169 + Q4 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-1 15:35:18:983:875 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/serializable/wat_sda_full_write.txt b/test_result/centralizend_result/ob_oracle/serializable/wat_sda_full_write.txt new file mode 100644 index 00000000..c59502fe --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/wat_sda_full_write.txt @@ -0,0 +1,31 @@ +#### db_type: ob #### +#### test_type: sda_full_write #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:19:270:565 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:19:274:166 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:19:371:737 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-1 15:35:19:471:71 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 15:35:19:473:994 + Q4 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-1 15:35:19:874:621 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/serializable/wat_sda_full_write_committed.txt b/test_result/centralizend_result/ob_oracle/serializable/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..2e0f7901 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/wat_sda_full_write_committed.txt @@ -0,0 +1,31 @@ +#### db_type: ob #### +#### test_type: sda_full_write_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:20:153:311 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:20:156:933 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:20:256:72 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-1 15:35:20:354:354 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:35:20:356:910 + Q4 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-1 15:35:20:758:104 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/serializable/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/ob_oracle/serializable/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..89168f98 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:23:200:158 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 15:35:23:203:786 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:23:300:117 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 15:35:23:405:875 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 15:35:23:408:475 + Q4 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-1 15:35:23:809:280 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/serializable/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/ob_oracle/serializable/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..9e0e2873 --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/wat_sda_lost_update_c1.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:21:32:57 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 15:35:21:35:602 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:21:132:10 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 15:35:21:135:433 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 15:35:21:333:185 +Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 +Q5 failed at: 2022-4-1 15:35:21:834:209 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/ob_oracle/serializable/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/ob_oracle/serializable/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..a1e42a2c --- /dev/null +++ b/test_result/centralizend_result/ob_oracle/serializable/wat_sda_lost_update_c2.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-1 15:35:22:110:253 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 15:35:22:113:738 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-1 15:35:22:210:255 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 15:35:22:213:419 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 15:35:22:411:875 +Q5 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction errcode: HY000 +Q5 failed at: 2022-4-1 15:35:22:912:776 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25]can't serialize access for this transaction + diff --git a/test_result/centralizend_result/oracle/read-committed/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/oracle/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..1a431c9a --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,57 @@ +#### db_type: oracle #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:27:58:10:172 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:27:58:13:691 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:27:58:110:136 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 16:27:58:113:608 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:27:58:116:275 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 16:27:58:215:276 +Q8-T1 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:27:58:220:604 + Q10-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/oracle/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..7a5f5619 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,50 @@ +#### db_type: oracle #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:27:58:466:638 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:27:58:470:11 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:27:58:566:689 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 16:27:58:570:425 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:27:58:573:477 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 16:27:58:669:484 +Q8-T1 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:27:58:676:256 + Q10-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/iat_dda_write_skew.txt b/test_result/centralizend_result/oracle/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..700fe78a --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,57 @@ +#### db_type: oracle #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:27:58:924:976 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:27:58:928:354 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:27:59:24:948 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 16:27:59:28:199 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:27:59:31:52 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 16:27:59:127:925 +Q7-T1 execute opt: 'COMMIT'; + Q8-T2 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:27:59:231:270 + Q8-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/oracle/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..40902ed7 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,57 @@ +#### db_type: oracle #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:0:369:572 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:28:0:373:113 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:0:469:719 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 16:28:0:473:188 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:28:0:475:881 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 16:28:0:572:406 +Q8-T1 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:28:0:578:779 + Q10-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/oracle/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..2b558e1f --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,68 @@ +#### db_type: oracle #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:27:59:455:596 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-1 16:27:59:460:632 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-1 16:27:59:462:992 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-1 16:27:59:555:687 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-1 16:27:59:559:910 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-1 16:27:59:562:406 + Q7-T2 execute opt: 'COMMIT'; +Q8-T1 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-1 16:27:59:660:68 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-1 16:27:59:662:208 + Q12-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/oracle/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..1d3c64aa --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,57 @@ +#### db_type: oracle #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:58:33:535:772 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-1 16:58:33:541:373 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:58:33:635:698 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-1 16:58:33:638:929 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-1 16:58:33:643:829 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-1 16:58:33:743:730 +Q8-T1 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,saving,1400) (kevin,checking,1400) + (1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + (2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-1 16:58:33:750:862 + Q10-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/iat_mda_step_iat.txt b/test_result/centralizend_result/oracle/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..762ab0b2 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,104 @@ +#### db_type: oracle #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:0:829:451 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 16:28:0:833:532 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:0:929:453 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 16:28:0:933:454 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 16:28:1:31:589 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 16:28:1:35:840 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-1 16:28:1:133:86 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 16:28:1:232:674 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-1 16:28:1:332:450 +Q10-T1 execute opt: 'COMMIT'; + Q11-T2 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 16:28:1:637:859 + Q14-T4 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/oracle/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..dd8aaf69 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,101 @@ +#### db_type: oracle #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:5:372:741 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:28:5:377:585 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:5:474:79 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 16:28:5:478:774 + Q5-T2 execute opt: 'COMMIT'; + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 16:28:5:574:480 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 16:28:5:577:504 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 16:28:5:581:138 + Q9-T3 execute opt: 'COMMIT'; +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2022-4-1 16:28:5:676:99 +Q11-T1 execute opt: 'COMMIT'; + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-1 16:28:5:682:636 + Q13-T4 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/oracle/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..7a9b9faf --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,201 @@ +#### db_type: oracle #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:4:597:259 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:28:4:601:748 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:4:699:543 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 16:28:4:704:226 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 16:28:4:797:529 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-1 16:28:4:801:329 + Q7-T3 execute opt: 'COMMIT'; + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 16:28:4:897:452 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 16:28:4:902:41 + Q10-T4 execute opt: 'COMMIT'; + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-4-1 16:28:4:999:883 + Q12-T2 execute opt: 'COMMIT'; +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-1 16:28:5:102:170 +Q14-T1 execute opt: 'COMMIT'; + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 16:28:5:110:362 + Q16-T5 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/oracle/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..3fb68441 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,104 @@ +#### db_type: oracle #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:1:898:478 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-1 16:28:1:902:490 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:2:0:418 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 16:28:2:4:499 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 16:28:2:96:875 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 16:28:2:100:839 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-1 16:28:2:200:20 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-1 16:28:2:302:839 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-1 16:28:2:400:74 +Q10-T1 execute opt: 'COMMIT'; + Q11-T2 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 16:28:2:705:813 + Q14-T4 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/oracle/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..a88c872a --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,101 @@ +#### db_type: oracle #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:2:966:589 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 16:28:2:970:886 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:3:67:74 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-1 16:28:3:71:266 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 16:28:3:170:182 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-1 16:28:3:174:526 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-1 16:28:3:270:270 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-1 16:28:3:370:566 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-1 16:28:3:470:703 +Q10-T1 execute opt: 'COMMIT'; + Q11-T2 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 16:28:3:774:578 + Q14-T4 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/oracle/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..c1ec2faf --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,135 @@ +#### db_type: oracle #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:5:933:545 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 16:28:5:937:355 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-1 16:28:5:940:375 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-1 16:28:6:33:561 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-1 16:28:6:36:477 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-1 16:28:6:39:732 + Q7-T2 execute opt: 'COMMIT'; + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 16:28:6:135:481 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-1 16:28:6:138:467 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 16:28:6:140:663 + Q11-T3 execute opt: 'COMMIT'; +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-1 16:28:6:236:259 +Q13-T1 execute opt: 'COMMIT'; + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-1 16:28:6:243:949 + Q15-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/oracle/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..d1fac200 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,157 @@ +#### db_type: oracle #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:4:35:112 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-1 16:28:4:39:323 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:4:135:85 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-1 16:28:4:139:240 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:28:4:142:134 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 16:28:4:144:512 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-1 16:28:4:147:644 + Q8-T2 execute opt: 'COMMIT'; + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2022-4-1 16:28:4:235:61 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-1 16:28:4:238:983 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-1 16:28:4:241:882 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-1 16:28:4:244:62 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-1 16:28:4:246:845 + Q14-T3 execute opt: 'COMMIT'; +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2022-4-1 16:28:4:337:614 +Q16-T1 execute opt: 'COMMIT'; + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-1 16:28:4:344:68 + Q18-T4 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/oracle/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..4c618e4e --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,47 @@ +#### db_type: oracle #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:27:57:555:463 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 16:27:57:558:908 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:27:57:655:648 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 16:27:57:659:482 + Q5-T2 execute opt: 'COMMIT'; +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-1 16:27:57:758:277 +Q7-T1 execute opt: 'COMMIT'; + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 16:27:57:764:651 + Q9-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/oracle/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..0680ba23 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,55 @@ +#### db_type: oracle #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:27:57:100:812 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:27:57:104:823 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:27:57:200:734 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 16:27:57:204:350 + Q5-T2 execute opt: 'COMMIT'; +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 16:27:57:302:692 +Q7-T1 execute opt: 'COMMIT'; + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 16:27:57:308:74 + Q9-T3 execute opt: 'COMMIT'; + Q10-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/oracle/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..ecf484b3 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,52 @@ +#### db_type: oracle #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:25:55:921:974 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:25:55:925:535 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:25:56:21:989 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 16:25:56:25:905 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 16:25:56:28:825 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 16:25:56:225:34 +Q8-T1 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-1 16:25:56:329:728 + Q10-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/oracle/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..21ab090b --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,52 @@ +#### db_type: oracle #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:25:56:578:761 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:25:56:582:784 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:25:56:678:606 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 16:25:56:682:84 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 16:25:56:684:891 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-1 16:25:56:781:510 +Q8-T1 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-1 16:25:56:789:596 + Q10-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/read-committed/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/oracle/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..0e133616 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,52 @@ +#### db_type: oracle #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:25:57:42:640 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:25:57:45:992 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:25:57:142:729 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 16:25:57:146:285 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 16:25:57:245:496 +Q7-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 16:25:57:246:836 + Q8-T2 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:25:57:349:661 + Q10-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/read-committed/rat_dda_read_skew.txt b/test_result/centralizend_result/oracle/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..1f6fc32a --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,59 @@ +#### db_type: oracle #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:25:57:597:771 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:25:57:601:43 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:25:57:697:722 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 16:25:57:701:72 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:25:57:703:688 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 16:25:57:800:531 + Q7-T2 execute opt: 'COMMIT'; +Q8-T1 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:25:58:3:121 + Q10-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/read-committed/rat_dda_read_skew2.txt b/test_result/centralizend_result/oracle/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..76b2ed01 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,59 @@ +#### db_type: oracle #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:25:59:166:976 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:25:59:170:450 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:25:59:266:970 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 16:25:59:271:98 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 16:25:59:274:13 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 16:25:59:369:919 +Q7-T1 execute opt: 'COMMIT'; + Q8-T2 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:25:59:472:318 + Q10-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/read-committed/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/oracle/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..b26934bd --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,59 @@ +#### db_type: oracle #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:25:59:724:986 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:25:59:729:357 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:25:59:827:468 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 16:25:59:832:736 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 16:25:59:835:816 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 16:25:59:927:662 +Q8-T1 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:25:59:935:412 + Q10-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/oracle/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..2004e26f --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,57 @@ +#### db_type: oracle #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:25:58:265:565 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 16:25:58:270:308 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:25:58:365:569 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 16:25:58:369:123 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:25:58:372:22 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 16:25:58:467:396 +Q8-T1 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-1 16:25:58:473:386 + Q10-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/oracle/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..033aa9aa --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,55 @@ +#### db_type: oracle #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:25:58:713:362 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 16:25:58:717:943 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:25:58:813:407 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-1 16:25:58:816:615 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-1 16:25:58:819:645 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (1,0) (0,0) + (1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 16:25:58:915:130 +Q8-T1 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-1 16:25:58:920:321 + Q10-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/rat_dda_write_read_skew.txt b/test_result/centralizend_result/oracle/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..15335557 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,57 @@ +#### db_type: oracle #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:25:54:796:714 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:25:54:800:259 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:25:54:896:761 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 16:25:54:900:536 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 16:25:54:903:484 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 16:25:54:999:624 + Q7-T2 execute opt: 'COMMIT'; +Q8-T1 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:25:55:203:620 + Q10-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/oracle/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..a6a4be40 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,59 @@ +#### db_type: oracle #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:25:55:453:996 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:25:55:457:430 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:25:55:554:66 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 16:25:55:557:628 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 16:25:55:560:671 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 16:25:55:658:647 +Q8-T1 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:25:55:665:480 + Q10-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/read-committed/rat_mda_step_rat.txt b/test_result/centralizend_result/oracle/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..875e6025 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,104 @@ +#### db_type: oracle #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:26:0:184:397 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:26:0:188:13 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:26:0:284:414 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 16:26:0:288:458 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 16:26:0:291:878 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 16:26:0:387:618 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-1 16:26:0:391:960 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-1 16:26:0:395:563 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-1 16:26:0:487:390 +Q10-T1 execute opt: 'COMMIT'; + Q11-T2 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 16:26:0:693:174 + Q14-T4 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/oracle/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..d1769a5c --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,203 @@ +#### db_type: oracle #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2022-4-1 16:26:0:942:293 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-1 16:26:0:948:63 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2022-4-1 16:26:1:42:194 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-1 16:26:1:45:918 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 16:26:1:143:637 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-1 16:26:1:153:65 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 16:26:1:156:111 + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 16:26:1:242:304 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 16:26:1:245:903 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 16:26:1:345:439 +Q11-T1 execute opt: 'COMMIT'; + Q12-T2 execute opt: 'COMMIT'; + Q13-T3 execute opt: 'COMMIT'; + Q14-T4 execute opt: 'COMMIT'; + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 16:26:1:650:475 + Q16-T4 execute opt: 'COMMIT'; + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/oracle/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..7a6ae190 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,104 @@ +#### db_type: oracle #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:26:1:905:805 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:26:1:910:650 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:26:2:5:759 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 16:26:2:9:320 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 16:26:2:13:436 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 16:26:2:105:837 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-1 16:26:2:109:292 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-1 16:26:2:112:659 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-1 16:26:2:209:770 +Q10-T1 execute opt: 'COMMIT'; + Q11-T2 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 16:26:2:412:802 + Q14-T4 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/oracle/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..70c67535 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,101 @@ +#### db_type: oracle #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:26:2:658:718 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-1 16:26:2:661:910 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:26:2:758:703 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-1 16:26:2:761:846 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 16:26:2:765:322 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 16:26:2:858:755 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-1 16:26:2:861:849 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-1 16:26:2:865:188 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-1 16:26:2:962:168 +Q10-T1 execute opt: 'COMMIT'; + Q11-T2 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 16:26:3:166:367 + Q14-T4 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/rat_sda_dirty_read.txt b/test_result/centralizend_result/oracle/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..985e0868 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,43 @@ +#### db_type: oracle #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:25:50:999:791 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:25:51:4:476 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:25:51:99:678 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 16:25:51:104:598 +Q5-T1 execute opt: 'ROLLBACK'; + Q6-T2 execute opt: 'COMMIT'; + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 16:25:51:306:992 + Q8-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/read-committed/rat_sda_intermediate_read.txt b/test_result/centralizend_result/oracle/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..eeeac7df --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,49 @@ +#### db_type: oracle #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:25:52:218:986 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:25:52:222:443 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:25:52:318:994 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 16:25:52:323:205 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-1 16:25:52:423:838 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute opt: 'COMMIT'; + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 16:25:52:627:417 + Q9-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/oracle/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..601115a7 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,49 @@ +#### db_type: oracle #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:25:52:876:392 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:25:52:879:895 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:25:52:976:479 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 16:25:52:980:60 + Q5-T2 execute opt: 'COMMIT'; +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-1 16:25:53:79:577 +Q7-T1 execute opt: 'COMMIT'; + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 16:25:53:86:797 + Q9-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/read-committed/rat_sda_lost_self_update.txt b/test_result/centralizend_result/oracle/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..dc28b468 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,49 @@ +#### db_type: oracle #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:25:54:239:959 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:25:54:243:435 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:25:54:339:931 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 16:25:54:442:758 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-1 16:25:54:444:285 + Q7-T2 execute opt: 'COMMIT'; + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 16:25:54:549:766 + Q9-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/read-committed/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/oracle/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..ca667bd7 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,56 @@ +#### db_type: oracle #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:25:51:561:426 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:25:51:565:196 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:25:51:662:325 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 16:25:51:666:111 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 16:25:51:763:363 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute opt: 'COMMIT'; + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 16:25:51:966:692 + Q9-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/oracle/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..c0f6beb9 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,54 @@ +#### db_type: oracle #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:25:53:333:669 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 16:25:53:338:584 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:25:53:433:663 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-1 16:25:53:437:457 + Q5-T2 execute opt: 'COMMIT'; +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 16:25:53:536:913 +Q7-T1 execute opt: 'COMMIT'; + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-1 16:25:53:541:904 + Q9-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/oracle/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..be9963fa --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,53 @@ +#### db_type: oracle #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:25:53:782:304 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 16:25:53:787:402 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:25:53:882:96 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-1 16:25:53:885:932 + Q5-T2 execute opt: 'COMMIT'; +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 16:25:53:987:818 +Q7-T1 execute opt: 'COMMIT'; + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-1 16:25:53:992:728 + Q9-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/oracle/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..05f489a4 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,52 @@ +#### db_type: oracle #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:26:7:305:816 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:26:7:309:368 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:26:7:406:342 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 16:26:7:415:127 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 16:26:7:509:977 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 16:26:7:511:566 + Q6-T2 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:26:7:522:857 + Q10-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/oracle/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..f2d1c3f4 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,33 @@ +#### db_type: oracle #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:26:7:780:849 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:26:7:784:328 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:26:7:880:685 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 16:26:7:884:854 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [Oracle][ODBC][Ora]ORA-00060: deadlock detected while waiting for resource errcode: HY000 + Q5 failed at: 2022-4-1 16:26:12:20:189 +Q6 failed reason: [Oracle][ODBC][Ora]ORA-01013: user requested cancel of current operation errcode: HYT00 +Q6 failed at: 2022-4-1 16:26:38:804:724 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-00060: deadlock detected while waiting for resource + diff --git a/test_result/centralizend_result/oracle/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/oracle/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..5ba9cc3d --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,33 @@ +#### db_type: oracle #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:26:39:56:574 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:26:39:59:980 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:26:39:156:568 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 16:26:39:159:973 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [Oracle][ODBC][Ora]ORA-00060: deadlock detected while waiting for resource errcode: HY000 + Q5 failed at: 2022-4-1 16:26:43:274:780 +Q6 failed reason: [Oracle][ODBC][Ora]ORA-01013: user requested cancel of current operation errcode: HYT00 +Q6 failed at: 2022-4-1 16:26:50:19:699 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-00060: deadlock detected while waiting for resource + diff --git a/test_result/centralizend_result/oracle/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/oracle/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..41672fc3 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,33 @@ +#### db_type: oracle #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:26:50:268:190 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:26:50:271:744 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:26:50:368:246 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 16:26:50:372:74 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [Oracle][ODBC][Ora]ORA-00060: deadlock detected while waiting for resource errcode: HY000 + Q5 failed at: 2022-4-1 16:26:54:573:476 +Q7 failed reason: [Oracle][ODBC][Ora]ORA-01013: user requested cancel of current operation errcode: HYT00 +Q7 failed at: 2022-4-1 16:26:57:599:183 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-00060: deadlock detected while waiting for resource + diff --git a/test_result/centralizend_result/oracle/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/oracle/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..59b195a5 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,50 @@ +#### db_type: oracle #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:26:57:859:93 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:26:57:862:545 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:26:57:959:161 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 16:26:57:962:919 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:26:57:966:208 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 16:26:58:161:53 +Q7-T1 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:26:58:168:273 + Q10-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/oracle/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..d8f14baf --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,50 @@ +#### db_type: oracle #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:26:58:418:559 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:26:58:422:177 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:26:58:518:400 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 16:26:58:521:715 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:26:58:524:414 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 16:26:58:719:684 +Q8-T1 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:26:58:825:246 + Q10-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/oracle/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..cd07504e --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,50 @@ +#### db_type: oracle #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:26:59:74:803 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:26:59:79:23 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:26:59:174:814 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 16:26:59:178:800 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 16:26:59:278:773 +Q7-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 16:26:59:280:358 + Q8-T2 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:26:59:382:892 + Q10-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/oracle/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..c734bf7f --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,50 @@ +#### db_type: oracle #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:27:41:644:82 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:27:41:648:570 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:27:41:747:577 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 16:27:41:752:321 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 16:27:41:849:893 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 16:27:42:45:577 + Q7-T2 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:27:42:53:770 + Q10-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/oracle/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..ff41e9a3 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,50 @@ +#### db_type: oracle #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:27:42:305:374 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:27:42:309:169 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:27:42:405:425 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 16:27:42:408:811 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 16:27:42:508:19 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 16:27:42:509:333 + Q6-T2 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:27:42:516:622 + Q10-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/oracle/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..7d671ac3 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,41 @@ +#### db_type: oracle #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:27:42:770:503 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:27:42:773:934 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:27:42:870:503 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 16:27:42:874:167 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 16:27:42:971:537 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 16:27:42:975:404 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 failed reason: [Oracle][ODBC][Ora]ORA-00060: deadlock detected while waiting for resource errcode: HY000 + Q5 failed at: 2022-4-1 16:27:46:559:84 + Q8 failed reason: [Oracle][ODBC][Ora]ORA-01013: user requested cancel of current operation errcode: HYT00 + Q8 failed at: 2022-4-1 16:27:49:570:400 +Q9 failed reason: [Oracle][ODBC][Ora]ORA-01013: user requested cancel of current operation errcode: HYT00 +Q9 failed at: 2022-4-1 16:27:49:670:712 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-00060: deadlock detected while waiting for resource + diff --git a/test_result/centralizend_result/oracle/read-committed/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/oracle/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..7368f183 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,41 @@ +#### db_type: oracle #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:27:49:941:525 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:27:49:945:173 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:27:50:41:452 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 16:27:50:45:555 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 16:27:50:143:634 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 16:27:50:345:112 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q8 failed reason: [Oracle][ODBC][Ora]ORA-00060: deadlock detected while waiting for resource errcode: HY000 + Q8 failed at: 2022-4-1 16:27:54:253:249 + Q6 failed reason: [Oracle][ODBC][Ora]ORA-01013: user requested cancel of current operation errcode: HYT00 + Q6 failed at: 2022-4-1 16:27:56:554:542 +Q9 failed reason: [Oracle][ODBC][Ora]ORA-01013: user requested cancel of current operation errcode: HYT00 +Q9 failed at: 2022-4-1 16:27:56:854:550 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-00060: deadlock detected while waiting for resource + diff --git a/test_result/centralizend_result/oracle/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/oracle/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..70feac7f --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,42 @@ +#### db_type: oracle #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:26:3:412:104 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:26:3:415:441 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:26:3:512:207 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; + Q4 finished at: 2022-4-1 16:26:3:613:362 + Q6-T2 execute opt: 'COMMIT'; + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 16:26:3:718:398 + Q8-T3 execute sql: 'DROP TABLE t1;' + Q8 finished at: 2022-4-1 16:26:3:754:21 + Q9-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/oracle/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..02f5bd2e --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,42 @@ +#### db_type: oracle #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:26:3:975:555 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:26:3:979:116 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:26:4:76:231 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-1 16:26:4:181:63 + Q6-T2 execute opt: 'COMMIT'; + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 16:26:4:292:604 + Q8-T3 execute sql: 'DROP TABLE t1;' + Q8 finished at: 2022-4-1 16:26:4:319:292 + Q9-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/read-committed/wat_sda_full_write.txt b/test_result/centralizend_result/oracle/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..62601b17 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/wat_sda_full_write.txt @@ -0,0 +1,42 @@ +#### db_type: oracle #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:26:4:545:751 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:26:4:549:373 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:26:4:645:787 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-1 16:26:4:748:345 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-1 16:26:4:749:775 + Q7-T2 execute opt: 'COMMIT'; + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-1 16:26:4:853:759 + Q9-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/read-committed/wat_sda_full_write_committed.txt b/test_result/centralizend_result/oracle/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..4998ba4c --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,42 @@ +#### db_type: oracle #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:26:5:101:799 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:26:5:105:304 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:26:5:201:891 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-1 16:26:5:306:181 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-1 16:26:5:307:527 + Q5-T2 execute opt: 'COMMIT'; + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-1 16:26:5:317:439 + Q9-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/oracle/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..4c0af2ed --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,49 @@ +#### db_type: oracle #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:26:6:836:594 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:26:6:840:584 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:26:6:939:700 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 16:26:7:41:56 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-1 16:26:7:43:713 + Q5-T2 execute opt: 'COMMIT'; + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 16:26:7:51:210 + Q9-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/read-committed/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/oracle/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..04e4d117 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,47 @@ +#### db_type: oracle #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:26:5:619:195 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 16:26:5:622:925 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:26:5:719:253 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 16:26:5:722:355 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-1 16:26:5:920:535 +Q6-T1 execute opt: 'COMMIT'; + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 16:26:5:929:509 + Q9-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/read-committed/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/oracle/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..e2ddf593 --- /dev/null +++ b/test_result/centralizend_result/oracle/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,47 @@ +#### db_type: oracle #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:26:6:198:69 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 16:26:6:201:520 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:26:6:287:288 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 16:26:6:291:452 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-1 16:26:6:488:625 +Q7-T1 execute opt: 'COMMIT'; + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 16:26:6:593:730 + Q9-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/result_summary/read-committed_total-result.txt b/test_result/centralizend_result/oracle/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..38745346 --- /dev/null +++ b/test_result/centralizend_result/oracle/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/oracle/result_summary/serializable_total-result.txt b/test_result/centralizend_result/oracle/result_summary/serializable_total-result.txt new file mode 100644 index 00000000..01329ba7 --- /dev/null +++ b/test_result/centralizend_result/oracle/result_summary/serializable_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Rollback + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Rollback + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Rollback + +wat_sda_full_write: Rollback + +wat_sda_full_write_committed: Rollback + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Rollback + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Rollback + +iat_dda_write_skew_committed: Rollback + +iat_mda_step_iat: Rollback + +iat_mda_step_iat_predicate_based_delete: Rollback + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Rollback + diff --git a/test_result/centralizend_result/oracle/serializable/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/oracle/serializable/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..96716e6f --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/iat_dda_read_skew_committed.txt @@ -0,0 +1,59 @@ +#### db_type: oracle #### +#### test_type: dda_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:36:3:768:144 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:36:3:772:451 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:36:3:869:118 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 16:36:3:872:887 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:36:3:876:492 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 16:36:3:972:196 +Q8-T1 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:36:3:979:76 + Q10-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/serializable/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/oracle/serializable/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..cb0e16c9 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,40 @@ +#### db_type: oracle #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:36:4:247:875 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:36:4:251:591 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:36:4:348:774 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 16:36:4:352:884 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:36:4:360:1 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 +Q7 failed at: 2022-4-1 16:36:5:153:681 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/centralizend_result/oracle/serializable/iat_dda_write_skew.txt b/test_result/centralizend_result/oracle/serializable/iat_dda_write_skew.txt new file mode 100644 index 00000000..3f8ad541 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/iat_dda_write_skew.txt @@ -0,0 +1,57 @@ +#### db_type: oracle #### +#### test_type: dda_write_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:36:5:463:78 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:36:5:466:721 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:36:5:563:588 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 16:36:5:567:323 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:36:5:570:377 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 16:36:5:666:341 +Q7-T1 execute opt: 'COMMIT'; + Q8-T2 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:36:5:770:596 + Q8-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/serializable/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/oracle/serializable/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..a57594ef --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/iat_dda_write_skew_committed.txt @@ -0,0 +1,47 @@ +#### db_type: oracle #### +#### test_type: dda_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:36:6:895:330 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:36:6:899:463 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:36:6:995:190 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 16:36:6:998:904 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:36:7:2:708 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 +Q7 failed at: 2022-4-1 16:36:7:799:319 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/centralizend_result/oracle/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/oracle/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..39de93b3 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,68 @@ +#### db_type: oracle #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:36:6:27:458 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-1 16:36:6:35:304 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-1 16:36:6:38:412 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-1 16:36:6:125:724 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-1 16:36:6:129:912 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-1 16:36:6:132:570 + Q7-T2 execute opt: 'COMMIT'; +Q8-T1 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-1 16:36:6:227:965 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-1 16:36:6:230:51 + Q12-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/oracle/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..3fd9c7e7 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,47 @@ +#### db_type: oracle #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:58:16:774:867 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-1 16:58:16:780:693 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:58:16:874:924 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-1 16:58:16:877:944 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-1 16:58:16:882:540 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 +Q7 failed at: 2022-4-1 16:58:17:679:120 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/centralizend_result/oracle/serializable/iat_mda_step_iat.txt b/test_result/centralizend_result/oracle/serializable/iat_mda_step_iat.txt new file mode 100644 index 00000000..00dae59e --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/iat_mda_step_iat.txt @@ -0,0 +1,86 @@ +#### db_type: oracle #### +#### test_type: mda_step_iat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:36:8:50:614 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 16:36:8:54:379 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:36:8:150:601 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 16:36:8:154:634 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 16:36:8:251:762 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 16:36:8:256:347 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-1 16:36:8:354:102 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 16:36:8:453:623 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q10-T1 execute opt: 'COMMIT'; + Q11-T2 execute opt: 'COMMIT'; + Q9 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 + Q9 failed at: 2022-4-1 16:36:9:454:218 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/centralizend_result/oracle/serializable/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/oracle/serializable/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..a755e129 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,103 @@ +#### db_type: oracle #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:36:13:733:846 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:36:13:737:835 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:36:13:834:771 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 16:36:13:838:184 + Q5-T2 execute opt: 'COMMIT'; + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 16:36:13:933:784 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 16:36:13:936:605 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 16:36:13:940:72 + Q9-T3 execute opt: 'COMMIT'; +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-1 16:36:14:36:990 +Q11-T1 execute opt: 'COMMIT'; + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-1 16:36:14:42:718 + Q13-T4 execute opt: 'COMMIT'; + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/serializable/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/oracle/serializable/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..68fde7a9 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,203 @@ +#### db_type: oracle #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:36:12:969:495 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:36:12:974:169 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:36:13:69:315 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 16:36:13:73:866 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 16:36:13:170:910 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-1 16:36:13:174:710 + Q7-T3 execute opt: 'COMMIT'; + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 16:36:13:269:373 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 16:36:13:273:319 + Q10-T4 execute opt: 'COMMIT'; + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-1 16:36:13:372:119 + Q12-T2 execute opt: 'COMMIT'; +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-1 16:36:13:472:5 +Q14-T1 execute opt: 'COMMIT'; + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 16:36:13:480:83 + Q16-T5 execute opt: 'COMMIT'; + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/serializable/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/oracle/serializable/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..b46aa2de --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,86 @@ +#### db_type: oracle #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:36:9:707:231 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-1 16:36:9:710:824 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:36:9:807:303 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 16:36:9:811:161 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 16:36:9:907:235 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 16:36:9:910:902 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-1 16:36:10:10:136 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' +Q10-T1 execute opt: 'COMMIT'; + Q8 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 + Q8 failed at: 2022-4-1 16:36:10:911:7 + Q9 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 + Q9 failed at: 2022-4-1 16:36:11:110:467 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/centralizend_result/oracle/serializable/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/oracle/serializable/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..8da072d6 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,101 @@ +#### db_type: oracle #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:36:11:352:625 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 16:36:11:356:826 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:36:11:452:613 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-1 16:36:11:456:240 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 16:36:11:552:655 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-1 16:36:11:556:487 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-1 16:36:11:655:517 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-1 16:36:11:756:264 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-1 16:36:11:856:141 +Q10-T1 execute opt: 'COMMIT'; + Q11-T2 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 16:36:12:160:950 + Q14-T4 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/oracle/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..49574ebd --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,117 @@ +#### db_type: oracle #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:36:14:290:191 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 16:36:14:294:29 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-1 16:36:14:296:988 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-1 16:36:14:390:227 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-1 16:36:14:392:888 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-1 16:36:14:395:996 + Q7-T2 execute opt: 'COMMIT'; + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 16:36:14:490:302 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-1 16:36:14:493:11 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 16:36:14:495:268 + Q11-T3 execute opt: 'COMMIT'; +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 +Q12 failed at: 2022-4-1 16:36:15:794:442 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/centralizend_result/oracle/serializable/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/oracle/serializable/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..72c7c339 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,159 @@ +#### db_type: oracle #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:36:12:412:544 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-1 16:36:12:416:687 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:36:12:512:476 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-1 16:36:12:516:452 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:36:12:519:785 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 16:36:12:521:905 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-1 16:36:12:524:521 + Q8-T2 execute opt: 'COMMIT'; + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2022-4-1 16:36:12:612:549 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-1 16:36:12:616:406 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-1 16:36:12:619:74 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-1 16:36:12:621:161 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-1 16:36:12:623:894 + Q14-T3 execute opt: 'COMMIT'; +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-1 16:36:12:714:819 +Q16-T1 execute opt: 'COMMIT'; + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-1 16:36:12:722:252 + Q18-T4 execute opt: 'COMMIT'; + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/serializable/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/oracle/serializable/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..73344fa2 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/iat_sda_lost_update_committed.txt @@ -0,0 +1,37 @@ +#### db_type: oracle #### +#### test_type: sda_lost_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:36:2:712:646 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 16:36:2:715:771 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:36:2:812:825 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 16:36:2:816:667 + Q5-T2 execute opt: 'COMMIT'; +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 +Q6 failed at: 2022-4-1 16:36:3:516:299 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/centralizend_result/oracle/serializable/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/oracle/serializable/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..c5a87e8f --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,57 @@ +#### db_type: oracle #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:36:2:238:596 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:36:2:242:853 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:36:2:338:527 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 16:36:2:342:442 + Q5-T2 execute opt: 'COMMIT'; +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 16:36:2:440:440 +Q7-T1 execute opt: 'COMMIT'; + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 16:36:2:446:618 + Q9-T3 execute opt: 'COMMIT'; + Q10-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/serializable/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/oracle/serializable/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..4c1a299a --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/rat_dda_double_write_skew1.txt @@ -0,0 +1,40 @@ +#### db_type: oracle #### +#### test_type: dda_double_write_skew1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:39:32:91 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:28:39:35:735 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:39:133:30 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 16:28:39:136:883 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 16:28:39:139:647 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 +Q6 failed at: 2022-4-1 16:28:39:933:886 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/centralizend_result/oracle/serializable/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/oracle/serializable/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..ecdb8ba2 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,40 @@ +#### db_type: oracle #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:40:188:367 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:28:40:192:98 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:40:288:37 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 16:28:40:292:315 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 16:28:40:295:325 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 +Q7 failed at: 2022-4-1 16:28:41:91:135 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/centralizend_result/oracle/serializable/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/oracle/serializable/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..ddbe1d56 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/rat_dda_double_write_skew2.txt @@ -0,0 +1,40 @@ +#### db_type: oracle #### +#### test_type: dda_double_write_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:41:349:456 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:28:41:353:21 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:41:449:478 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 16:28:41:453:94 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 16:28:41:552:694 +Q7-T1 execute opt: 'COMMIT'; + Q5 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-1 16:28:42:54:499 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/centralizend_result/oracle/serializable/rat_dda_read_skew.txt b/test_result/centralizend_result/oracle/serializable/rat_dda_read_skew.txt new file mode 100644 index 00000000..bd393bc2 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/rat_dda_read_skew.txt @@ -0,0 +1,59 @@ +#### db_type: oracle #### +#### test_type: dda_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:42:309:702 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:28:42:313:170 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:42:409:739 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 16:28:42:413:682 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:28:42:416:754 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 16:28:42:512:699 + Q7-T2 execute opt: 'COMMIT'; +Q8-T1 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:28:42:718:928 + Q10-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/serializable/rat_dda_read_skew2.txt b/test_result/centralizend_result/oracle/serializable/rat_dda_read_skew2.txt new file mode 100644 index 00000000..0f61e8ad --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/rat_dda_read_skew2.txt @@ -0,0 +1,59 @@ +#### db_type: oracle #### +#### test_type: dda_read_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:43:892:788 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:28:43:896:507 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:43:992:732 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 16:28:43:996:469 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 16:28:43:999:342 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 16:28:44:95:595 +Q7-T1 execute opt: 'COMMIT'; + Q8-T2 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:28:44:199:655 + Q10-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/serializable/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/oracle/serializable/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..e94fd43d --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/rat_dda_read_skew2_committed.txt @@ -0,0 +1,59 @@ +#### db_type: oracle #### +#### test_type: dda_read_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:44:449:241 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:28:44:452:913 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:44:548:976 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 16:28:44:552:635 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 16:28:44:555:370 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 16:28:44:652:15 +Q8-T1 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:28:44:659:920 + Q10-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/serializable/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/oracle/serializable/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..ba1ef192 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,59 @@ +#### db_type: oracle #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:42:979:918 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 16:28:42:984:954 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:43:79:986 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 16:28:43:83:710 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:28:43:86:352 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 16:28:43:181:946 +Q8-T1 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-1 16:28:43:187:710 + Q10-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/serializable/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/oracle/serializable/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..dd28ee39 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,57 @@ +#### db_type: oracle #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:43:432:343 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 16:28:43:437:56 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:43:532:340 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-1 16:28:43:535:692 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-1 16:28:43:538:12 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 16:28:43:633:868 +Q8-T1 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-1 16:28:43:639:690 + Q10-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/serializable/rat_dda_write_read_skew.txt b/test_result/centralizend_result/oracle/serializable/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..acb08a68 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/rat_dda_write_read_skew.txt @@ -0,0 +1,57 @@ +#### db_type: oracle #### +#### test_type: dda_write_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:37:902:640 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:28:37:906:703 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:38:2:540 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 16:28:38:6:546 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 16:28:38:9:733 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 16:28:38:105:696 + Q7-T2 execute opt: 'COMMIT'; +Q8-T1 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:28:38:310:351 + Q10-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/serializable/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/oracle/serializable/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..c232b4b3 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,57 @@ +#### db_type: oracle #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:38:564:766 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:28:38:568:667 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:38:665:177 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 16:28:38:668:924 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 16:28:38:672:190 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 16:28:38:767:781 +Q8-T1 execute opt: 'COMMIT'; + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 16:28:38:774:820 + Q10-T3 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/serializable/rat_mda_step_rat.txt b/test_result/centralizend_result/oracle/serializable/rat_mda_step_rat.txt new file mode 100644 index 00000000..01e81f7f --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/rat_mda_step_rat.txt @@ -0,0 +1,104 @@ +#### db_type: oracle #### +#### test_type: mda_step_rat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:44:914:217 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:28:44:917:710 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:45:14:110 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 16:28:45:17:938 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 16:28:45:21:242 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 16:28:45:114:235 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-1 16:28:45:118:562 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-1 16:28:45:122:340 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-1 16:28:45:217:171 +Q10-T1 execute opt: 'COMMIT'; + Q11-T2 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 16:28:45:422:78 + Q14-T4 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/serializable/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/oracle/serializable/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..da1fc244 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,203 @@ +#### db_type: oracle #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2022-4-1 16:28:45:667:907 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-1 16:28:45:673:373 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2022-4-1 16:28:45:767:833 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-1 16:28:45:771:274 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 16:28:45:867:861 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-1 16:28:45:874:175 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 16:28:45:877:317 + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 16:28:45:968:93 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 16:28:45:971:759 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 16:28:46:70:588 +Q11-T1 execute opt: 'COMMIT'; + Q12-T2 execute opt: 'COMMIT'; + Q13-T3 execute opt: 'COMMIT'; + Q14-T4 execute opt: 'COMMIT'; + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 16:28:46:376:30 + Q16-T4 execute opt: 'COMMIT'; + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/serializable/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/oracle/serializable/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..ebe38d8f --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,52 @@ +#### db_type: oracle #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:46:628:760 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:28:46:632:374 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:46:728:794 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 16:28:46:828:853 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-1 16:28:46:933:887 +Q10-T1 execute opt: 'COMMIT'; + Q4 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-1 16:28:47:132:723 + Q7 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 + Q7 failed at: 2022-4-1 16:28:47:533:627 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/centralizend_result/oracle/serializable/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/oracle/serializable/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..daa9695e --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,101 @@ +#### db_type: oracle #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:47:785:472 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-1 16:28:47:789:233 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:47:886:22 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-1 16:28:47:889:314 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 16:28:47:893:148 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 16:28:47:985:461 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-1 16:28:47:988:989 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-1 16:28:47:992:735 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-1 16:28:48:91:90 +Q10-T1 execute opt: 'COMMIT'; + Q11-T2 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 16:28:48:294:496 + Q14-T4 execute opt: 'COMMIT'; + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/oracle/serializable/rat_sda_dirty_read.txt b/test_result/centralizend_result/oracle/serializable/rat_sda_dirty_read.txt new file mode 100644 index 00000000..fca3c1a6 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/rat_sda_dirty_read.txt @@ -0,0 +1,43 @@ +#### db_type: oracle #### +#### test_type: sda_dirty_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:33:788:1 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:28:33:791:759 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:33:888:37 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 16:28:33:892:397 +Q5-T1 execute opt: 'ROLLBACK'; + Q6-T2 execute opt: 'COMMIT'; + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 16:28:34:93:910 + Q8-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/serializable/rat_sda_intermediate_read.txt b/test_result/centralizend_result/oracle/serializable/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..e44e1ec6 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/rat_sda_intermediate_read.txt @@ -0,0 +1,49 @@ +#### db_type: oracle #### +#### test_type: sda_intermediate_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:35:18:724 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:28:35:23:123 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:35:119:713 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 16:28:35:124:55 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-1 16:28:35:222:184 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute opt: 'COMMIT'; + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 16:28:35:426:610 + Q9-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/serializable/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/oracle/serializable/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..64891f90 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,49 @@ +#### db_type: oracle #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:35:673:598 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:28:35:677:287 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:35:773:607 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 16:28:35:777:388 + Q5-T2 execute opt: 'COMMIT'; +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-1 16:28:35:878:398 +Q7-T1 execute opt: 'COMMIT'; + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 16:28:35:885:380 + Q9-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/serializable/rat_sda_lost_self_update.txt b/test_result/centralizend_result/oracle/serializable/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..409a1067 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/rat_sda_lost_self_update.txt @@ -0,0 +1,37 @@ +#### db_type: oracle #### +#### test_type: sda_lost_self_update #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:37:38:329 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:28:37:41:813 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:37:138:248 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 16:28:37:241:122 +Q6-T1 execute opt: 'COMMIT'; + Q4 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-1 16:28:37:643:584 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/centralizend_result/oracle/serializable/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/oracle/serializable/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..c531994b --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/rat_sda_non_repeatable_read.txt @@ -0,0 +1,56 @@ +#### db_type: oracle #### +#### test_type: sda_non_repeatable_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:34:340:508 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:28:34:344:142 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:34:440:534 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 16:28:34:445:116 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 16:28:34:542:403 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute opt: 'COMMIT'; + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 16:28:34:747:523 + Q9-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/oracle/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..2be1c15c --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,56 @@ +#### db_type: oracle #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:36:131:358 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 16:28:36:136:155 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:36:231:383 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-1 16:28:36:234:890 + Q5-T2 execute opt: 'COMMIT'; +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 16:28:36:333:365 +Q7-T1 execute opt: 'COMMIT'; + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-1 16:28:36:338:738 + Q9-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/oracle/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..b3fcd1ca --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,55 @@ +#### db_type: oracle #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:36:583:564 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 16:28:36:587:967 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:36:683:643 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-1 16:28:36:687:511 + Q5-T2 execute opt: 'COMMIT'; +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 16:28:36:785:593 +Q7-T1 execute opt: 'COMMIT'; + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-1 16:28:36:790:993 + Q9-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/serializable/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/oracle/serializable/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..7300a57c --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,40 @@ +#### db_type: oracle #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:54:676:353 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:28:54:680:403 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:54:776:755 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 16:28:54:780:836 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 16:28:54:882:659 +Q8-T1 execute opt: 'COMMIT'; + Q5 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-1 16:28:55:384:286 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/centralizend_result/oracle/serializable/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/oracle/serializable/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..2ca1e906 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,32 @@ +#### db_type: oracle #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:55:642:436 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:28:55:651:803 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:55:742:999 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 16:28:55:747:300 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 failed reason: [Oracle][ODBC][Ora]ORA-00060: deadlock detected while waiting for resource errcode: HY000 +Q6 failed at: 2022-4-1 16:29:2:462:431 + Q5 finished at: 2022-4-1 16:29:2:464:104 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-00060: deadlock detected while waiting for resource + diff --git a/test_result/centralizend_result/oracle/serializable/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/oracle/serializable/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..cc74ce58 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,32 @@ +#### db_type: oracle #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:29:2:724:742 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:29:2:728:210 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:29:2:826:188 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 16:29:2:831:47 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 failed reason: [Oracle][ODBC][Ora]ORA-00060: deadlock detected while waiting for resource errcode: HY000 +Q6 failed at: 2022-4-1 16:29:10:13:281 + Q5 finished at: 2022-4-1 16:29:10:15:666 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-00060: deadlock detected while waiting for resource + diff --git a/test_result/centralizend_result/oracle/serializable/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/oracle/serializable/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..748e7b66 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,32 @@ +#### db_type: oracle #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:29:10:278:100 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:29:10:281:867 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:29:10:378:408 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 16:29:10:382:814 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 failed reason: [Oracle][ODBC][Ora]ORA-00060: deadlock detected while waiting for resource errcode: HY000 +Q7 failed at: 2022-4-1 16:29:17:501:855 + Q5 finished at: 2022-4-1 16:29:17:503:854 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-00060: deadlock detected while waiting for resource + diff --git a/test_result/centralizend_result/oracle/serializable/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/oracle/serializable/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..725da63e --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,40 @@ +#### db_type: oracle #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:29:17:767:140 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 16:29:17:770:935 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:29:17:867:29 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 16:29:17:870:451 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 16:29:17:873:173 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; +Q6 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 +Q6 failed at: 2022-4-1 16:29:18:668:654 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/centralizend_result/oracle/serializable/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/oracle/serializable/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..59b5c742 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,16 @@ +#### db_type: oracle #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0 failed reason: [Oracle][ODBC][Ora]ORA-01000: maximum open cursors exceeded errcode: HY000 +Q0 failed at: 2022-4-1 16:29:18:707:473 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-01000: maximum open cursors exceeded + diff --git a/test_result/centralizend_result/oracle/serializable/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/oracle/serializable/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..b436eb57 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,40 @@ +#### db_type: oracle #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:29:57:586:929 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:29:57:591:397 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:29:57:686:907 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 16:29:57:691:907 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 16:29:57:790:741 +Q7-T1 execute opt: 'COMMIT'; + Q5 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-1 16:29:58:292:538 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/centralizend_result/oracle/serializable/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/oracle/serializable/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..a439c01c --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,40 @@ +#### db_type: oracle #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:29:58:548:104 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:29:58:551:891 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:29:58:648:15 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 16:29:58:651:563 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 16:29:58:750:738 +Q8-T1 execute opt: 'COMMIT'; + Q5 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-1 16:29:59:450:543 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/centralizend_result/oracle/serializable/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/oracle/serializable/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..f8583c99 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,40 @@ +#### db_type: oracle #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:29:59:737:218 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:29:59:741:378 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:29:59:839:651 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 16:29:59:853:51 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 16:29:59:942:438 +Q8-T1 execute opt: 'COMMIT'; + Q5 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-1 16:30:0:444:416 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/centralizend_result/oracle/serializable/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/oracle/serializable/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..fc2ca433 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/wat_mda_step_wat_c1.txt @@ -0,0 +1,41 @@ +#### db_type: oracle #### +#### test_type: mda_step_wat_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:30:0:705:681 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:30:0:709:55 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:30:0:805:740 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 16:30:0:809:595 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 16:30:0:907:378 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 16:30:0:911:685 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q8 failed reason: [Oracle][ODBC][Ora]ORA-00060: deadlock detected while waiting for resource errcode: HY000 + Q8 failed at: 2022-4-1 16:30:4:783:302 + Q5 failed reason: [Oracle][ODBC][Ora]ORA-01013: user requested cancel of current operation errcode: HYT00 + Q5 failed at: 2022-4-1 16:35:57:631:453 +Q9 failed reason: [Oracle][ODBC][Ora]ORA-01013: user requested cancel of current operation errcode: HYT00 +Q9 failed at: 2022-4-1 16:35:58:31:415 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-00060: deadlock detected while waiting for resource + diff --git a/test_result/centralizend_result/oracle/serializable/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/oracle/serializable/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..a4abed1f --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/wat_mda_step_wat_c2.txt @@ -0,0 +1,41 @@ +#### db_type: oracle #### +#### test_type: mda_step_wat_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:35:58:284:958 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:35:58:288:358 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:35:58:385:346 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 16:35:58:388:958 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 16:35:58:484:951 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 16:35:58:688:90 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q8 failed reason: [Oracle][ODBC][Ora]ORA-01013: user requested cancel of current operation errcode: HYT00 + Q8 failed at: 2022-4-1 16:36:1:856:719 + Q6 failed reason: [Oracle][ODBC][Ora]ORA-00060: deadlock detected while waiting for resource errcode: HY000 + Q6 failed at: 2022-4-1 16:36:1:878:242 +Q9 failed reason: [Oracle][ODBC][Ora]ORA-01013: user requested cancel of current operation errcode: HYT00 +Q9 failed at: 2022-4-1 16:36:1:967:429 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-01013: user requested cancel of current operation + diff --git a/test_result/centralizend_result/oracle/serializable/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/oracle/serializable/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..42accfc3 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,42 @@ +#### db_type: oracle #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:48:540:493 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:28:48:543:956 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:48:640:660 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; + Q4 finished at: 2022-4-1 16:28:48:744:878 + Q6-T2 execute opt: 'COMMIT'; + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 16:28:48:846:897 + Q8-T3 execute sql: 'DROP TABLE t1;' + Q8 finished at: 2022-4-1 16:28:48:881:171 + Q9-T3 execute opt: 'COMMIT'; + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/oracle/serializable/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/oracle/serializable/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..bc226108 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,28 @@ +#### db_type: oracle #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:49:103:321 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:28:49:106:960 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:49:203:516 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; + Q4 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-1 16:28:49:704:815 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/centralizend_result/oracle/serializable/wat_sda_full_write.txt b/test_result/centralizend_result/oracle/serializable/wat_sda_full_write.txt new file mode 100644 index 00000000..086bce78 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/wat_sda_full_write.txt @@ -0,0 +1,30 @@ +#### db_type: oracle #### +#### test_type: sda_full_write #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:49:953:768 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:28:49:957:290 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:50:53:749 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-1 16:28:50:158:698 +Q6-T1 execute opt: 'COMMIT'; + Q4 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-1 16:28:50:560:360 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/centralizend_result/oracle/serializable/wat_sda_full_write_committed.txt b/test_result/centralizend_result/oracle/serializable/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..ac73661c --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/wat_sda_full_write_committed.txt @@ -0,0 +1,30 @@ +#### db_type: oracle #### +#### test_type: sda_full_write_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:50:805:245 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:28:50:808:927 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:50:905:314 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-1 16:28:51:8:229 +Q7-T1 execute opt: 'COMMIT'; + Q4 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-1 16:28:51:409:922 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/centralizend_result/oracle/serializable/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/oracle/serializable/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..b7f7a62c --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,37 @@ +#### db_type: oracle #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:53:768:809 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 16:28:53:772:672 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:53:871:663 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 16:28:53:975:58 +Q7-T1 execute opt: 'COMMIT'; + Q4 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-1 16:28:54:380:78 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/centralizend_result/oracle/serializable/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/oracle/serializable/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..d64c73b7 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/wat_sda_lost_update_c1.txt @@ -0,0 +1,37 @@ +#### db_type: oracle #### +#### test_type: sda_lost_update_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:51:658:447 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 16:28:51:661:926 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:51:758:473 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 16:28:51:762:5 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; +Q5 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 +Q5 failed at: 2022-4-1 16:28:52:460:906 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/centralizend_result/oracle/serializable/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/oracle/serializable/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..95d17437 --- /dev/null +++ b/test_result/centralizend_result/oracle/serializable/wat_sda_lost_update_c2.txt @@ -0,0 +1,37 @@ +#### db_type: oracle #### +#### test_type: sda_lost_update_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 16:28:52:714:385 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 16:28:52:718:224 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 16:28:52:814:515 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 16:28:52:822:498 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; +Q5 failed reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction errcode: HY000 +Q5 failed at: 2022-4-1 16:28:53:516:61 + +Test Result: Rollback +Reason: [Oracle][ODBC][Ora]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/centralizend_result/pg/read-committed/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/pg/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..87c03f25 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: pg #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:32:401:585 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:15:32:403:435 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:32:501:494 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:15:32:503:219 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:15:32:504:575 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:15:32:510:361 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 12:15:32:604:426 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:15:32:605:345 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:15:32:607:235 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:15:32:608:195 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/pg/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..c8acd739 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:32:824:681 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:15:32:826:602 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:32:924:641 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:15:32:926:494 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:15:32:927:884 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:15:32:930:155 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 12:15:33:25:474 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:15:33:27:529 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:15:33:29:336 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:15:33:30:77 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/iat_dda_write_skew.txt b/test_result/centralizend_result/pg/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..0347f4fc --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: pg #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:33:243:511 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:15:33:245:605 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:33:343:327 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:15:33:345:141 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:15:33:346:495 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 12:15:33:444:251 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:15:33:446:389 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 12:15:33:544:994 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:15:33:546:905 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 12:15:33:547:741 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/pg/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..7d8765f8 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: pg #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:34:610:592 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:15:34:612:529 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:34:710:256 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:15:34:712:166 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:15:34:713:450 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:15:34:715:292 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 12:15:34:811:149 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:15:34:813:915 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:15:34:815:974 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:15:34:816:979 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/pg/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..305fb1ec --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: pg #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:33:760:533 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-1 12:15:33:762:595 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-1 12:15:33:764:24 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-1 12:15:33:860:603 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-1 12:15:33:862:860 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-1 12:15:33:864:287 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:15:33:866:373 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:15:33:961:971 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-1 12:15:33:964:181 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-1 12:15:33:965:983 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:15:33:966:860 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/pg/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..24715ca8 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: pg #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:34:188:661 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-1 12:15:34:191:230 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:34:288:530 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-1 12:15:34:291:204 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-1 12:15:34:293:443 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:15:34:295:448 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-1 12:15:34:390:559 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:15:34:392:587 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,saving,1400) (kevin,checking,1400) + (1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + (2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-1 12:15:34:394:487 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:15:34:395:403 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/iat_mda_step_iat.txt b/test_result/centralizend_result/pg/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..5121643e --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: pg #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:35:34:208 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 12:15:35:36:384 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:35:134:234 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 12:15:35:136:436 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:15:35:238:48 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 12:15:35:240:247 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-1 12:15:35:335:196 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 12:15:35:435:181 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-1 12:15:35:540:451 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:15:35:637:61 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 12:15:35:735:855 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:15:35:835:871 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 12:15:35:838:316 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:15:35:839:361 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/pg/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..f03f01dd --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,106 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:39:345:19 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:15:39:347:373 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:39:444:972 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 12:15:39:447:84 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:15:39:449:254 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 12:15:39:545:205 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 12:15:39:547:509 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 12:15:39:548:908 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:15:39:550:921 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2022-4-1 12:15:39:646:164 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 12:15:39:647:258 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-1 12:15:39:649:318 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 12:15:39:650:208 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/pg/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..7e4638d3 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,207 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:38:621:967 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:15:38:627:297 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:38:722:604 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:15:38:727:90 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:15:38:823:855 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-1 12:15:38:825:824 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:15:38:828:119 + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 12:15:38:922:109 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 12:15:38:924:326 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:15:38:926:592 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-4-1 12:15:39:25:826 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:15:39:27:349 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-1 12:15:39:123:923 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-1 12:15:39:125:8 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 12:15:39:128:384 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 12:15:39:129:272 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/pg/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..78e42920 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:36:55:698 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-1 12:15:36:57:868 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:36:155:703 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 12:15:36:157:925 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:15:36:255:871 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 12:15:36:258:535 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-1 12:15:36:356:595 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-1 12:15:36:460:299 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-1 12:15:36:556:740 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:15:36:658:426 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 12:15:36:757:261 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:15:36:857:220 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 12:15:36:859:67 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:15:36:859:892 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/pg/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..dcee9a03 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:37:71:532 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 12:15:37:73:991 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:37:171:299 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-1 12:15:37:173:399 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:15:37:275:648 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-1 12:15:37:278:74 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-1 12:15:37:372:284 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-1 12:15:37:472:386 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-1 12:15:37:572:420 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:15:37:673:165 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 12:15:37:773:236 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:15:37:873:243 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 12:15:37:875:629 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:15:37:876:669 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/pg/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..14fb9403 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:39:867:205 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 12:15:39:869:721 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-1 12:15:39:871:604 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-1 12:15:39:964:875 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-1 12:15:39:967:305 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-1 12:15:39:969:310 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:15:39:971:447 + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 12:15:40:64:701 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-1 12:15:40:67:179 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 12:15:40:69:218 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 12:15:40:70:217 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-1 12:15:40:168:135 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-1 12:15:40:171:69 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-1 12:15:40:173:396 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-1 12:15:40:174:367 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/pg/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..56c4c769 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,162 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:38:96:125 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-1 12:15:38:98:430 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:38:196:126 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-1 12:15:38:198:326 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:15:38:199:681 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 12:15:38:201:635 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-1 12:15:38:203:416 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 12:15:38:206:174 + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2022-4-1 12:15:38:299:690 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-1 12:15:38:302:396 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-1 12:15:38:304:256 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-1 12:15:38:307:915 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-1 12:15:38:309:626 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:15:38:312:46 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2022-4-1 12:15:38:398:890 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-1 12:15:38:400:57 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-1 12:15:38:402:391 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-1 12:15:38:403:373 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/pg/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..c6f39d64 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: pg #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:31:982:116 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 12:15:31:983:961 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:32:82:135 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 12:15:32:84:182 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:15:32:86:263 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-1 12:15:32:182:993 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:15:32:185:324 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 12:15:32:186:903 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:15:32:187:669 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/pg/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..08927bdd --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,60 @@ +#### db_type: pg #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:31:564:734 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:15:31:566:684 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:31:664:775 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 12:15:31:666:727 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:15:31:669:17 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 12:15:31:765:612 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:15:31:766:543 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 12:15:31:768:202 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:15:31:769:142 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:15:31:769:850 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/pg/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..087be577 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,56 @@ +#### db_type: pg #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:31:683:607 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:13:31:685:432 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:31:783:592 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:13:31:785:397 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:13:31:787:285 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:13:31:985:247 +Q6 finished at: 2022-4-1 12:13:31:985:231 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:13:32:85:274 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-1 12:13:32:87:380 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:13:32:88:165 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/pg/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..6221fd06 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,56 @@ +#### db_type: pg #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:32:302:90 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:13:32:303:780 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:32:402:142 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:13:32:403:981 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:13:32:405:363 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:13:32:407:9 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-1 12:13:32:504:719 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:13:32:506:976 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-1 12:13:32:509:25 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:13:32:509:632 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-committed/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/pg/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..9f1fba42 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,56 @@ +#### db_type: pg #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:32:722:716 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:13:32:724:466 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:32:822:569 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:13:32:824:291 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 12:13:32:923:630 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:13:32:925:587 + Q5 finished at: 2022-4-1 12:13:32:925:760 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 12:13:33:24:142 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:13:33:26:64 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:13:33:26:784 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-committed/rat_dda_read_skew.txt b/test_result/centralizend_result/pg/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..beb753a6 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: pg #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:33:240:802 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:13:33:242:638 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:33:340:867 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:13:33:343:53 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:13:33:344:481 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 12:13:33:441:717 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:13:33:542:191 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:13:33:641:173 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:13:33:643:153 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:13:33:643:849 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-committed/rat_dda_read_skew2.txt b/test_result/centralizend_result/pg/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..974cad2a --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: pg #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:34:690:700 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:13:34:692:437 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:34:790:740 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:13:34:792:651 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:13:34:794:27 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 12:13:34:891:559 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:13:34:893:442 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 12:13:34:991:115 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:13:34:993:130 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:13:34:993:831 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-committed/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/pg/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..adac0bd3 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: pg #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:35:212:441 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:13:35:214:284 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:35:312:642 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:13:35:314:861 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:13:35:316:534 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:13:35:317:556 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 12:13:35:413:134 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:13:35:414:923 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:13:35:417:85 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:13:35:418:40 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/pg/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..10a2b8e1 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,61 @@ +#### db_type: pg #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:33:857:220 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 12:13:33:859:148 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:33:957:182 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:13:33:958:812 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:13:33:960:103 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:13:33:961:627 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 12:13:34:58:66 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:13:34:58:881 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-1 12:13:34:60:645 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:13:34:61:355 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/pg/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..40b3a27f --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,59 @@ +#### db_type: pg #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:34:272:959 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 12:13:34:274:829 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:34:372:834 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-1 12:13:34:374:903 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-1 12:13:34:376:164 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:13:34:378:109 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (1,0) (0,0) + (1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 12:13:34:473:653 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:13:34:474:539 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-1 12:13:34:476:299 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:13:34:476:971 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/rat_dda_write_read_skew.txt b/test_result/centralizend_result/pg/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..aa59cbe2 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: pg #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:30:644:641 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:13:30:646:735 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:30:747:579 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:13:30:749:397 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:13:30:750:892 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 12:13:30:845:605 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:13:30:946:167 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:13:31:46:200 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:13:31:48:543 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:13:31:49:274 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/pg/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..1e62aa23 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: pg #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:31:263:708 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:13:31:265:452 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:31:363:785 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:13:31:365:729 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:13:31:367:163 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:13:31:369:83 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 12:13:31:464:741 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:13:31:466:719 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:13:31:468:697 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:13:31:469:461 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-committed/rat_mda_step_rat.txt b/test_result/centralizend_result/pg/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..f38b0e1f --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: pg #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:35:633:783 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:13:35:635:588 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:35:733:874 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:13:35:736:106 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:13:35:737:917 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 12:13:35:834:32 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-1 12:13:35:835:824 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-1 12:13:35:837:645 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-1 12:13:35:935:826 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:13:35:937:828 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 12:13:36:35:748 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:13:36:135:569 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 12:13:36:138:155 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:13:36:138:855 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/pg/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..4339ed91 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: pg #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2022-4-1 12:13:36:354:416 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-1 12:13:36:357:400 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2022-4-1 12:13:36:454:432 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-1 12:13:36:456:602 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:13:36:554:398 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-1 12:13:36:557:367 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 12:13:36:559:828 + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 12:13:36:654:418 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 12:13:36:656:302 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 12:13:36:757:734 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 12:13:36:856:182 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:13:36:956:172 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 12:13:37:54:850 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:13:37:55:893 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 12:13:37:58:362 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 12:13:37:59:217 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/pg/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..f63df17f --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: pg #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:37:274:988 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:13:37:276:697 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:37:379:635 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:13:37:381:673 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 12:13:37:383:761 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 12:13:37:475:229 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-1 12:13:37:477:291 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-1 12:13:37:479:722 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-1 12:13:37:576:395 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:13:37:578:574 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 12:13:37:676:991 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:13:37:776:659 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 12:13:37:778:720 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:13:37:779:552 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/pg/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..0f67f4f1 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: pg #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:37:990:639 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-1 12:13:37:992:362 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:38:90:582 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-1 12:13:38:92:541 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 12:13:38:94:527 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 12:13:38:190:648 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-1 12:13:38:192:451 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-1 12:13:38:194:495 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-1 12:13:38:292:74 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:13:38:294:254 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 12:13:38:392:197 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:13:38:492:755 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 12:13:38:495:51 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:13:38:495:858 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/rat_sda_dirty_read.txt b/test_result/centralizend_result/pg/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..7bcdb259 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: pg #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 13:3:43:967:775 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 13:3:43:969:445 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 13:3:44:67:772 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 13:3:44:69:802 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-1 13:3:44:168:62 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 13:3:44:268:202 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 13:3:44:270:31 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 13:3:44:270:663 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-committed/rat_sda_intermediate_read.txt b/test_result/centralizend_result/pg/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..a30533c3 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: pg #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:28:243:721 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:13:28:245:498 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:28:343:578 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 12:13:28:345:644 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-1 12:13:28:445:7 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:13:28:547:762 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:13:28:646:381 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 12:13:28:648:188 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:13:28:648:890 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/pg/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..d2d0937d --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: pg #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:28:873:868 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:13:28:875:842 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:28:961:888 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 12:13:28:963:893 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:13:28:964:742 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-1 12:13:29:64:544 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:13:29:66:562 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 12:13:29:68:379 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:13:29:69:176 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-committed/rat_sda_lost_self_update.txt b/test_result/centralizend_result/pg/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..e442c743 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: pg #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:30:125:811 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:13:30:127:661 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:30:227:142 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 12:13:30:326:693 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 12:13:30:328:520 + Q4 finished at: 2022-4-1 12:13:30:328:872 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:13:30:428:930 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 12:13:30:430:870 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:13:30:431:602 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-committed/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/pg/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..6163c75d --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: pg #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:27:627:212 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:13:27:629:571 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:27:727:463 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 12:13:27:729:856 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 12:13:27:828:234 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:13:27:928:875 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:13:28:27:734 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 12:13:28:29:734 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:13:28:30:493 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/pg/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..f4d55bdc --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,58 @@ +#### db_type: pg #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:29:283:575 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 12:13:29:285:648 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:29:383:514 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-1 12:13:29:385:902 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:13:29:387:641 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 12:13:29:485:146 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:13:29:486:95 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-1 12:13:29:487:835 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:13:29:488:617 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/pg/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..bb6c8911 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,57 @@ +#### db_type: pg #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:29:705:505 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 12:13:29:707:935 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:29:807:66 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-1 12:13:29:809:178 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:13:29:811:615 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 12:13:29:908:719 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:13:29:909:657 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-1 12:13:29:911:722 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:13:29:912:514 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/pg/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..cd6565cc --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,56 @@ +#### db_type: pg #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:42:242:459 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:13:42:244:787 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:42:344:861 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:13:42:346:632 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 12:13:42:443:182 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:13:42:445:162 + Q5 finished at: 2022-4-1 12:13:42:445:180 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:13:42:446:853 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:13:42:448:738 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:13:42:449:607 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/pg/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..19c6a366 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,34 @@ +#### db_type: pg #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:53:51:596:677 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:53:51:598:488 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:53:51:696:573 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:53:51:698:512 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected; errcode: 40P01 + Q5 failed at: 2022-4-1 12:53:53:298:95 +Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q6 failed at: 2022-4-1 12:54:12:398:214 + +Test Result: Rollback +Reason: ERROR: deadlock detected; + diff --git a/test_result/centralizend_result/pg/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/pg/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..41a05b92 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,34 @@ +#### db_type: pg #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:54:12:613:380 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:54:12:616:690 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:54:12:713:731 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:54:12:715:634 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected; errcode: 40P01 + Q5 failed at: 2022-4-1 12:54:14:314:687 +Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q6 failed at: 2022-4-1 12:54:33:414:661 + +Test Result: Rollback +Reason: ERROR: deadlock detected; + diff --git a/test_result/centralizend_result/pg/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/pg/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..3aaf3e7a --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,34 @@ +#### db_type: pg #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:54:33:630:626 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:54:33:632:376 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:54:33:730:591 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:54:33:732:353 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected; errcode: 40P01 + Q5 failed at: 2022-4-1 12:54:35:332:22 +Q7 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q7 failed at: 2022-4-1 12:54:54:532:33 + +Test Result: Rollback +Reason: ERROR: deadlock detected; + diff --git a/test_result/centralizend_result/pg/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/pg/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..c02179b5 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:14:45:819:34 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:14:45:821:65 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:14:45:919:9 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:14:45:920:784 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:14:45:922:219 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 12:14:46:120:578 + Q8 finished at: 2022-4-1 12:14:46:120:647 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:14:46:122:438 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:14:46:124:363 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:14:46:125:248 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/pg/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..267d11dd --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:14:46:340:780 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:14:46:342:656 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:14:46:440:832 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:14:46:442:715 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:14:46:444:45 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:14:46:642:352 +Q6 finished at: 2022-4-1 12:14:46:642:361 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:14:46:742:499 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:14:46:744:484 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:14:46:745:386 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/pg/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..982dbe25 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:14:46:959:513 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:14:46:961:406 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:14:47:59:713 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:14:47:61:887 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 12:14:47:160:399 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:14:47:162:522 + Q5 finished at: 2022-4-1 12:14:47:162:564 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 12:14:47:265:530 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:14:47:267:463 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:14:47:268:518 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/pg/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..31a13c60 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:14:47:483:208 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:14:47:485:255 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:14:47:583:156 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:14:47:585:895 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 12:14:47:686:871 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:14:47:888:235 + Q5 finished at: 2022-4-1 12:14:47:888:320 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:14:47:890:323 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:14:47:892:240 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:14:47:893:150 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/pg/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..c2b0a92d --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:14:48:106:842 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:14:48:108:841 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:14:48:207:196 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:14:48:209:574 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 12:14:48:307:696 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:14:48:309:606 + Q5 finished at: 2022-4-1 12:14:48:309:654 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:14:48:311:508 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:14:48:313:107 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:14:48:313:863 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/pg/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..51174f83 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:54:54:749:448 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:54:54:751:282 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:54:54:849:460 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:54:54:851:285 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 12:54:54:949:421 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 12:54:54:951:458 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q8 failed reason: ERROR: deadlock detected; errcode: 40P01 + Q8 failed at: 2022-4-1 12:54:56:753:380 + Q5 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 + Q5 failed at: 2022-4-1 12:55:15:550:781 +Q9 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q9 failed at: 2022-4-1 12:55:15:950:816 + +Test Result: Rollback +Reason: ERROR: deadlock detected; + diff --git a/test_result/centralizend_result/pg/read-committed/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/pg/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..49bb16a3 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:55:16:167:501 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:55:16:171:19 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:55:16:267:347 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:55:16:269:274 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:55:16:367:588 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 12:55:16:568:664 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q8 failed reason: ERROR: deadlock detected; errcode: 40P01 + Q8 failed at: 2022-4-1 12:55:18:371:59 + Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 + Q6 failed at: 2022-4-1 12:55:37:269:673 +Q9 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q9 failed at: 2022-4-1 12:55:37:569:673 + +Test Result: Rollback +Reason: ERROR: deadlock detected; + diff --git a/test_result/centralizend_result/pg/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/pg/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..0566b5bf --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: pg #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:38:711:313 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:13:38:713:111 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:38:811:338 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-1 12:13:38:911:625 + Q4 finished at: 2022-4-1 12:13:38:911:833 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:13:39:12:819 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 12:13:39:14:540 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-1 12:13:39:16:393 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:13:39:18:502 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/pg/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..90158794 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: pg #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:39:230:202 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:13:39:231:953 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:39:330:314 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-1 12:13:39:431:484 + Q4 finished at: 2022-4-1 12:13:39:431:492 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:13:39:531:553 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 12:13:39:533:197 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-1 12:13:39:534:757 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:13:39:536:989 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-committed/wat_sda_full_write.txt b/test_result/centralizend_result/pg/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..4b520e8e --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: pg #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:39:748:733 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:13:39:750:491 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:39:848:670 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-1 12:13:39:949:610 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-1 12:13:39:951:789 +Q6 finished at: 2022-4-1 12:13:39:951:802 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:13:40:50:178 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-1 12:13:40:51:787 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:13:40:52:654 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-committed/wat_sda_full_write_committed.txt b/test_result/centralizend_result/pg/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..61d241a7 --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: pg #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:40:264:566 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:13:40:266:276 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:40:364:581 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-1 12:13:40:465:371 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:13:40:467:202 + Q4 finished at: 2022-4-1 12:13:40:467:240 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:13:40:468:828 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-1 12:13:40:470:339 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:13:40:471:105 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/pg/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..34b4e77b --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: pg #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:41:819:552 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:13:41:821:526 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:41:919:538 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 12:13:42:20:450 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:13:42:22:562 + Q4 finished at: 2022-4-1 12:13:42:22:942 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:13:42:24:990 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 12:13:42:26:632 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:13:42:27:534 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-committed/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/pg/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..ecd3f83a --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: pg #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:40:683:898 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 12:13:40:685:608 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:40:783:860 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 12:13:40:785:780 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:13:40:985:563 +Q5 finished at: 2022-4-1 12:13:40:985:575 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 12:13:40:987:491 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 12:13:40:989:196 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:13:40:990:194 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-committed/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/pg/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..16d8cffc --- /dev/null +++ b/test_result/centralizend_result/pg/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: pg #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:41:202:143 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 12:13:41:203:964 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:41:302:211 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 12:13:41:303:982 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:13:41:503:505 +Q5 finished at: 2022-4-1 12:13:41:503:580 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:13:41:603:607 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 12:13:41:605:296 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:13:41:606:124 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/pg/read-uncommitted/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..3ce6f981 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/iat_dda_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: pg #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:18:874:277 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:13:18:876:157 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:18:974:243 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:13:18:975:907 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:13:18:977:324 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:13:18:979:648 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 12:13:19:75:247 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:13:19:76:146 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:13:19:77:984 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:13:19:78:977 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/pg/read-uncommitted/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..c0e48b4d --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:19:292:702 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:13:19:294:633 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:19:392:677 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:13:19:394:645 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:13:19:396:57 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:13:19:397:912 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 12:13:19:493:422 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:13:19:495:750 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:13:19:497:573 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:13:19:498:625 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/iat_dda_write_skew.txt b/test_result/centralizend_result/pg/read-uncommitted/iat_dda_write_skew.txt new file mode 100644 index 00000000..9f2d026d --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: pg #### +#### test_type: dda_write_skew #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:19:712:976 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:13:19:714:967 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:19:812:942 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:13:19:814:933 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:13:19:816:245 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 12:13:19:913:842 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:13:19:916:49 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 12:13:20:14:634 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:13:20:16:701 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 12:13:20:17:671 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/pg/read-uncommitted/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..99eff8ba --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: pg #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:21:78:898 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:13:21:80:703 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:21:178:902 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:13:21:180:875 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:13:21:182:267 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:13:21:184:138 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 12:13:21:279:726 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:13:21:281:827 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:13:21:283:746 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:13:21:284:740 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/pg/read-uncommitted/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..eec7713a --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: pg #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:20:231:193 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-1 12:13:20:233:278 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-1 12:13:20:234:631 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-1 12:13:20:331:307 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-1 12:13:20:333:662 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-1 12:13:20:335:267 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:13:20:337:381 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:13:20:433:590 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-1 12:13:20:435:567 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-1 12:13:20:437:200 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:13:20:438:59 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/pg/read-uncommitted/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..0aaa2c34 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: pg #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:20:658:84 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-1 12:13:20:660:544 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:20:758:43 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-1 12:13:20:760:629 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-1 12:13:20:762:758 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:13:20:764:543 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-1 12:13:20:859:638 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:13:20:861:769 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,saving,1400) (kevin,checking,1400) + (1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + (2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-1 12:13:20:863:610 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:13:20:864:582 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/iat_mda_step_iat.txt b/test_result/centralizend_result/pg/read-uncommitted/iat_mda_step_iat.txt new file mode 100644 index 00000000..35312631 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: pg #### +#### test_type: mda_step_iat #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:21:500:387 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 12:13:21:502:483 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:21:600:534 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 12:13:21:602:795 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:13:21:700:494 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 12:13:21:702:825 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-1 12:13:21:801:343 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 12:13:21:901:605 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-1 12:13:22:4:820 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:13:22:102:289 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 12:13:22:202:177 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:13:22:302:265 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 12:13:22:304:553 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:13:22:305:597 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/pg/read-uncommitted/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..fb1d1040 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,106 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:25:845:437 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:13:25:847:527 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:25:945:343 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 12:13:25:947:139 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:13:25:950:137 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 12:13:26:45:322 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 12:13:26:47:580 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 12:13:26:48:921 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:13:26:51:750 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2022-4-1 12:13:26:146:586 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 12:13:26:147:676 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-1 12:13:26:149:893 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 12:13:26:151:135 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/pg/read-uncommitted/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..11f2dd88 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,207 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:25:107:835 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:13:25:110:480 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:25:207:939 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:13:25:210:765 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:13:25:308:176 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-1 12:13:25:310:81 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:13:25:312:398 + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 12:13:25:408:878 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 12:13:25:410:648 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:13:25:412:620 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-4-1 12:13:25:509:818 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:13:25:511:39 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-1 12:13:25:609:715 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-1 12:13:25:610:831 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 12:13:25:614:38 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 12:13:25:614:835 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/pg/read-uncommitted/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..b07fee56 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:22:523:278 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-1 12:13:22:525:460 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:22:624:0 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 12:13:22:626:199 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:13:22:723:353 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 12:13:22:725:758 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-1 12:13:22:824:448 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-1 12:13:22:924:247 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-1 12:13:23:24:176 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:13:23:125:422 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 12:13:23:225:390 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:13:23:325:380 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 12:13:23:327:271 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:13:23:328:198 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/pg/read-uncommitted/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..53f590cc --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:23:540:432 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 12:13:23:542:520 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:23:640:422 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-1 12:13:23:642:486 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:13:23:740:508 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-1 12:13:23:742:793 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-1 12:13:23:841:279 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-1 12:13:23:941:322 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-1 12:13:24:41:375 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:13:24:142:85 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 12:13:24:242:283 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:13:24:343:61 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 12:13:24:345:228 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:13:24:346:218 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/pg/read-uncommitted/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..fc928097 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:26:365:789 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 12:13:26:367:932 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-1 12:13:26:369:639 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-1 12:13:26:465:715 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-1 12:13:26:467:938 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-1 12:13:26:469:429 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:13:26:471:661 + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 12:13:26:565:885 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-1 12:13:26:568:286 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 12:13:26:570:90 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 12:13:26:571:220 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-1 12:13:26:666:572 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-1 12:13:26:668:571 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-1 12:13:26:670:631 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-1 12:13:26:671:621 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/pg/read-uncommitted/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..e1c3f303 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,162 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:24:582:65 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-1 12:13:24:584:560 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:24:681:941 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-1 12:13:24:684:141 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:13:24:685:573 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 12:13:24:687:424 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-1 12:13:24:688:730 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 12:13:24:690:625 + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2022-4-1 12:13:24:783:875 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-1 12:13:24:786:107 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-1 12:13:24:787:491 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-1 12:13:24:789:250 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-1 12:13:24:790:686 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:13:24:792:629 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2022-4-1 12:13:24:883:344 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-1 12:13:24:884:485 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-1 12:13:24:886:877 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-1 12:13:24:887:859 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/pg/read-uncommitted/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..70317dba --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: pg #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:18:449:139 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 12:13:18:451:62 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:18:548:810 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 12:13:18:550:626 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:13:18:552:895 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-1 12:13:18:649:935 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:13:18:652:534 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 12:13:18:654:140 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:13:18:655:23 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/pg/read-uncommitted/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..3efc3297 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,60 @@ +#### db_type: pg #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:13:18:29:425 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:13:18:31:408 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:13:18:129:675 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 12:13:18:131:932 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:13:18:134:586 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 12:13:18:232:299 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:13:18:233:147 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 12:13:18:234:664 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:13:18:235:608 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:13:18:236:289 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/pg/read-uncommitted/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..ac687bcd --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/rat_dda_double_write_skew1.txt @@ -0,0 +1,56 @@ +#### db_type: pg #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:37:127:607 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:11:37:129:384 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:37:227:679 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:11:37:229:525 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:11:37:230:922 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:11:37:429:129 +Q6 finished at: 2022-4-1 12:11:37:429:220 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:11:37:529:228 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-1 12:11:37:531:411 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:11:37:532:131 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-uncommitted/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/pg/read-uncommitted/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..14b0e04c --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,56 @@ +#### db_type: pg #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:37:745:654 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:11:37:747:821 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:37:845:806 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:11:37:847:724 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:11:37:849:183 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:11:37:851:200 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-1 12:11:37:946:785 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:11:37:948:737 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-1 12:11:37:950:706 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:11:37:951:480 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-uncommitted/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/pg/read-uncommitted/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..29d8216f --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/rat_dda_double_write_skew2.txt @@ -0,0 +1,56 @@ +#### db_type: pg #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:38:165:404 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:11:38:167:471 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:38:265:318 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:11:38:267:155 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 12:11:38:366:478 +Q7-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:11:38:368:901 +Q7 finished at: 2022-4-1 12:11:38:368:916 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 12:11:38:467:4 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:11:38:469:166 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:11:38:469:842 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-uncommitted/rat_dda_read_skew.txt b/test_result/centralizend_result/pg/read-uncommitted/rat_dda_read_skew.txt new file mode 100644 index 00000000..1e57890e --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: pg #### +#### test_type: dda_read_skew #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:38:683:509 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:11:38:685:555 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:38:784:132 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:11:38:786:68 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:11:38:787:445 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 12:11:38:884:676 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:11:38:989:47 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:11:39:87:875 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:11:39:89:877 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:11:39:90:641 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-uncommitted/rat_dda_read_skew2.txt b/test_result/centralizend_result/pg/read-uncommitted/rat_dda_read_skew2.txt new file mode 100644 index 00000000..5a1d7beb --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: pg #### +#### test_type: dda_read_skew2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:40:139:197 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:11:40:140:895 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:40:239:145 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:11:40:240:948 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:11:40:242:284 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 12:11:40:340:133 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:11:40:342:287 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 12:11:40:439:518 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:11:40:441:500 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:11:40:442:206 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-uncommitted/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/pg/read-uncommitted/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..1e78d925 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: pg #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:40:669:679 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:11:40:671:771 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:40:756:106 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:11:40:757:982 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:11:40:759:580 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:11:40:760:378 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 12:11:40:856:844 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:11:40:859:109 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:11:40:860:893 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:11:40:861:604 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-uncommitted/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/pg/read-uncommitted/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..3b0f325e --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,61 @@ +#### db_type: pg #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:39:304:982 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 12:11:39:306:828 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:39:405:118 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:11:39:407:47 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:11:39:408:649 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:11:39:410:740 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 12:11:39:506:75 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:11:39:506:996 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-1 12:11:39:508:732 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:11:39:509:410 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/pg/read-uncommitted/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..c282028a --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,59 @@ +#### db_type: pg #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:39:720:994 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 12:11:39:723:46 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:39:820:915 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-1 12:11:39:822:686 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-1 12:11:39:824:10 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:11:39:825:568 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (1,0) (0,0) + (1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 12:11:39:921:778 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:11:39:922:706 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-1 12:11:39:924:524 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:11:39:925:235 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/rat_dda_write_read_skew.txt b/test_result/centralizend_result/pg/read-uncommitted/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..9ce9a473 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: pg #### +#### test_type: dda_write_read_skew #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:36:85:701 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:11:36:87:536 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:36:186:30 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:11:36:187:940 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:11:36:189:525 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 12:11:36:286:913 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:11:36:387:537 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:11:36:488:887 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:11:36:491:74 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:11:36:491:859 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/pg/read-uncommitted/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..9e9d7d02 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: pg #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:36:707:197 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:11:36:709:94 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:36:807:179 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:11:36:809:174 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:11:36:810:611 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:11:36:812:616 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 12:11:36:908:111 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:11:36:911:108 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:11:36:913:6 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:11:36:913:713 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-uncommitted/rat_mda_step_rat.txt b/test_result/centralizend_result/pg/read-uncommitted/rat_mda_step_rat.txt new file mode 100644 index 00000000..a6bcead2 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: pg #### +#### test_type: mda_step_rat #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:41:79:203 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:11:41:80:993 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:41:179:282 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:11:41:181:55 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:11:41:182:810 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 12:11:41:279:206 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-1 12:11:41:281:97 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-1 12:11:41:282:904 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-1 12:11:41:380:372 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:11:41:382:698 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 12:11:41:480:840 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:11:41:580:679 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 12:11:41:583:360 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:11:41:584:167 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/pg/read-uncommitted/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..fdfe21f0 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: pg #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2022-4-1 12:11:41:801:566 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-1 12:11:41:804:574 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2022-4-1 12:11:41:901:585 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-1 12:11:41:903:610 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:11:42:1:606 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-1 12:11:42:4:520 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 12:11:42:7:86 + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 12:11:42:101:758 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 12:11:42:103:573 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 12:11:42:205:395 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 12:11:42:303:253 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:11:42:403:406 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 12:11:42:505:812 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:11:42:506:942 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 12:11:42:509:838 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 12:11:42:510:852 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-uncommitted/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/pg/read-uncommitted/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..c63cf529 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: pg #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:42:729:188 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:11:42:730:850 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:42:829:160 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:11:42:831:69 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 12:11:42:833:267 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 12:11:42:929:144 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-1 12:11:42:930:862 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-1 12:11:42:932:925 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-1 12:11:43:32:911 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:11:43:34:986 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 12:11:43:132:488 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:11:43:230:774 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 12:11:43:232:916 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:11:43:233:790 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/pg/read-uncommitted/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..36f480aa --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: pg #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:43:446:747 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-1 12:11:43:448:616 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:43:547:499 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-1 12:11:43:549:355 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 12:11:43:551:395 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 12:11:43:646:963 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-1 12:11:43:649:12 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-1 12:11:43:651:198 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-1 12:11:43:752:888 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:11:43:754:901 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 12:11:43:848:945 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:11:43:948:568 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 12:11:43:951:370 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:11:43:952:465 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/rat_sda_dirty_read.txt b/test_result/centralizend_result/pg/read-uncommitted/rat_sda_dirty_read.txt new file mode 100644 index 00000000..5270f4dc --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: pg #### +#### test_type: sda_dirty_read #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 13:3:43:392:354 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 13:3:43:394:79 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 13:3:43:492:302 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 13:3:43:494:302 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-1 13:3:43:592:563 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 13:3:43:692:689 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 13:3:43:694:331 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 13:3:43:695:70 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-uncommitted/rat_sda_intermediate_read.txt b/test_result/centralizend_result/pg/read-uncommitted/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..a3e18830 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: pg #### +#### test_type: sda_intermediate_read #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:33:683:668 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:11:33:685:426 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:33:783:648 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 12:11:33:785:482 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-1 12:11:33:884:805 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:11:33:984:50 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:11:34:85:233 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 12:11:34:86:854 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:11:34:87:481 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-uncommitted/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/pg/read-uncommitted/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..24463f91 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: pg #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:34:301:182 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:11:34:302:962 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:34:401:46 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 12:11:34:403:14 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:11:34:403:814 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-1 12:11:34:502:44 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:11:34:504:137 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 12:11:34:505:813 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:11:34:506:585 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-uncommitted/rat_sda_lost_self_update.txt b/test_result/centralizend_result/pg/read-uncommitted/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..19aef99c --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: pg #### +#### test_type: sda_lost_self_update #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:35:561:888 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:11:35:563:809 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:35:661:814 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 12:11:35:763:871 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 12:11:35:766:31 + Q4 finished at: 2022-4-1 12:11:35:766:54 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:11:35:868:841 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 12:11:35:870:588 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:11:35:871:242 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-uncommitted/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/pg/read-uncommitted/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..d77b17c7 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: pg #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:33:64:842 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:11:33:66:715 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:33:165:51 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 12:11:33:167:145 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 12:11:33:268:258 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:11:33:366:483 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:11:33:467:804 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 12:11:33:469:621 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:11:33:470:278 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/pg/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..ea2d1f5b --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,58 @@ +#### db_type: pg #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:34:725:936 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 12:11:34:727:831 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:34:826:42 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-1 12:11:34:827:963 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:11:34:829:810 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 12:11:34:927:39 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:11:34:928:132 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-1 12:11:34:929:855 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:11:34:930:556 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/pg/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..8fe99ad8 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,57 @@ +#### db_type: pg #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:35:142:316 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 12:11:35:144:77 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:35:242:352 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-1 12:11:35:244:417 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:11:35:246:337 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 12:11:35:345:606 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:11:35:346:440 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-1 12:11:35:348:233 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:11:35:349:15 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/pg/read-uncommitted/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..dde0ad75 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,56 @@ +#### db_type: pg #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:47:710:880 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:11:47:712:616 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:47:810:983 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:11:47:813:0 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 12:11:47:911:686 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:11:47:913:695 + Q5 finished at: 2022-4-1 12:11:47:913:762 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:11:47:915:415 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:11:47:917:107 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:11:47:917:941 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-uncommitted/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/pg/read-uncommitted/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..b0c09ebc --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,34 @@ +#### db_type: pg #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:52:5:345:218 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:52:5:347:204 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:52:5:444:983 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:52:5:447:95 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected; errcode: 40P01 + Q5 failed at: 2022-4-1 12:52:7:46:459 +Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q6 failed at: 2022-4-1 12:52:26:146:514 + +Test Result: Rollback +Reason: ERROR: deadlock detected; + diff --git a/test_result/centralizend_result/pg/read-uncommitted/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/pg/read-uncommitted/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..8eadeb1a --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,34 @@ +#### db_type: pg #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:52:26:360:482 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:52:26:362:188 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:52:26:460:500 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:52:26:462:351 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected; errcode: 40P01 + Q5 failed at: 2022-4-1 12:52:28:61:742 +Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q6 failed at: 2022-4-1 12:52:47:161:836 + +Test Result: Rollback +Reason: ERROR: deadlock detected; + diff --git a/test_result/centralizend_result/pg/read-uncommitted/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/pg/read-uncommitted/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..ff4eaae0 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,34 @@ +#### db_type: pg #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:52:47:377:374 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:52:47:379:359 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:52:47:477:445 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:52:47:479:296 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected; errcode: 40P01 + Q5 failed at: 2022-4-1 12:52:49:80:735 +Q7 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q7 failed at: 2022-4-1 12:53:8:280:767 + +Test Result: Rollback +Reason: ERROR: deadlock detected; + diff --git a/test_result/centralizend_result/pg/read-uncommitted/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/pg/read-uncommitted/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..5f89b953 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:12:32:290:462 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:12:32:292:248 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:12:32:390:493 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:12:32:392:399 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:12:32:393:801 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 12:12:32:592:212 +Q6 finished at: 2022-4-1 12:12:32:592:264 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:12:32:594:162 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:12:32:596:46 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:12:32:596:808 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/pg/read-uncommitted/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..dc4965f1 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:12:32:811:213 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:12:32:813:451 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:12:32:911:143 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:12:32:913:224 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:12:32:914:834 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:12:33:112:978 +Q6 finished at: 2022-4-1 12:12:33:112:990 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:12:33:217:90 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:12:33:219:199 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:12:33:220:348 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/pg/read-uncommitted/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..9b835878 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:12:33:434:455 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:12:33:436:289 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:12:33:534:425 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:12:33:536:450 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 12:12:33:635:455 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:12:33:637:452 + Q5 finished at: 2022-4-1 12:12:33:637:529 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 12:12:33:735:853 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:12:33:737:752 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:12:33:738:605 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/pg/read-uncommitted/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..0b5e43ef --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:12:33:952:48 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:12:33:954:42 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:12:34:52:25 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:12:34:53:816 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 12:12:34:152:762 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:12:34:353:498 + Q5 finished at: 2022-4-1 12:12:34:353:529 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:12:34:355:292 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:12:34:357:196 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:12:34:358:33 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/pg/read-uncommitted/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..d464783e --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:12:34:571:705 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:12:34:573:692 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:12:34:671:700 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:12:34:674:140 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 12:12:34:772:551 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:12:34:774:756 + Q5 finished at: 2022-4-1 12:12:34:774:774 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:12:34:776:756 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:12:34:778:535 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:12:34:779:410 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/pg/read-uncommitted/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..c2c98cd4 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/wat_mda_step_wat_c1.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:53:8:498:367 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:53:8:500:194 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:53:8:598:250 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:53:8:600:0 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 12:53:8:698:311 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 12:53:8:700:269 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q8 failed reason: ERROR: deadlock detected; errcode: 40P01 + Q8 failed at: 2022-4-1 12:53:10:502:160 + Q5 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 + Q5 failed at: 2022-4-1 12:53:29:300:710 +Q9 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q9 failed at: 2022-4-1 12:53:29:700:693 + +Test Result: Rollback +Reason: ERROR: deadlock detected; + diff --git a/test_result/centralizend_result/pg/read-uncommitted/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/pg/read-uncommitted/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..e23656f3 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/wat_mda_step_wat_c2.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:53:29:918:127 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:53:29:920:168 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:53:30:18:37 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:53:30:20:28 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:53:30:118:19 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 12:53:30:319:36 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q8 failed reason: ERROR: deadlock detected; errcode: 40P01 + Q8 failed at: 2022-4-1 12:53:32:120:859 + Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 + Q6 failed at: 2022-4-1 12:53:51:19:508 +Q9 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q9 failed at: 2022-4-1 12:53:51:319:662 + +Test Result: Rollback +Reason: ERROR: deadlock detected; + diff --git a/test_result/centralizend_result/pg/read-uncommitted/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/pg/read-uncommitted/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..7e461b4d --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: pg #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:44:165:883 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:11:44:167:607 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:44:265:913 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; + Q4 finished at: 2022-4-1 12:11:44:366:216 +Q5 finished at: 2022-4-1 12:11:44:366:257 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:11:44:469:0 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 12:11:44:470:555 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-1 12:11:44:472:383 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:11:44:474:551 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-uncommitted/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/pg/read-uncommitted/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..a013b6c7 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: pg #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:44:688:607 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:11:44:690:511 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:44:788:564 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-1 12:11:44:890:216 + Q4 finished at: 2022-4-1 12:11:44:890:261 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:11:44:989:921 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 12:11:44:991:578 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-1 12:11:44:993:84 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:11:44:995:368 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-uncommitted/wat_sda_full_write.txt b/test_result/centralizend_result/pg/read-uncommitted/wat_sda_full_write.txt new file mode 100644 index 00000000..57f7d3a4 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: pg #### +#### test_type: sda_full_write #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:45:207:615 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:11:45:209:372 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:45:307:593 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-1 12:11:45:411:158 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 12:11:45:413:4 + Q4 finished at: 2022-4-1 12:11:45:413:94 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:11:45:509:320 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-1 12:11:45:510:943 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:11:45:511:728 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-uncommitted/wat_sda_full_write_committed.txt b/test_result/centralizend_result/pg/read-uncommitted/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..7b5290d7 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: pg #### +#### test_type: sda_full_write_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:45:724:545 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:11:45:726:302 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:45:824:557 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-1 12:11:45:925:371 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:11:45:927:582 + Q4 finished at: 2022-4-1 12:11:45:927:622 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:11:45:929:240 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-1 12:11:45:930:807 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:11:45:931:546 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-uncommitted/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/pg/read-uncommitted/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..722d004e --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: pg #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:47:290:538 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:11:47:292:364 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:47:390:554 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 12:11:47:491:740 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:11:47:493:620 + Q4 finished at: 2022-4-1 12:11:47:493:671 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:11:47:495:340 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 12:11:47:496:874 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:11:47:497:652 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/read-uncommitted/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/pg/read-uncommitted/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..f98b8994 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: pg #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:46:143:597 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 12:11:46:145:411 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:46:243:654 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 12:11:46:245:469 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-1 12:11:46:445:221 + Q7 finished at: 2022-4-1 12:11:46:445:276 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 12:11:46:447:86 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 12:11:46:448:844 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:11:46:449:720 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/read-uncommitted/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/pg/read-uncommitted/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..aeb40283 --- /dev/null +++ b/test_result/centralizend_result/pg/read-uncommitted/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: pg #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:11:46:662:248 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 12:11:46:664:21 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:11:46:762:156 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 12:11:46:764:48 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:11:46:964:275 +Q5 finished at: 2022-4-1 12:11:46:964:325 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:11:47:64:45 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 12:11:47:65:717 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:11:47:66:810 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/repeatable-read/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/pg/repeatable-read/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..59c8319f --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/iat_dda_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: pg #### +#### test_type: dda_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:17:53:726:787 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:17:53:728:566 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:17:53:826:735 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:17:53:828:416 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:17:53:829:723 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:17:53:831:833 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 12:17:53:929:625 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:17:53:930:562 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:17:53:932:353 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:17:53:933:149 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/repeatable-read/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/pg/repeatable-read/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..607cbb26 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:17:54:147:592 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:17:54:149:751 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:17:54:247:524 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:17:54:249:409 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:17:54:250:830 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:17:54:253:63 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 +Q7 failed at: 2022-4-1 12:17:55:48:614 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/repeatable-read/iat_dda_write_skew.txt b/test_result/centralizend_result/pg/repeatable-read/iat_dda_write_skew.txt new file mode 100644 index 00000000..ce51c196 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: pg #### +#### test_type: dda_write_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:17:55:264:291 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:17:55:266:212 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:17:55:364:239 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:17:55:366:76 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:17:55:367:507 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 12:17:55:465:127 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:17:55:467:209 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 12:17:55:566:921 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:17:55:568:913 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 12:17:55:569:850 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/repeatable-read/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/pg/repeatable-read/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..2489c1c4 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: pg #### +#### test_type: dda_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:17:56:634:531 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:17:56:636:535 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:17:56:734:444 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:17:56:736:474 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:17:56:737:811 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:17:56:739:851 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 12:17:56:835:262 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:17:56:838:875 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:17:56:840:742 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:17:56:841:572 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/pg/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..19124eaa --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: pg #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:17:55:782:319 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-1 12:17:55:784:368 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-1 12:17:55:785:705 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-1 12:17:55:882:819 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-1 12:17:55:884:840 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-1 12:17:55:886:178 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:17:55:888:340 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:17:55:983:853 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-1 12:17:55:985:825 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-1 12:17:55:987:456 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:17:55:988:242 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/pg/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..14f740af --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: pg #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:17:56:212:638 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-1 12:17:56:215:518 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:17:56:312:597 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-1 12:17:56:315:662 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-1 12:17:56:317:836 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:17:56:319:972 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-1 12:17:56:414:805 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:17:56:417:76 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,saving,1400) (kevin,checking,1400) + (1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + (2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-1 12:17:56:418:836 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:17:56:419:749 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/repeatable-read/iat_mda_step_iat.txt b/test_result/centralizend_result/pg/repeatable-read/iat_mda_step_iat.txt new file mode 100644 index 00000000..dc16636a --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: pg #### +#### test_type: mda_step_iat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:17:57:65:129 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 12:17:57:67:296 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:17:57:165:28 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 12:17:57:167:175 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:17:57:265:90 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 12:17:57:267:209 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-1 12:17:57:365:970 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 12:17:57:465:901 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-1 12:17:57:566:75 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:17:57:666:498 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 12:17:57:767:137 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:17:57:866:576 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 12:17:57:868:894 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:17:57:869:755 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/pg/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..9f330781 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:1:366:871 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:18:1:369:38 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:1:466:830 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 12:18:1:468:803 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:18:1:471:323 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 12:18:1:566:908 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 12:18:1:569:373 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 12:18:1:570:855 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:18:1:573:256 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-1 12:18:1:667:965 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 12:18:1:669:68 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-1 12:18:1:671:283 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 12:18:1:672:234 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/pg/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..c54d45e2 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,209 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:0:642:496 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:18:0:645:485 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:0:742:528 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:18:0:745:592 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:18:0:842:812 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-1 12:18:0:844:709 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:18:0:847:130 + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 12:18:0:943:680 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 12:18:0:945:674 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:18:0:948:270 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-1 12:18:1:44:573 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:18:1:45:718 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-1 12:18:1:144:339 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-1 12:18:1:145:360 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 12:18:1:148:778 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 12:18:1:149:613 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/pg/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..3ebb0376 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:17:58:85:192 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-1 12:17:58:87:388 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:17:58:185:244 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 12:17:58:187:551 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:17:58:285:202 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 12:17:58:287:245 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-1 12:17:58:385:853 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-1 12:17:58:486:30 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-1 12:17:58:586:144 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:17:58:686:838 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 12:17:58:786:869 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:17:58:887:80 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 12:17:58:889:55 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:17:58:889:919 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/pg/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..ccf57854 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:17:59:100:730 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 12:17:59:103:32 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:17:59:200:722 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-1 12:17:59:202:842 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:17:59:300:730 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-1 12:17:59:303:218 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-1 12:17:59:401:544 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-1 12:17:59:501:479 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-1 12:17:59:601:375 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:17:59:702:493 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 12:17:59:802:408 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:17:59:902:382 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 12:17:59:904:629 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:17:59:905:543 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/pg/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..b5ea01cd --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:1:887:243 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 12:18:1:889:419 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-1 12:18:1:891:207 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-1 12:18:1:987:277 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-1 12:18:1:989:655 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-1 12:18:1:991:604 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:18:1:993:872 + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 12:18:2:87:686 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-1 12:18:2:89:999 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 12:18:2:91:827 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 12:18:2:92:725 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-1 12:18:2:192:865 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-1 12:18:2:196:518 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-1 12:18:2:198:769 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-1 12:18:2:199:757 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/repeatable-read/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/pg/repeatable-read/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..f749edd2 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,164 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:0:121:42 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-1 12:18:0:123:326 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:0:220:984 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-1 12:18:0:223:771 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:18:0:225:196 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 12:18:0:226:915 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-1 12:18:0:228:312 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 12:18:0:230:296 + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2022-4-1 12:18:0:321:83 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-1 12:18:0:323:443 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-1 12:18:0:325:34 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-1 12:18:0:327:263 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-1 12:18:0:328:850 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:18:0:331:556 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-1 12:18:0:422:416 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-1 12:18:0:423:520 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-1 12:18:0:425:951 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-1 12:18:0:426:940 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/repeatable-read/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/pg/repeatable-read/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..6546a8b0 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/iat_sda_lost_update_committed.txt @@ -0,0 +1,39 @@ +#### db_type: pg #### +#### test_type: sda_lost_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:17:52:708:397 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 12:17:52:710:337 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:17:52:808:357 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 12:17:52:810:118 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:17:52:812:180 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 +Q6 failed at: 2022-4-1 12:17:53:510:68 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/repeatable-read/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/pg/repeatable-read/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..0278209c --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: pg #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:17:52:282:633 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:17:52:284:384 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:17:52:382:613 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 12:17:52:384:249 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:17:52:386:410 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 12:17:52:483:410 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:17:52:484:270 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 12:17:52:485:734 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:17:52:486:754 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:17:52:487:422 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/repeatable-read/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/pg/repeatable-read/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..c6199cf4 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/rat_dda_double_write_skew1.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: dda_double_write_skew1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:45:502:972 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:15:45:504:791 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:45:602:934 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:15:45:604:756 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:15:45:606:272 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:15:45:804:355 +Q6 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 +Q6 failed at: 2022-4-1 12:15:46:404:616 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/repeatable-read/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/pg/repeatable-read/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..44827b1d --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:46:619:789 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:15:46:621:662 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:46:719:888 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:15:46:721:919 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:15:46:723:427 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:15:46:725:363 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 +Q7 failed at: 2022-4-1 12:15:47:524:304 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/repeatable-read/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/pg/repeatable-read/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..aa998264 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/rat_dda_double_write_skew2.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: dda_double_write_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:47:738:992 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:15:47:741:29 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:47:838:907 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:15:47:840:657 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 12:15:47:939:919 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:15:47:944:170 + Q5 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 + Q5 failed at: 2022-4-1 12:15:48:444:513 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/repeatable-read/rat_dda_read_skew.txt b/test_result/centralizend_result/pg/repeatable-read/rat_dda_read_skew.txt new file mode 100644 index 00000000..e99ee2f1 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: pg #### +#### test_type: dda_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:48:662:572 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:15:48:664:429 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:48:762:558 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:15:48:764:447 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:15:48:765:761 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 12:15:48:863:670 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:15:48:964:69 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:15:49:62:853 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:15:49:64:816 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:15:49:65:500 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/repeatable-read/rat_dda_read_skew2.txt b/test_result/centralizend_result/pg/repeatable-read/rat_dda_read_skew2.txt new file mode 100644 index 00000000..4242da91 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: pg #### +#### test_type: dda_read_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:50:112:652 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:15:50:114:485 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:50:212:706 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:15:50:214:648 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:15:50:216:120 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 12:15:50:313:518 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:15:50:315:255 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 12:15:50:413:91 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:15:50:415:92 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:15:50:415:798 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/repeatable-read/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/pg/repeatable-read/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..8d8a7c95 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: pg #### +#### test_type: dda_read_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:50:629:833 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:15:50:631:572 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:50:729:841 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:15:50:732:96 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:15:50:733:643 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:15:50:734:471 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 12:15:50:830:766 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:15:50:835:204 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:15:50:837:336 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:15:50:838:84 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/pg/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..b8a97057 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: pg #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:49:279:222 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 12:15:49:280:964 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:49:379:550 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:15:49:381:644 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:15:49:383:121 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:15:49:385:302 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 12:15:49:480:251 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:15:49:481:44 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-1 12:15:49:482:658 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:15:49:483:338 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/pg/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..4b7fc5d4 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: pg #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:49:694:406 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 12:15:49:696:305 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:49:794:413 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-1 12:15:49:796:266 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-1 12:15:49:797:572 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:15:49:799:434 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 12:15:49:895:384 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:15:49:896:317 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-1 12:15:49:898:28 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:15:49:898:709 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/repeatable-read/rat_dda_write_read_skew.txt b/test_result/centralizend_result/pg/repeatable-read/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..3978abe8 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: pg #### +#### test_type: dda_write_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:44:463:852 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:15:44:465:766 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:44:563:893 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:15:44:565:836 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:15:44:567:666 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 12:15:44:665:220 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:15:44:765:875 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:15:44:865:237 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:15:44:867:354 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:15:44:868:67 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/repeatable-read/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/pg/repeatable-read/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..7dcab273 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: pg #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:45:81:709 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:15:45:83:440 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:45:181:653 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:15:45:183:411 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:15:45:184:822 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:15:45:186:752 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 12:15:45:282:655 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:15:45:284:725 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:15:45:286:590 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:15:45:287:303 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/repeatable-read/rat_mda_step_rat.txt b/test_result/centralizend_result/pg/repeatable-read/rat_mda_step_rat.txt new file mode 100644 index 00000000..bbe0e148 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: pg #### +#### test_type: mda_step_rat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:51:54:73 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:15:51:55:855 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:51:154:124 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:15:51:155:932 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:15:51:157:798 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 12:15:51:254:95 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-1 12:15:51:255:945 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-1 12:15:51:257:800 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-1 12:15:51:355:626 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:15:51:357:595 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 12:15:51:457:314 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:15:51:555:689 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 12:15:51:558:403 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:15:51:559:105 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/repeatable-read/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/pg/repeatable-read/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..90090ad0 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: pg #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2022-4-1 12:15:51:772:701 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-1 12:15:51:775:929 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2022-4-1 12:15:51:875:762 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-1 12:15:51:878:28 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:15:51:972:825 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-1 12:15:51:976:134 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 12:15:51:978:743 + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 12:15:52:72:924 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 12:15:52:74:717 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 12:15:52:174:894 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 12:15:52:274:192 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:15:52:374:464 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 12:15:52:473:257 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:15:52:474:475 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 12:15:52:476:999 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 12:15:52:477:905 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/pg/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..c0139d5d --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: pg #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:52:694:967 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:15:52:696:662 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:52:794:920 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:15:52:796:761 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 12:15:52:798:790 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 12:15:52:894:927 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-1 12:15:52:896:680 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-1 12:15:52:898:876 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-1 12:15:52:996:469 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:15:52:999:908 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 12:15:53:96:543 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:15:53:196:636 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 12:15:53:198:578 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:15:53:199:458 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/pg/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..297f2af5 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: pg #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:53:410:930 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-1 12:15:53:412:642 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:53:511:78 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-1 12:15:53:512:909 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 12:15:53:515:58 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 12:15:53:610:951 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-1 12:15:53:612:751 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-1 12:15:53:614:665 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-1 12:15:53:712:679 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:15:53:714:893 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 12:15:53:812:700 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:15:53:912:467 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 12:15:53:914:817 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:15:53:915:653 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/pg/repeatable-read/rat_sda_dirty_read.txt b/test_result/centralizend_result/pg/repeatable-read/rat_sda_dirty_read.txt new file mode 100644 index 00000000..179e61b6 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: pg #### +#### test_type: sda_dirty_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 13:3:44:536:325 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 13:3:44:538:75 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 13:3:44:636:309 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 13:3:44:638:282 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-1 13:3:44:736:632 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 13:3:44:836:707 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 13:3:44:838:449 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 13:3:44:839:183 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/repeatable-read/rat_sda_intermediate_read.txt b/test_result/centralizend_result/pg/repeatable-read/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..088cffae --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: pg #### +#### test_type: sda_intermediate_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:41:776:895 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:15:41:778:606 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:41:876:697 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 12:15:41:878:827 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-1 12:15:41:977:560 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:15:42:77:77 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:15:42:178:128 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 12:15:42:180:107 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:15:42:180:883 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/repeatable-read/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/pg/repeatable-read/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..fb07dea7 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: pg #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:42:394:92 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:15:42:395:933 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:42:494:92 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 12:15:42:496:65 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:15:42:496:870 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-1 12:15:42:596:356 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:15:42:598:273 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 12:15:42:600:109 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:15:42:600:896 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/repeatable-read/rat_sda_lost_self_update.txt b/test_result/centralizend_result/pg/repeatable-read/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..6011588f --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/rat_sda_lost_self_update.txt @@ -0,0 +1,39 @@ +#### db_type: pg #### +#### test_type: sda_lost_self_update #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:43:645:454 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:15:43:647:213 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:43:745:507 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 12:15:43:846:458 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 12:15:43:848:450 + Q4 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 + Q4 failed at: 2022-4-1 12:15:44:248:807 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/repeatable-read/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/pg/repeatable-read/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..7983b0ec --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: pg #### +#### test_type: sda_non_repeatable_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:41:158:876 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:15:41:160:636 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:41:258:813 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 12:15:41:260:488 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 12:15:41:359:768 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:15:41:463:570 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:15:41:559:318 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 12:15:41:561:72 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:15:41:561:994 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/pg/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..e72ce827 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: pg #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:42:813:447 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 12:15:42:815:274 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:42:913:481 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-1 12:15:42:915:737 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:15:42:917:740 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 12:15:43:14:765 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:15:43:15:637 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-1 12:15:43:17:236 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:15:43:18:29 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/pg/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..0c0bc443 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: pg #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:43:229:385 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 12:15:43:231:178 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:43:329:416 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-1 12:15:43:331:309 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:15:43:333:251 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 12:15:43:430:398 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:15:43:431:340 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-1 12:15:43:432:852 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:15:43:433:545 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/repeatable-read/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/pg/repeatable-read/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..851bff66 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:59:968:10 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:15:59:969:932 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:16:0:67:927 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:16:0:69:724 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 12:16:0:168:801 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:16:0:170:850 + Q5 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 + Q5 failed at: 2022-4-1 12:16:0:671:124 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/repeatable-read/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/pg/repeatable-read/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..39a12099 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,34 @@ +#### db_type: pg #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:55:37:859:67 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:55:37:860:901 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:55:37:958:968 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:55:37:960:861 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected; errcode: 40P01 + Q5 failed at: 2022-4-1 12:55:39:560:236 +Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q6 failed at: 2022-4-1 12:55:58:660:389 + +Test Result: Rollback +Reason: ERROR: deadlock detected; + diff --git a/test_result/centralizend_result/pg/repeatable-read/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/pg/repeatable-read/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..c392e625 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,34 @@ +#### db_type: pg #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:55:58:875:83 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:55:58:876:921 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:55:58:975:92 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:55:58:976:778 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected; errcode: 40P01 + Q5 failed at: 2022-4-1 12:56:0:576:289 +Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q6 failed at: 2022-4-1 12:56:19:676:454 + +Test Result: Rollback +Reason: ERROR: deadlock detected; + diff --git a/test_result/centralizend_result/pg/repeatable-read/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/pg/repeatable-read/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..c6f63bf4 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,34 @@ +#### db_type: pg #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:56:19:892:394 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:56:19:894:354 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:56:19:992:307 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:56:19:994:431 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected; errcode: 40P01 + Q5 failed at: 2022-4-1 12:56:21:594:661 +Q7 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q7 failed at: 2022-4-1 12:56:40:794:692 + +Test Result: Rollback +Reason: ERROR: deadlock detected; + diff --git a/test_result/centralizend_result/pg/repeatable-read/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/pg/repeatable-read/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..d1c06f02 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:17:4:43:547 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:17:4:45:525 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:17:4:143:620 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:17:4:145:653 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:17:4:147:225 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 12:17:4:345:46 +Q6 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 +Q6 failed at: 2022-4-1 12:17:4:945:635 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/repeatable-read/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/pg/repeatable-read/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..b951e23e --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:17:5:160:578 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:17:5:162:389 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:17:5:260:550 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:17:5:262:666 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:17:5:263:996 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:17:5:462:273 +Q6 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 +Q6 failed at: 2022-4-1 12:17:6:62:476 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/repeatable-read/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/pg/repeatable-read/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..1152c0f5 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:17:6:281:827 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:17:6:283:967 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:17:6:382:79 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:17:6:384:254 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 12:17:6:483:101 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:17:6:486:43 + Q5 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 + Q5 failed at: 2022-4-1 12:17:6:986:311 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/repeatable-read/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/pg/repeatable-read/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..1eb4715b --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:17:7:203:614 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:17:7:205:440 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:17:7:303:524 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:17:7:305:364 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 12:17:7:404:475 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:17:7:604:981 + Q5 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 + Q5 failed at: 2022-4-1 12:17:8:105:247 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/repeatable-read/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/pg/repeatable-read/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..983a9f39 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:17:8:324:754 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:17:8:326:586 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:17:8:427:506 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:17:8:429:346 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 12:17:8:525:690 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:17:8:527:967 + Q5 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 + Q5 failed at: 2022-4-1 12:17:9:28:254 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/repeatable-read/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/pg/repeatable-read/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..c4241d60 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/wat_mda_step_wat_c1.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: mda_step_wat_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:56:41:11:774 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:56:41:13:612 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:56:41:111:817 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:56:41:113:663 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 12:56:41:211:924 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 12:56:41:214:80 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q8 failed reason: ERROR: deadlock detected; errcode: 40P01 + Q8 failed at: 2022-4-1 12:56:43:16:166 + Q5 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 + Q5 failed at: 2022-4-1 12:57:1:813:169 +Q9 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q9 failed at: 2022-4-1 12:57:2:213:183 + +Test Result: Rollback +Reason: ERROR: deadlock detected; + diff --git a/test_result/centralizend_result/pg/repeatable-read/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/pg/repeatable-read/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..f8b76bf6 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/wat_mda_step_wat_c2.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: mda_step_wat_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:57:2:431:645 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:57:2:433:507 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:57:2:531:722 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:57:2:533:501 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:57:2:631:779 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 12:57:2:832:895 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q8 failed reason: ERROR: deadlock detected; errcode: 40P01 + Q8 failed at: 2022-4-1 12:57:4:634:754 + Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 + Q6 failed at: 2022-4-1 12:57:23:536:668 +Q9 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q9 failed at: 2022-4-1 12:57:23:836:689 + +Test Result: Rollback +Reason: ERROR: deadlock detected; + diff --git a/test_result/centralizend_result/pg/repeatable-read/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/pg/repeatable-read/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..7eea8458 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: pg #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:54:128:836 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:15:54:130:894 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:54:228:564 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; + Q4 finished at: 2022-4-1 12:15:54:329:217 +Q5 finished at: 2022-4-1 12:15:54:329:213 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:15:54:433:106 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 12:15:54:434:884 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-1 12:15:54:436:955 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:15:54:439:132 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/repeatable-read/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/pg/repeatable-read/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..fc35eb99 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,30 @@ +#### db_type: pg #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:54:652:168 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:15:54:653:994 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:54:755:634 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-1 12:15:54:856:810 + Q4 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 + Q4 failed at: 2022-4-1 12:15:55:257:377 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/repeatable-read/wat_sda_full_write.txt b/test_result/centralizend_result/pg/repeatable-read/wat_sda_full_write.txt new file mode 100644 index 00000000..1d06ff56 --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/wat_sda_full_write.txt @@ -0,0 +1,32 @@ +#### db_type: pg #### +#### test_type: sda_full_write #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:55:472:711 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:15:55:474:704 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:55:572:705 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-1 12:15:55:673:518 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 12:15:55:675:756 + Q4 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 + Q4 failed at: 2022-4-1 12:15:56:76:100 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/repeatable-read/wat_sda_full_write_committed.txt b/test_result/centralizend_result/pg/repeatable-read/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..3fa7c30e --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/wat_sda_full_write_committed.txt @@ -0,0 +1,32 @@ +#### db_type: pg #### +#### test_type: sda_full_write_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:56:293:648 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:15:56:295:780 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:56:393:594 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-1 12:15:56:494:409 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:15:56:496:699 + Q4 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 + Q4 failed at: 2022-4-1 12:15:56:896:921 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/repeatable-read/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/pg/repeatable-read/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..47759c5a --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,39 @@ +#### db_type: pg #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:59:147:961 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:15:59:149:705 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:59:247:951 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 12:15:59:348:888 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:15:59:350:881 + Q4 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 + Q4 failed at: 2022-4-1 12:15:59:751:156 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/repeatable-read/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/pg/repeatable-read/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..a94a0ecc --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/wat_sda_lost_update_c1.txt @@ -0,0 +1,39 @@ +#### db_type: pg #### +#### test_type: sda_lost_update_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:57:110:833 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 12:15:57:113:61 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:57:211:555 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 12:15:57:213:575 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:15:57:413:259 +Q5 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 +Q5 failed at: 2022-4-1 12:15:57:913:583 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/repeatable-read/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/pg/repeatable-read/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..0d1f5f7d --- /dev/null +++ b/test_result/centralizend_result/pg/repeatable-read/wat_sda_lost_update_c2.txt @@ -0,0 +1,39 @@ +#### db_type: pg #### +#### test_type: sda_lost_update_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:15:58:130:714 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 12:15:58:132:564 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:15:58:230:741 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 12:15:58:232:529 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:15:58:432:245 +Q5 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 +Q5 failed at: 2022-4-1 12:15:58:932:533 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/result_summary/read-committed_total-result.txt b/test_result/centralizend_result/pg/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..38745346 --- /dev/null +++ b/test_result/centralizend_result/pg/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/pg/result_summary/read-uncommitted_total-result.txt b/test_result/centralizend_result/pg/result_summary/read-uncommitted_total-result.txt new file mode 100644 index 00000000..38745346 --- /dev/null +++ b/test_result/centralizend_result/pg/result_summary/read-uncommitted_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/pg/result_summary/repeatable-read_total-result.txt b/test_result/centralizend_result/pg/result_summary/repeatable-read_total-result.txt new file mode 100644 index 00000000..45e2cffc --- /dev/null +++ b/test_result/centralizend_result/pg/result_summary/repeatable-read_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Rollback + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Rollback + +wat_sda_full_write: Rollback + +wat_sda_full_write_committed: Rollback + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Rollback + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/pg/result_summary/serializable_total-result.txt b/test_result/centralizend_result/pg/result_summary/serializable_total-result.txt new file mode 100644 index 00000000..4ce755ba --- /dev/null +++ b/test_result/centralizend_result/pg/result_summary/serializable_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Rollback + +rat_dda_write_read_skew: Rollback + +rat_dda_write_read_skew_committed: Rollback + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Rollback + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Rollback + +rat_mda_step_rat_predicate_based_insert: Rollback + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Rollback + +wat_sda_full_write: Rollback + +wat_sda_full_write_committed: Rollback + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Rollback + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Rollback + +iat_dda_write_skew_predicate_based-intersecting_data: Rollback + +iat_dda_write_skew_predicate_based-overdraft_protection: Rollback + +iat_dda_write_skew_committed: Rollback + +iat_mda_step_iat: Rollback + +iat_mda_step_iat_predicate_based_delete: Rollback + +iat_mda_step_iat_predicate_based_insert: Rollback + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Rollback + diff --git a/test_result/centralizend_result/pg/serializable/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/pg/serializable/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..e907fb35 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/iat_dda_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: pg #### +#### test_type: dda_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:19:42:255:370 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:19:42:257:217 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:19:42:355:359 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:19:42:357:161 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:19:42:358:422 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:19:42:360:525 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 12:19:42:456:305 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:19:42:457:339 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:19:42:459:359 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:19:42:460:338 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/serializable/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/pg/serializable/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..dd6d0f59 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:19:42:673:950 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:19:42:675:838 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:19:42:774:35 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:19:42:775:746 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:19:42:777:57 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:19:42:779:145 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 +Q7 failed at: 2022-4-1 12:19:43:576:976 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/serializable/iat_dda_write_skew.txt b/test_result/centralizend_result/pg/serializable/iat_dda_write_skew.txt new file mode 100644 index 00000000..e6bcced0 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/iat_dda_write_skew.txt @@ -0,0 +1,51 @@ +#### db_type: pg #### +#### test_type: dda_write_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:19:43:792:864 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:19:43:794:880 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:19:43:892:846 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:19:43:894:686 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:19:43:896:60 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 12:19:43:993:705 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:19:43:995:870 + Q8-T2 execute opt: 'COMMIT'; + Q8 failed reason: ERROR: could not serialize access due to read/write dependencies among transactions errcode: 40001 + Q8 failed at: 2022-4-1 12:19:44:893:395 + +Test Result: Rollback +ERROR: could not serialize access due to read/write dependencies among transactions + diff --git a/test_result/centralizend_result/pg/serializable/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/pg/serializable/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..a3a4d1fb --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/iat_dda_write_skew_committed.txt @@ -0,0 +1,49 @@ +#### db_type: pg #### +#### test_type: dda_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:19:47:447:347 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:19:47:449:231 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:19:47:547:312 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:19:47:549:56 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:19:47:550:322 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:19:47:552:306 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 failed reason: ERROR: could not serialize access due to read/write dependencies among transactions; errcode: 40001 +Q7 failed at: 2022-4-1 12:19:48:348:527 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to read/write dependencies among transactions; + diff --git a/test_result/centralizend_result/pg/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/pg/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..c13f6216 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,53 @@ +#### db_type: pg #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:19:45:106:110 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-1 12:19:45:108:508 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-1 12:19:45:109:954 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-1 12:19:45:206:112 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-1 12:19:45:208:319 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-1 12:19:45:209:715 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:19:45:211:685 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: ERROR: could not serialize access due to read/write dependencies among transactions errcode: 40001 +Q8 failed at: 2022-4-1 12:19:46:106:465 + +Test Result: Rollback +ERROR: could not serialize access due to read/write dependencies among transactions + diff --git a/test_result/centralizend_result/pg/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/pg/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..81e32681 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,49 @@ +#### db_type: pg #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:19:46:328:845 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-1 12:19:46:331:767 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:19:46:428:774 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-1 12:19:46:431:529 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-1 12:19:46:433:712 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:19:46:435:592 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 failed reason: ERROR: could not serialize access due to read/write dependencies among transactions; errcode: 40001 +Q7 failed at: 2022-4-1 12:19:47:230:914 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to read/write dependencies among transactions; + diff --git a/test_result/centralizend_result/pg/serializable/iat_mda_step_iat.txt b/test_result/centralizend_result/pg/serializable/iat_mda_step_iat.txt new file mode 100644 index 00000000..b61a3fa8 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/iat_mda_step_iat.txt @@ -0,0 +1,91 @@ +#### db_type: pg #### +#### test_type: mda_step_iat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:19:48:565:498 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 12:19:48:568:11 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:19:48:665:469 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 12:19:48:667:741 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:19:48:765:475 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 12:19:48:767:738 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-1 12:19:48:866:944 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 12:19:48:966:727 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-1 12:19:49:68:919 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:19:49:166:942 + Q11-T2 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:19:49:367:765 + Q11 failed reason: ERROR: could not serialize access due to read/write dependencies among transactions errcode: 40001 + Q11 failed at: 2022-4-1 12:19:50:366:27 + +Test Result: Rollback +ERROR: could not serialize access due to read/write dependencies among transactions + diff --git a/test_result/centralizend_result/pg/serializable/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/pg/serializable/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..d97c6b28 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:19:56:64:829 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:19:56:67:38 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:19:56:165:592 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 12:19:56:167:468 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:19:56:170:176 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 12:19:56:264:982 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 12:19:56:267:460 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 12:19:56:269:48 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:19:56:271:275 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-1 12:19:56:368:859 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 12:19:56:370:198 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-1 12:19:56:372:615 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 12:19:56:373:550 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/serializable/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/pg/serializable/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..a3f2fe0b --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,209 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:19:55:337:133 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:19:55:344:108 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:19:55:438:51 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:19:55:441:397 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:19:55:537:248 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-1 12:19:55:539:937 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:19:55:543:367 + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 12:19:55:638:107 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 12:19:55:640:468 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:19:55:643:87 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-1 12:19:55:741:952 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:19:55:743:121 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-1 12:19:55:842:251 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-1 12:19:55:843:603 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 12:19:55:847:606 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 12:19:55:848:483 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/serializable/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/pg/serializable/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..4b4ddf7b --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,91 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:19:50:581:675 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-1 12:19:50:584:115 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:19:50:681:686 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 12:19:50:683:888 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:19:50:787:605 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 12:19:50:789:859 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-1 12:19:50:882:485 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-1 12:19:50:982:639 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-1 12:19:51:85:338 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:19:51:183:467 + Q11-T2 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:19:51:383:443 + Q11 failed reason: ERROR: could not serialize access due to read/write dependencies among transactions errcode: 40001 + Q11 failed at: 2022-4-1 12:19:52:382:536 + +Test Result: Rollback +ERROR: could not serialize access due to read/write dependencies among transactions + diff --git a/test_result/centralizend_result/pg/serializable/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/pg/serializable/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..338223ae --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,89 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:19:52:594:378 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 12:19:52:596:658 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:19:52:694:325 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-1 12:19:52:696:426 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:19:52:794:387 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-1 12:19:52:796:524 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-1 12:19:52:895:328 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-1 12:19:52:996:319 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-1 12:19:53:95:303 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:19:53:196:228 + Q11-T2 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; + Q11 failed reason: ERROR: could not serialize access due to read/write dependencies among transactions errcode: 40001 + Q11 failed at: 2022-4-1 12:19:54:394:961 + Q12 failed reason: ERROR: could not serialize access due to read/write dependencies among transactions errcode: 40001 + Q12 failed at: 2022-4-1 12:19:54:595:410 + +Test Result: Rollback +ERROR: could not serialize access due to read/write dependencies among transactions + diff --git a/test_result/centralizend_result/pg/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/pg/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..1859a146 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,120 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:19:56:590:83 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 12:19:56:592:434 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-1 12:19:56:594:199 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-1 12:19:56:690:0 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-1 12:19:56:692:379 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-1 12:19:56:693:863 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:19:56:696:302 + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 12:19:56:790:89 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-1 12:19:56:792:498 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 12:19:56:794:368 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 12:19:56:795:298 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 failed reason: ERROR: could not serialize access due to read/write dependencies among transactions; errcode: 40001 +Q12 failed at: 2022-4-1 12:19:58:92:536 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to read/write dependencies among transactions; + diff --git a/test_result/centralizend_result/pg/serializable/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/pg/serializable/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..26627ee1 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,164 @@ +#### db_type: pg #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:19:54:814:159 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-1 12:19:54:816:573 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:19:54:915:757 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-1 12:19:54:918:245 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:19:54:919:965 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 12:19:54:921:773 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-1 12:19:54:923:462 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 12:19:54:925:701 + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2022-4-1 12:19:55:14:886 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-1 12:19:55:18:941 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-1 12:19:55:20:670 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-1 12:19:55:22:731 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-1 12:19:55:24:250 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:19:55:26:245 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-1 12:19:55:116:576 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-1 12:19:55:117:618 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-1 12:19:55:120:85 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-1 12:19:55:121:22 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/serializable/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/pg/serializable/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..dc7e895f --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/iat_sda_lost_update_committed.txt @@ -0,0 +1,39 @@ +#### db_type: pg #### +#### test_type: sda_lost_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:19:41:237:914 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 12:19:41:239:725 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:19:41:337:484 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 12:19:41:339:386 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:19:41:341:160 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 +Q6 failed at: 2022-4-1 12:19:42:39:534 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/serializable/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/pg/serializable/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..bc9a59d5 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: pg #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:19:40:811:445 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:19:40:813:466 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:19:40:911:520 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 12:19:40:913:555 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:19:40:915:855 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 12:19:41:12:429 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:19:41:13:414 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 12:19:41:15:829 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:19:41:16:881 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:19:41:17:855 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/serializable/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/pg/serializable/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..e1aac0ed --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/rat_dda_double_write_skew1.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: dda_double_write_skew1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:9:35:589 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:18:9:37:507 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:9:135:551 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:18:9:137:546 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:18:9:139:125 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:18:9:337:264 +Q6 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 +Q6 failed at: 2022-4-1 12:18:9:937:613 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/serializable/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/pg/serializable/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..abe70179 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:10:154:65 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:18:10:155:984 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:10:253:878 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:18:10:255:716 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:18:10:257:227 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:18:10:259:89 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 failed reason: ERROR: could not serialize access due to read/write dependencies among transactions; errcode: 40001 +Q7 failed at: 2022-4-1 12:18:11:55:100 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to read/write dependencies among transactions; + diff --git a/test_result/centralizend_result/pg/serializable/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/pg/serializable/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..0b524ea3 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/rat_dda_double_write_skew2.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: dda_double_write_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:11:272:556 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:18:11:274:789 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:11:372:260 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:18:11:374:267 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 12:18:11:473:347 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:18:11:475:628 + Q5 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 + Q5 failed at: 2022-4-1 12:18:11:975:992 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/serializable/rat_dda_read_skew.txt b/test_result/centralizend_result/pg/serializable/rat_dda_read_skew.txt new file mode 100644 index 00000000..3f0a89d3 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: pg #### +#### test_type: dda_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:12:192:188 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:18:12:194:398 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:12:295:536 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:18:12:297:286 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:18:12:298:592 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 12:18:12:392:734 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:18:12:497:229 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:18:12:592:240 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:18:12:594:361 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:18:12:595:88 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/serializable/rat_dda_read_skew2.txt b/test_result/centralizend_result/pg/serializable/rat_dda_read_skew2.txt new file mode 100644 index 00000000..164c947f --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: pg #### +#### test_type: dda_read_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:13:649:454 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:18:13:651:140 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:13:749:543 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:18:13:751:509 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:18:13:753:138 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 12:18:13:850:300 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:18:13:852:244 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 12:18:13:949:756 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:18:13:951:798 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:18:13:952:560 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/serializable/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/pg/serializable/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..adb75a8c --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: pg #### +#### test_type: dda_read_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:14:167:354 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:18:14:169:194 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:14:267:308 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:18:14:269:207 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:18:14:270:614 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:18:14:271:381 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 12:18:14:368:120 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:18:14:370:45 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 12:18:14:371:951 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:18:14:372:687 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/serializable/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/pg/serializable/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..a8b5f42c --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: pg #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:12:808:849 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 12:18:12:810:762 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:12:908:897 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:18:12:910:575 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:18:12:911:874 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:18:12:913:689 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 12:18:13:9:898 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:18:13:10:721 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-1 12:18:13:12:376 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:18:13:13:86 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/serializable/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/pg/serializable/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..d310e138 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: pg #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:13:225:426 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 12:18:13:227:413 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:13:325:497 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-1 12:18:13:327:433 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-1 12:18:13:328:677 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:18:13:330:725 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 12:18:13:428:748 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:18:13:430:23 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-1 12:18:13:432:390 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 12:18:13:433:220 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/serializable/rat_dda_write_read_skew.txt b/test_result/centralizend_result/pg/serializable/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..aa4bede4 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/rat_dda_write_read_skew.txt @@ -0,0 +1,51 @@ +#### db_type: pg #### +#### test_type: dda_write_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:6:501:356 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:18:6:503:53 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:6:601:347 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:18:6:603:166 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:18:6:604:500 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 12:18:6:702:312 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:18:6:802:775 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: ERROR: could not serialize access due to read/write dependencies among transactions errcode: 40001 +Q8 failed at: 2022-4-1 12:18:7:701:797 + +Test Result: Rollback +ERROR: could not serialize access due to read/write dependencies among transactions + diff --git a/test_result/centralizend_result/pg/serializable/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/pg/serializable/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..76ee9dd9 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:7:916:260 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:18:7:918:244 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:8:16:243 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:18:8:18:548 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:18:8:20:34 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:18:8:21:767 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q7 failed reason: ERROR: could not serialize access due to read/write dependencies among transactions; errcode: 40001 +Q7 failed at: 2022-4-1 12:18:8:817:371 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to read/write dependencies among transactions; + diff --git a/test_result/centralizend_result/pg/serializable/rat_mda_step_rat.txt b/test_result/centralizend_result/pg/serializable/rat_mda_step_rat.txt new file mode 100644 index 00000000..ab8c38a8 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/rat_mda_step_rat.txt @@ -0,0 +1,91 @@ +#### db_type: pg #### +#### test_type: mda_step_rat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:14:588:520 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:18:14:590:366 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:14:688:451 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:18:14:690:303 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 12:18:14:692:159 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 12:18:14:791:471 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-1 12:18:14:793:409 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-1 12:18:14:795:66 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-1 12:18:14:890:143 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:18:14:892:360 + Q11-T2 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:18:15:90:427 + Q11 failed reason: ERROR: could not serialize access due to read/write dependencies among transactions errcode: 40001 + Q11 failed at: 2022-4-1 12:18:16:89:424 + +Test Result: Rollback +ERROR: could not serialize access due to read/write dependencies among transactions + diff --git a/test_result/centralizend_result/pg/serializable/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/pg/serializable/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..33cbedcc --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: pg #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2022-4-1 12:18:16:306:608 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-1 12:18:16:309:793 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2022-4-1 12:18:16:409:244 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-1 12:18:16:411:323 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:18:16:506:540 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-1 12:18:16:509:455 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 12:18:16:512:26 + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-1 12:18:16:606:595 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 12:18:16:608:428 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 12:18:16:709:857 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 12:18:16:808:248 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:18:16:908:256 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 12:18:17:7:156 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 12:18:17:8:384 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 12:18:17:11:167 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 12:18:17:12:30 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/serializable/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/pg/serializable/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..569de27c --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,91 @@ +#### db_type: pg #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:17:228:73 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:18:17:230:43 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:17:328:69 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:18:17:330:494 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 12:18:17:333:242 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 12:18:17:428:119 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-1 12:18:17:429:988 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-1 12:18:17:432:49 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-1 12:18:17:529:808 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:18:17:531:999 + Q11-T2 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:18:17:729:563 + Q11 failed reason: ERROR: could not serialize access due to read/write dependencies among transactions errcode: 40001 + Q11 failed at: 2022-4-1 12:18:18:728:807 + +Test Result: Rollback +ERROR: could not serialize access due to read/write dependencies among transactions + diff --git a/test_result/centralizend_result/pg/serializable/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/pg/serializable/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..b102cd0b --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,88 @@ +#### db_type: pg #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:18:941:403 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-1 12:18:18:943:211 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:19:42:20 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-1 12:18:19:44:244 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 12:18:19:46:368 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 12:18:19:141:575 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-1 12:18:19:143:463 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-1 12:18:19:145:726 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-1 12:18:19:242:844 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 12:18:19:244:901 + Q11-T2 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 12:18:19:443:75 + Q11 failed reason: ERROR: could not serialize access due to read/write dependencies among transactions errcode: 40001 + Q11 failed at: 2022-4-1 12:18:20:441:907 + +Test Result: Rollback +ERROR: could not serialize access due to read/write dependencies among transactions + diff --git a/test_result/centralizend_result/pg/serializable/rat_sda_dirty_read.txt b/test_result/centralizend_result/pg/serializable/rat_sda_dirty_read.txt new file mode 100644 index 00000000..b6cf8f52 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: pg #### +#### test_type: sda_dirty_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 13:3:45:104:502 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 13:3:45:106:498 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 13:3:45:204:607 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 13:3:45:207:41 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-1 13:3:45:304:858 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 13:3:45:404:961 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 13:3:45:406:637 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 13:3:45:407:336 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/serializable/rat_sda_intermediate_read.txt b/test_result/centralizend_result/pg/serializable/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..cfcee4de --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: pg #### +#### test_type: sda_intermediate_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:3:799:768 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:18:3:801:688 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:3:899:615 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 12:18:3:901:920 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-1 12:18:4:0:589 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:18:4:99:955 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:18:4:201:92 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 12:18:4:202:765 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:18:4:203:398 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/serializable/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/pg/serializable/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..748f79f4 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: pg #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:4:416:255 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:18:4:418:204 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:4:516:223 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 12:18:4:518:334 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:18:4:519:88 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-1 12:18:4:617:198 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:18:4:619:100 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 12:18:4:620:860 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:18:4:621:549 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/serializable/rat_sda_lost_self_update.txt b/test_result/centralizend_result/pg/serializable/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..9cfff7e6 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/rat_sda_lost_self_update.txt @@ -0,0 +1,39 @@ +#### db_type: pg #### +#### test_type: sda_lost_self_update #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:5:669:28 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:18:5:670:979 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:5:768:830 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 12:18:5:870:282 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 12:18:5:872:480 + Q4 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 + Q4 failed at: 2022-4-1 12:18:6:272:859 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/serializable/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/pg/serializable/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..b98214ae --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: pg #### +#### test_type: sda_non_repeatable_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:3:183:195 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:18:3:185:482 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:3:282:451 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 12:18:3:284:496 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 12:18:3:383:206 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:18:3:485:12 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:18:3:583:89 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 12:18:3:585:268 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:18:3:586:152 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/pg/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..33de4c21 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: pg #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:4:834:777 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 12:18:4:836:838 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:4:934:829 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-1 12:18:4:936:893 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:18:4:938:949 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 12:18:5:35:863 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:18:5:36:899 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-1 12:18:5:39:127 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:18:5:39:820 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/pg/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..b980154e --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: pg #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:5:252:587 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 12:18:5:254:456 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:5:352:647 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-1 12:18:5:354:753 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 12:18:5:356:672 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 12:18:5:453:483 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:18:5:454:387 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-1 12:18:5:456:21 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:18:5:456:638 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/serializable/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/pg/serializable/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..ea5e1c4b --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:26:495:625 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:18:26:497:565 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:26:595:559 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 12:18:26:597:501 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 12:18:26:696:544 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:18:26:698:639 + Q5 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 + Q5 failed at: 2022-4-1 12:18:27:198:974 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/serializable/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/pg/serializable/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..83799da8 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,34 @@ +#### db_type: pg #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:57:24:114:715 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:57:24:116:500 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:57:24:214:548 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:57:24:216:502 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected; errcode: 40P01 + Q5 failed at: 2022-4-1 12:57:25:820:668 +Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q6 failed at: 2022-4-1 12:57:44:920:568 + +Test Result: Rollback +Reason: ERROR: deadlock detected; + diff --git a/test_result/centralizend_result/pg/serializable/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/pg/serializable/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..624563a8 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,34 @@ +#### db_type: pg #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:57:45:134:956 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:57:45:136:766 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:57:45:235:116 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:57:45:237:168 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected; errcode: 40P01 + Q5 failed at: 2022-4-1 12:57:46:836:208 +Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q6 failed at: 2022-4-1 12:58:5:936:430 + +Test Result: Rollback +Reason: ERROR: deadlock detected; + diff --git a/test_result/centralizend_result/pg/serializable/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/pg/serializable/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..07db5dc3 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,34 @@ +#### db_type: pg #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:58:6:150:297 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:58:6:152:25 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:58:6:250:345 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:58:6:252:140 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected; errcode: 40P01 + Q5 failed at: 2022-4-1 12:58:7:851:746 +Q7 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q7 failed at: 2022-4-1 12:58:27:51:773 + +Test Result: Rollback +Reason: ERROR: deadlock detected; + diff --git a/test_result/centralizend_result/pg/serializable/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/pg/serializable/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..cb9644f6 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:52:579:381 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:18:52:581:524 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:52:679:335 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:18:52:681:365 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:18:52:682:862 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 12:18:52:881:91 +Q6 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 +Q6 failed at: 2022-4-1 12:18:53:481:668 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/serializable/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/pg/serializable/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..b81af9f7 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:53:696:341 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 12:18:53:698:253 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:53:796:329 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:18:53:798:158 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 12:18:53:799:472 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:18:53:997:820 +Q6 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 +Q6 failed at: 2022-4-1 12:18:54:598:97 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/serializable/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/pg/serializable/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..1b3de099 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:54:814:157 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:18:54:816:36 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:54:914:178 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:18:54:916:251 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 12:18:55:15:78 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:18:55:17:223 + Q5 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 + Q5 failed at: 2022-4-1 12:18:55:517:497 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/serializable/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/pg/serializable/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..81859971 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:55:735:988 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:18:55:737:756 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:55:835:988 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:18:55:837:880 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 12:18:55:940:477 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:18:56:137:595 + Q5 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 + Q5 failed at: 2022-4-1 12:18:56:638:102 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/serializable/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/pg/serializable/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..c9cb0b5a --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:56:853:14 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:18:56:854:855 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:56:952:920 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 12:18:56:954:754 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 12:18:57:53:830 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 12:18:57:59:747 + Q5 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 + Q5 failed at: 2022-4-1 12:18:57:560:24 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/serializable/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/pg/serializable/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..ad52d9ac --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/wat_mda_step_wat_c1.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: mda_step_wat_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:58:27:274:890 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:58:27:277:17 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:58:27:371:941 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:58:27:373:948 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-1 12:58:27:471:960 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 12:58:27:474:121 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q8 failed reason: ERROR: deadlock detected; errcode: 40P01 + Q8 failed at: 2022-4-1 12:58:29:276:14 + Q5 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 + Q5 failed at: 2022-4-1 12:58:48:73:265 +Q9 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q9 failed at: 2022-4-1 12:58:48:473:207 + +Test Result: Rollback +Reason: ERROR: deadlock detected; + diff --git a/test_result/centralizend_result/pg/serializable/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/pg/serializable/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..fab18761 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/wat_mda_step_wat_c2.txt @@ -0,0 +1,42 @@ +#### db_type: pg #### +#### test_type: mda_step_wat_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:58:48:689:954 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:58:48:691:849 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:58:48:789:791 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 12:58:48:791:675 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-1 12:58:48:889:780 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 12:58:49:90:900 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q8 failed reason: ERROR: deadlock detected; errcode: 40P01 + Q8 failed at: 2022-4-1 12:58:50:892:628 + Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 + Q6 failed at: 2022-4-1 12:59:9:791:304 +Q9 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q9 failed at: 2022-4-1 12:59:10:91:493 + +Test Result: Rollback +Reason: ERROR: deadlock detected; + diff --git a/test_result/centralizend_result/pg/serializable/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/pg/serializable/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..b9ff8db4 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: pg #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:20:656:745 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:18:20:658:957 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:20:756:840 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-1 12:18:20:859:907 + Q4 finished at: 2022-4-1 12:18:20:860:270 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:18:20:957:962 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 12:18:20:959:677 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-1 12:18:20:961:551 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 12:18:20:963:620 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/pg/serializable/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/pg/serializable/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..6cce67d6 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,30 @@ +#### db_type: pg #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:21:178:854 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:18:21:180:759 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:21:278:762 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-1 12:18:21:383:574 + Q4 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 + Q4 failed at: 2022-4-1 12:18:21:783:892 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/serializable/wat_sda_full_write.txt b/test_result/centralizend_result/pg/serializable/wat_sda_full_write.txt new file mode 100644 index 00000000..f1fa0e1e --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/wat_sda_full_write.txt @@ -0,0 +1,32 @@ +#### db_type: pg #### +#### test_type: sda_full_write #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:22:1:497 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:18:22:3:331 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:22:101:415 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-1 12:18:22:202:313 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 12:18:22:204:411 + Q4 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 + Q4 failed at: 2022-4-1 12:18:22:604:681 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/serializable/wat_sda_full_write_committed.txt b/test_result/centralizend_result/pg/serializable/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..f9952420 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/wat_sda_full_write_committed.txt @@ -0,0 +1,32 @@ +#### db_type: pg #### +#### test_type: sda_full_write_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:22:819:230 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:18:22:820:975 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:22:919:308 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-1 12:18:23:20:184 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:18:23:22:121 + Q4 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 + Q4 failed at: 2022-4-1 12:18:23:422:482 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/serializable/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/pg/serializable/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..7e7f4871 --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,39 @@ +#### db_type: pg #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:25:676:447 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 12:18:25:678:209 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:25:776:483 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 12:18:25:877:369 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 12:18:25:879:329 + Q4 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 + Q4 failed at: 2022-4-1 12:18:26:279:617 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/serializable/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/pg/serializable/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..c845f7ae --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/wat_sda_lost_update_c1.txt @@ -0,0 +1,39 @@ +#### db_type: pg #### +#### test_type: sda_lost_update_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:23:640:864 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 12:18:23:642:988 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:23:741:78 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 12:18:23:743:296 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 12:18:23:942:892 +Q5 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 +Q5 failed at: 2022-4-1 12:18:24:443:168 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/pg/serializable/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/pg/serializable/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..16afd40d --- /dev/null +++ b/test_result/centralizend_result/pg/serializable/wat_sda_lost_update_c2.txt @@ -0,0 +1,39 @@ +#### db_type: pg #### +#### test_type: sda_lost_update_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-1 12:18:24:658:773 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 12:18:24:660:538 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-1 12:18:24:758:794 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 12:18:24:760:658 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 12:18:24:961:172 +Q5 failed reason: ERROR: could not serialize access due to concurrent update; errcode: 40001 +Q5 failed at: 2022-4-1 12:18:25:461:397 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update; + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..dcd30011 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_dda_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew_committed #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:14:20:676:897 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 15:14:20:719:478 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:14:20:776:931 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 15:14:20:816:700 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 15:14:20:855:348 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q6 finished at: 2022-4-2 15:14:20:900:937 + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 15:14:20:918:15 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 15:14:20:959:369 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 15:14:20:997:712 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:14:21:34:624 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..acae42c8 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:14:21:463:643 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 15:14:21:506:299 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:14:21:563:401 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 15:14:21:603:475 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 15:14:21:642:115 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q6 finished at: 2022-4-2 15:14:21:688:259 +Q7 finished at: 2022-4-2 15:14:21:704:283 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 15:14:21:753:956 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 15:14:21:792:212 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:14:21:829:19 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/iat_dda_write_skew.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_dda_write_skew.txt new file mode 100644 index 00000000..0265ff07 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:14:22:247:950 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 15:14:22:290:656 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:14:22:348:4 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 15:14:22:386:854 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 15:14:22:426:529 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 15:14:22:489:141 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:14:22:539:412 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 15:14:22:596:573 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 15:14:22:635:32 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 15:14:22:671:794 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..bbff1fa4 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew_committed #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:14:24:835:511 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 15:14:24:878:231 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:14:24:935:614 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 15:14:24:974:522 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 15:14:25:14:645 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q6 finished at: 2022-4-2 15:14:25:62:465 +Q7 finished at: 2022-4-2 15:14:25:76:630 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 15:14:25:128:28 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 15:14:25:166:392 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:14:25:203:309 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..1d14cba4 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,74 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:14:23:179:382 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-2 15:14:23:232:180 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-2 15:14:23:273:860 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-2 15:14:23:279:117 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' +Q8-T1 execute opt: 'COMMIT'; + current_result: + (330,) + *(1) expected_result: + (330,) + (2) expected_result: + (300,) + + Q5 finished at: 2022-4-2 15:14:23:425:396 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' +Q8 finished at: 2022-4-2 15:14:23:427:903 + Q6 finished at: 2022-4-2 15:14:23:464:109 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 15:14:23:510:227 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-2 15:14:23:548:318 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-2 15:14:23:585:877 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 15:14:23:622:816 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..d6bc77f6 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:14:24:46:73 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-2 15:14:24:102:464 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:14:24:146:26 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-2 15:14:24:185:143 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-2 15:14:24:225:721 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' + Q6 finished at: 2022-4-2 15:14:24:271:758 +Q7 finished at: 2022-4-2 15:14:24:287:880 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 15:14:24:340:621 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-2 15:14:24:378:867 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:14:24:415:671 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/iat_mda_step_iat.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_mda_step_iat.txt new file mode 100644 index 00000000..779ada60 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:14:25:665:548 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 15:14:25:708:431 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:14:25:765:824 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 15:14:25:805:451 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 15:14:25:865:579 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 15:14:25:903:475 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-2 15:14:26:7:711 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-2 15:14:26:105:636 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-2 15:14:26:202:261 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 15:14:26:323:465 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 15:14:26:411:980 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 15:14:26:507:832 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 15:14:26:552:766 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 15:14:26:595:775 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..c86062f1 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,106 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:14:31:741:622 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 15:14:31:784:598 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:14:31:841:606 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 15:14:31:881:296 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 15:14:31:934:613 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 15:14:31:941:875 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 15:14:31:980:2 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-2 15:14:32:17:351 + Q9-T3 execute opt: 'COMMIT'; +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q9 finished at: 2022-4-2 15:14:32:62:607 + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2022-4-2 15:14:32:83:61 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-2 15:14:32:124:572 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-2 15:14:32:169:570 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 15:14:32:212:970 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..bab073cd --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,207 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:14:30:692:265 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 15:14:30:736:238 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:14:30:794:947 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 15:14:30:835:8 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 15:14:30:892:278 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-2 15:14:30:930:849 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 15:14:30:978:894 + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 15:14:30:994:708 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-2 15:14:31:38:519 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:14:31:92:122 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-4-2 15:14:31:134:810 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 15:14:31:173:97 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-2 15:14:31:234:264 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-2 15:14:31:275:817 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-2 15:14:31:315:561 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-2 15:14:31:316:482 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..0fc1b1df --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:14:27:62:270 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-2 15:14:27:106:355 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:14:27:162:132 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 15:14:27:201:35 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 15:14:27:262:241 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 15:14:27:299:900 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-2 15:14:27:403:909 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-2 15:14:27:500:306 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-2 15:14:27:600:223 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 15:14:27:708:813 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 15:14:27:814:468 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 15:14:27:903:556 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-2 15:14:27:948:259 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 15:14:27:991:300 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..d3ab8570 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:14:28:330:5 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 15:14:28:373:188 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:14:28:430:112 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-2 15:14:28:469:566 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 15:14:28:529:763 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-2 15:14:28:567:667 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-2 15:14:28:671:471 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-2 15:14:28:767:860 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-2 15:14:28:868:673 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 15:14:28:978:959 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 15:14:29:77:949 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 15:14:29:183:83 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 15:14:29:228:36 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 15:14:29:271:114 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..9bbb5f83 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:14:32:636:132 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 15:14:32:679:196 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-2 15:14:32:721:395 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-2 15:14:32:735:702 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-2 15:14:32:774:817 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-2 15:14:32:814:561 + Q7-T2 execute opt: 'COMMIT'; + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 15:14:32:838:262 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q7 finished at: 2022-4-2 15:14:32:868:59 + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-2 15:14:32:875:879 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 15:14:32:913:629 + Q11-T3 execute opt: 'COMMIT'; +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' + Q11 finished at: 2022-4-2 15:14:32:950:595 +Q12 finished at: 2022-4-2 15:14:32:977:405 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-2 15:14:33:33:254 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-2 15:14:33:71:964 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-2 15:14:33:108:941 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..fb853aa3 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,162 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:14:29:736:404 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-2 15:14:29:779:714 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:14:29:836:302 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-2 15:14:29:875:813 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 15:14:29:915:950 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2022-4-2 15:14:29:936:184 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 15:14:29:955:118 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-2 15:14:29:974:7 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-2 15:14:29:993:824 + Q8-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 15:14:30:11:407 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + Q8 finished at: 2022-4-2 15:14:30:50:278 + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-2 15:14:30:52:411 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-2 15:14:30:89:696 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 15:14:30:136:621 + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2022-4-2 15:14:30:138:414 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-2 15:14:30:179:865 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-2 15:14:30:225:61 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-2 15:14:30:268:285 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..c378cb0f --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_update_committed #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:14:19:887:367 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 15:14:19:929:929 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:14:19:987:714 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 15:14:20:27:630 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 15:14:20:74:554 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-2 15:14:20:128:455 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:14:20:183:85 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 15:14:20:221:24 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 15:14:20:257:786 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..48764b43 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,60 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:14:19:144:782 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 15:14:19:187:589 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:14:19:244:762 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 15:14:19:284:606 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 15:14:19:332:225 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 15:14:19:388:484 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:14:19:429:755 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 15:14:19:467:933 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 15:14:19:504:823 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:14:19:505:875 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..e09e1e11 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_double_write_skew1.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew1 #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:23:972:968 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:13:24:15:900 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:24:72:426 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 15:13:24:111:107 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 15:13:25:310:48 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 15:13:25:358:783 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 15:13:25:912:665 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..196289b5 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:26:375:904 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:13:26:419:339 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:26:475:294 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 15:13:26:514:209 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 15:13:27:185:826 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 15:13:27:232:178 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 15:13:27:888:55 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..2558f82d --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_double_write_skew2.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew2 #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:28:349:944 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:13:28:392:660 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:28:449:908 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 15:13:28:488:672 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-2 15:13:29:60:835 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 15:13:29:107:566 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 15:13:29:663:695 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_read_skew.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_read_skew.txt new file mode 100644 index 00000000..d17d7188 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:30:142:773 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 15:13:30:185:447 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:30:242:715 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 15:13:30:282:215 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 15:13:30:320:986 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 15:13:30:489:84 + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 15:13:30:492:0 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 15:13:30:583:286 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 15:13:30:621:874 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:13:30:622:638 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_read_skew2.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_read_skew2.txt new file mode 100644 index 00000000..7daa8f83 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_read_skew2.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew2 #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:32:452:459 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:13:32:495:148 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:32:552:225 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 15:13:32:591:753 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 15:13:32:693:357 +Q7-T1 execute opt: 'COMMIT'; + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 15:13:32:740:69 +Q7 finished at: 2022-4-2 15:13:32:742:429 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 15:13:32:792:582 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 15:13:32:830:915 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:13:32:831:708 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..af92d858 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_read_skew2_committed.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew2_committed #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:33:251:362 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:13:33:293:987 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:33:351:369 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 15:13:33:390:913 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 15:13:33:492:599 +Q8-T1 execute opt: 'COMMIT'; + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 15:13:33:539:5 + Q6-T2 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 15:13:33:541:364 + Q6 finished at: 2022-4-2 15:13:33:577:49 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 15:13:33:615:486 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:13:33:616:267 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..39865a16 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:31:42:844 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 15:13:31:94:532 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:31:142:890 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-2 15:13:31:182:323 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-2 15:13:31:221:75 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + Q6 finished at: 2022-4-2 15:13:31:272:127 + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 15:13:31:283:809 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 15:13:31:324:881 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-2 15:13:31:363:253 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:13:31:363:957 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..62521231 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,59 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:31:699:608 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 15:13:31:742:391 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:31:799:754 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-2 15:13:31:839:379 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-2 15:13:31:878:29 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + Q6 finished at: 2022-4-2 15:13:31:946:795 + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 15:13:31:949:918 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 15:13:31:990:987 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-2 15:13:32:29:264 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:13:32:30:116 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_write_read_skew.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..282bb578 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_write_read_skew.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_read_skew #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:16:897:504 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:13:16:940:127 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:16:997:550 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 15:13:17:36:221 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 15:13:17:808:886 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 15:13:17:853:67 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 15:13:18:411:567 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..be8b756a --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:18:874:68 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:13:18:916:898 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:18:974:62 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 15:13:19:12:771 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 15:13:22:809:517 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 15:13:22:854:725 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 15:13:23:512:82 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/rat_mda_step_rat.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_mda_step_rat.txt new file mode 100644 index 00000000..b89edd83 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_mda_step_rat.txt @@ -0,0 +1,74 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:34:78:497 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:13:34:121:293 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:34:178:580 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 15:13:34:217:295 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 15:13:34:314:630 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-2 15:13:34:352:209 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 15:13:34:688:97 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 15:13:34:737:127 + current_result: + (1,1) + *(1) expected_result: + (1,1) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q8 finished at: 2022-4-2 15:13:34:739:386 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 15:13:34:785:674 +Q9 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q9 failed at: 2022-4-2 15:13:35:590:46 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..41521eab --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,207 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2022-4-2 15:13:36:98:382 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-2 15:13:36:143:783 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2022-4-2 15:13:36:156:290 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-2 15:13:36:199:134 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 15:13:36:256:240 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-2 15:13:36:294:893 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 15:13:36:356:369 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-2 15:13:36:395:153 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q11-T1 execute opt: 'COMMIT'; + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + *(5) expected_result: + (0,1) + (6) expected_result: + (0,0) + *(7) expected_result: + (0,1) + *(8) expected_result: + (0,1) + *(9) expected_result: + (0,1) + (10) expected_result: + (0,0) + (11) expected_result: + (0,0) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + (14) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 15:13:36:603:962 +Q11 finished at: 2022-4-2 15:13:36:604:219 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 15:13:36:701:467 + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + (3) expected_result: + (1,0) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + *(6) expected_result: + (1,1) + (7) expected_result: + (1,0) + *(8) expected_result: + (1,1) + *(9) expected_result: + (1,1) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + (12) expected_result: + (1,0) + (13) expected_result: + (1,0) + (14) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 15:13:36:706:136 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 15:13:36:792:409 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 15:13:36:835:619 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-2 15:13:36:880:796 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-2 15:13:36:923:820 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..699dcf39 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,74 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:37:393:43 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:13:37:435:812 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:37:492:857 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-2 15:13:37:531:559 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 15:13:37:592:996 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-2 15:13:37:630:751 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 15:13:39:688:311 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 15:13:39:750:832 + current_result: + (,) + *(1) expected_result: + (,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q8 finished at: 2022-4-2 15:13:39:752:970 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 15:13:39:800:856 +Q9 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q9 failed at: 2022-4-2 15:13:40:590:607 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..9cf20e1b --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,71 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:40:972:289 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-2 15:13:41:14:882 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:41:71:904 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-2 15:13:41:111:6 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 15:13:41:172:488 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-2 15:13:41:210:44 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-2 15:13:42:191:603 +Q10-T1 execute opt: 'COMMIT'; + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 15:13:42:236:518 + Q11-T2 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 15:13:42:238:606 + Q11 finished at: 2022-4-2 15:13:42:287:52 + Q8 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 53) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q8 failed at: 2022-4-2 15:13:42:990:170 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 53) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/rat_sda_dirty_read.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_sda_dirty_read.txt new file mode 100644 index 00000000..56945a45 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: sqlserver #### +#### test_type: sda_dirty_read #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:11:493:346 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:13:11:536:92 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:11:592:313 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' +Q5-T1 execute opt: 'ROLLBACK'; + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 15:13:11:693:564 +Q5 finished at: 2022-4-2 15:13:11:695:997 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 15:13:11:790:42 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 15:13:11:827:959 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 15:13:11:828:703 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/rat_sda_intermediate_read.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..0301308e --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_intermediate_read #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:13:63:718 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:13:13:106:478 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:13:166:234 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-2 15:13:13:304:926 +Q7-T1 execute opt: 'COMMIT'; + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 15:13:13:518:719 + Q6-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:13:13:521:114 + Q6 finished at: 2022-4-2 15:13:13:556:672 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 15:13:13:594:961 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 15:13:13:595:683 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..86424d49 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:13:979:112 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:13:14:21:894 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:14:79:151 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-2 15:13:14:223:141 +Q7-T1 execute opt: 'COMMIT'; + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 15:13:14:275:723 + Q5-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:13:14:277:983 + Q5 finished at: 2022-4-2 15:13:14:313:730 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 15:13:14:352:187 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 15:13:14:352:883 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/rat_sda_lost_self_update.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..d637c167 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_self_update #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:16:95:93 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:13:16:137:677 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:16:195:95 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 15:13:16:337:280 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 15:13:16:387:550 +Q6 finished at: 2022-4-2 15:13:16:390:58 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 15:13:16:440:785 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 15:13:16:478:979 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 15:13:16:479:748 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..b99277b4 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_sda_non_repeatable_read.txt @@ -0,0 +1,58 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:12:204:230 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 15:13:12:247:146 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:12:304:103 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 15:13:12:343:897 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 15:13:12:550:72 + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 15:13:12:553:285 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:13:12:644:590 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 15:13:12:682:662 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 15:13:12:683:456 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..fe013b6b --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,58 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:14:737:544 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 15:13:14:786:168 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:14:837:541 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-2 15:13:14:877:119 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 15:13:14:922:163 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 15:13:14:978:414 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:13:15:19:675 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-2 15:13:15:57:681 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 15:13:15:58:526 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..e5785a5a --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,57 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:15:398:551 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 15:13:15:441:382 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:15:498:631 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-2 15:13:15:538:247 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 15:13:15:582:32 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 15:13:15:639:513 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:13:15:680:573 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-2 15:13:15:718:689 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 15:13:15:719:553 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..675fa8ed --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:49:331:645 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:13:49:374:618 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:49:431:532 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 15:13:49:470:303 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-2 15:13:52:814:764 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 15:13:52:866:751 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 15:13:53:517:623 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..5155481d --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:53:980:983 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:13:54:23:613 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:54:81:404 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 15:13:54:120:192 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 15:13:57:815:361 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 15:13:57:862:821 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 15:13:58:418:287 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..231dbef2 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:58:881:120 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:13:58:923:857 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:58:981:366 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 15:13:59:22:711 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 15:14:0:315:862 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 15:14:0:363:356 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 15:14:0:918:769 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..3347e15f --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:14:1:386:62 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:14:1:429:278 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:14:1:486:275 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 15:14:1:525:403 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 15:14:2:191:581 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 15:14:2:241:707 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 15:14:2:894:460 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..c148e191 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:14:3:364:701 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 15:14:3:407:397 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:14:3:464:714 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 15:14:3:504:649 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 15:14:3:543:486 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 15:14:3:711:10 +Q6 finished at: 2022-4-2 15:14:3:713:731 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:14:3:809:696 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 15:14:3:847:988 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:14:3:885:321 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..07fd49a9 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:14:4:304:695 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 15:14:4:347:564 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:14:4:404:791 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 15:14:4:444:498 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 15:14:4:483:223 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 15:14:4:657:374 +Q6 finished at: 2022-4-2 15:14:4:660:86 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 15:14:4:761:678 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 15:14:4:799:909 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:14:4:836:663 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..96078af6 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:14:5:257:27 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:14:5:299:779 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:14:5:356:717 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 15:14:5:396:441 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 15:14:5:497:994 +Q7-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 15:14:5:551:434 +Q7 finished at: 2022-4-2 15:14:5:554:253 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 15:14:5:605:40 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 15:14:5:643:292 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:14:5:680:41 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..dbcd7f40 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:14:6:107:650 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:14:6:150:415 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:14:6:207:639 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 15:14:6:247:165 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 15:14:6:348:922 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 15:14:6:551:698 + Q7-T2 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 15:14:6:554:357 + Q7 finished at: 2022-4-2 15:14:6:601:465 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 15:14:6:639:726 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:14:6:676:719 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..bcefd9d3 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:14:7:98:307 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:14:7:141:97 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:14:7:197:983 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 15:14:7:237:443 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 15:14:7:339:2 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 15:14:7:382:447 + Q6-T2 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 15:14:7:385:230 + Q6 finished at: 2022-4-2 15:14:7:430:866 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 15:14:7:469:279 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:14:7:505:995 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..ac89e359 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_mda_step_wat_c1.txt @@ -0,0 +1,44 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_wat_c1 #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:14:7:971:615 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:14:8:14:607 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:14:8:71:448 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 15:14:8:110:219 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 15:14:8:171:515 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 15:14:8:208:834 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-2 15:14:12:818:110 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 15:14:12:866:813 + Q8 finished at: 2022-4-2 15:14:12:868:470 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 15:14:12:913:959 +Q9 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q9 failed at: 2022-4-2 15:14:13:720:903 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..805f6ebb --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_mda_step_wat_c2.txt @@ -0,0 +1,44 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_wat_c2 #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:14:14:232:513 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:14:14:275:565 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:14:14:334:250 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 15:14:14:373:179 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 15:14:14:435:569 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 15:14:14:672:650 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-2 15:14:17:818:755 + Q10-T2 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:14:17:869:186 + Q8 finished at: 2022-4-2 15:14:17:871:50 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 15:14:17:919:858 +Q9 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q9 failed at: 2022-4-2 15:14:18:721:655 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..c8d62f2d --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: sqlserver #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:43:379:403 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:13:43:422:449 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:43:479:688 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; + Q4 finished at: 2022-4-2 15:13:43:619:369 +Q5 finished at: 2022-4-2 15:13:43:620:150 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 15:13:43:742:579 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 15:13:43:816:298 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 15:13:43:854:314 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 15:13:43:911:522 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..d117f5eb --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: sqlserver #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:44:297:315 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:13:44:340:132 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:44:399:597 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 15:13:44:545:808 +Q5 finished at: 2022-4-2 15:13:44:548:574 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 15:13:44:645:664 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 15:13:44:684:146 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 15:13:44:722:158 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 15:13:44:763:816 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/wat_sda_full_write.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_sda_full_write.txt new file mode 100644 index 00000000..23a6a398 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: sqlserver #### +#### test_type: sda_full_write #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:45:146:139 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:13:45:188:812 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:45:246:252 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-2 15:13:45:387:454 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 15:13:45:433:780 +Q6 finished at: 2022-4-2 15:13:45:436:396 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 15:13:45:491:445 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 15:13:45:529:571 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 15:13:45:566:273 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/wat_sda_full_write_committed.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..d1125e4b --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: sqlserver #### +#### test_type: sda_full_write_committed #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:45:945:270 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:13:45:987:976 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:46:45:317 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-2 15:13:46:186:184 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 15:13:46:230:353 + Q5-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:13:46:232:997 + Q5 finished at: 2022-4-2 15:13:46:280:188 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 15:13:46:318:198 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 15:13:46:355:125 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..9df55a0d --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:48:500:143 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:13:48:542:947 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:48:600:74 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 15:13:48:741:963 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 15:13:48:787:193 + Q5-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:13:48:789:900 + Q5 finished at: 2022-4-2 15:13:48:834:823 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 15:13:48:872:943 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 15:13:48:909:720 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..b4ea4ba8 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_update_c1 #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:46:741:164 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 15:13:46:783:564 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:46:841:243 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 15:13:46:880:899 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 15:13:47:86:576 +Q5 finished at: 2022-4-2 15:13:47:89:318 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 15:13:47:146:262 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 15:13:47:184:149 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 15:13:47:220:896 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/rcsnapshot/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..a7e6f24a --- /dev/null +++ b/test_result/centralizend_result/sqlserver/rcsnapshot/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_update_c2 #### +#### isolation: rcsnapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = rcsnapshot for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:13:47:596:894 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 15:13:47:639:386 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:13:47:696:886 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 15:13:47:736:593 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 15:13:47:944:838 +Q5 finished at: 2022-4-2 15:13:47:947:520 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:13:48:48:763 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 15:13:48:86:855 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 15:13:48:123:562 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/sqlserver/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..60186395 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:5:819:404 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:53:5:867:700 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:5:919:91 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:53:5:961:316 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:53:6:2:465 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q6 finished at: 2022-4-2 14:53:6:56:562 + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 14:53:6:66:87 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:53:6:112:848 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:53:6:153:293 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:53:6:191:978 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/sqlserver/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..f2872527 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:6:648:835 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:53:6:699:222 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:6:748:879 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:53:6:791:298 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:53:6:832:584 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q6 finished at: 2022-4-2 14:53:6:887:348 +Q7 finished at: 2022-4-2 14:53:6:895:334 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:53:6:951:699 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:53:6:991:852 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:53:7:30:641 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/iat_dda_write_skew.txt b/test_result/centralizend_result/sqlserver/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..244c97c7 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:7:477:596 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:53:7:525:715 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:7:577:601 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:53:7:619:325 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:53:7:661:497 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 14:53:7:726:12 +Q7-T1 execute opt: 'COMMIT'; + Q8-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:53:7:780:827 + Q8 finished at: 2022-4-2 14:53:7:824:857 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:53:7:864:957 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:53:7:903:512 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/sqlserver/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..ddab9728 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:10:191:405 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:53:10:239:573 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:10:291:530 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:53:10:333:72 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:53:10:375:205 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q6 finished at: 2022-4-2 14:53:10:429:117 +Q7 finished at: 2022-4-2 14:53:10:441:902 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:53:10:496:865 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:53:10:536:990 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:53:10:575:667 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/sqlserver/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..a2c8838f --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,74 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:8:450:537 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-2 14:53:8:509:882 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-2 14:53:8:550:477 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' +Q3 finished at: 2022-4-2 14:53:8:557:86 +Q8-T1 execute opt: 'COMMIT'; + current_result: + (330,) + *(1) expected_result: + (330,) + (2) expected_result: + (300,) + + Q5 finished at: 2022-4-2 14:53:8:701:414 +Q8 finished at: 2022-4-2 14:53:8:702:564 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-2 14:53:8:742:854 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:53:8:792:712 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-2 14:53:8:832:591 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-2 14:53:8:871:904 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:53:8:910:564 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/sqlserver/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..cc40176f --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:9:363:887 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-2 14:53:9:421:519 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:9:463:857 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-2 14:53:9:505:517 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-2 14:53:9:548:563 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' + Q6 finished at: 2022-4-2 14:53:9:597:567 +Q7 finished at: 2022-4-2 14:53:9:611:58 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:53:9:666:738 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-2 14:53:9:706:791 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:53:9:745:466 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/iat_mda_step_iat.txt b/test_result/centralizend_result/sqlserver/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..c4019c16 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:11:69:238 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 14:53:11:118:255 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:11:169:150 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:53:11:210:919 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:53:11:269:147 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 14:53:11:308:833 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-2 14:53:11:416:614 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-2 14:53:11:509:969 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-2 14:53:11:608:515 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:53:11:728:435 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:53:11:822:513 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:53:11:913:906 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 14:53:11:958:380 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:53:12:0:902 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/sqlserver/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..1a676b67 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,106 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:17:333:489 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:53:17:381:929 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:17:433:494 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 14:53:17:475:777 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:53:17:528:248 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 14:53:17:533:419 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 14:53:17:572:983 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-2 14:53:17:612:134 + Q9-T3 execute opt: 'COMMIT'; +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q9 finished at: 2022-4-2 14:53:17:656:519 + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2022-4-2 14:53:17:680:557 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-2 14:53:17:727:296 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-2 14:53:17:771:729 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 14:53:17:814:391 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/sqlserver/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..20607600 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,207 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:16:245:240 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:53:16:294:30 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:16:345:202 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:53:16:387:507 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:53:16:445:258 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-2 14:53:16:485:495 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:53:16:536:667 + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 14:53:16:545:291 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-2 14:53:16:588:332 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:53:16:636:292 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-4-2 14:53:16:686:983 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:53:16:727:894 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-2 14:53:16:792:856 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-2 14:53:16:839:733 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-2 14:53:16:880:995 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-2 14:53:16:881:997 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/sqlserver/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..b90a7749 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:12:502:371 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-2 14:53:12:550:914 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:12:602:515 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:53:12:644:298 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:53:12:702:433 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 14:53:12:742:177 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-2 14:53:12:849:937 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-2 14:53:12:942:849 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-2 14:53:13:41:189 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:53:13:159:68 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:53:13:254:711 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:53:13:346:664 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-2 14:53:13:390:765 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:53:13:433:535 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/sqlserver/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..2fce071c --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:13:790:344 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 14:53:13:838:685 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:13:890:314 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-2 14:53:13:932:156 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:53:13:990:353 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-2 14:53:14:30:37 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-2 14:53:14:137:832 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-2 14:53:14:231:11 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-2 14:53:14:329:187 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:53:14:448:232 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:53:14:538:689 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:53:14:634:296 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 14:53:14:679:189 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:53:14:721:709 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/sqlserver/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..101cccc1 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:18:268:608 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 14:53:18:317:269 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + Q4-T2 execute opt: 'BEGIN;' + *(1) expected_result: + (1,0) + *(2) expected_result: + Q4 finished at: 2022-4-2 14:53:18:368:814 + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-2 14:53:18:369:191 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-2 14:53:18:410:731 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-2 14:53:18:453:541 + Q7-T2 execute opt: 'COMMIT'; + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 14:53:18:468:821 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q7 finished at: 2022-4-2 14:53:18:505:955 + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-2 14:53:18:508:477 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 14:53:18:548:231 + Q11-T3 execute opt: 'COMMIT'; +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' + Q11 finished at: 2022-4-2 14:53:18:586:959 +Q12 finished at: 2022-4-2 14:53:18:617:399 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-2 14:53:18:674:353 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-2 14:53:18:715:148 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-2 14:53:18:754:125 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/sqlserver/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..3928f330 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,162 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:15:224:363 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-2 14:53:15:272:711 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:15:324:375 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-2 14:53:15:366:273 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:53:15:408:547 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2022-4-2 14:53:15:424:446 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 14:53:15:450:235 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-2 14:53:15:464:255 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-2 14:53:15:491:445 + Q8-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:53:15:503:712 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-2 14:53:15:546:455 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q8 finished at: 2022-4-2 14:53:15:548:145 + Q13 finished at: 2022-4-2 14:53:15:585:911 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:53:15:640:399 + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2022-4-2 14:53:15:644:14 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-2 14:53:15:690:839 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-2 14:53:15:735:472 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-2 14:53:15:778:85 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/sqlserver/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..aa447eb5 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:4:981:929 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 14:53:5:30:163 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:5:82:15 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 14:53:5:124:682 + Q5-T2 execute opt: 'COMMIT'; +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:53:5:182:657 +Q6 finished at: 2022-4-2 14:53:5:228:441 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:53:5:294:262 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:53:5:334:453 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:53:5:373:230 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/sqlserver/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..1cd8c29f --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,60 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:4:207:148 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:53:4:255:372 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:4:307:75 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 14:53:4:349:311 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:53:4:399:362 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 14:53:4:453:866 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:53:4:500:738 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:53:4:540:516 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:53:4:579:146 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:53:4:580:104 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/sqlserver/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..ee8bd493 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:9:41:682 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:52:9:89:855 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:9:141:747 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:52:9:182:997 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:52:10:348:958 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:52:10:401:502 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:52:10:950:200 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/sqlserver/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..57b4d99d --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:11:441:676 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:52:11:489:877 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:11:541:728 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:52:11:583:54 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:52:12:224:613 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:52:12:275:261 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 14:52:12:925:806 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/read-committed/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/sqlserver/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..ee946e14 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:13:428:573 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:52:13:476:750 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:13:531:19 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:52:13:572:513 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:52:14:100:12 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:52:14:153:32 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:52:14:701:597 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/read-committed/rat_dda_read_skew.txt b/test_result/centralizend_result/sqlserver/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..17239fda --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:15:197:902 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:52:15:245:946 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:15:297:961 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:52:15:340:276 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:52:15:381:861 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:52:15:549:656 + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 14:52:15:551:403 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:52:15:644:31 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:52:15:684:534 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:52:15:685:386 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/rat_dda_read_skew2.txt b/test_result/centralizend_result/sqlserver/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..2eb52222 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:17:613:123 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:52:17:661:751 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:17:712:710 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:52:17:754:798 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 14:52:17:859:290 +Q7-T1 execute opt: 'COMMIT'; + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:52:17:913:307 + Q8-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:52:17:914:357 + Q8 finished at: 2022-4-2 14:52:17:953:889 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:52:17:994:123 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:52:17:994:856 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/sqlserver/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..3dcf78cb --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:18:444:480 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:52:18:492:584 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:18:544:410 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:52:18:586:458 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 14:52:18:691:38 +Q8-T1 execute opt: 'COMMIT'; + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:52:18:745:670 + Q6-T2 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:52:18:746:689 + Q6 finished at: 2022-4-2 14:52:18:786:688 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:52:18:826:768 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:52:18:827:608 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/sqlserver/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..51234636 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:16:136:752 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 14:52:16:192:414 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:16:236:717 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:52:16:279:134 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:52:16:320:442 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + Q6 finished at: 2022-4-2 14:52:16:367:369 + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 14:52:16:384:904 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:52:16:431:479 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-2 14:52:16:472:61 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:52:16:472:888 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/sqlserver/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..02396295 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,59 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:16:822:748 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 14:52:16:870:975 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:16:922:658 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-2 14:52:16:964:781 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-2 14:52:17:6:70 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + Q6 finished at: 2022-4-2 14:52:17:53:936 + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 14:52:17:69:185 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:52:17:115:707 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-2 14:52:17:155:804 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:52:17:156:645 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/rat_dda_write_read_skew.txt b/test_result/centralizend_result/sqlserver/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..46d61d77 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:59:535:437 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:51:59:583:772 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:59:635:293 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:51:59:676:411 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:52:2:847:829 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:52:2:905:806 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:52:3:449:147 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/sqlserver/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..213a05f0 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:3:942:578 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:52:3:990:737 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:4:42:758 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:52:4:84:131 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:52:7:848:382 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:52:7:901:220 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 14:52:8:549:701 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/read-committed/rat_mda_step_rat.txt b/test_result/centralizend_result/sqlserver/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..e17cbf5c --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,74 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:19:325:461 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:52:19:373:728 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:19:425:403 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:52:19:466:743 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 14:52:19:563:422 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-2 14:52:19:602:772 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:52:19:726:763 + Q11-T2 execute opt: 'COMMIT'; + current_result: + (1,1) + *(1) expected_result: + (1,1) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q8 finished at: 2022-4-2 14:52:19:773:375 + Q11 finished at: 2022-4-2 14:52:19:774:308 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:52:19:884:59 +Q9 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q9 failed at: 2022-4-2 14:52:20:627:788 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/sqlserver/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..3fdc6d15 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,207 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2022-4-2 14:52:21:182:316 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-2 14:52:21:227:508 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2022-4-2 14:52:21:240:328 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-2 14:52:21:288:845 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:52:21:340:661 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-2 14:52:21:381:109 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 14:52:21:440:559 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-2 14:52:21:481:842 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q11-T1 execute opt: 'COMMIT'; + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + *(5) expected_result: + (0,1) + (6) expected_result: + (0,0) + *(7) expected_result: + (0,1) + *(8) expected_result: + (0,1) + *(9) expected_result: + (0,1) + (10) expected_result: + (0,0) + (11) expected_result: + (0,0) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + (14) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 14:52:21:691:197 +Q11 finished at: 2022-4-2 14:52:21:692:927 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:52:21:793:587 + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + (3) expected_result: + (1,0) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + *(6) expected_result: + (1,1) + (7) expected_result: + (1,0) + *(8) expected_result: + (1,1) + *(9) expected_result: + (1,1) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + (12) expected_result: + (1,0) + (13) expected_result: + (1,0) + (14) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 14:52:21:795:805 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 14:52:21:878:529 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:52:21:921:209 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-2 14:52:21:966:227 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-2 14:52:22:8:690 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/sqlserver/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..51b5f574 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,74 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:22:512:317 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:52:22:560:332 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:22:612:258 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:52:22:653:535 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 14:52:22:712:464 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-2 14:52:22:751:647 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 14:52:24:727:428 + Q11-T2 execute opt: 'COMMIT'; + current_result: + (,) + *(1) expected_result: + (,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q8 finished at: 2022-4-2 14:52:24:783:445 + Q12-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:52:24:784:340 + Q12 finished at: 2022-4-2 14:52:24:837:127 +Q9 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q9 failed at: 2022-4-2 14:52:25:628:363 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/sqlserver/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..0311c220 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,71 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:26:30:58 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-2 14:52:26:78:401 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:26:129:930 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-2 14:52:26:171:137 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 14:52:26:229:878 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-2 14:52:26:269:117 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-2 14:52:27:229:429 +Q10-T1 execute opt: 'COMMIT'; + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 14:52:27:284:195 + Q11-T2 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:52:27:285:45 + Q11 finished at: 2022-4-2 14:52:27:333:579 + Q8 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 58) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q8 failed at: 2022-4-2 14:52:28:25:926 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 58) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/read-committed/rat_sda_dirty_read.txt b/test_result/centralizend_result/sqlserver/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..d71052c1 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: sqlserver #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:53:868:853 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:51:53:917:411 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:53:962:881 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' +Q5-T1 execute opt: 'ROLLBACK'; + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:51:54:67:973 +Q5 finished at: 2022-4-2 14:51:54:69:122 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:51:54:163:639 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 14:51:54:203:444 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:51:54:204:121 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/read-committed/rat_sda_intermediate_read.txt b/test_result/centralizend_result/sqlserver/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..0c0df1ce --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:55:513:692 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:51:55:561:723 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:55:613:707 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-2 14:51:55:760:464 +Q7-T1 execute opt: 'COMMIT'; + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:51:55:972:7 + Q6-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:51:55:973:65 + Q6 finished at: 2022-4-2 14:51:56:12:725 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 14:51:56:52:777 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:51:56:53:479 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/sqlserver/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..bf8be142 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:56:458:11 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:51:56:506:230 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:56:557:977 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-2 14:51:56:704:632 +Q7-T1 execute opt: 'COMMIT'; + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:51:56:761:498 + Q5-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:51:56:762:499 + Q5 finished at: 2022-4-2 14:51:56:802:95 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 14:51:56:841:864 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:51:56:842:574 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/read-committed/rat_sda_lost_self_update.txt b/test_result/centralizend_result/sqlserver/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..206f680e --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:58:691:302 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:51:58:739:542 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:58:791:324 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 14:51:58:938:818 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 14:51:58:997:6 + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 14:51:58:998:362 + Q7 finished at: 2022-4-2 14:51:59:45:912 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:51:59:85:815 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:51:59:86:549 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/read-committed/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/sqlserver/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..cac68cf9 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,58 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:54:622:767 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:51:54:671:46 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:54:722:860 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 14:51:54:765:126 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:51:54:978:922 + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 14:51:54:980:727 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:51:55:69:304 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:51:55:109:394 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:51:55:110:63 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/sqlserver/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..328aa815 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,58 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:57:255:218 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 14:51:57:309:738 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:57:355:97 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-2 14:51:57:397:220 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:51:57:443:454 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 14:51:57:501:602 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:51:57:548:159 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-2 14:51:57:588:98 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:51:57:588:892 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/sqlserver/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..84c04273 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,57 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:57:945:257 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 14:51:57:993:408 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:58:45:259 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-2 14:51:58:87:464 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:51:58:135:149 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 14:51:58:191:842 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:51:58:238:380 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-2 14:51:58:279:492 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:51:58:280:309 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/sqlserver/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..66086f21 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:34:597:707 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:52:34:645:857 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:34:697:787 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:52:34:738:990 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:52:37:853:798 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:52:37:902:721 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 14:52:38:555:355 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/sqlserver/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..24650656 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:39:51:265 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:52:39:99:243 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:39:151:347 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:52:39:192:655 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:52:42:855:251 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:52:42:913:954 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:52:43:455:877 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/sqlserver/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..4b0c00fe --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:43:959:964 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:52:44:8:144 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:44:60:91 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:52:44:101:206 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:52:45:354:919 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:52:45:416:204 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:52:45:956:492 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/sqlserver/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..304dacac --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:46:456:443 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:52:46:504:847 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:46:558:993 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:52:46:600:912 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:52:47:230:538 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:52:47:285:247 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 14:52:47:932:98 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/sqlserver/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..fc5585c4 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:48:435:875 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:52:48:484:96 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:48:535:901 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:52:48:578:259 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:52:48:619:529 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:52:48:789:852 +Q6 finished at: 2022-4-2 14:52:48:791:303 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:52:48:849:654 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:52:48:890:88 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:52:48:928:840 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/sqlserver/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..7aff5b5c --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:49:387:969 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:52:49:436:48 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:49:487:935 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:52:49:530:327 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:52:49:571:707 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:52:49:739:870 +Q6 finished at: 2022-4-2 14:52:49:741:257 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:52:49:848:156 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:52:49:888:428 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:52:49:926:995 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/sqlserver/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..d69818c9 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:50:384:896 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:52:50:432:981 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:50:484:966 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:52:50:527:84 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 14:52:50:631:761 +Q7-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:52:50:682:458 +Q7 finished at: 2022-4-2 14:52:50:683:889 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:52:50:737:487 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:52:50:777:637 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:52:50:816:290 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/sqlserver/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..cfb18a3f --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:51:267:421 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:52:51:315:560 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:51:367:372 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:52:51:409:552 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 14:52:51:514:185 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:52:51:718:724 + Q7-T2 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:52:51:720:78 + Q7 finished at: 2022-4-2 14:52:51:771:539 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:52:51:811:711 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:52:51:850:241 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/sqlserver/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..938c8c0a --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:52:304:20 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:52:52:352:307 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:52:404:19 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:52:52:446:45 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 14:52:52:550:637 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:52:52:606:6 + Q6-T2 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:52:52:607:328 + Q6 finished at: 2022-4-2 14:52:52:654:851 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:52:52:695:91 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:52:52:733:720 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/sqlserver/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..36976f0c --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,44 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:53:232:433 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:52:53:280:617 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:53:332:446 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:52:53:373:648 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 14:52:53:432:516 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 14:52:53:471:909 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-2 14:52:57:857:158 + Q11-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:52:57:908:60 + Q12-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:52:57:909:576 + Q12 finished at: 2022-4-2 14:52:57:955:988 +Q9 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q9 failed at: 2022-4-2 14:52:58:758:742 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/read-committed/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/sqlserver/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..1e8f72f8 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,44 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:59:300:735 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:52:59:348:936 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:59:400:908 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:52:59:442:160 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:52:59:500:713 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 14:52:59:739:547 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-2 14:53:2:857:880 + Q10-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:53:2:908:371 + Q12-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:53:2:909:772 + Q12 finished at: 2022-4-2 14:53:2:956:464 +Q9 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q9 failed at: 2022-4-2 14:53:3:759:415 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/sqlserver/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..88d476fd --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: sqlserver #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:28:428:140 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:52:28:476:350 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:28:530:421 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; + Q4 finished at: 2022-4-2 14:52:28:672:690 +Q5 finished at: 2022-4-2 14:52:28:674:58 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:52:28:779:109 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 14:52:28:856:702 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 14:52:28:896:883 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:52:28:940:734 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/sqlserver/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..14227b70 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: sqlserver #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:29:343:68 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:52:29:391:305 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:29:443:275 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 14:52:29:594:372 +Q5 finished at: 2022-4-2 14:52:29:595:774 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:52:29:693:399 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 14:52:29:733:637 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 14:52:29:773:538 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:52:29:817:125 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/read-committed/wat_sda_full_write.txt b/test_result/centralizend_result/sqlserver/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..979f421f --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: sqlserver #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:30:216:552 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:52:30:264:891 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:30:316:623 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-2 14:52:30:466:334 +Q6-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 14:52:30:516:891 + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 14:52:30:518:313 + Q7 finished at: 2022-4-2 14:52:30:564:617 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 14:52:30:604:816 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:52:30:643:389 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/read-committed/wat_sda_full_write_committed.txt b/test_result/centralizend_result/sqlserver/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..9651d365 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: sqlserver #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:31:51:517 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:52:31:100:48 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:31:151:410 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-2 14:52:31:297:943 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 14:52:31:353:545 + Q5-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:52:31:354:893 + Q5 finished at: 2022-4-2 14:52:31:407:53 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 14:52:31:447:100 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:52:31:485:790 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/sqlserver/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..1d4fc8e1 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:33:720:423 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:52:33:768:554 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:33:820:614 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 14:52:33:967:879 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-4-2 14:52:34:20:585 + Q5-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:52:34:21:896 + Q5 finished at: 2022-4-2 14:52:34:71:259 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:52:34:111:131 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:52:34:149:758 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/read-committed/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/sqlserver/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..52840ddd --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:31:890:599 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 14:52:31:942:697 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:31:997:764 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 14:52:32:40:293 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:52:32:243:70 +Q5 finished at: 2022-4-2 14:52:32:244:448 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 14:52:32:304:729 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:52:32:344:974 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:52:32:383:641 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-committed/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/sqlserver/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..9e3e5bb5 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:52:32:783:120 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 14:52:32:831:7 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:52:32:883:211 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 14:52:32:925:447 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:52:33:137:0 +Q5 finished at: 2022-4-2 14:52:33:140:443 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:52:33:243:609 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:52:33:283:829 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:52:33:322:449 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..db4e409d --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_dda_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:39:337:142 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:51:39:377:994 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:39:439:625 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:51:39:477:187 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:51:39:513:501 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q6 finished at: 2022-4-2 14:51:39:560:405 + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 14:51:39:576:365 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:51:39:616:37 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:51:39:660:647 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:51:39:703:602 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..805399f9 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:40:116:792 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:51:40:157:773 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:40:216:725 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:51:40:254:362 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:51:40:290:627 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q6 finished at: 2022-4-2 14:51:40:334:560 +Q7 finished at: 2022-4-2 14:51:40:357:680 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:51:40:407:528 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:51:40:452:120 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:51:40:495:282 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/iat_dda_write_skew.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_dda_write_skew.txt new file mode 100644 index 00000000..e4f11e86 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:40:908:589 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:51:40:949:725 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:41:11:564 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:51:41:48:24 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:51:41:85:718 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 14:51:41:147:577 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:51:41:193:150 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:51:41:251:468 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:51:41:296:193 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:51:41:339:640 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..04545ec3 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:43:406:162 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:51:43:447:87 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:43:507:144 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:51:43:543:785 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:51:43:581:0 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q6 finished at: 2022-4-2 14:51:43:623:998 +Q7 finished at: 2022-4-2 14:51:43:645:324 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:51:43:694:621 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:51:43:738:841 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:51:43:781:889 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..3d4c68d7 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,74 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:41:831:266 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-2 14:51:41:880:963 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-2 14:51:41:920:909 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-2 14:51:41:931:208 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + (2) expected_result: + (300,) + + Q5 finished at: 2022-4-2 14:51:41:967:997 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-2 14:51:42:4:369 + Q7-T2 execute opt: 'COMMIT'; +Q8-T1 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:51:42:48:706 +Q8 finished at: 2022-4-2 14:51:42:76:537 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-2 14:51:42:120:493 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-2 14:51:42:164:307 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:51:42:207:458 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..80292264 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:42:617:970 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-2 14:51:42:665:614 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:42:718:134 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-2 14:51:42:754:848 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-2 14:51:42:792:769 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' + Q6 finished at: 2022-4-2 14:51:42:836:675 +Q7 finished at: 2022-4-2 14:51:42:858:102 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:51:42:903:864 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-2 14:51:42:948:232 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:51:42:991:190 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/iat_mda_step_iat.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_mda_step_iat.txt new file mode 100644 index 00000000..00bc936b --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:44:231:571 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 14:51:44:272:807 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:44:331:885 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:51:44:368:670 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:51:44:431:862 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 14:51:44:475:713 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-2 14:51:44:571:909 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-2 14:51:44:667:248 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-2 14:51:44:774:403 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:51:44:877:560 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:51:44:976:2 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:51:45:79:209 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 14:51:45:121:297 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:51:45:161:513 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..e2d18b41 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,106 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:50:227:985 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:51:50:269:7 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:50:328:40 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 14:51:50:365:293 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:51:50:409:543 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 14:51:50:427:946 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 14:51:50:471:693 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-2 14:51:50:515:55 + Q9-T3 execute opt: 'COMMIT'; +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q9 finished at: 2022-4-2 14:51:50:563:853 + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2022-4-2 14:51:50:567:666 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-2 14:51:50:607:205 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-2 14:51:50:649:436 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 14:51:50:689:761 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..c7def312 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,207 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:49:182:85 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:51:49:223:683 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:49:282:478 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:51:49:319:982 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:51:49:382:283 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-2 14:51:49:426:876 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:51:49:481:692 + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 14:51:49:482:247 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-2 14:51:49:523:30 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:51:49:568:761 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-4-2 14:51:49:618:846 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:51:49:654:666 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-2 14:51:49:722:415 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-2 14:51:49:762:30 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-2 14:51:49:804:198 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-2 14:51:49:805:138 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..ff7d9f92 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:45:615:411 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-2 14:51:45:656:453 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:45:714:338 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:51:45:750:903 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:51:45:815:154 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 14:51:45:859:115 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-2 14:51:45:955:200 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-2 14:51:46:50:562 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-2 14:51:46:162:108 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:51:46:272:768 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:51:46:358:650 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:51:46:463:960 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-2 14:51:46:505:819 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:51:46:546:140 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..48e5037e --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:46:876:128 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 14:51:46:917:222 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:46:976:83 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-2 14:51:47:12:859 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:51:47:76:48 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-2 14:51:47:119:995 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-2 14:51:47:216:279 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-2 14:51:47:311:571 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-2 14:51:47:418:928 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:51:47:520:257 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:51:47:617:818 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:51:47:724:365 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 14:51:47:766:558 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:51:47:806:919 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..eabbf415 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:51:101:565 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 14:51:51:142:637 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-2 14:51:51:182:902 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-2 14:51:51:201:514 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-2 14:51:51:237:976 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-2 14:51:51:275:326 + Q7-T2 execute opt: 'COMMIT'; + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 14:51:51:301:584 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q7 finished at: 2022-4-2 14:51:51:322:536 + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-2 14:51:51:345:484 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 14:51:51:389:419 + Q11-T3 execute opt: 'COMMIT'; +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' + Q11 finished at: 2022-4-2 14:51:51:432:355 +Q12 finished at: 2022-4-2 14:51:51:440:720 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-2 14:51:51:488:123 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-2 14:51:51:533:919 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-2 14:51:51:577:165 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..f2f70675 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,162 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:48:259:990 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-2 14:51:48:301:437 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:48:359:995 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-2 14:51:48:396:902 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:51:48:434:349 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2022-4-2 14:51:48:460:2 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 14:51:48:471:227 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-2 14:51:48:504:61 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-2 14:51:48:507:610 + Q8-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:51:48:547:445 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q8 finished at: 2022-4-2 14:51:48:550:410 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-2 14:51:48:591:417 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2022-4-2 14:51:48:599:490 +Q16-T1 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 14:51:48:635:33 + Q14-T3 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-2 14:51:48:638:935 + Q14 finished at: 2022-4-2 14:51:48:684:960 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-2 14:51:48:727:372 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-2 14:51:48:767:755 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..875d393b --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:38:553:529 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 14:51:38:594:352 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:38:653:479 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 14:51:38:690:795 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:51:38:737:402 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-2 14:51:38:792:546 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:51:38:839:780 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:51:38:884:244 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:51:38:927:217 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..492334e3 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,60 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:37:772:635 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:51:37:813:575 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:37:872:919 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 14:51:37:910:162 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:51:37:953:138 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 14:51:38:12:77 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:51:38:51:492 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:51:38:137:417 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:51:38:180:468 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:51:38:181:543 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..f6b2e831 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_double_write_skew1.txt @@ -0,0 +1,54 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:50:51:6:438 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:50:51:47:519 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:50:51:106:405 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:50:51:142:750 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:50:51:179:962 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 14:50:51:350:351 + Q7 finished at: 2022-4-2 14:50:51:350:379 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:50:51:454:124 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-2 14:50:51:498:665 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:50:51:499:495 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..ad7ad9fd --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:50:51:910:434 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:50:51:951:436 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:50:52:10:368 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:50:52:46:730 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:50:52:83:834 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q6 finished at: 2022-4-2 14:50:52:125:34 +Q7 finished at: 2022-4-2 14:50:52:149:722 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:50:52:195:827 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-2 14:50:52:240:265 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:50:52:241:10 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..e352d511 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_double_write_skew2.txt @@ -0,0 +1,54 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:50:52:652:26 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:50:52:692:927 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:50:52:752:34 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:50:52:788:228 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 14:50:52:893:819 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:50:52:940:442 + Q5 finished at: 2022-4-2 14:50:52:940:759 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:50:52:995:35 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:50:53:39:456 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:50:53:40:254 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_read_skew.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_read_skew.txt new file mode 100644 index 00000000..931f9f50 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:50:53:453:149 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:50:53:494:194 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:50:53:552:890 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:50:53:589:989 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:50:53:626:166 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 14:50:53:692:474 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:50:53:795:543 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:50:53:891:491 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:50:53:935:856 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:50:53:936:608 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_read_skew2.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_read_skew2.txt new file mode 100644 index 00000000..ed560591 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_read_skew2.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:50:55:743:216 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:50:55:784:213 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:50:55:843:76 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:50:55:880:352 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:50:55:916:622 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 14:50:55:982:506 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:50:56:35:620 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:50:56:78:98 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:50:56:122:358 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:50:56:123:133 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..bd59a4dc --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_read_skew2_committed.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:50:56:534:917 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:50:56:575:758 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:50:56:634:799 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:50:56:671:771 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:50:56:708:261 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q6 finished at: 2022-4-2 14:50:56:743:864 +Q7 finished at: 2022-4-2 14:50:56:774:354 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:50:56:820:594 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:50:56:864:914 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:50:56:865:686 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..ba47085e --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:50:54:355:656 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 14:50:54:403:371 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:50:54:455:702 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:50:54:492:953 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:50:54:529:235 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + Q6 finished at: 2022-4-2 14:50:54:570:390 + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 14:50:54:594:999 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:50:54:634:284 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-2 14:50:54:678:610 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:50:54:679:392 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..b06e68ac --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,59 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:50:55:10:10 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 14:50:55:51:55 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:50:55:109:888 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-2 14:50:55:146:965 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-2 14:50:55:183:308 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + Q6 finished at: 2022-4-2 14:50:55:227:873 + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 14:50:55:249:236 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:50:55:288:737 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-2 14:50:55:333:344 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:50:55:334:83 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_write_read_skew.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..ff8ceabf --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_read_skew #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:50:49:364:157 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:50:49:405:317 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:50:49:464:354 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:50:49:500:693 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:50:49:537:977 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 14:50:49:606:792 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:50:49:705:24 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:50:49:807:896 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:50:49:852:215 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:50:49:852:976 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..cb0a1fb1 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:50:50:265:286 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:50:50:306:404 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:50:50:365:265 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:50:50:401:734 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:50:50:438:871 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q6 finished at: 2022-4-2 14:50:50:480:645 + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 14:50:50:504:703 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:50:50:549:198 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:50:50:593:715 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:50:50:594:513 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/rat_mda_step_rat.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_mda_step_rat.txt new file mode 100644 index 00000000..5d0eddef --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:50:57:316:429 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:50:57:357:304 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:50:57:416:429 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:50:57:452:782 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + (3) expected_result: + (0,0) + (4) expected_result: + (0,0) + *(5) expected_result: + (0,1) + (6) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:50:57:490:261 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 14:50:57:558:400 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-2 14:50:57:601:919 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (1,1) + *(1) expected_result: + (1,1) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q8 finished at: 2022-4-2 14:50:57:645:780 + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + *(4) expected_result: + (2,1) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q9 finished at: 2022-4-2 14:50:57:655:902 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:50:57:705:693 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:50:57:755:660 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:50:57:863:989 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 14:50:57:905:942 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:50:57:906:711 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..8a35dd9c --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,207 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2022-4-2 14:50:58:359:599 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-2 14:50:58:402:464 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2022-4-2 14:50:58:420:98 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-2 14:50:58:461:247 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:50:58:520:432 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-2 14:50:58:565:385 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + *(5) expected_result: + (0,1) + (6) expected_result: + (0,0) + *(7) expected_result: + (0,1) + *(8) expected_result: + (0,1) + *(9) expected_result: + (0,1) + (10) expected_result: + (0,0) + (11) expected_result: + (0,0) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + (14) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 14:50:58:610:428 + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 14:50:58:620:245 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-2 14:50:58:656:672 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + (3) expected_result: + (1,0) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + *(6) expected_result: + (1,1) + (7) expected_result: + (1,0) + *(8) expected_result: + (1,1) + *(9) expected_result: + (1,1) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + (12) expected_result: + (1,0) + (13) expected_result: + (1,0) + (14) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 14:50:58:761:283 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-2 14:50:58:871:971 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:50:58:961:238 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 14:50:59:62:548 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:50:59:103:23 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-2 14:50:59:145:956 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-2 14:50:59:186:132 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..b94da1b4 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:50:59:638:199 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:50:59:678:948 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:50:59:738:157 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:50:59:774:309 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 14:50:59:812:106 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 14:50:59:838:449 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-2 14:50:59:882:189 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + *(1) expected_result: + (,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q8 finished at: 2022-4-2 14:50:59:926:70 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + (3) expected_result: + (1,) + *(4) expected_result: + (,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-2 14:50:59:978:275 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:51:0:27:89 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:51:0:89:50 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:51:0:185:841 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-2 14:51:0:227:715 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:51:0:267:860 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..31ef7810 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:0:596:348 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-2 14:51:0:637:381 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:0:696:415 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-2 14:51:0:732:752 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 14:51:0:770:276 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 14:51:0:796:421 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-2 14:51:0:839:795 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + (4) expected_result: + (,) + *(5) expected_result: + (1,) + (6) expected_result: + (,) + + Q8 finished at: 2022-4-2 14:51:0:883:866 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-2 14:51:0:936:859 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:51:0:985:50 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:51:1:43:805 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:51:1:144:159 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 14:51:1:186:596 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:51:1:226:946 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/rat_sda_dirty_read.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_sda_dirty_read.txt new file mode 100644 index 00000000..e2453a32 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_sda_dirty_read.txt @@ -0,0 +1,45 @@ +#### db_type: sqlserver #### +#### test_type: sda_dirty_read #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:50:44:82:385 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:50:44:123:438 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:50:44:179:2 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:50:44:216:468 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-2 14:50:44:282:499 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:50:44:379:105 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 14:50:44:423:206 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:50:44:423:823 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/rat_sda_intermediate_read.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..aecb5f08 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_sda_intermediate_read.txt @@ -0,0 +1,51 @@ +#### db_type: sqlserver #### +#### test_type: sda_intermediate_read #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:50:45:653:620 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:50:45:694:907 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:50:45:755:186 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:50:45:792:642 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-2 14:50:45:892:893 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:50:45:988:452 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:50:46:99:562 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 14:50:46:143:654 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:50:46:144:469 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..52dfd314 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,51 @@ +#### db_type: sqlserver #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:50:46:514:973 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:50:46:555:890 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:50:46:614:963 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:50:46:651:980 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:50:46:687:496 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-2 14:50:46:754:194 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:50:46:798:855 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 14:50:46:843:34 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:50:46:843:897 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/rat_sda_lost_self_update.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..05b110f7 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_self_update #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:50:48:559:840 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:50:48:600:770 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:50:48:659:785 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 14:50:48:800:14 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 14:50:48:847:412 + Q4 finished at: 2022-4-2 14:50:48:847:703 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:50:48:903:400 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:50:48:947:740 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:50:48:948:462 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..8df41be5 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_sda_non_repeatable_read.txt @@ -0,0 +1,58 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:50:44:794:956 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:50:44:835:789 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:50:44:894:932 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 14:50:44:931:973 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 14:50:45:34:433 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:50:45:142:648 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:50:45:233:626 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:50:45:277:932 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:50:45:278:604 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..20533f31 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,58 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:50:47:214:972 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 14:50:47:262:328 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:50:47:314:908 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-2 14:50:47:352:6 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:50:47:392:78 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 14:50:47:454:155 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:50:47:493:434 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-2 14:50:47:537:754 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:50:47:538:664 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..19cdff1e --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,57 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:50:47:866:791 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 14:50:47:909:232 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:50:47:966:946 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-2 14:50:48:4:470 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:50:48:45:959 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 14:50:48:106:395 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:50:48:145:649 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-2 14:50:48:189:967 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:50:48:190:840 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..aadbbdbf --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:7:579:68 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:51:7:619:951 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:7:679:159 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:51:7:715:662 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 14:51:7:819:116 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:51:7:866:477 + Q5 finished at: 2022-4-2 14:51:7:866:733 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:51:7:910:957 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:51:7:955:553 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:51:7:998:415 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..73b0bda8 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:8:407:714 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:51:8:448:560 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:8:507:801 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:51:8:544:266 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:51:13:473:62 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:51:13:522:527 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:51:14:75:383 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..c07cea01 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:14:528:446 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:51:14:569:357 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:14:628:338 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:51:14:664:506 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:51:18:466:338 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:51:18:509:762 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:51:19:66:415 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..f8d147d8 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:19:517:988 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:51:19:558:855 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:19:618:27 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:51:19:654:567 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:51:20:966:951 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:51:21:9:911 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 14:51:21:667:43 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..5af3b00c --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:22:115:34 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:51:22:156:44 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:22:215:100 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:51:22:252:538 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:51:22:289:236 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 14:51:22:461:250 + Q8 finished at: 2022-4-2 14:51:22:461:319 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:51:22:511:19 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:51:22:555:461 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:51:22:598:408 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..7083ee46 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:23:8:12 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:51:23:48:842 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:23:108:42 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:51:23:145:599 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:51:23:181:939 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 14:51:23:356:365 + Q7 finished at: 2022-4-2 14:51:23:356:407 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:51:23:464:727 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:51:23:509:249 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:51:23:552:575 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..7b79479d --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:23:964:628 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:51:24:5:772 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:24:64:641 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:51:24:101:976 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 14:51:24:204:10 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:51:24:257:141 + Q5 finished at: 2022-4-2 14:51:24:257:345 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:51:24:324:535 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:51:24:368:918 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:51:24:411:875 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..90cf32e8 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:24:824:605 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:51:24:865:604 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:24:924:627 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:51:24:961:924 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 14:51:25:64:118 +Q8-T1 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:51:25:275:230 +Q8 finished at: 2022-4-2 14:51:25:275:96 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:51:25:320:578 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:51:25:365:85 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:51:25:408:36 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..444030fa --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:25:816:892 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:51:25:857:756 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:25:916:949 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:51:25:954:363 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 14:51:26:56:383 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:51:26:106:641 + Q5 finished at: 2022-4-2 14:51:26:106:851 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:51:26:150:244 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 14:51:26:194:779 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:51:26:237:618 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..819f062d --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_mda_step_wat_c1.txt @@ -0,0 +1,44 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:26:687:291 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:51:26:728:300 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:26:787:244 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:51:26:823:465 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 14:51:26:887:477 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 14:51:26:930:954 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q9 finished at: 2022-4-2 14:51:31:593:312 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:51:31:659:907 + Q5 finished at: 2022-4-2 14:51:31:660:130 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:51:31:711:380 + Q8 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 58) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q8 failed at: 2022-4-2 14:51:32:397:272 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 58) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..628a1220 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_mda_step_wat_c2.txt @@ -0,0 +1,44 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:32:857:329 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:51:32:898:657 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:32:957:269 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:51:32:993:661 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:51:33:57:306 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 14:51:33:342:202 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q9 finished at: 2022-4-2 14:51:36:594:149 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-2 14:51:36:642:813 + Q6 finished at: 2022-4-2 14:51:36:643:260 + Q10-T2 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:51:36:690:861 + Q8 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 58) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q8 failed at: 2022-4-2 14:51:37:398:143 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 58) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..4be606f4 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: sqlserver #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:1:633:531 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:51:1:674:427 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:1:733:432 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-2 14:51:1:872:115 + Q4 finished at: 2022-4-2 14:51:1:872:351 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:51:1:973:540 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 14:51:2:18:6 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 14:51:2:62:447 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:51:2:115:994 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..c3120f69 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: sqlserver #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:2:491:904 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:51:2:532:848 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:2:591:853 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-2 14:51:2:747:467 + Q4 finished at: 2022-4-2 14:51:2:747:711 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:51:2:842:923 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 14:51:2:886:980 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 14:51:2:931:130 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:51:2:979:280 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/wat_sda_full_write.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_sda_full_write.txt new file mode 100644 index 00000000..d4aa7806 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: sqlserver #### +#### test_type: sda_full_write #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:3:352:394 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:51:3:393:201 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:3:452:387 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-2 14:51:3:591:924 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 14:51:3:640:683 + Q4 finished at: 2022-4-2 14:51:3:641:8 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:51:3:706:428 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 14:51:3:750:867 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:51:3:793:716 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/wat_sda_full_write_committed.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..b82f6621 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: sqlserver #### +#### test_type: sda_full_write_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:4:166:527 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:51:4:207:418 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:4:266:611 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-2 14:51:4:405:801 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:51:4:458:762 + Q4 finished at: 2022-4-2 14:51:4:458:993 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:51:4:502:815 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 14:51:4:546:961 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:51:4:589:804 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..e1840fde --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:6:736:774 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:51:6:777:846 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:6:836:646 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 14:51:6:976:901 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:51:7:26:13 + Q4 finished at: 2022-4-2 14:51:7:26:233 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:51:7:70:972 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:51:7:115:189 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:51:7:158:251 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..d15a8b6e --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:4:959:35 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 14:51:4:999:808 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:5:59:228 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 14:51:5:96:348 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-2 14:51:5:312:257 + Q7 finished at: 2022-4-2 14:51:5:312:316 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 14:51:5:362:416 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:51:5:406:631 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:51:5:449:714 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/read-uncommitted/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..dd5f34d4 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/read-uncommitted/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-uncommitted #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-uncommitted for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:51:5:829:643 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 14:51:5:870:541 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:51:5:929:481 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 14:51:5:966:799 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-2 14:51:6:178:124 + Q6 finished at: 2022-4-2 14:51:6:178:184 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:51:6:279:37 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:51:6:323:372 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:51:6:366:254 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/sqlserver/repeatable-read/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..23ed881b --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/iat_dda_read_skew_committed.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:31:735:594 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:54:31:776:670 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:31:835:676 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:54:31:878:518 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:54:32:550:233 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:54:32:621:194 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 14:54:33:248:25 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/sqlserver/repeatable-read/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..2eca52f1 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:33:705:805 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:54:33:746:682 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:33:805:818 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:54:33:848:248 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:54:35:47:21 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:54:35:103:354 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 14:54:35:744:697 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/iat_dda_write_skew.txt b/test_result/centralizend_result/sqlserver/repeatable-read/iat_dda_write_skew.txt new file mode 100644 index 00000000..70eb1d93 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/iat_dda_write_skew.txt @@ -0,0 +1,49 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:36:200:445 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:54:36:241:445 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:36:300:537 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:54:36:342:319 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:54:36:919:355 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:54:36:975:48 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:54:37:517:210 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/sqlserver/repeatable-read/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..51474bc2 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/iat_dda_write_skew_committed.txt @@ -0,0 +1,49 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:41:199:77 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:54:41:240:38 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:41:299:1 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:54:41:340:626 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:54:42:537:76 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:54:42:596:836 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 14:54:43:234:962 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/sqlserver/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..8516e6c6 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,74 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:38:50:977 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-2 14:54:38:102:936 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-2 14:54:38:143:8 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-2 14:54:38:150:873 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:54:38:295:886 + current_result: + (330,) + *(1) expected_result: + (330,) + (2) expected_result: + (300,) + + Q5 finished at: 2022-4-2 14:54:38:298:455 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-2 14:54:38:339:873 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:54:38:389:467 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-2 14:54:38:426:108 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-2 14:54:38:462:382 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:54:38:497:913 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/sqlserver/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..535b0bb9 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,49 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:38:914:613 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-2 14:54:38:965:226 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:39:14:557 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-2 14:54:39:56:453 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' + Q5 finished at: 2022-4-2 14:54:40:40:467 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:54:40:91:653 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 14:54:40:738:281 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/iat_mda_step_iat.txt b/test_result/centralizend_result/sqlserver/repeatable-read/iat_mda_step_iat.txt new file mode 100644 index 00000000..89058e45 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/iat_mda_step_iat.txt @@ -0,0 +1,89 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:43:728:45 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 14:54:43:769:366 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:43:828:441 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:54:43:870:502 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:54:43:928:64 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 14:54:43:964:725 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q8 finished at: 2022-4-2 14:54:44:409:787 + Q11-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:54:44:476:63 +Q10-T1 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:54:44:478:366 +Q10 finished at: 2022-4-2 14:54:44:524:785 + Q9 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 58) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q9 failed at: 2022-4-2 14:54:45:307:676 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 58) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/sqlserver/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..079301e1 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:56:772:878 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:54:56:814:152 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:56:872:673 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 14:54:56:972:907 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-2 14:54:57:112:802 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-2 14:54:57:152:512 + Q4 finished at: 2022-4-2 14:54:57:154:850 + Q5-T2 execute opt: 'COMMIT'; + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 14:54:57:210:852 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:54:57:212:438 + Q8 finished at: 2022-4-2 14:54:57:246:955 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:54:57:292:350 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-2 14:54:57:334:213 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 14:54:57:374:104 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/sqlserver/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..38082465 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,140 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:53:231:55 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:54:53:272:885 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:53:330:713 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:54:53:373:445 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:54:53:430:707 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 14:54:53:530:937 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q6 finished at: 2022-4-2 14:54:55:18:718 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:54:55:67:295 + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-4-2 14:54:55:70:706 + Q12-T2 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:54:55:110:936 + Q12 finished at: 2022-4-2 14:54:55:111:600 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:54:55:160:473 +Q13 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q13 failed at: 2022-4-2 14:54:56:318:815 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/sqlserver/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..262142d7 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,89 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:45:761:120 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-2 14:54:45:802:541 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:45:861:312 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:54:45:903:414 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:54:45:961:378 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 14:54:46:32:248 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q8 finished at: 2022-4-2 14:54:47:530:853 + Q11-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:54:47:581:477 +Q10-T1 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:54:47:583:888 +Q10 finished at: 2022-4-2 14:54:47:629:629 + Q9 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 58) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q9 failed at: 2022-4-2 14:54:48:428:795 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 58) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/sqlserver/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..1ee15601 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:48:761:386 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 14:54:48:802:624 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:48:861:366 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-2 14:54:48:903:660 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:54:48:961:777 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-2 14:54:49:32:631 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-2 14:54:49:101:489 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-2 14:54:49:202:250 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-2 14:54:49:296:949 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:54:49:415:243 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:54:49:513:628 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:54:49:607:440 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 14:54:49:649:427 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:54:49:689:436 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/sqlserver/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..909d0019 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,120 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:57:789:622 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 14:54:57:830:946 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-2 14:54:57:871:542 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-2 14:54:57:889:615 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-2 14:54:57:931:503 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 14:54:57:989:693 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-2 14:54:58:26:295 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' + Q6 finished at: 2022-4-2 14:54:58:761:494 + Q7-T2 execute opt: 'COMMIT'; + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 14:54:58:809:957 + Q11-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:54:58:811:427 + Q11 finished at: 2022-4-2 14:54:58:845:653 +Q12 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q12 failed at: 2022-4-2 14:54:59:959:303 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/sqlserver/repeatable-read/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..386186b8 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,127 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:50:140:861 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-2 14:54:50:182:215 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:50:240:788 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-2 14:54:50:282:738 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:54:50:325:14 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2022-4-2 14:54:50:340:929 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 14:54:50:366:990 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-2 14:54:50:377:361 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-2 14:54:50:413:312 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-2 14:54:51:275:733 + Q8-T2 execute opt: 'COMMIT'; + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-2 14:54:51:327:762 + Q8 finished at: 2022-4-2 14:54:51:328:932 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-2 14:54:51:364:93 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:54:51:409:376 +Q15 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q15 failed at: 2022-4-2 14:54:52:773:569 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/sqlserver/repeatable-read/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..ea7d0326 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/iat_sda_lost_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:30:897:423 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 14:54:30:938:379 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:30:997:399 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-2 14:54:31:136:825 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:54:31:191:335 + Q4 finished at: 2022-4-2 14:54:31:193:633 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:54:31:246:591 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:54:31:283:364 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:54:31:318:801 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/sqlserver/repeatable-read/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..73008b53 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:30:119:421 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:54:30:160:479 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:30:219:441 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 14:54:30:358:649 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:54:30:398:158 + Q4 finished at: 2022-4-2 14:54:30:400:451 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:54:30:451:22 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:54:30:488:39 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:54:30:523:541 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:54:30:524:330 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..207959a0 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_double_write_skew1.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:35:263:907 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:53:35:305:43 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:35:363:872 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:53:35:405:366 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:53:36:611:508 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:53:36:658:47 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:53:37:209:128 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..d1cba120 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:37:663:703 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:53:37:704:782 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:37:763:668 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:53:37:805:161 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:53:38:488:797 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:53:38:537:558 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 14:53:39:186:382 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..f1409b52 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_double_write_skew2.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:39:643:330 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:53:39:684:418 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:39:743:379 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:53:39:784:800 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:53:40:364:94 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:53:40:419:491 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:53:40:961:983 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_read_skew.txt b/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_read_skew.txt new file mode 100644 index 00000000..4f32c719 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_read_skew.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:41:427:458 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:53:41:468:386 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:41:527:615 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:53:41:570:22 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:53:42:239:666 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:53:42:289:259 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:53:42:837:591 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_read_skew2.txt b/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_read_skew2.txt new file mode 100644 index 00000000..c7dd489d --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_read_skew2.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:44:767:546 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:53:44:808:689 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:44:867:469 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:53:44:909:972 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 14:53:45:363:340 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:53:45:411:390 + Q5 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q5 failed at: 2022-4-2 14:53:45:865:766 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..1e259a12 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_read_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:46:279:20 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:53:46:319:869 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:46:379:22 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:53:46:461:97 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 14:53:47:864:2 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:53:47:911:514 + Q5 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q5 failed at: 2022-4-2 14:53:48:366:432 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..2d709e2d --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:43:302:124 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 14:53:43:351:97 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:43:392:630 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 14:53:43:532:207 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:53:43:571:707 + Q4 finished at: 2022-4-2 14:53:43:574:179 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:53:43:615:555 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:53:43:665:800 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-2 14:53:43:702:813 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:53:43:703:628 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..2367d6fb --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,59 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:44:34:931 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 14:53:44:75:956 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:44:134:708 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-2 14:53:44:179:406 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-2 14:53:44:220:963 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + Q6 finished at: 2022-4-2 14:53:44:272:549 + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 14:53:44:273:885 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:53:44:313:243 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-2 14:53:44:350:161 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:53:44:350:959 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_write_read_skew.txt b/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..5a425957 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_write_read_skew.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:26:348:594 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:53:26:389:466 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:26:448:458 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:53:26:490:13 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:53:29:110:446 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:53:29:164:378 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:53:29:708:37 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..07d75a35 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:30:160:727 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:53:30:202:31 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:30:260:622 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:53:30:301:931 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:53:34:110:916 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:53:34:167:303 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 14:53:34:808:494 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/rat_mda_step_rat.txt b/test_result/centralizend_result/sqlserver/repeatable-read/rat_mda_step_rat.txt new file mode 100644 index 00000000..2ba49290 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/rat_mda_step_rat.txt @@ -0,0 +1,74 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:48:816:911 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:53:48:857:910 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:48:916:919 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:53:48:998:119 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 14:53:49:51:650 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-2 14:53:49:88:27 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:53:49:742:396 + Q11-T2 execute opt: 'COMMIT'; + current_result: + (1,1) + *(1) expected_result: + (1,1) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q8 finished at: 2022-4-2 14:53:49:791:263 + Q12-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:53:49:792:629 + Q12 finished at: 2022-4-2 14:53:49:835:854 +Q9 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q9 failed at: 2022-4-2 14:53:50:639:789 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/sqlserver/repeatable-read/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..07f12f92 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,169 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2022-4-2 14:53:51:131:598 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-2 14:53:51:174:108 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2022-4-2 14:53:51:192:476 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:53:51:292:486 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-2 14:53:51:329:753 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 14:53:51:392:643 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 14:53:51:616:380 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 14:53:51:827:532 + Q9 finished at: 2022-4-2 14:53:51:829:866 + Q12-T2 execute opt: 'COMMIT'; + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + (3) expected_result: + (1,0) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + *(6) expected_result: + (1,1) + (7) expected_result: + (1,0) + *(8) expected_result: + (1,1) + *(9) expected_result: + (1,1) + *(10) expected_result: + (1,1) + Q12 finished at: 2022-4-2 14:53:51:892:633 + *(11) expected_result: + (1,1) + (12) expected_result: + (1,0) + (13) expected_result: + (1,0) + (14) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 14:53:51:893:304 +Q4 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q4 failed at: 2022-4-2 14:53:52:15:421 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/sqlserver/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..0912df3e --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,74 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:52:570:623 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:53:52:611:546 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:52:666:811 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:53:52:708:507 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 14:53:52:766:571 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-2 14:53:52:802:740 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 14:53:53:494:463 + Q11-T2 execute opt: 'COMMIT'; + current_result: + (,) + *(1) expected_result: + (,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q8 finished at: 2022-4-2 14:53:53:545:773 + Q12-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:53:53:547:211 + Q12 finished at: 2022-4-2 14:53:53:589:159 +Q9 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q9 failed at: 2022-4-2 14:53:54:391:284 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/sqlserver/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..46e5e086 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,71 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:54:767:186 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-2 14:53:54:808:550 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:54:863:677 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-2 14:53:54:905:392 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 14:53:54:965:297 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-2 14:53:55:1:489 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-2 14:53:55:367:495 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:53:55:412:220 + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 14:53:55:415:53 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:53:55:469:587 + Q8 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 58) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q8 failed at: 2022-4-2 14:53:56:167:193 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 58) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/rat_sda_dirty_read.txt b/test_result/centralizend_result/sqlserver/repeatable-read/rat_sda_dirty_read.txt new file mode 100644 index 00000000..2451c9d2 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: sqlserver #### +#### test_type: sda_dirty_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:20:855:564 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:53:20:896:622 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:20:957:107 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-2 14:53:21:55:788 + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:53:21:58:413 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:53:21:156:965 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 14:53:21:193:856 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:53:21:194:834 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/rat_sda_intermediate_read.txt b/test_result/centralizend_result/sqlserver/repeatable-read/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..557d70fe --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_intermediate_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:22:466:39 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:53:22:507:190 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:22:566:41 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-2 14:53:22:705:701 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:53:22:921:165 + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:53:22:923:802 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:53:22:964:666 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 14:53:23:4:372 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:53:23:5:48 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/sqlserver/repeatable-read/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..6f162d01 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:23:395:31 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:53:23:436:40 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:23:494:967 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-2 14:53:23:634:530 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:53:23:688:800 + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:53:23:691:505 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:53:23:732:255 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 14:53:23:768:857 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:53:23:769:613 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/rat_sda_lost_self_update.txt b/test_result/centralizend_result/sqlserver/repeatable-read/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..da59c8a8 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_self_update #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:25:546:639 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:53:25:587:709 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:25:646:711 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 14:53:25:786:975 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 14:53:25:844:858 + Q4 finished at: 2022-4-2 14:53:25:847:329 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:53:25:900:472 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:53:25:937:133 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:53:25:937:789 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/sqlserver/repeatable-read/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..3e366d08 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:21:565:363 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:53:21:606:571 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:21:665:525 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 14:53:21:806:918 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:53:22:4:244 + Q4 finished at: 2022-4-2 14:53:22:6:696 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:53:22:54:46 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:53:22:92:261 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:53:22:92:984 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/sqlserver/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..f4c96ce6 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:24:143:974 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 14:53:24:202:565 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:24:243:904 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 14:53:24:383:393 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:53:24:422:747 + Q4 finished at: 2022-4-2 14:53:24:425:120 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:53:24:477:636 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-2 14:53:24:514:370 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:53:24:515:69 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/sqlserver/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..cb75541c --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,57 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:24:852:163 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 14:53:24:893:210 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:24:952:132 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-2 14:53:24:994:512 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:53:25:45:673 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 14:53:25:91:433 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:53:25:130:854 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-2 14:53:25:167:578 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:53:25:168:283 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..0cf25576 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:2:484:879 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:54:2:525:938 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:2:584:871 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:54:2:626:297 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:54:5:995:684 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:54:6:53:593 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 14:54:6:693:631 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..2aa5deab --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:7:169:727 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:54:7:210:886 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:7:269:920 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:54:7:311:515 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:54:10:996:240 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:54:11:47:452 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:54:11:594:57 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..2b6233ba --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:12:51:164 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:54:12:92:704 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:12:151:57 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:54:12:192:569 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:54:13:496:808 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:54:13:558:537 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:54:14:94:636 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..b12a3009 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:14:554:370 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:54:14:595:565 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:14:654:309 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:54:14:695:945 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:54:15:372:324 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:54:15:426:128 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 14:54:16:70:133 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..ec5308e5 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:16:523:501 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:54:16:564:653 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:16:623:645 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:54:16:666:342 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:54:17:247:871 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:54:17:296:261 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:54:17:845:781 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..1756b4c0 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:18:310:965 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:54:18:351:897 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:18:410:948 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:54:18:453:377 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:54:19:123:467 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:54:19:180:966 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:54:19:721:316 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..b6b4d81a --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:20:172:365 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:54:20:213:302 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:20:272:331 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:54:20:314:876 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 14:54:20:997:239 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:54:21:42:820 + Q5 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q5 failed at: 2022-4-2 14:54:21:499:678 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..213cc50b --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:21:912:376 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:54:21:953:443 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:22:12:276 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:54:22:94:565 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 14:54:22:247:402 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:54:22:358:760 + Q5 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q5 failed at: 2022-4-2 14:54:22:749:882 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..2b344c39 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:23:162:737 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:54:23:203:596 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:23:262:769 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:54:23:344:899 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 14:54:23:809:306 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:54:23:856:404 + Q5 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q5 failed at: 2022-4-2 14:54:24:311:673 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/sqlserver/repeatable-read/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..7020c418 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/wat_mda_step_wat_c1.txt @@ -0,0 +1,44 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_wat_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:24:767:142 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:54:24:808:228 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:24:866:997 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:54:24:948:363 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 14:54:24:967:60 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 14:54:25:3:177 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-2 14:54:25:684:474 + Q11-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:54:25:731:895 + Q12-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:54:25:733:972 + Q12 finished at: 2022-4-2 14:54:25:782:514 +Q9 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q9 failed at: 2022-4-2 14:54:26:582:317 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/sqlserver/repeatable-read/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..6bc0f237 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/wat_mda_step_wat_c2.txt @@ -0,0 +1,44 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_wat_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:27:78:919 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:54:27:120:70 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:27:178:872 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:54:27:220:456 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:54:27:279:253 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 14:54:27:514:517 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-2 14:54:28:805:564 + Q10-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:54:28:859:419 + Q12-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:54:28:861:425 + Q12 finished at: 2022-4-2 14:54:28:908:412 +Q9 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q9 failed at: 2022-4-2 14:54:29:703:423 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/sqlserver/repeatable-read/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..d095fc9b --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: sqlserver #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:56:546:795 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:53:56:587:928 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:56:646:802 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-2 14:53:56:785:676 + Q4 finished at: 2022-4-2 14:53:56:788:1 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:53:56:895:376 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 14:53:56:966:602 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 14:53:57:3:488 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:53:57:50:883 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/sqlserver/repeatable-read/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..1a74e848 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: sqlserver #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:57:428:78 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:53:57:469:59 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:57:528:307 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-2 14:53:57:675:374 + Q4 finished at: 2022-4-2 14:53:57:677:732 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:53:57:777:776 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 14:53:57:814:696 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 14:53:57:851:616 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:53:57:896:73 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/wat_sda_full_write.txt b/test_result/centralizend_result/sqlserver/repeatable-read/wat_sda_full_write.txt new file mode 100644 index 00000000..df6841fb --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: sqlserver #### +#### test_type: sda_full_write #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:58:283:807 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:53:58:324:822 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:58:383:389 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-2 14:53:58:523:178 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 14:53:58:568:622 + Q4 finished at: 2022-4-2 14:53:58:570:958 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:53:58:637:468 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 14:53:58:674:296 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:53:58:709:812 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/wat_sda_full_write_committed.txt b/test_result/centralizend_result/sqlserver/repeatable-read/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..c8f2f8b2 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: sqlserver #### +#### test_type: sda_full_write_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:59:88:843 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:53:59:130:93 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:59:189:62 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-2 14:53:59:328:193 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:53:59:376:181 + Q4 finished at: 2022-4-2 14:53:59:378:477 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:53:59:435:508 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 14:53:59:472:462 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:53:59:507:800 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/sqlserver/repeatable-read/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..1de6b24f --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:1:638:442 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:54:1:679:569 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:1:738:405 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 14:54:1:878:632 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:54:1:925:865 + Q4 finished at: 2022-4-2 14:54:1:928:180 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:54:1:977:681 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:54:2:21:926 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:54:2:57:427 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/sqlserver/repeatable-read/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..c1c1ba4f --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/wat_sda_lost_update_c1.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_update_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:53:59:888:641 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 14:53:59:929:491 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:53:59:988:666 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-2 14:54:0:128:97 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 14:54:0:178:114 + Q4 finished at: 2022-4-2 14:54:0:180:430 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:54:0:242:472 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:54:0:279:445 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:54:0:314:960 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/repeatable-read/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/sqlserver/repeatable-read/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..64fe5e49 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/repeatable-read/wat_sda_lost_update_c2.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_update_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:54:0:687:337 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 14:54:0:728:368 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:54:0:787:351 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-2 14:54:0:926:825 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:54:1:136:344 + Q4 finished at: 2022-4-2 14:54:1:138:526 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:54:1:191:309 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:54:1:228:149 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:54:1:263:574 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/result_summary/rcsnapshot_total-result.txt b/test_result/centralizend_result/sqlserver/result_summary/rcsnapshot_total-result.txt new file mode 100644 index 00000000..45f42a10 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/result_summary/rcsnapshot_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Anomaly + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Rollback + +rat_dda_write_read_skew_committed: Rollback + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Anomaly + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Anomaly + +rat_dda_read_skew2_committed: Anomaly + +rat_mda_step_rat: Rollback + +rat_mda_step_rat_long_fork: Anomaly + +rat_mda_step_rat_predicate_based_delete: Rollback + +rat_mda_step_rat_predicate_based_insert: Rollback + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Avoid + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/sqlserver/result_summary/read-committed_total-result.txt b/test_result/centralizend_result/sqlserver/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..45f42a10 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Anomaly + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Rollback + +rat_dda_write_read_skew_committed: Rollback + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Anomaly + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Anomaly + +rat_dda_read_skew2_committed: Anomaly + +rat_mda_step_rat: Rollback + +rat_mda_step_rat_long_fork: Anomaly + +rat_mda_step_rat_predicate_based_delete: Rollback + +rat_mda_step_rat_predicate_based_insert: Rollback + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Avoid + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/sqlserver/result_summary/read-uncommitted_total-result.txt b/test_result/centralizend_result/sqlserver/result_summary/read-uncommitted_total-result.txt new file mode 100644 index 00000000..f709ccda --- /dev/null +++ b/test_result/centralizend_result/sqlserver/result_summary/read-uncommitted_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Anomaly + +rat_sda_non_repeatable_read: Anomaly + +rat_sda_intermediate_read: Anomaly + +rat_sda_intermediate_read_committed: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Anomaly + +rat_dda_double_write_skew1_committed: Anomaly + +rat_dda_double_write_skew2: Anomaly + +rat_dda_read_skew: Anomaly + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Anomaly + +rat_dda_read_skew2_committed: Anomaly + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Anomaly + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Anomaly + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Avoid + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/sqlserver/result_summary/repeatable-read_total-result.txt b/test_result/centralizend_result/sqlserver/result_summary/repeatable-read_total-result.txt new file mode 100644 index 00000000..f872970f --- /dev/null +++ b/test_result/centralizend_result/sqlserver/result_summary/repeatable-read_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Rollback + +rat_dda_write_read_skew_committed: Rollback + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Rollback + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Rollback + +rat_dda_read_skew2_committed: Rollback + +rat_mda_step_rat: Rollback + +rat_mda_step_rat_long_fork: Rollback + +rat_mda_step_rat_predicate_based_delete: Rollback + +rat_mda_step_rat_predicate_based_insert: Rollback + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Avoid + +wat_sda_lost_update_c2: Avoid + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Avoid + +iat_dda_read_skew_committed: Rollback + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Rollback + +iat_dda_write_skew_predicate_based-intersecting_data: Avoid + +iat_dda_write_skew_predicate_based-overdraft_protection: Rollback + +iat_dda_write_skew_committed: Rollback + +iat_mda_step_iat: Rollback + +iat_mda_step_iat_predicate_based_delete: Rollback + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Rollback + +iat_mda_step_iat_cross_phenomenon: Rollback + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Rollback + diff --git a/test_result/centralizend_result/sqlserver/result_summary/serializable_total-result.txt b/test_result/centralizend_result/sqlserver/result_summary/serializable_total-result.txt new file mode 100644 index 00000000..db50cb37 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/result_summary/serializable_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Rollback + +rat_dda_write_read_skew_committed: Rollback + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Rollback + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Rollback + +rat_dda_read_skew2_committed: Rollback + +rat_mda_step_rat: Rollback + +rat_mda_step_rat_long_fork: Rollback + +rat_mda_step_rat_predicate_based_delete: Rollback + +rat_mda_step_rat_predicate_based_insert: Rollback + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Avoid + +wat_sda_lost_update_c2: Avoid + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Avoid + +iat_dda_read_skew_committed: Rollback + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Rollback + +iat_dda_write_skew_predicate_based-intersecting_data: Avoid + +iat_dda_write_skew_predicate_based-overdraft_protection: Rollback + +iat_dda_write_skew_committed: Rollback + +iat_mda_step_iat: Rollback + +iat_mda_step_iat_predicate_based_delete: Rollback + +iat_mda_step_iat_predicate_based_insert: Rollback + +iat_mda_step_iat_uname_anomaly: Rollback + +iat_mda_step_iat_cross_phenomenon: Rollback + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Rollback + diff --git a/test_result/centralizend_result/sqlserver/result_summary/snapshot_total-result.txt b/test_result/centralizend_result/sqlserver/result_summary/snapshot_total-result.txt new file mode 100644 index 00000000..554aa7a2 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/result_summary/snapshot_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Rollback + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Rollback + +wat_sda_full_write: Rollback + +wat_sda_full_write_committed: Rollback + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Rollback + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Rollback + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/sqlserver/serializable/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/sqlserver/serializable/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..0cb31fa1 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/iat_dda_read_skew_committed.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:40:131:36 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:56:40:173:852 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:40:231:576 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:56:40:273:658 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:56:40:935:311 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:56:40:984:412 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 14:56:41:633:924 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/sqlserver/serializable/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..0386255a --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:42:84:828 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:56:42:125:654 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:42:184:846 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:56:42:227:12 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:56:43:431:648 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:56:43:488:967 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 14:56:44:130:286 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/iat_dda_write_skew.txt b/test_result/centralizend_result/sqlserver/serializable/iat_dda_write_skew.txt new file mode 100644 index 00000000..9d78878b --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/iat_dda_write_skew.txt @@ -0,0 +1,49 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:44:582:841 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:56:44:623:584 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:44:682:792 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:56:44:723:724 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:56:45:304:370 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:56:45:355:608 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:56:45:903:16 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/sqlserver/serializable/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..0eeb6543 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/iat_dda_write_skew_committed.txt @@ -0,0 +1,49 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:49:576:5 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:56:49:616:630 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:49:675:967 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:56:49:716:941 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:56:50:921:931 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:56:50:970:603 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 14:56:51:620:589 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/sqlserver/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..5f840c80 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,74 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:46:439:311 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-2 14:56:46:487:540 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-2 14:56:46:527:558 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-2 14:56:46:539:276 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:56:46:689:917 + current_result: + (330,) + *(1) expected_result: + (330,) + (2) expected_result: + (300,) + + Q5 finished at: 2022-4-2 14:56:46:691:759 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-2 14:56:46:732:745 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:56:46:780:457 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-2 14:56:46:821:656 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-2 14:56:46:862:428 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:56:46:902:447 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/sqlserver/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..4ec3332e --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,49 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:47:316:574 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-2 14:56:47:364:670 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:47:416:587 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-2 14:56:47:457:969 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' + Q5 finished at: 2022-4-2 14:56:48:425:246 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:56:48:473:721 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 14:56:49:123:832 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/iat_mda_step_iat.txt b/test_result/centralizend_result/sqlserver/serializable/iat_mda_step_iat.txt new file mode 100644 index 00000000..e1117103 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/iat_mda_step_iat.txt @@ -0,0 +1,89 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:52:117:921 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 14:56:52:159:238 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:52:219:581 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:56:52:260:953 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:56:52:317:917 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 14:56:52:358:866 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q8 finished at: 2022-4-2 14:56:52:794:456 + Q11-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:56:52:868:759 +Q10-T1 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:56:52:870:393 +Q10 finished at: 2022-4-2 14:56:52:918:863 + Q9 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 53) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q9 failed at: 2022-4-2 14:56:53:693:578 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 53) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/sqlserver/serializable/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..e9dead33 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:57:4:924:323 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:57:4:965:334 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:57:5:24:163 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 14:57:5:124:102 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-2 14:57:5:264:21 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-2 14:57:5:303:600 + Q4 finished at: 2022-4-2 14:57:5:305:178 + Q5-T2 execute opt: 'COMMIT'; + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 14:57:5:359:310 + Q5 finished at: 2022-4-2 14:57:5:359:794 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-2 14:57:5:399:936 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:57:5:452:562 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-2 14:57:5:494:517 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 14:57:5:534:725 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/serializable/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/sqlserver/serializable/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..e9f1e37e --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,140 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:57:2:244:246 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:57:2:285:853 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:57:2:344:338 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:57:2:386:741 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:57:2:444:285 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 14:57:2:544:287 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q9 finished at: 2022-4-2 14:57:3:407:245 + Q10-T4 execute opt: 'COMMIT'; + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-2 14:57:3:456:576 +Q14-T1 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:57:3:458:157 +Q14 finished at: 2022-4-2 14:57:3:496:179 + Q6 finished at: 2022-4-2 14:57:3:496:789 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:57:3:552:802 + Q11 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q11 failed at: 2022-4-2 14:57:4:506:301 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/sqlserver/serializable/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..196fae42 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,89 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:54:145:100 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-2 14:56:54:186:234 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:54:245:105 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:56:54:286:945 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:56:54:345:129 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 14:56:54:425:174 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q8 finished at: 2022-4-2 14:56:55:915:701 + Q11-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:56:55:967:356 +Q10-T1 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:56:55:968:856 +Q10 finished at: 2022-4-2 14:56:56:19:45 + Q9 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 53) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q9 failed at: 2022-4-2 14:56:56:814:938 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 53) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/sqlserver/serializable/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..f58982da --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,85 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:57:144:514 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 14:56:57:185:664 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:57:244:779 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-2 14:56:57:286:403 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:56:57:344:669 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-2 14:56:57:424:796 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q7 finished at: 2022-4-2 14:56:58:411:111 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:56:58:457:611 + Q8 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q8 failed at: 2022-4-2 14:56:59:212:576 + Q9 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 53) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q9 failed at: 2022-4-2 14:56:59:311:750 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/sqlserver/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..55c27f8a --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,120 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:57:5:952:208 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 14:57:5:993:588 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-2 14:57:6:34:310 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-2 14:57:6:51:688 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-2 14:57:6:93:15 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 14:57:6:151:857 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-2 14:57:6:193:65 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' + Q6 finished at: 2022-4-2 14:57:7:150:832 + Q7-T2 execute opt: 'COMMIT'; + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 14:57:7:201:693 + Q7 finished at: 2022-4-2 14:57:7:201:876 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:57:7:241:736 +Q12 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q12 failed at: 2022-4-2 14:57:8:349:417 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/sqlserver/serializable/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..c74c21e5 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,127 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:59:763:702 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-2 14:56:59:804:802 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:59:863:651 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-2 14:56:59:944:380 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2022-4-2 14:56:59:963:643 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + Q5 finished at: 2022-4-2 14:56:59:986:257 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 14:57:0:27:774 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-2 14:57:0:43:957 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + Q11 finished at: 2022-4-2 14:57:0:84:629 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q7 finished at: 2022-4-2 14:57:0:284:940 + Q8-T2 execute opt: 'COMMIT'; + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-2 14:57:0:334:263 + Q8 finished at: 2022-4-2 14:57:0:334:505 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-2 14:57:0:374:763 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 14:57:0:422:769 +Q15 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q15 failed at: 2022-4-2 14:57:1:783:575 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/sqlserver/serializable/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..f892f940 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/iat_sda_lost_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:39:289:234 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 14:56:39:330:347 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:39:391:466 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-2 14:56:39:528:308 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:56:39:578:941 + Q4 finished at: 2022-4-2 14:56:39:580:528 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:56:39:628:369 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:56:39:670:874 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:56:39:710:917 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/serializable/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/sqlserver/serializable/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..d4049826 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:38:501:533 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:56:38:542:568 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:38:603:568 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 14:56:38:743:57 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:56:38:782:557 + Q4 finished at: 2022-4-2 14:56:38:784:53 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:56:38:832:956 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:56:38:874:534 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:56:38:914:774 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:56:38:915:624 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/serializable/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/sqlserver/serializable/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..6dbf6abf --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/rat_dda_double_write_skew1.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:55:16:146:787 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:55:16:187:755 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:55:16:251:509 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:55:16:292:495 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:55:17:495:457 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:55:17:542:201 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:55:18:93:795 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/sqlserver/serializable/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..d931383c --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:55:18:546:585 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:55:18:587:443 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:55:18:646:476 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:55:18:687:190 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:55:19:371:3 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:55:19:422:717 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 14:55:20:69:322 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/sqlserver/serializable/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..5c938e61 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/rat_dda_double_write_skew2.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:55:20:519:455 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:55:20:560:249 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:55:20:619:684 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:55:20:660:549 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:55:21:246:445 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:55:21:300:358 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:55:21:844:943 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/rat_dda_read_skew.txt b/test_result/centralizend_result/sqlserver/serializable/rat_dda_read_skew.txt new file mode 100644 index 00000000..09268b81 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/rat_dda_read_skew.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:55:22:308:385 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:55:22:349:263 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:55:22:408:513 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:55:22:450:519 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:55:23:121:991 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:55:23:175:658 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:55:23:720:561 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/rat_dda_read_skew2.txt b/test_result/centralizend_result/sqlserver/serializable/rat_dda_read_skew2.txt new file mode 100644 index 00000000..7cb14060 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/rat_dda_read_skew2.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:55:25:745:536 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:55:25:786:258 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:55:25:845:539 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:55:25:887:128 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 14:55:26:246:390 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:55:26:297:191 + Q5 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q5 failed at: 2022-4-2 14:55:26:748:71 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/sqlserver/serializable/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..2b9cfee0 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/rat_dda_read_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:55:27:158:358 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:55:27:199:336 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:55:27:258:421 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:55:27:339:398 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 14:55:28:747:82 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:55:28:797:826 + Q5 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q5 failed at: 2022-4-2 14:55:29:248:753 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/sqlserver/serializable/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..b3f3a52f --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:55:24:180:375 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 14:55:24:234:680 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:55:24:280:418 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 14:55:24:419:689 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:55:24:458:967 + Q4 finished at: 2022-4-2 14:55:24:460:641 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-2 14:55:24:501:337 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:55:24:550:468 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-2 14:55:24:592:55 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:55:24:592:804 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/serializable/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/sqlserver/serializable/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..41e5e3a4 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:55:24:920:997 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 14:55:24:961:725 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:55:25:21:11 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 14:55:25:160:272 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:55:25:199:549 + Q4 finished at: 2022-4-2 14:55:25:201:264 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-2 14:55:25:242:20 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:55:25:290:785 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-2 14:55:25:332:281 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:55:25:333:11 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/serializable/rat_dda_write_read_skew.txt b/test_result/centralizend_result/sqlserver/serializable/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..3872e2e9 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/rat_dda_write_read_skew.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:55:7:689:45 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:55:7:729:958 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:55:7:789:262 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:55:7:830:126 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:55:9:994:505 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:55:10:54:121 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:55:10:592:770 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/sqlserver/serializable/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..ef3f3a87 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:55:11:46:653 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:55:11:87:599 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:55:11:146:599 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:55:11:187:466 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:55:14:994:795 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:55:15:47:414 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 14:55:15:693:137 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/rat_mda_step_rat.txt b/test_result/centralizend_result/sqlserver/serializable/rat_mda_step_rat.txt new file mode 100644 index 00000000..fe41b529 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/rat_mda_step_rat.txt @@ -0,0 +1,74 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:55:29:698:124 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:55:29:738:934 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:55:29:798:75 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:55:29:877:996 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 14:55:29:937:451 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-2 14:55:29:977:880 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 14:55:30:625:59 + Q11-T2 execute opt: 'COMMIT'; + current_result: + (1,1) + *(1) expected_result: + (1,1) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q8 finished at: 2022-4-2 14:55:30:673:709 + Q11 finished at: 2022-4-2 14:55:30:674:196 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:55:30:728:861 +Q9 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q9 failed at: 2022-4-2 14:55:31:523:31 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/sqlserver/serializable/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..9b9e85da --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,167 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2022-4-2 14:55:32:21:740 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-2 14:55:32:65:182 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2022-4-2 14:55:32:80:374 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:55:32:183:726 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-2 14:55:32:225:679 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 14:55:32:283:664 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 14:55:32:502:723 + Q9 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q9 failed at: 2022-4-2 14:55:33:400:286 + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 14:55:52:124:43 +Q4 failed reason: errcode: 00000 +Q4 failed at: 2022-4-2 14:55:52:522:583 +Q4 finished at: 2022-4-2 14:55:52:522:710 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/sqlserver/serializable/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..94f070b1 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,74 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:55:52:978:520 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:55:53:19:288 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:55:53:78:719 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:55:53:158:643 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 14:55:53:178:526 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-2 14:55:53:219:1 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 14:55:58:128:626 + Q11-T2 execute opt: 'COMMIT'; + current_result: + (,) + *(1) expected_result: + (,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q8 finished at: 2022-4-2 14:55:58:184:832 + Q11 finished at: 2022-4-2 14:55:58:185:7 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 14:55:58:233:993 +Q9 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q9 failed at: 2022-4-2 14:55:59:26:748 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/sqlserver/serializable/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..01d1ba51 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,71 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:55:59:401:906 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-2 14:55:59:442:605 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:55:59:501:871 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-2 14:55:59:542:658 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 14:55:59:602:196 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-2 14:55:59:642:877 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-2 14:56:3:127:797 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 14:56:3:188:635 + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 14:56:3:190:922 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:56:3:242:704 + Q8 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 53) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q8 failed at: 2022-4-2 14:56:3:928:32 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 53) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/rat_sda_dirty_read.txt b/test_result/centralizend_result/sqlserver/serializable/rat_sda_dirty_read.txt new file mode 100644 index 00000000..5deae19b --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: sqlserver #### +#### test_type: sda_dirty_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:55:2:149:777 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:55:2:190:654 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:55:2:250:383 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-2 14:55:2:349:603 + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:55:2:351:501 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:55:2:450:458 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 14:55:2:491:785 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:55:2:492:635 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/serializable/rat_sda_intermediate_read.txt b/test_result/centralizend_result/sqlserver/serializable/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..1039b521 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_intermediate_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:55:3:770:404 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:55:3:811:469 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:55:3:870:382 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-2 14:55:4:9:834 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:55:4:237:790 + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:55:4:239:710 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:55:4:279:885 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 14:55:4:321:219 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:55:4:321:943 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/serializable/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/sqlserver/serializable/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..f1961064 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:55:4:698:934 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:55:4:739:610 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:55:4:798:870 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-2 14:55:4:938:219 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:55:4:989:678 + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 14:55:4:991:486 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:55:5:31:505 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 14:55:5:72:660 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:55:5:73:370 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/serializable/rat_sda_lost_self_update.txt b/test_result/centralizend_result/sqlserver/serializable/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..ebfa11d2 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_self_update #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:55:6:888:685 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:55:6:929:817 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:55:6:988:758 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 14:55:7:128:901 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 14:55:7:185:662 + Q4 finished at: 2022-4-2 14:55:7:187:423 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:55:7:238:252 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:55:7:279:610 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:55:7:280:383 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/serializable/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/sqlserver/serializable/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..9baa5bb1 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:55:2:863:946 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:55:2:904:848 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:55:2:964:315 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 14:55:3:103:339 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:55:3:302:708 + Q4 finished at: 2022-4-2 14:55:3:304:351 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:55:3:349:947 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:55:3:391:158 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:55:3:391:841 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/sqlserver/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..4c7d1a44 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:55:5:450:143 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 14:55:5:501:166 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:55:5:549:984 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 14:55:5:689:246 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:55:5:728:356 + Q4 finished at: 2022-4-2 14:55:5:730:138 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:55:5:775:379 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-2 14:55:5:816:666 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:55:5:817:386 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/sqlserver/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..03c81edb --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:55:6:148:128 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 14:55:6:189:124 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:55:6:248:31 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 14:55:6:387:336 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:55:6:426:465 + Q4 finished at: 2022-4-2 14:55:6:428:199 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:55:6:477:909 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-2 14:55:6:519:498 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:55:6:520:240 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/serializable/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/sqlserver/serializable/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..c35d88f3 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:10:284:850 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:56:10:325:905 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:10:384:693 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 14:56:10:425:547 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:56:14:380:102 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:56:14:434:590 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 14:56:15:78:699 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/sqlserver/serializable/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..350e1769 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:15:530:588 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:56:15:571:533 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:15:630:286 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:56:15:671:175 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:56:19:380:753 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:56:19:431:844 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:56:19:979:396 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/sqlserver/serializable/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..718506ea --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:20:441:132 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:56:20:482:149 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:20:540:926 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:56:20:581:786 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:56:21:881:419 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:56:21:932:989 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:56:22:480:346 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/sqlserver/serializable/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..70bc6fc2 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:22:937:643 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:56:22:978:634 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:23:37:710 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:56:23:78:914 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:56:23:757:59 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:56:23:818:488 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 14:56:24:455:624 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/sqlserver/serializable/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..82fe2386 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:24:910:887 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:56:24:951:545 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:25:10:944 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:56:25:52:836 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:56:25:632:512 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:56:25:684:516 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:56:26:231:87 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/sqlserver/serializable/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..11d7eedc --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:26:685:785 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 14:56:26:726:782 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:26:785:667 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:56:26:827:484 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 14:56:27:508:676 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:56:27:560:145 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 14:56:28:107:303 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/sqlserver/serializable/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..54924ddf --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:28:558:760 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:56:28:599:596 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:28:658:778 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:56:28:700:602 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 14:56:29:382:632 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:56:29:431:236 + Q5 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q5 failed at: 2022-4-2 14:56:29:884:391 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/sqlserver/serializable/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..f65bb713 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:30:296:181 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:56:30:337:291 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:30:396:97 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:56:30:476:968 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 14:56:30:633:105 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:56:30:745:255 + Q5 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q5 failed at: 2022-4-2 14:56:31:134:782 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/sqlserver/serializable/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..91365b1c --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:31:548:494 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:56:31:589:298 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:31:648:356 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 14:56:31:729:531 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 14:56:32:195:65 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 14:56:32:243:391 + Q5 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q5 failed at: 2022-4-2 14:56:32:696:788 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/sqlserver/serializable/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..47b77edf --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/wat_mda_step_wat_c1.txt @@ -0,0 +1,44 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_wat_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:33:150:271 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:56:33:191:405 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:33:250:266 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:56:33:330:468 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 14:56:33:350:205 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 14:56:33:390:986 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-2 14:56:34:69:635 + Q11-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:56:34:123:912 + Q12-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 14:56:34:124:741 + Q12 finished at: 2022-4-2 14:56:34:183:684 +Q9 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q9 failed at: 2022-4-2 14:56:34:968:227 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/sqlserver/serializable/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..f834d0f1 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/wat_mda_step_wat_c2.txt @@ -0,0 +1,44 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_wat_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:35:461:402 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:56:35:502:227 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:35:561:377 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 14:56:35:602:191 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 14:56:35:661:371 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 14:56:35:901:771 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-2 14:56:37:191:359 + Q10-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 14:56:37:239:593 + Q12-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 14:56:37:240:409 + Q12 finished at: 2022-4-2 14:56:37:287:850 +Q9 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q9 failed at: 2022-4-2 14:56:38:89:124 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/serializable/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/sqlserver/serializable/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..79ad9662 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: sqlserver #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:4:308:566 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:56:4:349:496 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:4:408:530 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-2 14:56:4:547:58 + Q4 finished at: 2022-4-2 14:56:4:548:664 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:56:4:661:970 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 14:56:4:742:428 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 14:56:4:783:778 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:56:4:828:598 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/serializable/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/sqlserver/serializable/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..3788f9d8 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: sqlserver #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:5:204:284 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:56:5:245:397 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:5:304:161 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-2 14:56:5:450:722 + Q4 finished at: 2022-4-2 14:56:5:452:287 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:56:5:552:118 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 14:56:5:593:469 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 14:56:5:634:664 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:56:5:679:927 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/serializable/wat_sda_full_write.txt b/test_result/centralizend_result/sqlserver/serializable/wat_sda_full_write.txt new file mode 100644 index 00000000..4ebc03fa --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: sqlserver #### +#### test_type: sda_full_write #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:6:49:671 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:56:6:90:783 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:6:149:649 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-2 14:56:6:289:389 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 14:56:6:337:583 + Q4 finished at: 2022-4-2 14:56:6:339:204 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:56:6:399:318 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 14:56:6:441:623 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:56:6:481:779 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/serializable/wat_sda_full_write_committed.txt b/test_result/centralizend_result/sqlserver/serializable/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..170e1dd9 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: sqlserver #### +#### test_type: sda_full_write_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:6:858:894 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:56:6:899:806 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:6:959:553 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-2 14:56:7:99:913 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:56:7:144:223 + Q4 finished at: 2022-4-2 14:56:7:145:794 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:56:7:194:787 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-2 14:56:7:239:649 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:56:7:279:717 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/serializable/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/sqlserver/serializable/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..14c91b40 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:9:444:200 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 14:56:9:485:228 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:9:543:298 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 14:56:9:683:324 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:56:9:729:636 + Q4 finished at: 2022-4-2 14:56:9:731:219 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 14:56:9:780:476 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:56:9:821:695 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:56:9:861:794 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/serializable/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/sqlserver/serializable/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..a2792eed --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/wat_sda_lost_update_c1.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_update_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:7:671:11 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 14:56:7:711:825 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:7:771:29 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-2 14:56:7:911:68 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 14:56:7:955:68 + Q4 finished at: 2022-4-2 14:56:7:956:644 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 14:56:8:23:227 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:56:8:71:515 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:56:8:111:631 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/serializable/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/sqlserver/serializable/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..acb7837e --- /dev/null +++ b/test_result/centralizend_result/sqlserver/serializable/wat_sda_lost_update_c2.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_update_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 14:56:8:482:849 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 14:56:8:523:430 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 14:56:8:582:842 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-2 14:56:8:721:951 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 14:56:8:927:47 + Q4 finished at: 2022-4-2 14:56:8:928:571 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 14:56:8:978:900 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 14:56:9:23:677 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 14:56:9:63:651 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/snapshot/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/sqlserver/snapshot/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..a8edadcf --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/iat_dda_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:54:844:373 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 15:10:54:888:288 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:54:944:267 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 15:10:54:983:504 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 15:10:55:21:789 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q6 finished at: 2022-4-2 15:10:55:76:701 + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 15:10:55:86:561 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 15:10:55:129:55 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 15:10:55:169:164 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:10:55:207:585 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/snapshot/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/sqlserver/snapshot/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..97e1e93b --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:55:639:345 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 15:10:55:683:138 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:55:739:310 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 15:10:55:778:723 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 15:10:55:817:59 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q6 finished at: 2022-4-2 15:10:55:870:479 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row errcode: 42000 +Q7 failed at: 2022-4-2 15:10:56:582:607 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row + diff --git a/test_result/centralizend_result/sqlserver/snapshot/iat_dda_write_skew.txt b/test_result/centralizend_result/sqlserver/snapshot/iat_dda_write_skew.txt new file mode 100644 index 00000000..254129a7 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:57:63:989 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 15:10:57:108:135 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:57:164:595 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 15:10:57:203:276 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 15:10:57:242:630 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 15:10:57:306:266 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:10:57:358:260 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 15:10:57:411:834 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 15:10:57:451:666 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 15:10:57:490:241 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/snapshot/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/sqlserver/snapshot/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..3db68a8b --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:59:626:332 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 15:10:59:670:478 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:59:726:260 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 15:10:59:764:750 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 15:10:59:803:961 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q6 finished at: 2022-4-2 15:10:59:849:969 +Q7 finished at: 2022-4-2 15:10:59:868:428 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 15:10:59:922:273 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 15:10:59:961:999 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:11:0:0:546 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/snapshot/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/sqlserver/snapshot/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..cbf23179 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:58:7:793 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-2 15:10:58:58:880 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-2 15:10:58:102:420 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-2 15:10:58:107:998 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-2 15:10:58:152:398 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-2 15:10:58:191:80 + Q7-T2 execute opt: 'COMMIT'; +Q8-T1 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 15:10:58:239:286 +Q8 finished at: 2022-4-2 15:10:58:263:169 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-2 15:10:58:302:619 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-2 15:10:58:341:917 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 15:10:58:380:477 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/snapshot/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/sqlserver/snapshot/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..efccc514 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:58:825:37 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-2 15:10:58:876:789 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:58:924:945 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-2 15:10:58:963:706 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-2 15:10:59:3:931 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' + Q6 finished at: 2022-4-2 15:10:59:58:351 +Q7 finished at: 2022-4-2 15:10:59:68:128 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 15:10:59:120:945 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-2 15:10:59:160:542 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:10:59:199:22 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/snapshot/iat_mda_step_iat.txt b/test_result/centralizend_result/sqlserver/snapshot/iat_mda_step_iat.txt new file mode 100644 index 00000000..1d72a779 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:11:0:475:210 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 15:11:0:519:543 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:11:0:575:685 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 15:11:0:614:468 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 15:11:0:675:158 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 15:11:0:714:590 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-2 15:11:0:818:415 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-2 15:11:0:912:626 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-2 15:11:1:13:469 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 15:11:1:139:663 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 15:11:1:222:484 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 15:11:1:319:496 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 15:11:1:359:999 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 15:11:1:398:739 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/snapshot/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/sqlserver/snapshot/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..f45c6b9a --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:11:7:671:948 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 15:11:7:715:880 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:11:7:772:70 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 15:11:7:811:217 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 15:11:7:861:272 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 15:11:7:871:961 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 15:11:7:911:173 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-2 15:11:7:950:132 + Q9-T3 execute opt: 'COMMIT'; +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q9 finished at: 2022-4-2 15:11:7:998:922 + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-2 15:11:8:14:588 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-2 15:11:8:57:177 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-2 15:11:8:97:740 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 15:11:8:136:462 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/snapshot/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/sqlserver/snapshot/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..f640590c --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,209 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:11:6:618:347 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 15:11:6:663:659 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:11:6:718:277 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 15:11:6:757:616 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 15:11:6:818:462 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-2 15:11:6:895:795 + Q7-T3 execute opt: 'COMMIT'; + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 15:11:6:918:291 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-2 15:11:6:948:728 + Q9 finished at: 2022-4-2 15:11:6:957:528 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:11:7:2:562 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-2 15:11:7:56:692 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 15:11:7:94:387 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-2 15:11:7:161:339 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-2 15:11:7:203:949 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-2 15:11:7:242:202 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-2 15:11:7:243:91 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/snapshot/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/sqlserver/snapshot/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..bf846cb9 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:11:1:872:964 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-2 15:11:1:916:808 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:11:1:972:947 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 15:11:2:11:612 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 15:11:2:73:95 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 15:11:2:112:397 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-2 15:11:2:216:335 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-2 15:11:2:310:543 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-2 15:11:2:411:563 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 15:11:2:522:452 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 15:11:2:626:19 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 15:11:2:716:115 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-2 15:11:2:756:437 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 15:11:2:795:237 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/snapshot/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/sqlserver/snapshot/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..824b2ced --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:11:3:135:439 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-2 15:11:3:179:736 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:11:3:235:332 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-2 15:11:3:273:945 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 15:11:3:335:349 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-2 15:11:3:374:702 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-2 15:11:3:478:357 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-2 15:11:3:572:787 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-2 15:11:3:673:634 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 15:11:3:785:187 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 15:11:3:885:944 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 15:11:3:978:231 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 15:11:4:18:986 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 15:11:4:57:700 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/snapshot/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/sqlserver/snapshot/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..7989fb25 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:11:8:566:962 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 15:11:8:611:93 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-2 15:11:8:654:736 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2022-4-2 15:11:8:666:985 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-2 15:11:8:705:599 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-2 15:11:8:744:844 + Q7-T2 execute opt: 'COMMIT'; + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 15:11:8:766:963 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q7 finished at: 2022-4-2 15:11:8:793:768 + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-2 15:11:8:806:410 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 15:11:8:845:728 + Q11-T3 execute opt: 'COMMIT'; +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' + Q11 finished at: 2022-4-2 15:11:8:884:288 +Q12 finished at: 2022-4-2 15:11:8:909:346 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-2 15:11:8:962:494 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-2 15:11:9:2:724 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-2 15:11:9:41:168 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/snapshot/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/sqlserver/snapshot/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..653afee1 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,142 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:11:4:532:278 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-2 15:11:4:576:738 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:11:4:632:232 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-2 15:11:4:670:950 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 15:11:4:710:142 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2022-4-2 15:11:4:732:383 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-2 15:11:4:748:576 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-2 15:11:4:771:712 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-2 15:11:4:786:568 + Q8-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 15:11:4:810:637 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q8 finished at: 2022-4-2 15:11:4:834:374 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q12 finished at: 2022-4-2 15:11:4:849:970 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-2 15:11:4:878:258 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-2 15:11:4:920:993 + Q13 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row errcode: 42000 + Q13 failed at: 2022-4-2 15:11:6:189:277 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row + diff --git a/test_result/centralizend_result/sqlserver/snapshot/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/sqlserver/snapshot/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..3a1a6167 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/iat_sda_lost_update_committed.txt @@ -0,0 +1,39 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_update_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:53:523:638 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 15:10:53:567:808 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:53:623:647 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 15:10:53:662:888 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 15:10:53:710:816 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row errcode: 42000 +Q6 failed at: 2022-4-2 15:10:54:366:205 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row + diff --git a/test_result/centralizend_result/sqlserver/snapshot/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/sqlserver/snapshot/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..5160c7af --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:52:740:575 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 15:10:52:784:751 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:52:836:952 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 15:10:52:912:690 + Q5-T2 execute opt: 'COMMIT'; +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-2 15:10:52:958:147 + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 15:10:52:979:104 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:10:53:21:675 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 15:10:53:98:573 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 15:10:53:136:988 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:10:53:137:707 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/snapshot/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/sqlserver/snapshot/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..0c6d0ef8 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/rat_dda_double_write_skew1.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:4:459:73 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:4:502:849 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:4:559:68 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 15:10:4:597:298 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 15:10:4:636:322 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 15:10:4:804:683 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row errcode: 42000 +Q6 failed at: 2022-4-2 15:10:5:408:848 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row + diff --git a/test_result/centralizend_result/sqlserver/snapshot/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/sqlserver/snapshot/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..4be1bfa1 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:5:878:767 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:5:923:206 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:5:978:668 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 15:10:6:17:150 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 15:10:6:56:452 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q6 finished at: 2022-4-2 15:10:6:101:746 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row errcode: 42000 +Q7 failed at: 2022-4-2 15:10:6:821:697 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row + diff --git a/test_result/centralizend_result/sqlserver/snapshot/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/sqlserver/snapshot/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..8e7ff5b4 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/rat_dda_double_write_skew2.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:7:293:294 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:7:337:279 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:7:393:199 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 15:10:7:431:321 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 15:10:7:536:610 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:10:7:586:894 + Q5 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row errcode: 42000 + Q5 failed at: 2022-4-2 15:10:8:83:849 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row + diff --git a/test_result/centralizend_result/sqlserver/snapshot/rat_dda_read_skew.txt b/test_result/centralizend_result/sqlserver/snapshot/rat_dda_read_skew.txt new file mode 100644 index 00000000..e3c70822 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:8:511:426 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 15:10:8:555:173 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:8:611:431 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 15:10:8:687:386 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-2 15:10:8:725:714 + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 15:10:8:753:772 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 15:10:8:855:206 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 15:10:8:953:116 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 15:10:8:993:279 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:10:8:994:35 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/snapshot/rat_dda_read_skew2.txt b/test_result/centralizend_result/sqlserver/snapshot/rat_dda_read_skew2.txt new file mode 100644 index 00000000..980640f3 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:10:840:563 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:10:884:525 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:10:940:474 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 15:10:10:979:579 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 15:10:11:18:297 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 15:10:11:82:840 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:10:11:132:948 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 15:10:11:178:628 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 15:10:11:218:605 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:10:11:219:569 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/snapshot/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/sqlserver/snapshot/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..23024a81 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew2_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:11:645:912 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:11:689:827 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:11:745:875 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 15:10:11:784:993 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 15:10:11:823:187 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q6 finished at: 2022-4-2 15:10:11:860:667 +Q7 finished at: 2022-4-2 15:10:11:888:451 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 15:10:11:936:525 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 15:10:11:976:427 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:10:11:977:240 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/snapshot/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/sqlserver/snapshot/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..7d338fd6 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:9:425:495 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 15:10:9:481:999 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:9:526:15 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-2 15:10:9:564:969 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-2 15:10:9:603:17 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + Q6 finished at: 2022-4-2 15:10:9:646:33 + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 15:10:9:668:511 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 15:10:9:710:872 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-2 15:10:9:750:637 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:10:9:751:402 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/snapshot/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/sqlserver/snapshot/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..e3d29eb7 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:10:89:109 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-2 15:10:10:132:947 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:10:189:148 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-2 15:10:10:228:317 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-2 15:10:10:266:411 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + Q6 finished at: 2022-4-2 15:10:10:311:724 + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-2 15:10:10:331:665 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 15:10:10:374:245 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-2 15:10:10:414:101 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:10:10:414:873 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/snapshot/rat_dda_write_read_skew.txt b/test_result/centralizend_result/sqlserver/snapshot/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..847c7999 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_read_skew #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:2:780:2 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:2:823:926 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:2:879:935 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 15:10:2:954:608 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 15:10:2:993:572 + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-2 15:10:3:22:705 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 15:10:3:122:354 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 15:10:3:227:555 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 15:10:3:267:276 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:10:3:268:25 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/snapshot/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/sqlserver/snapshot/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..b1884297 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: sqlserver #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:3:691:857 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:3:735:869 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:3:791:731 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 15:10:3:829:812 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 15:10:3:868:834 + Q6-T2 execute opt: 'COMMIT'; +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q6 finished at: 2022-4-2 15:10:3:918:783 + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 15:10:3:933:993 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 15:10:3:987:56 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-2 15:10:4:26:760 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-2 15:10:4:27:450 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/snapshot/rat_mda_step_rat.txt b/test_result/centralizend_result/sqlserver/snapshot/rat_mda_step_rat.txt new file mode 100644 index 00000000..58be1c74 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:12:445:15 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:12:489:40 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:12:544:994 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 15:10:12:583:27 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-2 15:10:12:622:516 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 15:10:12:682:683 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-2 15:10:12:725:246 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-2 15:10:12:764:724 + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-2 15:10:12:789:927 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 15:10:12:846:887 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 15:10:12:891:531 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 15:10:12:988:91 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 15:10:13:29:35 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 15:10:13:29:839 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/snapshot/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/sqlserver/snapshot/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..1f3924b2 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2022-4-2 15:10:13:493:886 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-2 15:10:13:535:120 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2022-4-2 15:10:13:556:325 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-2 15:10:13:600:170 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 15:10:13:655:995 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-2 15:10:13:696:182 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 15:10:13:736:254 + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2022-4-2 15:10:13:756:66 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-2 15:10:13:794:371 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-2 15:10:13:895:628 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-2 15:10:14:9:897 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 15:10:14:107:356 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-2 15:10:14:193:923 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 15:10:14:232:811 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-2 15:10:14:274:99 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-2 15:10:14:312:719 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/snapshot/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/sqlserver/snapshot/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..e9f7f591 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:14:783:490 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:14:827:101 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:14:883:153 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-2 15:10:14:921:341 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 15:10:14:960:825 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 15:10:14:983:301 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-2 15:10:15:22:136 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-2 15:10:15:61:884 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-2 15:10:15:126:183 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 15:10:15:180:433 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 15:10:15:235:2 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 15:10:15:332:518 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-2 15:10:15:372:939 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 15:10:15:411:665 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/snapshot/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/sqlserver/snapshot/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..1e4ce153 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:15:752:584 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-2 15:10:15:796:343 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:15:852:336 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-2 15:10:15:890:370 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-2 15:10:15:930:42 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 15:10:15:952:448 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-2 15:10:15:991:259 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-2 15:10:16:30:759 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-2 15:10:16:95:91 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 15:10:16:147:162 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-2 15:10:16:198:518 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-2 15:10:16:311:211 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-2 15:10:16:352:558 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-2 15:10:16:391:129 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/sqlserver/snapshot/rat_sda_dirty_read.txt b/test_result/centralizend_result/sqlserver/snapshot/rat_sda_dirty_read.txt new file mode 100644 index 00000000..417b28c4 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: sqlserver #### +#### test_type: sda_dirty_read #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:9:57:71:725 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:9:57:115:528 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:9:57:167:35 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 15:9:57:206:126 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-2 15:9:57:271:960 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 15:9:57:367:64 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-2 15:9:57:406:564 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 15:9:57:407:272 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/snapshot/rat_sda_intermediate_read.txt b/test_result/centralizend_result/sqlserver/snapshot/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..2f580eab --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_intermediate_read #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:9:58:665:47 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:9:58:709:7 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:9:58:765:27 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 15:9:58:803:941 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-2 15:9:58:907:331 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 15:9:59:1:957 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:9:59:130:303 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 15:9:59:169:919 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 15:9:59:170:685 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/snapshot/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/sqlserver/snapshot/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..040b732d --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: sqlserver #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:9:59:555:526 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:9:59:599:883 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:9:59:655:323 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-2 15:9:59:694:519 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 15:9:59:731:904 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-2 15:9:59:801:749 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:9:59:849:671 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-2 15:9:59:889:374 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 15:9:59:890:73 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/snapshot/rat_sda_lost_self_update.txt b/test_result/centralizend_result/sqlserver/snapshot/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..dc7f81bb --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/rat_sda_lost_self_update.txt @@ -0,0 +1,39 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_self_update #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:1:647:425 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:1:691:648 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:1:745:924 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 15:10:1:888:910 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 15:10:1:953:238 + Q4 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row errcode: 42000 + Q4 failed at: 2022-4-2 15:10:2:350:232 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row + diff --git a/test_result/centralizend_result/sqlserver/snapshot/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/sqlserver/snapshot/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..e881ba50 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:9:57:788:580 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 15:9:57:832:445 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:9:57:888:655 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-2 15:9:57:927:669 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-2 15:9:58:31:209 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 15:9:58:141:320 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:9:58:236:409 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-2 15:9:58:275:889 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 15:9:58:276:702 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/sqlserver/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..56b252e4 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:0:275:757 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 15:10:0:327:647 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:0:375:639 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-2 15:10:0:414:551 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 15:10:0:457:730 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 15:10:0:517:960 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:10:0:560:338 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-2 15:10:0:599:977 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 15:10:0:600:707 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/sqlserver/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..21c291c2 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: sqlserver #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:0:937:523 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-2 15:10:0:981:240 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:1:37:550 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-2 15:10:1:76:277 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-2 15:10:1:127:189 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-2 15:10:1:179:728 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:10:1:222:71 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-2 15:10:1:261:954 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 15:10:1:262:956 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/snapshot/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/sqlserver/snapshot/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..3b7adebe --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:24:551:59 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:24:595:361 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:24:651:54 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-2 15:10:24:725:934 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-2 15:10:24:794:895 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 15:10:24:844:809 + Q5 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row errcode: 42000 + Q5 failed at: 2022-4-2 15:10:25:341:902 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row + diff --git a/test_result/centralizend_result/sqlserver/snapshot/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/sqlserver/snapshot/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..7c2bbffe --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:25:772:221 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:25:817:158 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:25:872:364 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 15:10:25:947:10 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 15:10:28:422:459 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 15:10:28:469:100 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 15:10:29:26:165 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/snapshot/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/sqlserver/snapshot/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..d7724aa3 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:29:495:570 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:29:539:346 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:29:595:718 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 15:10:29:634:175 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 15:10:33:423:35 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 15:10:33:485:796 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q6 failed at: 2022-4-2 15:10:34:26:694 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/snapshot/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/sqlserver/snapshot/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..f2940d12 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: sqlserver #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:34:503:411 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:34:547:349 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:34:603:462 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 15:10:34:641:702 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-2 15:10:35:923:502 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 15:10:35:969:285 +Q7 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 +Q7 failed at: 2022-4-2 15:10:36:627:217 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. + diff --git a/test_result/centralizend_result/sqlserver/snapshot/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/sqlserver/snapshot/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..23651f4e --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:37:93:838 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 15:10:37:137:714 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:37:193:811 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 15:10:37:233:129 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 15:10:37:271:564 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-2 15:10:37:442:940 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row errcode: 42000 +Q6 failed at: 2022-4-2 15:10:38:47:27 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row + diff --git a/test_result/centralizend_result/sqlserver/snapshot/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/sqlserver/snapshot/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..4e8e23a3 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:38:523:388 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-2 15:10:38:567:456 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:38:623:570 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 15:10:38:662:836 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-2 15:10:38:701:67 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 15:10:38:876:469 +Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row errcode: 42000 +Q6 failed at: 2022-4-2 15:10:39:480:599 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row + diff --git a/test_result/centralizend_result/sqlserver/snapshot/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/sqlserver/snapshot/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..cba25d2d --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:39:952:183 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:39:996:301 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:40:52:109 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 15:10:40:91:445 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 15:10:40:201:234 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:10:40:255:55 + Q5 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row errcode: 42000 + Q5 failed at: 2022-4-2 15:10:40:751:942 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row + diff --git a/test_result/centralizend_result/sqlserver/snapshot/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/sqlserver/snapshot/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..5c10895c --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:41:182:841 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:41:226:971 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:41:282:637 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 15:10:41:358:467 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-2 15:10:41:425:594 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 15:10:41:633:197 + Q5 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row errcode: 42000 + Q5 failed at: 2022-4-2 15:10:42:130:75 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row + diff --git a/test_result/centralizend_result/sqlserver/snapshot/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/sqlserver/snapshot/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..681c81b6 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: sqlserver #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:42:558:652 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:42:602:549 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:42:658:664 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-2 15:10:42:734:488 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-2 15:10:42:800:880 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-2 15:10:42:858:240 + Q5 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row errcode: 42000 + Q5 failed at: 2022-4-2 15:10:43:358:405 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row + diff --git a/test_result/centralizend_result/sqlserver/snapshot/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/sqlserver/snapshot/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..b4263d86 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/wat_mda_step_wat_c1.txt @@ -0,0 +1,43 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_wat_c1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:43:832:781 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:43:876:996 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:43:932:948 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 15:10:44:7:694 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2022-4-2 15:10:44:32:869 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 15:10:44:72:329 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q9 finished at: 2022-4-2 15:10:46:553:844 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-2 15:10:46:607:907 + Q5 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row errcode: 42000 + Q5 failed at: 2022-4-2 15:10:47:104:887 + Q8 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 53) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q8 failed at: 2022-4-2 15:10:47:350:363 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row + diff --git a/test_result/centralizend_result/sqlserver/snapshot/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/sqlserver/snapshot/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..bb1062a3 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/wat_mda_step_wat_c2.txt @@ -0,0 +1,43 @@ +#### db_type: sqlserver #### +#### test_type: mda_step_wat_c2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:47:819:404 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:47:863:228 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:47:919:426 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-2 15:10:47:994:22 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2022-4-2 15:10:48:19:491 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-2 15:10:48:295:239 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q9 finished at: 2022-4-2 15:10:51:554:132 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-2 15:10:51:610:89 + Q6 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row errcode: 42000 + Q6 failed at: 2022-4-2 15:10:52:207:90 + Q8 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 53) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. errcode: 40001 + Q8 failed at: 2022-4-2 15:10:52:350:757 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row + diff --git a/test_result/centralizend_result/sqlserver/snapshot/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/sqlserver/snapshot/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..80c59d67 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: sqlserver #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:16:775:581 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:16:819:504 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:16:875:500 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; + Q4 finished at: 2022-4-2 15:10:17:17:5 +Q5 finished at: 2022-4-2 15:10:17:17:409 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 15:10:17:127:707 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-2 15:10:17:167:283 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-2 15:10:17:206:932 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-2 15:10:17:251:280 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/sqlserver/snapshot/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/sqlserver/snapshot/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..fa49b5aa --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,30 @@ +#### db_type: sqlserver #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:17:632:221 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:17:676:406 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:17:732:399 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-2 15:10:17:882:260 + Q4 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row errcode: 42000 + Q4 failed at: 2022-4-2 15:10:18:279:187 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row + diff --git a/test_result/centralizend_result/sqlserver/snapshot/wat_sda_full_write.txt b/test_result/centralizend_result/sqlserver/snapshot/wat_sda_full_write.txt new file mode 100644 index 00000000..1ae0a561 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/wat_sda_full_write.txt @@ -0,0 +1,32 @@ +#### db_type: sqlserver #### +#### test_type: sda_full_write #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:18:666:204 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:18:710:218 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:18:766:310 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-2 15:10:18:908:618 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-2 15:10:18:958:521 + Q4 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row errcode: 42000 + Q4 failed at: 2022-4-2 15:10:19:355:510 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row + diff --git a/test_result/centralizend_result/sqlserver/snapshot/wat_sda_full_write_committed.txt b/test_result/centralizend_result/sqlserver/snapshot/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..d82e312a --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/wat_sda_full_write_committed.txt @@ -0,0 +1,32 @@ +#### db_type: sqlserver #### +#### test_type: sda_full_write_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:19:753:984 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:19:798:250 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:19:853:845 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-2 15:10:19:997:516 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:10:20:53:361 + Q4 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row errcode: 42000 + Q4 failed at: 2022-4-2 15:10:20:450:355 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row + diff --git a/test_result/centralizend_result/sqlserver/snapshot/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/sqlserver/snapshot/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..63b87de3 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,39 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:23:425:74 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-2 15:10:23:469:126 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:23:526:379 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-2 15:10:23:670:640 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-2 15:10:23:726:104 + Q4 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row errcode: 42000 + Q4 failed at: 2022-4-2 15:10:24:123:79 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row + diff --git a/test_result/centralizend_result/sqlserver/snapshot/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/sqlserver/snapshot/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..2b7fbe4b --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/wat_sda_lost_update_c1.txt @@ -0,0 +1,39 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_update_c1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:20:855:508 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 15:10:20:899:548 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:20:955:445 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 15:10:21:31:202 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-2 15:10:21:206:775 +Q5 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row errcode: 42000 +Q5 failed at: 2022-4-2 15:10:21:710:728 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row + diff --git a/test_result/centralizend_result/sqlserver/snapshot/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/sqlserver/snapshot/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..2b2cc732 --- /dev/null +++ b/test_result/centralizend_result/sqlserver/snapshot/wat_sda_lost_update_c2.txt @@ -0,0 +1,39 @@ +#### db_type: sqlserver #### +#### test_type: sda_lost_update_c2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2022-4-2 15:10:22:142:650 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-2 15:10:22:186:656 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2022-4-2 15:10:22:242:621 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-2 15:10:22:281:747 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-2 15:10:22:490:902 +Q5 failed reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row errcode: 42000 +Q5 failed at: 2022-4-2 15:10:22:994:953 + +Test Result: Rollback +Reason: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.t1' directly or indirectly in database 'test' to update, delete, or insert the row + diff --git a/test_result/centralizend_result/tdsql/read-committed/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/tdsql/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..eccb91ba --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:15:17:391:717 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:15:17:427:134 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:15:20:401:617 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 15:15:20:441:859 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:15:20:481:587 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:15:20:523:643 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-18 15:15:23:396:21 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:15:23:447:383 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:15:53:399:241 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:15:53:439:438 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/tdsql/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..b46a33bb --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:16:1:671:282 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:16:1:705:318 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:16:4:677:75 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:16:4:716:996 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:16:4:756:830 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:16:4:796:475 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-18 15:16:7:671:601 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:16:7:705:558 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:16:37:678:636 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:16:37:718:691 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/iat_dda_write_skew.txt b/test_result/centralizend_result/tdsql/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..6cb0ad30 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:16:45:953:334 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:16:45:987:543 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:16:48:959:115 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:16:48:999:529 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:16:49:39:142 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-18 15:16:51:954:19 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:16:51:988:132 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:16:54:959:660 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:17:24:960:821 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:17:25:1:26 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/tdsql/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..662ef40b --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:19:2:41:502 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:19:2:75:636 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:19:5:47:232 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:19:5:87:156 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:19:5:126:947 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:19:5:166:932 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-18 15:19:8:42:5 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:19:8:76:97 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:19:38:48:663 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:19:38:88:879 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/tdsql/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..8152674c --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL PRIMARY KEY);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 20:48:7:328:957 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-23 20:48:7:364:543 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-23 20:48:7:399:719 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-23 20:48:8:330:210 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-23 20:48:8:403:496 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-23 20:48:8:440:555 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 20:48:8:478:136 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 20:48:9:329:760 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-23 20:48:29:367:67 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-23 20:48:29:403:231 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 20:48:29:438:865 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/tdsql/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..51139b15 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:18:17:761:965 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-18 15:18:17:796:249 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:18:20:728:244 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-18 15:18:20:769:6 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-18 15:18:20:808:999 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:18:20:849:778 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-18 15:18:23:762:560 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:18:23:796:655 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-18 15:18:53:769:126 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:18:53:809:232 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/iat_mda_step_iat.txt b/test_result/centralizend_result/tdsql/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..62a3372c --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:19:46:360:118 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-18 15:19:46:394:380 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:19:49:366:72 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-18 15:19:49:405:834 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 15:19:52:377:413 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-18 15:19:52:418:582 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-18 15:19:55:360:731 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-18 15:19:58:366:475 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-18 15:20:1:367:176 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 15:20:4:361:19 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 15:20:7:366:912 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:20:10:368:334 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-18 15:20:40:367:138 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:20:40:407:411 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/tdsql/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..87e2ee39 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,106 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:24:33:810:836 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:24:33:845:129 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:24:36:816:56 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-18 15:24:36:855:950 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:24:36:895:695 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 15:24:39:817:2 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-18 15:24:39:857:907 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-18 15:24:39:898:278 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:24:39:938:953 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2022-4-18 15:24:42:810:777 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-18 15:24:42:844:500 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-18 15:25:12:817:326 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-18 15:25:12:857:300 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/tdsql/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..c39b88d9 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,207 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:23:40:499:987 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:23:40:534:825 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:23:43:506:65 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:23:43:546:324 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 15:23:46:506:762 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-18 15:23:46:547:516 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:23:46:588:189 + Q8-T4 execute opt: 'BEGIN' + Q8 finished at: 2022-4-18 15:23:49:506:148 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-18 15:23:49:546:600 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:23:49:586:864 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-4-18 15:23:52:506:575 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:23:52:546:512 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-18 15:23:55:500:837 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-18 15:23:55:534:754 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-18 15:24:25:540:387 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-18 15:24:25:576:375 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/tdsql/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..f1a37275 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:20:48:676:936 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-18 15:20:48:711:103 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:20:51:682:656 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-18 15:20:51:723:69 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 15:20:54:683:791 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-18 15:20:54:724:596 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-18 15:20:57:677:433 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-18 15:21:0:683:232 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-18 15:21:3:684:251 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 15:21:6:677:569 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 15:21:9:683:489 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:21:12:684:339 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-18 15:21:42:685:639 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:21:42:742:259 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/tdsql/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..2928622b --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:21:50:870:799 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-18 15:21:50:906:231 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:21:53:909:664 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-18 15:21:53:949:760 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 15:21:56:910:525 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-18 15:21:56:951:685 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-18 15:21:59:904:830 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-18 15:22:2:910:145 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-18 15:22:5:911:215 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 15:22:8:905:99 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 15:22:11:910:960 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:22:14:911:445 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-18 15:22:44:911:540 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:22:44:951:204 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/tdsql/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..f289c970 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:25:21:89:672 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-18 15:25:21:123:663 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-18 15:25:21:160:114 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-18 15:25:24:94:583 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-18 15:25:24:134:468 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-18 15:25:24:174:149 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:25:24:213:969 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-18 15:25:27:95:483 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-18 15:25:27:136:386 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-18 15:25:27:177:66 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 15:25:27:217:409 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-18 15:25:30:89:331 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-18 15:25:30:123:645 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-18 15:26:0:97:637 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-18 15:26:0:138:240 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/tdsql/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..d7a6c712 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,162 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:22:53:220:840 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-18 15:22:53:266:405 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:22:56:226:576 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-18 15:22:56:266:885 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:22:56:307:242 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-18 15:22:56:347:543 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-18 15:22:56:387:67 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:22:56:427:238 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-18 15:22:59:227:830 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-18 15:22:59:269:11 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-18 15:22:59:309:620 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-18 15:22:59:350:232 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-18 15:22:59:390:808 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:22:59:431:465 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2022-4-18 15:23:2:221:462 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-18 15:23:2:267:280 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-18 15:23:32:228:65 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-18 15:23:32:269:261 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/tdsql/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..970f0a90 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:14:33:106:757 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-18 15:14:33:140:820 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:14:36:111:849 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-18 15:14:36:152:208 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:14:36:192:852 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-18 15:14:39:107:572 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:14:39:143:57 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-18 15:15:9:118:814 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:15:9:159:42 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/tdsql/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..af3f964b --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,60 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:13:48:817:780 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:13:48:851:985 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:13:51:784:465 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-18 15:13:51:824:621 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:13:51:864:809 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-18 15:13:54:818:406 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:13:54:852:79 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-18 15:14:24:825:217 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:14:24:865:695 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:14:24:906:497 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/tdsql/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..f3a93e04 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,56 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 20:48:33:681:580 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 20:48:33:716:863 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 20:48:34:682:864 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 20:48:34:719:566 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-23 20:48:34:756:530 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 20:48:36:683:669 +Q6 finished at: 2022-4-23 20:48:36:685:371 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 20:48:37:681:978 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-23 20:48:57:683:237 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 20:48:57:718:849 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/tdsql/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..76b0cf6b --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,56 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:50:17:952:991 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:50:17:987:209 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:50:20:958:986 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 14:50:20:999:601 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 14:50:21:43:893 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 14:50:21:83:932 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-18 14:50:23:953:767 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 14:50:23:987:540 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-18 14:50:53:960:564 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 14:50:54:0:460 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/read-committed/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/tdsql/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..50bca9e1 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,56 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:51:2:233:702 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:51:2:267:654 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:51:5:239:481 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 14:51:5:279:522 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-18 14:51:8:234:307 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 14:51:8:268:89 + Q5 finished at: 2022-4-18 14:51:8:271:328 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 14:51:11:239:773 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 14:51:41:251:970 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 14:51:41:292:675 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/read-committed/rat_dda_read_skew.txt b/test_result/centralizend_result/tdsql/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..9edce572 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:51:49:526:931 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 14:51:49:560:970 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:51:52:532:530 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 14:51:52:572:399 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 14:51:52:611:820 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-18 14:51:55:529:106 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 14:51:58:533:496 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 14:52:1:527:429 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 14:52:31:534:641 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 14:52:31:574:524 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/read-committed/rat_dda_read_skew2.txt b/test_result/centralizend_result/tdsql/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..cf81889a --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:54:8:306:447 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:54:8:341:75 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:54:11:312:88 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 14:54:11:352:304 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 14:54:11:391:874 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-18 14:54:14:306:985 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 14:54:14:340:765 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 14:54:17:401:934 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 14:54:47:314:77 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 14:54:47:354:253 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/read-committed/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/tdsql/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..fc33f859 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:54:55:589:148 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:54:55:623:138 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:54:58:594:975 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 14:54:58:635:381 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 14:54:58:674:926 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 14:54:58:714:160 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-18 14:55:1:590:12 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 14:55:1:624:639 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 14:55:31:596:801 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 14:55:31:636:747 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/tdsql/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..de8405ce --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:52:39:808:424 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-18 14:52:39:842:651 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:52:42:814:170 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-18 14:52:42:855:24 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-18 14:52:42:894:710 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 14:52:42:934:637 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-18 14:52:45:808:948 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 14:52:45:842:473 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-18 14:53:15:815:793 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 14:53:15:855:696 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/tdsql/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..7ba1c0b9 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,59 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:53:23:984:175 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-18 14:53:24:19:358 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:53:27:27:435 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-18 14:53:27:67:88 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-18 14:53:27:108:573 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 14:53:27:148:473 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-18 14:53:30:18:180 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 14:53:30:51:611 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-18 14:54:0:24:863 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 14:54:0:64:728 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/rat_dda_write_read_skew.txt b/test_result/centralizend_result/tdsql/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..c29e97a8 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:47:53:112:989 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:47:53:150:541 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:47:56:118:294 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 14:47:56:158:215 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 14:47:56:198:334 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-18 14:47:59:113:306 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 14:48:2:198:833 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 14:48:5:113:211 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 14:48:35:120:89 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 14:48:35:160:29 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/tdsql/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..ecd63f83 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tdsql #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:48:43:395:933 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:48:43:429:935 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:48:46:401:616 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 14:48:46:441:474 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 14:48:46:481:307 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 14:48:46:520:662 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-18 14:48:49:396:508 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 14:48:49:430:286 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 14:49:19:403:316 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 14:49:19:443:482 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/read-committed/rat_mda_step_rat.txt b/test_result/centralizend_result/tdsql/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..0dd9262a --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:55:39:902:589 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:55:39:936:737 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:55:42:908:401 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 14:55:42:948:303 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 14:55:42:988:784 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 14:55:45:909:449 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-18 14:55:45:950:558 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-18 14:55:45:991:68 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-18 14:55:48:903:415 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 14:55:48:937:506 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 14:55:51:909:398 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 14:55:54:910:182 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-18 14:56:24:949:534 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 14:56:24:988:937 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/tdsql/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..5d80be7e --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN' + Q1 finished at: 2022-4-18 14:56:33:228:606 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-18 14:56:33:269:487 +Q3-T1 execute opt: 'BEGIN' +Q3 finished at: 2022-4-18 14:56:36:222:301 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-18 14:56:36:256:594 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 14:56:39:229:34 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-18 14:56:39:270:424 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-18 14:56:39:311:222 + Q8-T2 execute opt: 'BEGIN' + Q8 finished at: 2022-4-18 14:56:42:228:93 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-18 14:56:42:267:958 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-18 14:56:45:229:648 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-18 14:56:48:222:780 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 14:56:51:228:973 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-18 14:56:54:229:651 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 14:57:24:228:965 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-18 14:57:24:270:535 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-18 14:57:24:311:285 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/tdsql/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..2ec15f59 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:57:32:576:60 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:57:32:609:998 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:57:35:581:748 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-18 14:57:35:621:711 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-18 14:57:35:661:482 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 14:57:38:586:149 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-18 14:57:38:627:911 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-18 14:57:38:669:317 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-18 14:57:41:576:867 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 14:57:41:611:120 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 14:57:44:582:405 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 14:57:47:583:981 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-18 14:58:17:583:297 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 14:58:17:622:798 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/tdsql/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..38b0b3a9 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:58:25:754:376 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-18 14:58:25:789:385 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:58:28:793:634 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-18 14:58:28:833:968 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-18 14:58:28:873:882 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 14:58:31:794:285 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-18 14:58:31:837:190 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-18 14:58:31:877:930 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-18 14:58:34:791:90 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 14:58:34:825:174 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 14:58:37:794:63 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 14:58:40:795:95 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-18 14:59:10:794:948 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 14:59:10:836:247 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/rat_sda_dirty_read.txt b/test_result/centralizend_result/tdsql/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..c9f759b5 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:42:25:329:647 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:42:25:367:350 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:42:28:338:202 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-18 14:42:28:417:951 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-18 14:42:31:329:662 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 14:42:34:336:85 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-18 14:43:4:376:745 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 14:43:4:417:82 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/read-committed/rat_sda_intermediate_read.txt b/test_result/centralizend_result/tdsql/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..be50eb4e --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:44:2:863:843 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:44:2:897:684 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:44:5:867:300 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-18 14:44:5:907:946 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-18 14:44:8:861:613 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 14:44:11:867:57 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 14:44:14:861:592 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-18 14:44:44:868:705 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 14:44:44:908:925 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/tdsql/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..f3b6f135 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:44:53:107:861 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:44:53:143:759 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:44:56:113:591 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-18 14:44:56:153:556 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 14:44:56:193:747 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-18 14:44:59:108:653 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 14:44:59:143:188 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-18 14:45:29:115:663 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 14:45:29:155:622 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/read-committed/rat_sda_lost_self_update.txt b/test_result/centralizend_result/tdsql/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..36bb4c28 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:47:5:817:242 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:47:5:851:212 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:47:8:822:866 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-18 14:47:11:817:829 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-18 14:47:11:851:535 + Q4 finished at: 2022-4-18 14:47:11:855:51 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 14:47:14:823:696 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-18 14:47:44:824:494 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 14:47:44:864:411 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/read-committed/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/tdsql/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..7954b328 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:43:12:614:644 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 14:43:12:649:188 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:43:15:620:548 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-18 14:43:15:660:442 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-18 14:43:18:615:494 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 14:43:21:621:17 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 14:43:24:614:884 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-18 14:43:54:622:39 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 14:43:54:662:17 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/tdsql/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..4778fa8c --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,58 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:45:37:351:867 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-18 14:45:37:386:232 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:45:40:357:133 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-18 14:45:40:398:697 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 14:45:40:438:395 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-18 14:45:43:352:239 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 14:45:43:385:955 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-18 14:46:13:358:942 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 14:46:13:400:860 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/tdsql/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..291e0b0a --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,57 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:46:21:534:85 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-18 14:46:21:569:383 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:46:24:572:930 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-18 14:46:24:612:705 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 14:46:24:652:598 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-18 14:46:27:567:736 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 14:46:27:601:108 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-18 14:46:57:574:641 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 14:46:57:614:620 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/tdsql/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..21e0db23 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,56 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:4:46:937:125 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:4:46:971:154 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:4:49:942:963 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 15:4:49:982:987 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-18 15:4:52:937:933 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:4:52:971:706 + Q5 finished at: 2022-4-18 15:4:52:974:952 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:4:53:15:127 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:5:22:944:649 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:5:22:984:956 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/tdsql/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..504f2e5f --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,33 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:5:31:217:63 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:5:31:251:36 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:5:34:222:866 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:5:34:262:976 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-18 15:5:37:221:315 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-e5-3c-625d0dbb-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-18 15:5:37:818:624 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-e5-3c-625d0dbb-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/tdsql/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..6c7115d9 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,33 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:6:18:642:90 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:6:18:676:380 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:6:21:608:637 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:6:21:648:709 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-18 15:6:24:646:644 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-e5-41-625d0dea-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-18 15:6:25:243:498 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-e5-41-625d0dea-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/tdsql/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..6d15cfc9 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:7:9:85:633 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:7:9:119:770 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:7:12:52:469 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:7:12:97:971 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-18 15:7:15:97:784 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:7:15:137:896 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-e5-46-625d0e1d-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-18 15:7:15:787:384 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-e5-46-625d0e1d-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/tdsql/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..1f3877b8 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 20:49:1:958:380 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 20:49:1:993:904 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 20:49:2:959:777 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-23 20:49:2:998:453 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-23 20:49:3:35:173 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-23 20:49:4:960:156 +Q6 finished at: 2022-4-23 20:49:4:961:669 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 20:49:4:997:38 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-23 20:49:24:960:158 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 20:49:24:995:709 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/tdsql/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..c393a0e0 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 20:49:29:236:396 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 20:49:29:271:838 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 20:49:30:237:696 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-23 20:49:30:276:528 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-23 20:49:30:312:997 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 20:49:32:238:222 +Q6 finished at: 2022-4-23 20:49:32:240:7 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 20:49:33:236:881 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-23 20:49:53:238:214 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 20:49:53:273:863 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/tdsql/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..07a39ebd --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:9:31:92:426 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:9:31:126:574 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:9:34:99:509 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:9:34:147:241 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-18 15:9:37:93:211 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:9:37:127:396 + Q5 finished at: 2022-4-18 15:9:37:130:598 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:9:40:107:237 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:10:10:99:723 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:10:10:139:759 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/tdsql/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..df3fe717 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:10:18:372:289 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:10:18:406:219 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:10:21:378:67 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:10:21:418:529 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-18 15:10:24:373:147 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:10:30:373:213 + Q5 finished at: 2022-4-18 15:10:30:376:121 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:10:30:416:710 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:11:0:379:838 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:11:0:420:795 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/tdsql/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..cda73ace --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:11:8:652:296 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:11:8:686:98 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:11:11:658:268 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:11:11:697:925 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-18 15:11:14:653:77 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:11:14:687:197 + Q5 finished at: 2022-4-18 15:11:14:690:262 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:11:14:730:80 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:11:44:659:975 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:11:44:700:882 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/tdsql/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..0c14f0d9 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:11:52:967:902 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:11:53:1:985 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:11:55:973:459 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:11:56:13:682 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 15:11:58:975:376 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-18 15:11:59:16:365 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-18 15:12:1:971:972 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-e5-54-625d0f38-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-18 15:12:2:869:558 + Q8 finished at: 2022-4-18 15:12:2:945:925 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-e5-54-625d0f38-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/read-committed/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/tdsql/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..4037cdf0 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:12:46:428:155 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:12:46:462:168 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:12:49:394:761 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:12:49:434:818 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 15:12:52:394:768 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-18 15:12:58:439:739 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-18 15:13:1:432:535 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-e5-5a-625d0f6e-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-18 15:13:2:329:704 + Q8 finished at: 2022-4-18 15:13:4:467:579 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-e5-5a-625d0f6e-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/tdsql/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..d318473f --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:59:19:61:270 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:59:19:97:151 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:59:22:68:408 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-18 14:59:25:61:799 + Q4 finished at: 2022-4-18 14:59:25:67:826 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 14:59:28:68:198 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-18 14:59:58:68:828 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-18 14:59:58:124:918 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 14:59:58:165:148 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/tdsql/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..32a0f8df --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:0:6:364:302 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:0:6:398:669 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:0:9:370:295 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-18 15:0:12:365:135 + Q4 finished at: 2022-4-18 15:0:12:368:336 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:0:15:370:896 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-18 15:0:45:371:971 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-18 15:0:45:427:511 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:0:45:467:517 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/read-committed/wat_sda_full_write.txt b/test_result/centralizend_result/tdsql/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..6468e30c --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:0:53:666:194 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:0:53:700:244 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:0:56:672:40 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-18 15:0:59:666:436 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-18 15:0:59:701:165 + Q4 finished at: 2022-4-18 15:0:59:703:444 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:1:2:673:74 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-18 15:1:32:673:475 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:1:32:713:698 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/read-committed/wat_sda_full_write_committed.txt b/test_result/centralizend_result/tdsql/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..8425c099 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:1:40:914:644 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:1:40:948:992 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:1:43:920:777 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-18 15:1:46:915:179 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:1:46:949:309 + Q4 finished at: 2022-4-18 15:1:46:952:502 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:1:46:992:292 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-18 15:2:16:923:975 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:2:16:964:942 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/tdsql/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..b2ca35a6 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:4:2:656:456 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:4:2:690:321 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:4:5:662:272 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-18 15:4:8:657:49 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:4:8:691:41 + Q4 finished at: 2022-4-18 15:4:8:694:118 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:4:8:733:763 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-18 15:4:38:664:425 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:4:38:704:874 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/read-committed/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/tdsql/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..b560cfc8 --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 20:49:57:479:233 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-23 20:49:57:514:659 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 20:49:58:481:719 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-23 20:49:58:520:918 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 20:50:0:481:456 +Q5 finished at: 2022-4-23 20:50:0:483:211 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-23 20:50:0:518:609 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-23 20:50:20:481:34 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 20:50:20:519:63 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/read-committed/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/tdsql/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..9319700f --- /dev/null +++ b/test_result/centralizend_result/tdsql/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 20:50:24:726:989 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-23 20:50:24:763:466 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 20:50:25:728:286 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-23 20:50:25:765:27 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 20:50:27:729:32 +Q5 finished at: 2022-4-23 20:50:27:730:794 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 20:50:28:727:661 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-23 20:50:48:728:730 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 20:50:48:764:315 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/tdsql/repeatable-read/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..cb713a4a --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/iat_dda_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:41:42:503:147 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:41:42:535:828 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:41:43:503:318 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 15:41:43:536:624 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:41:43:569:303 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:41:43:602:157 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-18 15:41:44:504:230 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:41:44:536:575 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:41:54:507:703 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:41:54:543:599 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/tdsql/repeatable-read/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..1d57c3f9 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:41:58:770:750 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:41:58:804:38 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:41:59:772:232 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:41:59:805:544 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:41:59:838:390 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:41:59:871:278 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-18 15:42:0:771:234 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:42:0:803:707 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:42:10:775:592 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:42:10:811:632 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/iat_dda_write_skew.txt b/test_result/centralizend_result/tdsql/repeatable-read/iat_dda_write_skew.txt new file mode 100644 index 00000000..54a43dfe --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:42:15:43:528 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:42:15:111:407 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:42:16:43:648 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:42:16:76:829 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:42:16:109:549 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-18 15:42:17:43:902 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:42:17:81:34 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:42:18:44:114 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:42:28:47:615 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:42:28:83:552 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/tdsql/repeatable-read/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..c2e4b535 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:43:5:186:275 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:43:5:219:0 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:43:6:191:698 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:43:6:225:772 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:43:6:258:480 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:43:6:291:496 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-18 15:43:7:187:103 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:43:7:219:603 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:43:17:190:681 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:43:17:226:425 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/tdsql/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..e05579c4 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL PRIMARY KEY);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 20:52:34:444:395 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-23 20:52:34:486:718 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-23 20:52:34:525:613 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-23 20:52:35:443:334 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-23 20:52:35:517:933 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-23 20:52:35:555:85 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 20:52:35:592:364 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 20:52:36:444:982 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-23 20:52:56:479:560 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-23 20:52:56:516:90 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 20:52:56:551:794 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/tdsql/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..c1db5233 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:42:48:918:38 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-18 15:42:48:950:638 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:42:49:886:179 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-18 15:42:49:919:732 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-18 15:42:49:952:957 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:42:49:985:978 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-18 15:42:50:939:456 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:42:50:972:251 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-18 15:43:0:922:528 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:43:0:958:471 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/iat_mda_step_iat.txt b/test_result/centralizend_result/tdsql/repeatable-read/iat_mda_step_iat.txt new file mode 100644 index 00000000..76a39fc2 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:43:21:486:548 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-18 15:43:21:519:365 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:43:22:487:448 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-18 15:43:22:520:776 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 15:43:23:490:601 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-18 15:43:23:527:110 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-18 15:43:24:487:98 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-18 15:43:25:487:368 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-18 15:43:26:490:929 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 15:43:27:486:918 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 15:43:28:488:84 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:43:29:490:910 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-18 15:43:39:498:612 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:43:39:537:664 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/tdsql/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..6b86a05f --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:45:4:907:138 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:45:4:940:67 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:45:5:907:603 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-18 15:45:5:940:761 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:45:5:974:3 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 15:45:6:911:187 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-18 15:45:6:947:667 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-18 15:45:6:983:867 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:45:7:20:321 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-18 15:45:7:908:111 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-18 15:45:7:940:996 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-18 15:45:17:914:699 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-18 15:45:17:953:720 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/tdsql/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..9b5df999 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,209 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:44:45:592:531 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:44:45:627:679 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:44:46:591:988 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:44:46:625:291 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 15:44:47:595:884 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-18 15:44:47:632:397 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:44:47:668:703 + Q8-T4 execute opt: 'BEGIN' + Q8 finished at: 2022-4-18 15:44:48:599:57 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-18 15:44:48:639:8 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:44:48:678:444 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-18 15:44:49:592:998 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:44:49:626:54 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-18 15:44:50:592:840 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-18 15:44:50:625:103 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-18 15:45:0:640:113 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-18 15:45:0:680:241 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/tdsql/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..bc238946 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:43:43:796:182 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-18 15:43:43:829:24 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:43:44:796:121 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-18 15:43:44:829:649 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 15:43:45:799:665 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-18 15:43:45:835:966 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-18 15:43:46:796:876 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-18 15:43:47:796:910 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-18 15:43:48:800:63 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 15:43:49:796:670 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 15:43:50:796:783 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:43:51:800:145 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-18 15:44:1:808:289 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:44:1:848:132 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/tdsql/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..e52d527d --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:44:5:976:315 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-18 15:44:6:9:821 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:44:7:8:306 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-18 15:44:7:41:457 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 15:44:8:11:878 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-18 15:44:8:48:312 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-18 15:44:9:9:542 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-18 15:44:10:9:19 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-18 15:44:11:12:264 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 15:44:12:8:958 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 15:44:13:9:279 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:44:14:12:579 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-18 15:44:24:16:442 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:44:24:55:566 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/tdsql/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..b61161b0 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:45:22:181:589 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-18 15:45:22:214:460 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-18 15:45:22:247:289 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-18 15:45:23:183:201 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-18 15:45:23:216:217 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-18 15:45:23:248:810 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:45:23:282:61 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-18 15:45:24:184:513 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-18 15:45:24:221:764 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-18 15:45:24:257:976 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 15:45:24:294:324 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-18 15:45:25:181:400 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-18 15:45:25:214:195 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-18 15:45:35:185:328 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-18 15:45:35:222:134 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/tdsql/repeatable-read/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..2e1ff714 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,164 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:44:28:317:196 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-18 15:44:28:349:845 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:44:29:324:585 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-18 15:44:29:357:807 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:44:29:391:618 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-18 15:44:29:424:717 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-18 15:44:29:457:395 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:44:29:490:445 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-18 15:44:30:320:712 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-18 15:44:30:359:933 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-18 15:44:30:396:251 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-18 15:44:30:432:490 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-18 15:44:30:468:801 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:44:30:505:164 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-18 15:44:31:324:325 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-18 15:44:31:356:468 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-18 15:44:41:324:744 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-18 15:44:41:363:970 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/tdsql/repeatable-read/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..7536ff22 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:41:26:235:443 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-18 15:41:26:268:102 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:41:27:235:580 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-18 15:41:27:268:920 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:41:27:301:787 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-18 15:41:28:238:656 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:41:28:271:415 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-18 15:41:38:239:976 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:41:38:275:804 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/tdsql/repeatable-read/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..99abff34 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:41:9:951:482 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:41:9:984:828 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:41:10:918:709 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-18 15:41:10:951:859 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:41:10:984:546 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-18 15:41:11:951:166 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:41:11:984:962 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-18 15:41:21:957:389 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:41:21:993:134 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:41:22:29:3 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..581ab111 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_double_write_skew1.txt @@ -0,0 +1,56 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 20:53:0:809:710 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 20:53:0:848:420 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 20:53:1:808:760 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 20:53:1:846:502 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-23 20:53:1:883:914 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-23 20:53:3:806:834 + Q7 finished at: 2022-4-23 20:53:3:809:936 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 20:53:4:810:446 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-23 20:53:24:808:607 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 20:53:24:844:204 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..fc2f295b --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,56 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:32:35:191:9 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:32:35:223:638 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:32:36:191:121 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 15:32:36:224:531 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 15:32:36:257:343 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:32:36:295:408 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-18 15:32:37:191:680 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:32:37:224:165 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-18 15:32:47:195:409 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:32:47:230:986 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..1a3f6b7a --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_double_write_skew2.txt @@ -0,0 +1,56 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:32:51:473:702 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:32:51:506:272 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:32:52:473:942 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 15:32:52:506:897 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-18 15:32:53:474:222 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:32:53:507:505 + Q5 finished at: 2022-4-18 15:32:53:508:502 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:32:54:474:556 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:33:4:478:280 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:33:4:513:910 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_read_skew.txt b/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_read_skew.txt new file mode 100644 index 00000000..bb5a9809 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:33:8:741:873 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:33:8:774:486 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:33:9:741:921 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 15:33:9:776:97 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:33:9:809:74 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-18 15:33:10:744:265 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:33:11:746:307 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:33:12:742:249 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:33:22:746:921 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:33:22:782:661 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_read_skew2.txt b/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_read_skew2.txt new file mode 100644 index 00000000..08d121ec --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:33:59:480:793 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:33:59:513:333 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:34:0:481:11 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:34:0:514:150 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 15:34:0:547:112 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-18 15:34:1:482:216 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:34:1:514:826 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:34:2:481:437 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:34:12:485:571 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:34:12:521:162 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..39bdc507 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:34:16:747:495 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:34:16:780:197 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:34:17:748:60 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:34:17:781:467 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 15:34:17:814:403 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:34:17:846:716 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-18 15:34:18:748:307 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:34:18:781:214 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:34:28:752:86 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:34:28:787:811 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..ac9c646c --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:33:27:8:914 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-18 15:33:27:41:470 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:33:28:9:312 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-18 15:33:28:42:267 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:33:28:74:770 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:33:28:107:682 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-18 15:33:29:9:580 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:33:29:41:382 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-18 15:33:39:13:226 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:33:39:50:151 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..5ebb0989 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:33:43:178:584 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-18 15:33:43:212:230 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:33:44:210:667 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-18 15:33:44:243:769 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-18 15:33:44:276:563 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:33:44:309:432 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-18 15:33:45:211:461 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:33:45:243:579 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-18 15:33:55:214:990 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:33:55:250:523 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_write_read_skew.txt b/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..5a6df7ba --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_write_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:31:42:388:115 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:31:42:420:691 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:31:43:388:319 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 15:31:43:421:737 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 15:31:43:454:577 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-18 15:31:44:388:698 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:31:45:388:964 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:31:46:388:563 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:31:56:392:337 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:31:56:427:895 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..1189597e --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tdsql #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:32:0:654:190 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:32:0:687:468 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:32:1:654:418 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 15:32:1:687:508 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 15:32:1:721:417 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:32:1:754:248 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-18 15:32:2:654:804 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:32:2:687:185 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:32:12:658:649 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:32:12:694:91 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/rat_mda_step_rat.txt b/test_result/centralizend_result/tdsql/repeatable-read/rat_mda_step_rat.txt new file mode 100644 index 00000000..9e2464a5 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:34:33:56:258 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:34:33:88:925 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:34:34:56:596 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 15:34:34:89:610 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 15:34:34:122:604 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 15:34:35:60:178 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-18 15:34:35:96:693 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-18 15:34:35:133:314 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-18 15:34:36:57:369 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 15:34:36:91:288 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 15:34:37:57:438 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:34:38:60:607 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-18 15:34:48:102:969 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:34:48:142:43 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/tdsql/repeatable-read/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..25542689 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN' + Q1 finished at: 2022-4-18 15:34:52:378:962 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-18 15:34:52:419:417 +Q3-T1 execute opt: 'BEGIN' +Q3 finished at: 2022-4-18 15:34:53:371:775 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-18 15:34:53:404:324 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 15:34:54:375:267 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-18 15:34:54:411:762 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-18 15:34:54:448:38 + Q8-T2 execute opt: 'BEGIN' + Q8 finished at: 2022-4-18 15:34:55:372:244 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-18 15:34:55:405:70 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-18 15:34:56:379:815 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-18 15:34:57:378:664 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:34:58:372:688 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-18 15:34:59:375:722 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:35:9:379:67 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-18 15:35:9:418:904 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-18 15:35:9:457:994 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/tdsql/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..31b814bc --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:35:13:720:180 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:35:13:752:744 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:35:14:720:892 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-18 15:35:14:753:984 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-18 15:35:14:786:754 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 15:35:15:724:61 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-18 15:35:15:760:291 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-18 15:35:15:796:609 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-18 15:35:16:721:4 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 15:35:16:753:533 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 15:35:17:721:481 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:35:18:724:500 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-18 15:35:28:728:40 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:35:28:766:952 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/tdsql/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..25d8f7f2 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:35:32:898:5 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-18 15:35:32:931:710 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:35:33:930:119 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-18 15:35:33:963:273 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-18 15:35:33:996:350 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 15:35:34:933:794 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-18 15:35:34:970:138 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-18 15:35:35:6:603 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-18 15:35:35:931:9 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 15:35:35:963:589 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 15:35:36:931:15 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:35:37:934:240 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-18 15:35:47:937:760 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:35:47:976:647 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/rat_sda_dirty_read.txt b/test_result/centralizend_result/tdsql/repeatable-read/rat_sda_dirty_read.txt new file mode 100644 index 00000000..08bf1251 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:29:42:702:59 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:29:42:734:684 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:29:43:701:861 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-18 15:29:43:767:438 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-18 15:29:44:702:25 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:29:45:702:159 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-18 15:29:55:741:497 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:29:55:776:948 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/rat_sda_intermediate_read.txt b/test_result/centralizend_result/tdsql/repeatable-read/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..b68cf440 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_intermediate_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:30:18:208:850 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:30:18:241:309 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:30:19:208:486 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-18 15:30:19:241:706 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-18 15:30:20:208:784 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:30:21:209:261 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:30:22:209:569 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-18 15:30:32:212:765 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:30:32:248:232 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/tdsql/repeatable-read/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..16eb2a2c --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:30:36:442:245 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:30:36:474:912 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:30:37:442:684 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-18 15:30:37:477:613 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:30:37:511:550 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-18 15:30:38:442:847 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:30:38:475:369 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-18 15:30:48:447:578 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:30:48:483:388 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/rat_sda_lost_self_update.txt b/test_result/centralizend_result/tdsql/repeatable-read/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..6eff50b3 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_self_update #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:31:25:117:112 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:31:25:150:728 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:31:26:116:285 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-18 15:31:27:116:906 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-18 15:31:27:149:268 + Q4 finished at: 2022-4-18 15:31:27:149:697 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:31:28:117:140 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-18 15:31:38:120:538 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:31:38:156:212 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/tdsql/repeatable-read/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..ae7a3812 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:29:59:971:224 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:30:0:6:742 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:30:0:971:15 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-18 15:30:1:4:112 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-18 15:30:1:973:150 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:30:2:971:826 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:30:3:971:345 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-18 15:30:13:975:541 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:30:14:11:11 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/tdsql/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..fedb6911 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:30:52:677:914 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-18 15:30:52:710:553 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:30:53:678:111 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-18 15:30:53:711:28 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:30:53:743:666 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-18 15:30:54:678:654 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:30:54:711:95 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-18 15:31:4:683:585 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:31:4:720:69 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/tdsql/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..b0c575ac --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:31:8:848:995 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-18 15:31:8:882:541 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:31:9:881:189 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-18 15:31:9:914:245 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:31:9:946:941 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-18 15:31:10:881:345 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:31:10:913:334 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-18 15:31:20:885:412 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:31:20:922:726 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..5dc2dacc --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,56 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 20:53:29:104:260 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 20:53:29:143:888 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 20:53:30:104:611 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 20:53:30:143:522 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-23 20:53:31:105:410 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 20:53:31:150:626 + Q5 finished at: 2022-4-23 20:53:31:153:680 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 20:53:31:191:237 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-23 20:53:51:102:653 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 20:53:51:138:347 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..e88fd420 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,33 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:38:8:255:63 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:38:8:288:881 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:38:9:255:199 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:38:9:288:502 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-18 15:38:10:257:327 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-74-58-625d1560-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-18 15:38:10:857:476 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-74-58-625d1560-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..22c51306 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,33 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:38:25:748:398 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:38:25:781:326 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:38:26:708:801 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:38:26:742:493 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-18 15:38:27:741:867 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-74-5d-625d1571-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-18 15:38:28:343:51 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-74-5d-625d1571-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..cd0327ce --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:38:44:162:396 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:38:44:195:16 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:38:45:130:142 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:38:45:163:396 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-18 15:38:46:163:499 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:38:46:196:538 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-74-62-625d1584-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-18 15:38:46:863:642 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-74-62-625d1584-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..3a051dcb --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:39:0:620:344 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:39:0:652:938 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:39:1:586:472 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:39:1:619:813 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:39:1:652:398 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:39:3:619:382 +Q6 finished at: 2022-4-18 15:39:3:620:240 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:39:3:656:252 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:39:13:622:773 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:39:13:658:609 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..e3e3f2fd --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:39:17:921:422 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:39:17:954:141 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:39:18:886:588 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:39:18:919:740 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:39:18:954:40 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:39:20:887:874 +Q6 finished at: 2022-4-18 15:39:20:888:700 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:39:21:887:491 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:39:31:892:38 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:39:31:927:859 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..9679f888 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:39:36:208:856 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:39:36:242:900 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:39:37:207:699 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:39:37:241:320 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-18 15:39:38:207:896 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:39:38:241:263 + Q5 finished at: 2022-4-18 15:39:38:241:778 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:39:39:208:259 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:39:49:211:745 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:39:49:248:375 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..11261695 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:39:53:476:591 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:39:53:515:580 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:39:54:476:762 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:39:54:510:3 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-18 15:39:55:482:961 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:39:57:477:603 + Q5 finished at: 2022-4-18 15:39:57:478:602 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:39:57:511:478 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:40:7:485:163 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:40:7:521:147 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..a954df96 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 20:53:55:401:230 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 20:53:55:440:239 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 20:53:56:400:152 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-23 20:53:56:440:602 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-23 20:53:57:403:955 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 20:53:57:442:480 + Q5 finished at: 2022-4-23 20:53:57:445:438 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 20:53:57:482:833 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-23 20:54:17:400:9 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 20:54:17:435:982 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/tdsql/repeatable-read/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..8505987b --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/wat_mda_step_wat_c1.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: mda_step_wat_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:40:28:66:634 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:40:28:99:327 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:40:29:67:485 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:40:29:100:504 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 15:40:30:70:65 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-18 15:40:30:107:10 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-18 15:40:31:68:216 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-74-70-625d15ec-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-18 15:40:31:968:349 + Q8 finished at: 2022-4-18 15:40:32:37:223 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-74-70-625d15ec-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/tdsql/repeatable-read/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..eab33a57 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/wat_mda_step_wat_c2.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: mda_step_wat_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:40:47:562:721 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:40:47:595:263 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:40:48:530:736 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:40:48:563:863 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 15:40:49:530:738 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-18 15:40:51:567:663 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-18 15:40:52:564:273 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-74-76-625d15ff-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-18 15:40:53:464:405 + Q8 finished at: 2022-4-18 15:40:53:598:596 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-74-76-625d15ff-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/tdsql/repeatable-read/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..c326781e --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:35:52:175:2 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:35:52:207:421 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:35:53:175:224 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-18 15:35:54:175:611 + Q4 finished at: 2022-4-18 15:35:54:175:906 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:35:55:176:673 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-18 15:36:5:179:750 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-18 15:36:5:232:914 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:36:5:268:602 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/tdsql/repeatable-read/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..03555579 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:36:9:468:469 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:36:9:502:399 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:36:10:469:357 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-18 15:36:11:468:187 + Q4 finished at: 2022-4-18 15:36:11:468:502 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:36:12:468:540 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-18 15:36:22:471:834 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-18 15:36:22:524:49 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:36:22:559:527 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/wat_sda_full_write.txt b/test_result/centralizend_result/tdsql/repeatable-read/wat_sda_full_write.txt new file mode 100644 index 00000000..ea4f4df2 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_full_write #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:36:26:762:755 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:36:26:795:330 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:36:27:762:958 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-18 15:36:28:763:312 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-18 15:36:28:796:284 + Q4 finished at: 2022-4-18 15:36:28:796:633 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:36:29:763:657 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-18 15:36:39:767:743 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:36:39:804:45 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/wat_sda_full_write_committed.txt b/test_result/centralizend_result/tdsql/repeatable-read/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..6798de5e --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_full_write_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:36:43:998:163 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:36:44:33:978 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:36:44:998:769 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-18 15:36:45:998:973 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:36:46:31:449 + Q4 finished at: 2022-4-18 15:36:46:31:804 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:36:46:64:624 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-18 15:36:56:2:589 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:36:56:38:224 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/tdsql/repeatable-read/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..640bfdf4 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:37:35:714:993 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:37:35:747:473 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:37:36:731:225 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-18 15:37:37:716:82 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:37:37:749:566 + Q4 finished at: 2022-4-18 15:37:37:751:461 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:37:37:785:912 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-18 15:37:47:719:563 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:37:47:755:527 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/tdsql/repeatable-read/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..8515e2a6 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 20:54:21:659:361 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-23 20:54:21:698:431 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 20:54:22:658:243 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-23 20:54:22:697:789 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-23 20:54:24:656:112 +Q6-T1 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 20:54:24:658:821 +Q6 finished at: 2022-4-23 20:54:24:694:817 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-23 20:54:44:657:889 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 20:54:44:693:623 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/repeatable-read/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/tdsql/repeatable-read/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..2b455816 --- /dev/null +++ b/test_result/centralizend_result/tdsql/repeatable-read/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:37:17:472:38 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-18 15:37:17:504:623 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:37:18:472:337 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-18 15:37:18:505:413 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:37:20:472:946 +Q5 finished at: 2022-4-18 15:37:20:473:652 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:37:21:474:879 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-18 15:37:31:484:98 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:37:31:520:53 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tdsql/result_summary/read-committed_total-result.txt b/test_result/centralizend_result/tdsql/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..38745346 --- /dev/null +++ b/test_result/centralizend_result/tdsql/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/tdsql/result_summary/repeatable-read_total-result.txt b/test_result/centralizend_result/tdsql/result_summary/repeatable-read_total-result.txt new file mode 100644 index 00000000..ef182286 --- /dev/null +++ b/test_result/centralizend_result/tdsql/result_summary/repeatable-read_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/tdsql/result_summary/serializable_total-result.txt b/test_result/centralizend_result/tdsql/result_summary/serializable_total-result.txt new file mode 100644 index 00000000..b5b686cf --- /dev/null +++ b/test_result/centralizend_result/tdsql/result_summary/serializable_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Rollback + +rat_dda_write_read_skew_committed: Rollback + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Rollback + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Rollback + +rat_dda_read_skew2_committed: Rollback + +rat_mda_step_rat: Rollback + +rat_mda_step_rat_long_fork: Rollback + +rat_mda_step_rat_predicate_based_delete: Rollback + +rat_mda_step_rat_predicate_based_insert: Rollback + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Rollback + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Rollback + +iat_dda_write_skew_predicate_based-intersecting_data: Avoid + +iat_dda_write_skew_predicate_based-overdraft_protection: Rollback + +iat_dda_write_skew_committed: Rollback + +iat_mda_step_iat: Rollback + +iat_mda_step_iat_predicate_based_delete: Rollback + +iat_mda_step_iat_predicate_based_insert: Rollback + +iat_mda_step_iat_uname_anomaly: Rollback + +iat_mda_step_iat_cross_phenomenon: Rollback + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Rollback + diff --git a/test_result/centralizend_result/tdsql/serializable/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/tdsql/serializable/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..ed9314ee --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/iat_dda_read_skew_committed.txt @@ -0,0 +1,42 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:23:55:649:6 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 21:23:55:683:111 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:23:56:615:509 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 21:23:56:655:683 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:23:57:654:414 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:23:57:693:262 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-99-6263fdeb-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-23 21:23:58:350:6 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-99-6263fdeb-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/tdsql/serializable/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..8a79473b --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:24:22:74:447 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 21:24:22:109:490 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:24:23:29:810 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-23 21:24:23:69:169 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:24:24:68:968 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:24:24:107:661 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-a0-6263fe06-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-23 21:24:24:775:449 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-a0-6263fe06-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/iat_dda_write_skew.txt b/test_result/centralizend_result/tdsql/serializable/iat_dda_write_skew.txt new file mode 100644 index 00000000..b9dcf586 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/iat_dda_write_skew.txt @@ -0,0 +1,47 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:24:48:488:80 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 21:24:48:522:156 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:24:49:454:536 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-23 21:24:49:493:665 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:24:50:493:547 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-a7-6263fe20-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-23 21:24:51:89:337 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-a7-6263fe20-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/tdsql/serializable/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..09aae02d --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/iat_dda_write_skew_committed.txt @@ -0,0 +1,49 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:26:8:699:307 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 21:26:8:734:564 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:26:9:665:879 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-23 21:26:9:705:680 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:26:10:704:891 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:26:10:743:456 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-b9-6263fe70-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-23 21:26:11:400:883 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-b9-6263fe70-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/tdsql/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..0d192f0b --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,74 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL PRIMARY KEY);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:25:15:968:256 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-23 21:25:16:2:367 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-23 21:25:16:36:275 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-23 21:25:16:934:793 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 21:25:17:968:681 + current_result: + (330,) + *(1) expected_result: + (330,) + (2) expected_result: + (300,) + + Q5 finished at: 2022-4-23 21:25:17:973:644 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-23 21:25:18:12:292 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 21:25:18:51:74 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-23 21:25:37:970:562 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-23 21:25:38:6:22 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 21:25:38:40:887 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/tdsql/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..5c38d3c6 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,49 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:25:42:272:969 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-23 21:25:42:307:782 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:25:43:277:568 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-23 21:25:43:317:621 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' + Q5 finished at: 2022-4-23 21:25:44:278:959 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:25:44:317:748 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-b2-6263fe56-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-23 21:25:44:974:595 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-b2-6263fe56-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/iat_mda_step_iat.txt b/test_result/centralizend_result/tdsql/serializable/iat_mda_step_iat.txt new file mode 100644 index 00000000..a203da36 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/iat_mda_step_iat.txt @@ -0,0 +1,86 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:21:28:7:132 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-24 12:21:28:44:30 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:21:28:970:0 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 12:21:29:7:199 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-24 12:21:29:970:13 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 12:21:30:4:790 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q8 finished at: 2022-4-24 12:21:33:8:364 + Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-157-6264d049-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q9 failed at: 2022-4-24 12:21:33:904:522 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]set_1650716943_1:Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-24 12:21:52:709:607 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-157-6264d049-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/tdsql/serializable/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..2c1658b8 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:29:9:223:885 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 21:29:9:258:237 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:29:10:190:386 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-23 21:29:11:190:408 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-23 21:29:12:224:901 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-23 21:29:12:258:791 + Q4 finished at: 2022-4-23 21:29:12:263:517 + Q5-T2 execute opt: 'COMMIT'; + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-23 21:29:12:298:983 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:29:12:302:324 + Q8 finished at: 2022-4-23 21:29:12:334:487 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:29:12:369:975 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-23 21:29:32:223:152 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-23 21:29:32:255:149 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/serializable/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/tdsql/serializable/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..83f30d91 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,171 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:20:21:906:223 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 12:20:21:943:337 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:20:22:905:735 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 12:20:22:979:246 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-24 12:20:23:902:219 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q8-T4 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 12:20:24:906:45 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-24 12:20:26:908:95 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 12:20:26:945:454 + Q9 finished at: 2022-4-24 12:20:26:945:830 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 12:20:26:982:432 + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-24 12:20:26:982:731 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-24 12:20:27:19:39 + Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-14c-6264d007-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q6 failed at: 2022-4-24 12:20:27:504:275 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-14c-6264d007-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/tdsql/serializable/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..843fc799 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,86 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:20:41:367:839 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-24 12:20:41:404:536 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:20:42:331:569 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 12:20:42:368:578 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-24 12:20:43:331:621 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 12:20:43:367:50 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q8 finished at: 2022-4-24 12:20:46:369:581 + Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-14f-6264d01b-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q9 failed at: 2022-4-24 12:20:47:265:789 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]set_1650716943_1:Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-24 12:21:6:71:47 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-14f-6264d01b-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/tdsql/serializable/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..e878d4a8 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,81 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:27:39:902:9 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-23 21:27:39:937:101 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:27:40:901:992 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-23 21:27:40:941:185 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-23 21:27:41:901:984 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-23 21:27:41:938:715 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-d3-6263fecc-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q8 failed at: 2022-4-23 21:27:44:741:390 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]set_1650716943_1:Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-23 21:28:4:638:982 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-d3-6263fecc-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/tdsql/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..dd59de9c --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,120 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:21:10:533:651 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 12:21:10:570:426 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-24 12:21:10:607:10 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-24 12:21:11:497:374 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-24 12:21:11:535:777 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 12:21:12:497:400 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-24 12:21:12:533:554 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' + Q6 finished at: 2022-4-24 12:21:13:536:18 + Q7-T2 execute opt: 'COMMIT'; + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-24 12:21:13:569:7 + Q11-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 12:21:13:572:975 + Q11 finished at: 2022-4-24 12:21:13:602:2 +Q12 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-168-6264d036-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q12 failed at: 2022-4-24 12:21:14:735:866 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-168-6264d036-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/tdsql/serializable/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..58ad193c --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,127 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:28:12:381:50 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-23 21:28:12:415:314 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:28:13:347:668 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-23 21:28:13:388:208 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-23 21:28:13:432:630 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-23 21:28:13:471:305 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-23 21:28:14:347:665 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-23 21:28:14:383:666 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-23 21:28:14:431:981 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-23 21:28:15:386:970 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-23 21:28:15:425:795 + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-23 21:28:15:431:774 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-23 21:28:15:467:372 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-23 21:28:15:503:176 +Q15 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-de-6263feec-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q15 failed at: 2022-4-23 21:28:16:882:722 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-de-6263feec-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/tdsql/serializable/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..0046ee13 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/iat_sda_lost_update_committed.txt @@ -0,0 +1,39 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:23:29:218:876 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-23 21:23:29:252:817 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:23:30:223:370 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-23 21:23:31:219:728 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 21:23:31:253:629 + Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-93-6263fdd2-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q4 failed at: 2022-4-23 21:23:31:624:832 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-93-6263fdd2-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/tdsql/serializable/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..1112ca71 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:23:2:902:855 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 21:23:2:937:12 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:23:3:906:866 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-23 21:23:4:902:782 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 21:23:4:936:336 + Q4 finished at: 2022-4-23 21:23:4:941:187 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-23 21:23:4:979:961 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-23 21:23:24:939:639 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:23:24:974:486 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 21:23:25:9:325 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/serializable/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/tdsql/serializable/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..e37c27be --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/rat_dda_double_write_skew1.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:5:6:259:733 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:5:6:295:417 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:5:7:224:975 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 21:5:7:263:576 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-23 21:5:8:264:771 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-19-6263f982-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-23 21:5:8:865:144 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-19-6263f982-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/tdsql/serializable/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..bc978167 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:5:34:679:937 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:5:34:715:292 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:5:35:645:237 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 21:5:35:683:945 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-23 21:5:36:684:831 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:5:36:723:688 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-1e-6263f99e-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-23 21:5:37:381:533 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-1e-6263f99e-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/tdsql/serializable/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..d43aa058 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/rat_dda_double_write_skew2.txt @@ -0,0 +1,33 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:6:1:133:757 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:6:1:169:57 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:6:2:99:229 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 21:6:2:138:153 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:6:3:138:754 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-22-6263f9b9-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-23 21:6:3:735:442 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-22-6263f9b9-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/rat_dda_read_skew.txt b/test_result/centralizend_result/tdsql/serializable/rat_dda_read_skew.txt new file mode 100644 index 00000000..5167cd5b --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/rat_dda_read_skew.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:6:28:555:531 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 21:6:28:590:720 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:6:29:520:909 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 21:6:29:559:765 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:6:30:560:114 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-27-6263f9d4-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-23 21:6:31:156:890 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-27-6263f9d4-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/rat_dda_read_skew2.txt b/test_result/centralizend_result/tdsql/serializable/rat_dda_read_skew2.txt new file mode 100644 index 00000000..84bbe279 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/rat_dda_read_skew2.txt @@ -0,0 +1,42 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:7:49:453:427 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:7:49:488:734 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:7:50:457:634 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-23 21:7:50:497:539 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-23 21:7:51:454:397 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 21:7:51:489:711 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-26-6263fa26-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-23 21:7:51:958:437 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-26-6263fa26-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/tdsql/serializable/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..dc982e69 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/rat_dda_read_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:8:16:882:872 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:8:16:918:172 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:8:17:844:956 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-23 21:8:17:884:959 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-23 21:8:18:880:613 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 21:8:18:915:947 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-29-6263fa41-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-23 21:8:19:384:775 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-29-6263fa41-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/tdsql/serializable/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..7f73f850 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:6:56:975:211 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-23 21:6:57:10:525 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:6:57:940:661 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-23 21:6:58:975:772 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 21:6:59:10:604 + Q4 finished at: 2022-4-23 21:6:59:14:431 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-23 21:6:59:52:831 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:6:59:91:149 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-23 21:7:18:976:531 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 21:7:19:11:604 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/serializable/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/tdsql/serializable/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..1b441532 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:7:23:144:21 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-23 21:7:23:180:333 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:7:24:181:749 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-23 21:7:25:179:176 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 21:7:25:214:53 + Q4 finished at: 2022-4-23 21:7:25:217:843 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-23 21:7:25:256:255 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:7:25:294:613 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-23 21:7:45:179:818 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 21:7:45:215:193 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/serializable/rat_dda_write_read_skew.txt b/test_result/centralizend_result/tdsql/serializable/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..a0a7067e --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/rat_dda_write_read_skew.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: dda_write_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:4:11:407:474 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:4:11:442:588 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:4:12:410:694 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 21:4:12:454:807 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-23 21:4:13:412:705 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-10-6263f94b-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-23 21:4:14:9:332 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-10-6263f94b-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/tdsql/serializable/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..71ba70ab --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,42 @@ +#### db_type: tdsql #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:4:39:829:953 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:4:39:865:329 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:4:40:794:867 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 21:4:40:833:998 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-23 21:4:41:836:960 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:4:41:875:264 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-15-6263f967-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-23 21:4:42:533:750 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-15-6263f967-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/rat_mda_step_rat.txt b/test_result/centralizend_result/tdsql/serializable/rat_mda_step_rat.txt new file mode 100644 index 00000000..f6be0c64 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/rat_mda_step_rat.txt @@ -0,0 +1,70 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:8:43:338:753 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:8:43:374:5 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:8:44:304:142 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 21:8:44:343:826 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-23 21:8:45:339:232 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-23 21:8:45:375:296 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-23 21:8:46:343:983 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-38-6263fa5b-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-23 21:8:47:240:544 + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-23 21:8:47:312:162 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-38-6263fa5b-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/tdsql/serializable/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..c0a2eaa0 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,166 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN' + Q1 finished at: 2022-4-23 21:9:12:760:640 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-23 21:9:12:835:441 +Q3-T1 execute opt: 'BEGIN' +Q3 finished at: 2022-4-23 21:9:13:759:71 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-23 21:9:14:724:513 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-23 21:9:14:761:179 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q8-T2 execute opt: 'BEGIN' + Q8 finished at: 2022-4-23 21:9:15:724:545 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-23 21:9:16:766:460 +Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-42-6263fa79-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q4 failed at: 2022-4-23 21:9:17:164:652 + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-23 21:9:36:765:137 + Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]set_1650716943_1:Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q9 failed at: 2022-4-23 21:9:37:669:929 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-42-6263fa79-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/tdsql/serializable/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..078e00c4 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,70 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:9:44:216:510 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:9:44:251:834 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:9:45:181:951 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-23 21:9:45:220:819 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-23 21:9:46:181:947 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-23 21:9:46:221:343 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-23 21:9:47:221:528 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-4c-6263fa98-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-23 21:9:48:118:301 + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-23 21:9:48:189:819 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-4c-6263fa98-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/tdsql/serializable/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..1e0f80fd --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,67 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:10:13:531:113 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-23 21:10:13:567:618 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:10:14:531:106 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-23 21:10:14:569:933 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-23 21:10:15:531:102 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-23 21:10:15:567:279 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-23 21:10:16:570:892 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-56-6263fab5-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-23 21:10:17:467:517 + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-23 21:10:17:539:32 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-56-6263fab5-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/rat_sda_dirty_read.txt b/test_result/centralizend_result/tdsql/serializable/rat_sda_dirty_read.txt new file mode 100644 index 00000000..51ed9b31 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:1:1:674:100 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:1:1:713:609 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:1:2:677:288 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-23 21:1:3:674:682 + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-23 21:1:3:678:335 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:1:4:677:466 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-23 21:1:24:710:918 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-23 21:1:24:745:980 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/serializable/rat_sda_intermediate_read.txt b/test_result/centralizend_result/tdsql/serializable/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..0424a315 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_intermediate_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:1:57:194:109 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:1:57:229:409 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:1:58:197:550 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-23 21:1:59:195:159 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 21:2:1:194:989 + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-23 21:2:1:198:820 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:2:1:237:28 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-23 21:2:21:195:609 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:2:21:230:587 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/serializable/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/tdsql/serializable/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..1ca86551 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:2:25:437:120 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:2:25:472:467 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:2:26:440:447 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-23 21:2:27:437:581 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 21:2:27:472:773 + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-23 21:2:27:476:613 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-23 21:2:27:514:707 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-23 21:2:47:438:459 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:2:47:473:445 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/serializable/rat_sda_lost_self_update.txt b/test_result/centralizend_result/tdsql/serializable/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..1b87a0e4 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_self_update #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:3:44:129:351 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:3:44:164:425 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:3:45:132:579 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-23 21:3:46:129:832 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-23 21:3:46:165:157 + Q4 finished at: 2022-4-23 21:3:46:168:771 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 21:3:47:133:225 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-23 21:4:7:130:793 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:4:7:166:391 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/serializable/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/tdsql/serializable/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..79213e34 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:1:28:949:843 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 21:1:28:985:241 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:1:29:953:131 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-23 21:1:30:950:579 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 21:1:32:950:136 + Q4 finished at: 2022-4-23 21:1:32:954:36 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:1:32:992:550 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-23 21:1:52:951:67 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:1:52:986:42 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/tdsql/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..998e13f1 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:2:51:686:191 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-23 21:2:51:721:411 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:2:52:688:572 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-23 21:2:53:686:132 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 21:2:53:720:909 + Q4 finished at: 2022-4-23 21:2:53:724:671 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-23 21:2:53:763:7 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-23 21:3:13:686:775 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:3:13:721:763 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/tdsql/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..f7815365 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:3:17:854:448 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-23 21:3:17:890:670 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:3:18:892:326 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-23 21:3:19:889:624 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 21:3:19:924:534 + Q4 finished at: 2022-4-23 21:3:19:928:294 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-23 21:3:19:966:726 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-23 21:3:39:890:625 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:3:39:926:177 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/serializable/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/tdsql/serializable/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..b6c41c1d --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,35 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:16:34:13:569 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:16:34:52:516 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:16:35:16:819 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 21:16:35:57:787 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:16:36:18:364 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:16:36:58:239 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-4e-6263fc32-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-23 21:16:36:715:254 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-4e-6263fc32-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/tdsql/serializable/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..37a46f64 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,33 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:17:0:446:485 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:17:0:483:540 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:17:1:410:126 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-23 21:17:1:450:518 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:17:2:451:0 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-52-6263fc4c-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-23 21:17:3:47:730 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-52-6263fc4c-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/tdsql/serializable/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..378176e1 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,33 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:17:27:877:89 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:17:27:913:861 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:17:28:840:946 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-23 21:17:28:884:493 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:17:29:881:876 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-57-6263fc67-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-23 21:17:30:478:940 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-57-6263fc67-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/tdsql/serializable/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..19fd387e --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:17:56:307:471 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:17:56:344:300 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:17:57:271:400 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-23 21:17:57:311:373 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:17:58:312:281 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:17:58:352:90 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-5c-6263fc84-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-23 21:17:59:9:103 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-5c-6263fc84-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/tdsql/serializable/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..eea7a9f0 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:18:22:740:399 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 21:18:22:777:399 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:18:23:704:326 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-23 21:18:23:744:461 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:18:24:745:136 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-60-6263fc9e-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-23 21:18:25:341:791 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-60-6263fc9e-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/tdsql/serializable/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..1b00fa9a --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:18:50:172:600 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 21:18:50:209:543 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:18:51:136:562 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-23 21:18:51:179:218 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:18:52:177:411 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-65-6263fcba-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-23 21:18:52:774:105 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-65-6263fcba-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/tdsql/serializable/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..3abac102 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,42 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:19:18:603:104 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:19:18:639:782 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:19:19:567:54 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-23 21:19:19:607:243 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-23 21:19:20:604:377 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 21:19:20:641:144 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-7d-6263fcd7-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-23 21:19:21:108:353 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-7d-6263fcd7-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/tdsql/serializable/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..7edfbd95 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:19:46:39:105 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:19:46:75:891 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:19:47:2:611 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-23 21:19:47:44:69 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-23 21:19:48:39:886 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-80-6263fcf3-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-23 21:19:48:543:790 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-80-6263fcf3-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/tdsql/serializable/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..939b0344 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:20:14:468:93 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:20:14:505:267 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:20:15:431:223 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-23 21:20:15:472:742 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-23 21:20:16:468:356 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 21:20:16:505:94 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-84-6263fd0f-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-23 21:20:16:972:512 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-84-6263fd0f-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/tdsql/serializable/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..f2b32d0b --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/wat_mda_step_wat_c1.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: mda_step_wat_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:20:40:931:362 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:20:40:968:539 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:20:41:895:130 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-23 21:20:41:936:937 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-23 21:20:42:931:769 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-23 21:20:42:969:150 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-23 21:20:43:936:195 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-76-6263fd28-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-23 21:20:44:834:507 + Q8 finished at: 2022-4-23 21:20:44:911:158 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-76-6263fd28-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/tdsql/serializable/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..cd55af75 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/wat_mda_step_wat_c2.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: mda_step_wat_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:21:10:398:167 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:21:10:434:935 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:21:11:362:99 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-23 21:21:11:402:515 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-23 21:21:12:362:108 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-23 21:21:14:399:190 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-23 21:21:15:403:259 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-7c-6263fd46-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-23 21:21:16:300:98 + Q8 finished at: 2022-4-23 21:21:16:438:277 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-7c-6263fd46-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/tdsql/serializable/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..02cd9270 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:13:23:782:21 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:13:23:818:703 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:13:24:785:427 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-23 21:13:25:782:625 + Q4 finished at: 2022-4-23 21:13:25:786:244 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:13:26:787:659 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-23 21:13:46:820:391 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-23 21:13:46:872:980 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:13:46:909:834 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/serializable/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/tdsql/serializable/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..6226c96b --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:13:51:123:939 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:13:51:160:734 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:13:52:126:303 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-23 21:13:53:123:739 + Q4 finished at: 2022-4-23 21:13:53:127:409 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:13:54:127:91 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-23 21:14:14:124:381 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-23 21:14:14:178:350 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:14:14:214:975 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/serializable/wat_sda_full_write.txt b/test_result/centralizend_result/tdsql/serializable/wat_sda_full_write.txt new file mode 100644 index 00000000..f8444b76 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_full_write #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:14:18:429:816 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:14:18:466:745 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:14:19:432:883 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-23 21:14:20:430:586 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-23 21:14:20:467:441 + Q4 finished at: 2022-4-23 21:14:20:471:132 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 21:14:21:433:978 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-23 21:14:41:431:96 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:14:41:467:661 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/serializable/wat_sda_full_write_committed.txt b/test_result/centralizend_result/tdsql/serializable/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..d81dda48 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_full_write_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:14:45:679:620 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:14:45:716:422 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:14:46:682:522 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-23 21:14:47:680:52 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 21:14:47:716:696 + Q4 finished at: 2022-4-23 21:14:47:720:462 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-23 21:14:47:760:388 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-23 21:15:7:680:811 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:15:7:718:510 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/serializable/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/tdsql/serializable/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..2bafe1e6 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:16:7:728:800 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:16:7:765:956 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:16:8:692:446 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-23 21:16:9:729:164 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 21:16:9:765:805 + Q4 finished at: 2022-4-23 21:16:9:769:659 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-23 21:16:9:809:420 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-23 21:16:29:729:725 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:16:29:766:186 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tdsql/serializable/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/tdsql/serializable/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..a0444e85 --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/wat_sda_lost_update_c1.txt @@ -0,0 +1,39 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:15:11:929:604 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-23 21:15:11:966:563 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:15:12:937:284 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-23 21:15:13:930:843 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-23 21:15:13:967:597 + Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-63-6263fbe0-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q4 failed at: 2022-4-23 21:15:14:334:750 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-63-6263fbe0-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tdsql/serializable/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/tdsql/serializable/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..12a4f38b --- /dev/null +++ b/test_result/centralizend_result/tdsql/serializable/wat_sda_lost_update_c2.txt @@ -0,0 +1,37 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:15:39:330:622 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-23 21:15:39:367:735 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:15:40:294:369 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-23 21:15:41:331:560 + Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-66-6263fbfc-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q4 failed at: 2022-4-23 21:15:41:735:685 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-66-6263fbfc-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/tidb_opt/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..03d8ec55 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:26:14:599:440 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:26:14:601:339 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:26:14:700:260 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:26:14:702:231 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:26:14:703:981 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:26:14:705:754 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 17:26:14:811:770 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:26:14:813:11 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:26:14:815:631 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:26:14:816:746 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/tidb_opt/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..f91a52bb --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:26:15:60:303 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:26:15:64:659 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:26:15:160:235 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:26:15:162:165 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:26:15:164:119 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:26:15:165:615 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:26:15:264:519 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224383810928640, conflictStartTS=432224383837143040, conflictCommitTS=432224383838453760, key={tableID=2670, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-1 17:26:16:66:803 + +Test Result: Rollback +[MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224383810928640, conflictStartTS=432224383837143040, conflictCommitTS=432224383838453760, key={tableID=2670, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/iat_dda_write_skew.txt b/test_result/centralizend_result/tidb_opt/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..c6a07684 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:26:16:313:314 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:26:16:315:258 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:26:16:415:564 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:26:16:417:679 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:26:16:419:640 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:26:16:514:462 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:26:16:516:136 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:26:16:613:796 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:26:16:616:585 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:26:16:617:699 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/tidb_opt/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..76b2127c --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:26:17:788:658 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:26:17:790:394 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:26:17:888:615 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:26:17:890:280 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:26:17:891:932 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:26:17:893:404 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:26:17:989:123 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:26:17:990:488 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:26:17:992:670 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:26:17:993:667 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/tidb_opt/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..ce0b370b --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:26:16:868:522 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-1 17:26:16:871:730 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-1 17:26:16:873:604 + Q4-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q4 finished at: 2022-4-1 17:26:16:968:300 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-1 17:26:16:971:212 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-1 17:26:16:972:886 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:26:16:974:159 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:26:17:68:856 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-1 17:26:17:72:28 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-1 17:26:17:75:236 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:26:17:76:541 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/tidb_opt/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..1d8a71a9 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:26:17:325:246 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (saving,500,) (checking,500,) + (1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-1 17:26:17:328:237 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:26:17:425:871 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (saving,500,) (checking,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + (2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-1 17:26:17:428:939 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-1 17:26:17:431:407 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:26:17:432:676 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-1 17:26:17:529:625 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:26:17:531:50 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,saving,1400) (kevin,checking,1400) + (1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + (2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-1 17:26:17:533:695 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:26:17:534:852 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/iat_mda_step_iat.txt b/test_result/centralizend_result/tidb_opt/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..d18b1444 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:26:18:237:943 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 17:26:18:240:267 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:26:18:337:883 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:26:18:340:5 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-1 17:26:18:437:919 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 17:26:18:440:104 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-1 17:26:18:538:589 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 17:26:18:638:731 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-1 17:26:18:738:547 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:26:18:838:278 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:26:18:938:588 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:26:19:38:462 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:26:19:41:276 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:26:19:42:234 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/tidb_opt/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..bca19063 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:26:22:686:57 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:26:22:688:176 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:26:22:786:71 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:26:22:787:846 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:26:22:789:429 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-1 17:26:22:886:192 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 17:26:22:888:295 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 17:26:22:889:872 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:26:22:891:146 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-1 17:26:22:986:934 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 17:26:22:988:107 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-1 17:26:22:990:728 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 17:26:22:991:759 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/tidb_opt/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..a1d91353 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,209 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:26:21:930:6 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:26:21:932:675 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:26:22:29:898 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:26:22:32:726 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-1 17:26:22:129:918 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-1 17:26:22:131:599 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:26:22:132:855 + Q8-T4 execute sql: 'BEGIN OPTIMISTIC;' + Q8 finished at: 2022-4-1 17:26:22:231:964 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 17:26:22:233:839 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:26:22:235:241 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-1 17:26:22:333:828 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:26:22:335:249 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-1 17:26:22:431:523 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-1 17:26:22:432:784 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 17:26:22:436:630 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 17:26:22:437:592 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/tidb_opt/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..3fc812ef --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:26:19:285:322 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-1 17:26:19:287:226 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:26:19:384:851 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:26:19:386:829 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-1 17:26:19:488:5 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 17:26:19:490:114 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-1 17:26:19:585:354 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-1 17:26:19:685:530 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-1 17:26:19:785:536 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:26:19:885:449 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:26:19:985:415 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:26:20:85:532 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 17:26:20:88:77 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:26:20:89:166 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/tidb_opt/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..7cc7df23 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:26:20:326:913 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 17:26:20:331:344 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:26:20:428:67 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-1 17:26:20:430:230 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-1 17:26:20:529:331 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-1 17:26:20:531:444 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-1 17:26:20:627:662 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-1 17:26:20:732:840 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-1 17:26:20:827:512 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:26:20:927:474 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:26:21:27:561 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:26:21:127:667 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:26:21:130:322 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:26:21:131:269 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/tidb_opt/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..c02257e6 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:26:23:235:893 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 17:26:23:237:812 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-1 17:26:23:239:841 + Q4-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q4 finished at: 2022-4-1 17:26:23:335:613 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-1 17:26:23:337:644 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-1 17:26:23:339:244 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:26:23:340:475 + Q8-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q8 finished at: 2022-4-1 17:26:23:435:572 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-1 17:26:23:437:555 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 17:26:23:439:468 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:26:23:440:602 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-1 17:26:23:536:165 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-1 17:26:23:537:589 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-1 17:26:23:540:389 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-1 17:26:23:541:729 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/tidb_opt/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..cc600077 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,164 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:26:21:377:352 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-1 17:26:21:379:602 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:26:21:477:300 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-1 17:26:21:479:444 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:26:21:481:124 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 17:26:21:483:31 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-1 17:26:21:484:537 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:26:21:485:870 + Q9-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q9 finished at: 2022-4-1 17:26:21:577:382 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-1 17:26:21:579:682 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-1 17:26:21:581:246 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-1 17:26:21:583:156 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-1 17:26:21:584:764 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:26:21:586:126 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-1 17:26:21:680:985 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-1 17:26:21:682:129 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-1 17:26:21:684:965 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-1 17:26:21:686:74 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/tidb_opt/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..7f60c5bd --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:26:13:442:818 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 17:26:13:447:179 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:26:13:544:92 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:26:13:545:840 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:26:13:547:183 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-1 17:26:13:644:109 +Q7-T1 execute opt: 'COMMIT'; +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224383386779648, conflictStartTS=432224383413256192, conflictCommitTS=432224383414042624, key={tableID=2664, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q7 failed at: 2022-4-1 17:26:14:345:998 + +Test Result: Rollback +[MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224383386779648, conflictStartTS=432224383413256192, conflictCommitTS=432224383414042624, key={tableID=2664, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/tidb_opt/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..5bc8b91a --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:26:12:960:836 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:26:12:962:564 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:26:13:75:102 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:26:13:76:772 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:26:13:77:974 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 17:26:13:176:601 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:26:13:177:751 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:26:13:180:29 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:26:13:181:63 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:26:13:182:89 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..61704a56 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:39:234:302 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:25:39:236:269 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:39:334:847 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:25:39:336:734 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:25:39:338:504 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q6 finished at: 2022-4-1 17:25:39:441:520 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:25:39:536:409 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224374419357696, conflictStartTS=432224374445572096, conflictCommitTS=432224374498525184, key={tableID=2571, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-1 17:25:40:440:915 + +Test Result: Rollback +[MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224374419357696, conflictStartTS=432224374445572096, conflictCommitTS=432224374498525184, key={tableID=2571, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..18156228 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:40:678:74 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:25:40:680:90 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:40:778:258 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:25:40:780:381 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:25:40:782:204 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:25:40:783:572 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-1 17:25:40:880:749 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224374797631488, conflictStartTS=432224374824108032, conflictCommitTS=432224374825418752, key={tableID=2574, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-1 17:25:41:682:584 + +Test Result: Rollback +[MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224374797631488, conflictStartTS=432224374824108032, conflictCommitTS=432224374825418752, key={tableID=2574, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..9debebeb --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:41:917:791 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:25:41:919:761 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:42:18:48 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:25:42:20:193 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-1 17:25:42:22:16 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 17:25:42:120:829 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:25:42:122:262 + Q8-T2 execute opt: 'COMMIT'; + Q8 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224375148904448, conflictStartTS=432224375122690048, conflictCommitTS=432224375176429568, key={tableID=2577, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q8 failed at: 2022-4-1 17:25:43:19:587 + +Test Result: Rollback +[MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224375148904448, conflictStartTS=432224375122690048, conflictCommitTS=432224375176429568, key={tableID=2577, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_read_skew.txt b/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..793fdddd --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:43:250:886 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:25:43:252:739 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:43:350:735 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:25:43:352:461 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:25:43:354:27 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 17:25:43:451:884 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:25:43:551:162 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:25:43:651:16 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:25:43:654:948 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:25:43:656:18 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_read_skew2.txt b/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..6ecd261a --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:44:792:829 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:25:44:794:615 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:44:892:770 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:25:44:894:411 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:25:44:895:952 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:25:44:993:465 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:25:44:994:781 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:25:45:92:693 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:25:45:95:208 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:25:45:96:271 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..cf8736f8 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:45:327:837 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:25:45:329:586 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:45:427:915 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:25:45:430:70 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:25:45:432:141 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:25:45:433:101 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:25:45:528:732 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:25:45:529:975 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:25:45:532:179 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:25:45:533:100 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..b933b0a8 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:43:919:793 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 17:25:43:922:894 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:44:20:100 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:25:44:21:788 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:25:44:31:550 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:25:44:33:426 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 17:25:44:121:358 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:25:44:122:543 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-1 17:25:44:124:786 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:25:44:125:721 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..89133cb7 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:44:353:712 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 17:25:44:358:408 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:44:455:540 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-1 17:25:44:457:121 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-1 17:25:44:458:601 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:25:44:459:794 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 17:25:44:557:111 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:25:44:558:29 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-1 17:25:44:560:186 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:25:44:561:21 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_write_read_skew.txt b/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..aca2e633 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:38:139:615 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:25:38:141:251 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:38:239:656 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:25:38:241:323 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:25:38:243:27 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 17:25:38:344:667 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:25:38:439:673 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:25:38:544:135 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:25:38:546:446 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:25:38:547:386 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..76aee8ac --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:38:795:853 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:25:38:797:789 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:38:895:783 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:25:38:897:446 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:25:38:899:201 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:25:38:900:577 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 17:25:38:996:353 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:25:38:997:514 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:25:39:0:103 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:25:39:1:92 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/rat_mda_step_rat.txt b/test_result/centralizend_result/tidb_opt/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..98b3ae84 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:45:766:975 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:25:45:768:700 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:45:866:951 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:25:45:868:660 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:25:45:870:565 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-1 17:25:45:967:81 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-1 17:25:45:968:763 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-1 17:25:45:970:741 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-1 17:25:46:68:76 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:25:46:69:299 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:25:46:167:187 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:25:46:267:262 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:25:46:271:22 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:25:46:271:920 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/tidb_opt/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..23b8a8ec --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN OPTIMISTIC;' + Q1 finished at: 2022-4-1 17:25:46:505:882 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-1 17:25:46:508:568 +Q3-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q3 finished at: 2022-4-1 17:25:46:605:917 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-1 17:25:46:607:667 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-1 17:25:46:705:832 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-1 17:25:46:708:508 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 17:25:46:710:981 + Q8-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q8 finished at: 2022-4-1 17:25:46:808:176 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 17:25:46:809:895 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 17:25:46:908:40 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 17:25:47:6:153 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:25:47:106:241 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 17:25:47:206:4 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:25:47:207:192 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 17:25:47:210:218 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 17:25:47:211:104 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/tidb_opt/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..368b43cf --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:47:446:623 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:25:47:448:497 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:47:546:935 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:25:47:548:620 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 17:25:47:551:187 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-1 17:25:47:646:648 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-1 17:25:47:648:237 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-1 17:25:47:650:545 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-1 17:25:47:750:571 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:25:47:752:4 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:25:47:847:114 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:25:47:947:25 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 17:25:47:949:365 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:25:47:950:315 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/tidb_opt/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..9b20828e --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:48:180:63 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-1 17:25:48:182:102 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:48:279:745 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-1 17:25:48:281:413 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 17:25:48:286:405 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-1 17:25:48:380:89 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-1 17:25:48:382:104 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-1 17:25:48:384:945 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-1 17:25:48:481:444 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:25:48:482:830 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:25:48:580:202 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:25:48:680:213 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:25:48:682:920 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:25:48:683:832 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/rat_sda_dirty_read.txt b/test_result/centralizend_result/tidb_opt/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..2e1b32d0 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:33:630:992 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:25:33:632:746 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:33:731:962 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:25:33:733:707 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-1 17:25:33:831:974 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:25:33:931:834 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 17:25:33:934:466 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:25:33:935:332 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/rat_sda_intermediate_read.txt b/test_result/centralizend_result/tidb_opt/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..bc851245 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:34:848:123 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:25:34:849:876 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:34:948:133 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:25:34:949:950 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-1 17:25:35:52:562 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:25:35:148:201 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:25:35:248:426 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 17:25:35:250:644 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:25:35:251:768 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/tidb_opt/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..0ffda640 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:35:511:840 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:25:35:513:438 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:35:611:885 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:25:35:613:654 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:25:35:614:569 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-1 17:25:35:712:348 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:25:35:713:507 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 17:25:35:715:461 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:25:35:716:324 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/rat_sda_lost_self_update.txt b/test_result/centralizend_result/tidb_opt/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..6ee6cbb3 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:36:907:809 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:25:36:909:457 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:37:7:937 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:25:37:9:828 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 17:25:37:108:337 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 17:25:37:109:812 + Q7-T2 execute opt: 'COMMIT'; + Q7 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224373835563008, conflictStartTS=432224373809348608, conflictCommitTS=432224373862301696, key={tableID=2562, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q7 failed at: 2022-4-1 17:25:37:908:601 + +Test Result: Rollback +[MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224373835563008, conflictStartTS=432224373809348608, conflictCommitTS=432224373862301696, key={tableID=2562, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/tidb_opt/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..679a6997 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:34:190:649 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:25:34:192:594 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:34:290:610 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:25:34:292:321 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 17:25:34:391:560 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:25:34:490:921 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:25:34:590:592 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:25:34:592:751 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:25:34:593:663 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/tidb_opt/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..76214967 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:35:984:170 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 17:25:35:986:792 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:36:71:464 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:25:36:73:245 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:25:36:74:437 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 17:25:36:172:571 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:25:36:173:586 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-1 17:25:36:175:570 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:25:36:176:504 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/tidb_opt/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..05e53a0a --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:36:429:867 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 17:25:36:434:637 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:36:529:865 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-1 17:25:36:531:496 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:25:36:532:618 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 17:25:36:631:88 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:25:36:632:155 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-1 17:25:36:634:492 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:25:36:637:814 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..a598a18e --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:56:689:319 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:25:56:691:50 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:56:789:891 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:25:56:791:677 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-1 17:25:56:793:288 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:25:56:794:495 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 17:25:56:892:683 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224378995081216, conflictStartTS=432224379021295616, conflictCommitTS=432224379022606336, key={tableID=2628, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-1 17:25:57:694:255 + +Test Result: Rollback +[MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224378995081216, conflictStartTS=432224379021295616, conflictCommitTS=432224379022606336, key={tableID=2628, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..439ee212 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,37 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:57:932:315 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:25:57:934:46 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:58:33:404 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:25:58:35:58 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-1 17:25:58:36:662 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:25:58:132:767 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:25:58:134:20 + Q8-T2 execute opt: 'COMMIT'; + Q8 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224379347402752, conflictStartTS=432224379320926208, conflictCommitTS=432224379373617152, key={tableID=2631, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q8 failed at: 2022-4-1 17:25:59:35:979 + +Test Result: Rollback +[MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224379347402752, conflictStartTS=432224379320926208, conflictCommitTS=432224379373617152, key={tableID=2631, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..a5446bcf --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,37 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:59:276:488 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:25:59:278:138 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:59:376:492 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:25:59:378:83 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-1 17:25:59:379:785 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:25:59:477:587 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:25:59:576:900 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224379673247744, conflictStartTS=432224379699462144, conflictCommitTS=432224379751890944, key={tableID=2634, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-1 17:26:0:477:327 + +Test Result: Rollback +[MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224379673247744, conflictStartTS=432224379699462144, conflictCommitTS=432224379751890944, key={tableID=2634, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..6bd3d3d4 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,37 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:26:0:717:160 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:26:0:719:164 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:26:0:817:209 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:26:0:819:102 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-1 17:26:0:820:650 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:26:0:821:880 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:26:0:917:598 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224380050735104, conflictStartTS=432224380076949504, conflictCommitTS=432224380078260224, key={tableID=2637, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-1 17:26:1:719:437 + +Test Result: Rollback +[MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224380050735104, conflictStartTS=432224380076949504, conflictCommitTS=432224380078260224, key={tableID=2637, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..b5e4aabc --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:26:1:958:635 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:26:1:960:429 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:26:2:59:440 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:26:2:61:951 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:26:2:63:695 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:26:2:161:99 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:26:2:162:630 + Q8-T2 execute opt: 'COMMIT'; + Q8 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224380402794496, conflictStartTS=432224380376317952, conflictCommitTS=432224380429795328, key={tableID=2640, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 + Q8 failed at: 2022-4-1 17:26:3:59:510 + +Test Result: Rollback +[MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224380402794496, conflictStartTS=432224380376317952, conflictCommitTS=432224380429795328, key={tableID=2640, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..e1ac6532 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:26:3:299:448 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:26:3:301:212 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:26:3:399:491 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:26:3:401:59 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:26:3:402:511 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:26:3:500:141 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:26:3:599:677 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224380727853056, conflictStartTS=432224380754067456, conflictCommitTS=432224380806496256, key={tableID=2643, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-1 17:26:4:500:121 + +Test Result: Rollback +[MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224380727853056, conflictStartTS=432224380754067456, conflictCommitTS=432224380806496256, key={tableID=2643, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..b800534c --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:26:4:739:809 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:26:4:741:470 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:26:4:839:795 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:26:4:841:453 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-1 17:26:4:842:953 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:26:4:940:402 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:26:4:941:752 + Q8-T2 execute opt: 'COMMIT'; + Q8 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224381131554816, conflictStartTS=432224381105340416, conflictCommitTS=432224381158293504, key={tableID=2646, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q8 failed at: 2022-4-1 17:26:5:840:390 + +Test Result: Rollback +[MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224381131554816, conflictStartTS=432224381105340416, conflictCommitTS=432224381158293504, key={tableID=2646, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..9f8074b2 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:26:6:79:629 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:26:6:81:307 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:26:6:179:517 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:26:6:181:178 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-1 17:26:6:182:728 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:26:6:280:72 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:26:6:379:899 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224381456613376, conflictStartTS=432224381482827776, conflictCommitTS=432224381535256576, key={tableID=2649, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-1 17:26:7:280:225 + +Test Result: Rollback +[MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224381456613376, conflictStartTS=432224381482827776, conflictCommitTS=432224381535256576, key={tableID=2649, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..f949704b --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:26:7:522:136 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:26:7:524:95 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:26:7:622:82 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:26:7:623:804 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-1 17:26:7:625:569 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:26:7:627:44 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:26:7:722:575 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224381834625024, conflictStartTS=432224381860839424, conflictCommitTS=432224381862150144, key={tableID=2652, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-1 17:26:8:524:319 + +Test Result: Rollback +[MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224381834625024, conflictStartTS=432224381860839424, conflictCommitTS=432224381862150144, key={tableID=2652, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/tidb_opt/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..8225bb49 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,47 @@ +#### db_type: tidb #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:26:8:766:639 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:26:8:768:770 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:26:8:866:356 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:26:8:868:96 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-1 17:26:8:871:606 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-1 17:26:8:966:494 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 17:26:8:968:202 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' + Q8 finished at: 2022-4-1 17:26:8:969:719 +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q9 finished at: 2022-4-1 17:26:9:68:781 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:26:9:70:425 + Q11-T2 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; + Q11 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224382187208704, conflictStartTS=432224382160994304, conflictCommitTS=432224382240686080, key={tableID=2655, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q11 failed at: 2022-4-1 17:26:10:268:732 + Q12 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224382213423104, conflictStartTS=432224382160994304, conflictCommitTS=432224382240686080, key={tableID=2655, handle=2} primary=[]byte(nil) [try again later] errcode: HY000 + Q12 failed at: 2022-4-1 17:26:10:467:631 + +Test Result: Rollback +[MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224382187208704, conflictStartTS=432224382160994304, conflictCommitTS=432224382240686080, key={tableID=2655, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/tidb_opt/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..47b785fb --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,47 @@ +#### db_type: tidb #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:26:10:712:173 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:26:10:714:284 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:26:10:811:918 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:26:10:813:584 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-1 17:26:10:911:931 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6 finished at: 2022-4-1 17:26:11:12:973 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 17:26:11:112:836 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' + Q8 finished at: 2022-4-1 17:26:11:114:429 +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q9 finished at: 2022-4-1 17:26:11:212:758 + Q10-T2 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:26:11:312:586 +Q11-T1 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; +Q11 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224382670864384, conflictStartTS=432224382697078784, conflictCommitTS=432224382828412928, key={tableID=2658, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q11 failed at: 2022-4-1 17:26:12:517:725 + Q12 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224382723293184, conflictStartTS=432224382697078784, conflictCommitTS=432224382828412928, key={tableID=2658, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 + Q12 failed at: 2022-4-1 17:26:12:712:980 + +Test Result: Rollback +[MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224382670864384, conflictStartTS=432224382697078784, conflictCommitTS=432224382828412928, key={tableID=2658, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/tidb_opt/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..6e6db82a --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:48:917:62 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:25:48:918:649 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:49:17:81 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:25:49:18:779 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-1 17:25:49:116:969 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:25:49:220:436 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 17:25:49:222:788 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-1 17:25:49:238:123 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:25:49:239:295 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/tidb_opt/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..93929313 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,32 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:49:456:757 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:25:49:458:596 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:49:556:694 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:25:49:558:374 +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-1 17:25:49:656:932 + Q6-T2 execute opt: 'COMMIT'; + Q6 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224377125208064, conflictStartTS=432224377098993664, conflictCommitTS=432224377151422464, key={tableID=2610, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q6 failed at: 2022-4-1 17:25:50:357:539 + +Test Result: Rollback +[MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224377125208064, conflictStartTS=432224377098993664, conflictCommitTS=432224377151422464, key={tableID=2610, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/wat_sda_full_write.txt b/test_result/centralizend_result/tidb_opt/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..56aa410e --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/wat_sda_full_write.txt @@ -0,0 +1,34 @@ +#### db_type: tidb #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:50:592:926 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:25:50:594:629 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:50:693:157 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:25:50:695:188 +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-1 17:25:50:793:607 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 17:25:50:795:52 + Q7-T2 execute opt: 'COMMIT'; + Q7 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224377423265792, conflictStartTS=432224377396789248, conflictCommitTS=432224377449742336, key={tableID=2613, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q7 failed at: 2022-4-1 17:25:51:596:568 + +Test Result: Rollback +[MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224377423265792, conflictStartTS=432224377396789248, conflictCommitTS=432224377449742336, key={tableID=2613, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/wat_sda_full_write_committed.txt b/test_result/centralizend_result/tidb_opt/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..9d1026d9 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,34 @@ +#### db_type: tidb #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:51:833:44 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:25:51:834:798 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:51:931:959 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:25:51:933:739 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:25:51:935:2 +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-1 17:25:52:32:384 +Q7-T1 execute opt: 'COMMIT'; +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224377721847808, conflictStartTS=432224377747800064, conflictCommitTS=432224377748586496, key={tableID=2616, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q7 failed at: 2022-4-1 17:25:52:734:517 + +Test Result: Rollback +[MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224377721847808, conflictStartTS=432224377747800064, conflictCommitTS=432224377748586496, key={tableID=2616, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/tidb_opt/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..398127af --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:55:550:641 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:25:55:552:710 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:55:651:180 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:25:55:653:91 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:25:55:654:504 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 17:25:55:750:224 +Q7-T1 execute opt: 'COMMIT'; +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224378696499200, conflictStartTS=432224378722713600, conflictCommitTS=432224378723762176, key={tableID=2625, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q7 failed at: 2022-4-1 17:25:56:452:235 + +Test Result: Rollback +[MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224378696499200, conflictStartTS=432224378722713600, conflictCommitTS=432224378723762176, key={tableID=2625, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/tidb_opt/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..536ed4cb --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:52:976:770 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 17:25:52:978:377 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:53:76:711 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:25:53:78:529 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-1 17:25:53:177:323 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 17:25:53:178:645 + Q7-T2 execute opt: 'COMMIT'; + Q7 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224378047954944, conflictStartTS=432224378021740544, conflictCommitTS=432224378074693632, key={tableID=2619, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q7 failed at: 2022-4-1 17:25:53:977:408 + +Test Result: Rollback +[MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224378047954944, conflictStartTS=432224378021740544, conflictCommitTS=432224378074693632, key={tableID=2619, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/centralizend_result/tidb_opt/read-committed/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/tidb_opt/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..c7841396 --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-1 17:25:54:213:51 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 17:25:54:214:849 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-1 17:25:54:312:901 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:25:54:314:707 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-1 17:25:54:416:620 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:25:54:516:256 +Q7-T1 execute opt: 'COMMIT'; +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224378345750528, conflictStartTS=432224378371964928, conflictCommitTS=432224378425180160, key={tableID=2622, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q7 failed at: 2022-4-1 17:25:55:313:751 + +Test Result: Rollback +[MySQL][ODBC 8.0(w) Driver]Write conflict, txnStartTS=432224378345750528, conflictStartTS=432224378371964928, conflictCommitTS=432224378425180160, key={tableID=2622, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/centralizend_result/tidb_opt/result_summary/read-committed_total-result.txt b/test_result/centralizend_result/tidb_opt/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..45e2cffc --- /dev/null +++ b/test_result/centralizend_result/tidb_opt/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Rollback + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Rollback + +wat_sda_full_write: Rollback + +wat_sda_full_write_committed: Rollback + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Rollback + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/tidb_per/read-committed/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/tidb_per/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..8c7f8b21 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:14:759:122 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:18:14:761:81 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:14:860:233 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:14:862:445 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:18:14:864:294 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:14:865:934 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 17:18:14:962:429 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:14:963:598 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:14:966:154 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:14:967:167 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/tidb_per/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..112ec1f7 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:15:204:606 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:18:15:206:319 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:15:304:901 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:15:306:846 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:18:15:308:477 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:15:309:977 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:18:15:405:431 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:15:406:951 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:15:424:219 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:15:425:427 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/iat_dda_write_skew.txt b/test_result/centralizend_result/tidb_per/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..b634c160 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:15:662:808 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:18:15:664:591 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:15:762:711 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:18:15:764:557 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:18:15:766:137 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:18:15:863:308 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:18:15:864:735 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:18:15:964:385 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:15:966:764 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:18:15:967:867 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/tidb_per/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..d8486cc1 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:17:233:579 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:18:17:235:356 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:17:336:358 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:18:17:338:323 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:18:17:340:234 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:17:341:774 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:18:17:434:266 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:17:435:719 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:17:438:158 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:17:439:436 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/tidb_per/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..f85b2866 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:16:227:229 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-1 17:18:16:249:442 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-1 17:18:16:251:304 + Q4-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q4 finished at: 2022-4-1 17:18:16:327:513 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-1 17:18:16:330:423 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-1 17:18:16:332:151 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:18:16:333:628 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:16:428:438 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-1 17:18:16:431:422 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-1 17:18:16:434:5 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:18:16:435:57 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/tidb_per/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..fe67e21f --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:16:771:733 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (saving,500,) (checking,500,) + (1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-1 17:18:16:775:200 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:16:871:520 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (saving,500,) (checking,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + (2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-1 17:18:16:874:356 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-1 17:18:16:877:982 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:16:879:402 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-1 17:18:16:984:345 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:16:985:832 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,saving,1400) (kevin,checking,1400) + (1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + (2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-1 17:18:16:988:571 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:16:989:724 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/iat_mda_step_iat.txt b/test_result/centralizend_result/tidb_per/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..f2ea1158 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:17:696:585 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 17:18:17:698:635 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:17:800:203 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:18:17:802:545 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-1 17:18:17:898:214 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 17:18:17:900:337 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-1 17:18:17:997:556 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 17:18:18:97:429 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-1 17:18:18:197:552 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:18:18:297:75 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:18:18:397:201 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:18:18:497:390 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:18:18:500:379 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:18:18:501:585 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/tidb_per/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..2600a199 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:22:140:966 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:18:22:142:998 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:22:241:76 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:18:22:242:985 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:18:22:244:361 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-1 17:18:22:341:273 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 17:18:22:343:484 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 17:18:22:345:240 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:22:346:749 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2022-4-1 17:18:22:441:970 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 17:18:22:443:185 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-1 17:18:22:445:716 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 17:18:22:446:695 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/tidb_per/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..7cf85e90 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,207 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:21:370:783 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:18:21:374:385 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:21:470:483 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:18:21:473:153 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-1 17:18:21:571:434 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-1 17:18:21:573:365 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:18:21:574:853 + Q8-T4 execute sql: 'BEGIN PESSIMISTIC;' + Q8 finished at: 2022-4-1 17:18:21:673:481 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 17:18:21:676:49 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:21:677:554 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-4-1 17:18:21:772:226 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:18:21:773:422 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-1 17:18:21:873:804 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-1 17:18:21:875:178 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 17:18:21:879:468 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 17:18:21:880:639 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/tidb_per/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..27eaa1eb --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:18:742:179 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-1 17:18:18:744:238 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:18:842:117 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:18:18:844:184 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-1 17:18:18:942:159 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 17:18:18:944:128 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-1 17:18:19:42:806 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-1 17:18:19:144:627 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-1 17:18:19:242:904 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:18:19:342:830 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:18:19:442:702 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:18:19:542:756 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 17:18:19:545:271 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:18:19:546:410 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/tidb_per/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..00bb4379 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:19:779:86 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 17:18:19:783:351 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:19:879:9 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-1 17:18:19:880:986 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-1 17:18:19:979:293 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-1 17:18:19:981:567 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-1 17:18:20:79:807 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-1 17:18:20:179:847 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-1 17:18:20:280:55 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:18:20:379:600 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:18:20:479:608 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:18:20:579:819 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:18:20:582:483 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:18:20:583:625 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/tidb_per/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..5a580e12 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:22:685:674 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 17:18:22:687:804 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-1 17:18:22:689:749 + Q4-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q4 finished at: 2022-4-1 17:18:22:785:692 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-1 17:18:22:787:860 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-1 17:18:22:789:673 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:18:22:791:696 + Q8-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q8 finished at: 2022-4-1 17:18:22:885:725 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-1 17:18:22:887:955 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 17:18:22:890:38 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:18:22:891:184 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-1 17:18:22:988:972 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-1 17:18:22:990:574 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-1 17:18:22:993:524 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-1 17:18:22:994:532 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/tidb_per/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..4a66559f --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,162 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:20:825:498 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-1 17:18:20:827:553 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:20:928:71 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-1 17:18:20:930:268 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:18:20:932:96 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 17:18:20:934:38 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-1 17:18:20:935:785 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:18:20:937:198 + Q9-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q9 finished at: 2022-4-1 17:18:21:25:522 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-1 17:18:21:27:683 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-1 17:18:21:29:370 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-1 17:18:21:31:394 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-1 17:18:21:33:53 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:18:21:34:420 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2022-4-1 17:18:21:126:537 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-1 17:18:21:127:772 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-1 17:18:21:130:713 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-1 17:18:21:131:796 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/tidb_per/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..26427bda --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:14:316:260 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 17:18:14:320:587 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:14:416:134 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:18:14:417:805 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:18:14:419:89 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-1 17:18:14:518:242 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:18:14:519:677 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:18:14:521:743 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:14:522:794 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/tidb_per/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..40a6a7d2 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,60 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:13:871:278 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:18:13:873:269 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:13:972:99 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:18:13:973:945 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:18:13:975:889 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 17:18:14:72:735 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:18:14:73:804 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:18:14:75:985 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:14:77:198 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:14:78:270 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/tidb_per/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..6fcc1918 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:17:52:447:732 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:17:52:449:688 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:17:52:547:640 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:17:52:549:412 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:17:52:551:84 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:17:52:762:853 +Q6 finished at: 2022-4-1 17:17:52:795:218 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:17:52:848:184 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-1 17:17:52:850:988 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:17:52:852:116 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/tidb_per/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..c4b2dc4a --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:17:53:108:887 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:17:53:110:741 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:17:53:208:892 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:17:53:211:256 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:17:53:213:400 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:17:53:214:824 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-1 17:17:53:312:761 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:17:53:314:76 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-1 17:17:53:316:427 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:17:53:317:359 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/read-committed/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/tidb_per/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..4bfd525a --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:17:53:567:987 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:17:53:569:879 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:17:53:668:191 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:17:53:670:229 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 17:17:53:770:884 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:17:53:776:131 + Q5 finished at: 2022-4-1 17:17:53:776:671 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:17:53:868:202 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:17:53:870:447 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:17:53:871:363 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/read-committed/rat_dda_read_skew.txt b/test_result/centralizend_result/tidb_per/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..531d1e18 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:17:54:121:952 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:17:54:123:764 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:17:54:221:897 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:17:54:223:779 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:17:54:225:297 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 17:17:54:322:754 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:17:54:422:152 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:17:54:521:894 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:17:54:524:235 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:17:54:525:118 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/read-committed/rat_dda_read_skew2.txt b/test_result/centralizend_result/tidb_per/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..25c1a1f0 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:17:55:706:739 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:17:55:708:619 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:17:55:808:192 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:17:55:822:53 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:17:55:824:12 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:17:55:914:420 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:17:55:920:788 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:17:56:12:262 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:17:56:15:209 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:17:56:16:423 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/read-committed/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/tidb_per/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..f0f86f41 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:17:56:318:757 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:17:56:320:771 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:17:56:420:141 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:17:56:421:969 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:17:56:423:939 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:17:56:424:986 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:17:56:523:175 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:17:56:524:506 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:17:56:526:952 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:17:56:528:23 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/tidb_per/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..e001425a --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:17:54:780:204 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 17:17:54:782:844 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:17:54:879:991 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:17:54:881:691 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:17:54:883:280 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:17:54:884:456 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 17:17:54:983:360 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:17:54:984:334 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-1 17:17:54:986:273 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:17:54:987:205 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/tidb_per/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..c1386b3e --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,59 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:17:55:238:688 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 17:17:55:243:763 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:17:55:338:894 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-1 17:17:55:340:885 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-1 17:17:55:342:784 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:17:55:344:173 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 17:17:55:440:5 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:17:55:441:40 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-1 17:17:55:443:280 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:17:55:444:375 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/rat_dda_write_read_skew.txt b/test_result/centralizend_result/tidb_per/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..fc6fc91a --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:17:51:337:450 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:17:51:339:206 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:17:51:437:597 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:17:51:439:597 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:17:51:441:348 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 17:17:51:538:245 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:17:51:640:184 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:17:51:737:630 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:17:51:739:960 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:17:51:740:990 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/tidb_per/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..1b93be75 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:17:51:994:273 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:17:51:996:263 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:17:52:94:438 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:17:52:96:799 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:17:52:98:573 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:17:52:99:856 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 17:17:52:194:745 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:17:52:195:927 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:17:52:198:207 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:17:52:199:180 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/read-committed/rat_mda_step_rat.txt b/test_result/centralizend_result/tidb_per/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..f04c3125 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:17:56:809:848 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:17:56:811:741 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:17:56:912:94 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:17:56:913:947 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:17:56:915:933 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-1 17:17:57:12:133 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-1 17:17:57:14:13 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-1 17:17:57:16:85 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-1 17:17:57:111:109 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:17:57:112:495 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:17:57:212:393 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:17:57:310:775 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:17:57:314:467 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:17:57:315:572 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/tidb_per/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..cbf4a886 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN PESSIMISTIC;' + Q1 finished at: 2022-4-1 17:17:57:600:213 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-1 17:17:57:602:929 +Q3-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q3 finished at: 2022-4-1 17:17:57:713:470 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-1 17:17:57:719:499 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-1 17:17:57:801:574 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-1 17:17:57:804:339 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 17:17:57:807:19 + Q8-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q8 finished at: 2022-4-1 17:17:57:900:578 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 17:17:57:902:544 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 17:17:58:4:206 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 17:17:58:102:450 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:17:58:200:738 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 17:17:58:300:550 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:17:58:301:784 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 17:17:58:305:178 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 17:17:58:306:106 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/tidb_per/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..2053927e --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:17:58:567:406 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:17:58:570:480 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:17:58:674:990 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:17:58:677:25 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 17:17:58:711:868 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-1 17:17:58:767:639 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-1 17:17:58:769:467 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-1 17:17:58:771:909 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-1 17:17:58:869:771 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:17:58:871:396 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:17:58:968:277 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:17:59:68:68 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 17:17:59:70:578 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:17:59:71:491 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/tidb_per/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..7dabf720 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:17:59:324:782 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-1 17:17:59:329:51 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:17:59:432:425 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-1 17:17:59:434:200 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 17:17:59:436:814 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-1 17:17:59:527:998 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-1 17:17:59:529:803 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-1 17:17:59:532:125 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-1 17:17:59:626:206 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:17:59:627:517 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:17:59:724:986 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:17:59:828:267 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:17:59:831:155 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:17:59:832:201 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/rat_sda_dirty_read.txt b/test_result/centralizend_result/tidb_per/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..4dac8098 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:17:47:518:552 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:17:47:520:345 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:17:47:620:909 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:17:47:622:572 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-1 17:17:47:718:531 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:17:47:818:469 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 17:17:47:821:287 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:17:47:822:342 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/read-committed/rat_sda_intermediate_read.txt b/test_result/centralizend_result/tidb_per/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..da7fb7e6 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:17:48:746:422 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:17:48:748:247 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:17:48:846:447 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:17:48:848:227 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-1 17:17:48:948:557 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:17:49:46:282 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:17:49:148:77 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 17:17:49:150:248 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:17:49:151:139 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/tidb_per/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..b4c89394 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:17:49:409:445 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:17:49:411:456 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:17:49:509:666 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:17:49:511:952 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:17:49:513:109 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-1 17:17:49:609:833 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:17:49:611:82 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 17:17:49:613:305 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:17:49:614:307 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/read-committed/rat_sda_lost_self_update.txt b/test_result/centralizend_result/tidb_per/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..b0627806 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:17:50:769:928 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:17:50:771:783 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:17:50:869:976 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 17:17:50:970:571 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 17:17:50:990:655 + Q4 finished at: 2022-4-1 17:17:51:63:993 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:17:51:82:538 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:17:51:84:783 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:17:51:85:586 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/read-committed/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/tidb_per/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..939a8782 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:17:48:88:955 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:17:48:90:969 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:17:48:188:708 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:17:48:190:399 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 17:17:48:289:444 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:17:48:389:5 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:17:48:491:897 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:17:48:494:232 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:17:48:495:153 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/tidb_per/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..c68a3c71 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,58 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:17:49:864:265 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 17:17:49:866:605 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:17:49:964:282 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:17:49:966:126 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:17:49:967:473 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 17:17:50:65:406 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:17:50:66:655 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-1 17:17:50:68:565 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:17:50:69:544 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/tidb_per/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..6f8fb380 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,57 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:17:50:314:454 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 17:17:50:368:164 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:17:50:414:458 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-1 17:17:50:416:321 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:17:50:417:440 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 17:17:50:516:228 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:17:50:517:162 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-1 17:17:50:519:391 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:17:50:520:204 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/tidb_per/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..a196f58c --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:4:23:316 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:4:25:168 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:4:124:124 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:4:125:966 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 17:18:4:227:633 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:4:248:652 + Q5 finished at: 2022-4-1 17:18:4:280:195 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:4:281:510 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:4:284:410 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:4:285:511 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/tidb_per/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..67f3bd0b --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,35 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:4:520:498 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:4:522:376 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:4:620:415 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:4:622:299 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:18:4:766:889 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:18:4:820:814 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25-TiDB-v4.0.10]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-1 17:18:5:431:565 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25-TiDB-v4.0.10]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/tidb_per/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/tidb_per/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..38757763 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,35 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:5:667:766 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:5:670:834 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:5:767:333 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:5:769:168 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:18:5:880:677 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:18:5:967:859 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25-TiDB-v4.0.10]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-1 17:18:6:480:823 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25-TiDB-v4.0.10]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/tidb_per/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/tidb_per/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..cccc0977 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:6:716:61 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:6:717:811 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:6:816:158 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:6:817:967 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:18:6:941:872 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:6:943:309 +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25-TiDB-v4.0.10]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-1 17:18:7:639:788 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25-TiDB-v4.0.10]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/tidb_per/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/tidb_per/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..f358b76c --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:7:874:757 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:18:7:876:649 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:7:974:225 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:7:975:963 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:18:7:977:610 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:18:8:179:388 +Q6 finished at: 2022-4-1 17:18:8:180:107 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:18:8:181:467 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:8:183:940 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:8:184:962 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/tidb_per/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..7ad20233 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:8:417:932 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:18:8:419:702 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:8:518:86 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:8:520:2 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:18:8:521:679 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:18:8:733:253 +Q6 finished at: 2022-4-1 17:18:8:761:750 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:8:818:352 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:8:820:737 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:8:821:762 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/tidb_per/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..c4163b6c --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:9:54:136 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:9:55:998 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:9:154:265 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:18:9:156:201 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:18:9:267:207 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:18:9:283:201 + Q5 finished at: 2022-4-1 17:18:9:283:528 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:18:9:354:429 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:9:356:769 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:9:357:790 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/tidb_per/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..43309280 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:9:591:549 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:9:593:205 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:9:691:512 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:18:9:693:496 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:18:9:804:511 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:10:6:819 + Q5 finished at: 2022-4-1 17:18:10:47:740 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:18:10:49:249 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:10:51:587 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:10:52:570 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/tidb_per/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..f76ea842 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:10:285:560 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:10:287:509 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:10:385:645 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:18:10:387:422 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:18:10:493:354 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:10:504:9 + Q5 finished at: 2022-4-1 17:18:10:504:298 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:10:505:615 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:10:508:2 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:10:508:883 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/tidb_per/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..1f4869d4 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:10:744:702 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:10:746:856 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:10:844:530 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:10:846:363 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-1 17:18:10:944:594 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 17:18:10:958:782 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-1 17:18:11:75:920 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:18:11:148:827 + Q8 finished at: 2022-4-1 17:18:11:149:214 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:18:11:245:82 +Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25-TiDB-v4.0.10]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-1 17:18:11:965:622 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25-TiDB-v4.0.10]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/tidb_per/read-committed/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/tidb_per/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..6bb05d14 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:12:206:698 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:12:208:725 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:12:306:711 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:12:308:681 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-1 17:18:12:406:733 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 17:18:12:612:997 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-1 17:18:12:729:424 + Q10-T2 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:12:823:166 + Q8 finished at: 2022-4-1 17:18:12:855:286 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:18:13:9:13 +Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25-TiDB-v4.0.10]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-1 17:18:13:624:444 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25-TiDB-v4.0.10]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/tidb_per/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/tidb_per/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..367b0a52 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:0:202:793 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:0:204:534 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:0:335:899 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-1 17:18:0:406:215 + Q4 finished at: 2022-4-1 17:18:0:432:437 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:0:503:132 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 17:18:0:505:288 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-1 17:18:0:539:222 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:0:543:729 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/tidb_per/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..67b4dbdb --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:0:776:525 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:0:778:220 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:0:876:400 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-1 17:18:0:987:415 + Q4 finished at: 2022-4-1 17:18:0:987:859 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:1:80:378 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 17:18:1:82:640 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-1 17:18:1:96:629 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:1:98:626 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/read-committed/wat_sda_full_write.txt b/test_result/centralizend_result/tidb_per/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..1b576a5a --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:1:315:447 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:1:317:227 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:1:415:479 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-1 17:18:1:515:943 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 17:18:1:527:907 + Q4 finished at: 2022-4-1 17:18:1:587:730 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:18:1:615:689 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-1 17:18:1:618:691 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:1:619:525 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/read-committed/wat_sda_full_write_committed.txt b/test_result/centralizend_result/tidb_per/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..d5e87209 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:1:847:239 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:1:849:47 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:1:947:256 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-1 17:18:2:47:820 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:18:2:59:888 + Q4 finished at: 2022-4-1 17:18:2:88:449 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:18:2:89:864 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-1 17:18:2:91:982 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:2:93:51 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/tidb_per/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..f651510c --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:3:530:183 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:3:532:23 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:3:630:70 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 17:18:3:730:652 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:18:3:751:632 + Q4 finished at: 2022-4-1 17:18:3:787:408 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:18:3:788:812 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:18:3:790:994 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:3:791:947 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/read-committed/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/tidb_per/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..54215405 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:2:322:116 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 17:18:2:323:794 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:2:422:101 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:18:2:423:966 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:18:2:632:394 +Q5 finished at: 2022-4-1 17:18:2:660:990 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 17:18:2:662:645 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:18:2:664:865 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:2:665:805 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/read-committed/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/tidb_per/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..70f63738 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:2:897:458 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 17:18:2:899:241 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:2:997:478 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:18:2:999:484 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:3:212:643 +Q5 finished at: 2022-4-1 17:18:3:244:885 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:18:3:297:618 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:18:3:299:723 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:3:300:744 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/tidb_per/repeatable-read/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..14e114fe --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/iat_dda_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:50:282:523 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:18:50:284:223 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:50:384:50 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:50:386:80 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:18:50:387:732 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:50:389:120 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 17:18:50:483:43 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:50:484:126 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:50:486:192 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:50:487:270 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/tidb_per/repeatable-read/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..11751c74 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:50:741:146 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:18:50:743:10 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:50:841:29 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:50:843:64 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:18:50:845:10 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:50:846:433 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:18:50:941:996 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:50:943:422 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:50:945:989 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:50:947:119 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/iat_dda_write_skew.txt b/test_result/centralizend_result/tidb_per/repeatable-read/iat_dda_write_skew.txt new file mode 100644 index 00000000..2494bef8 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:51:204:505 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:18:51:206:151 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:51:304:528 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:18:51:306:222 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:18:51:307:968 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:18:51:408:875 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:18:51:410:317 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:18:51:504:986 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:51:507:613 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:18:51:508:643 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/tidb_per/repeatable-read/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..f86954bb --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:52:729:190 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:18:52:730:948 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:52:829:266 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:18:52:831:86 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:18:52:832:867 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:52:834:304 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:18:52:929:979 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:52:931:517 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:52:933:811 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:52:934:869 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/tidb_per/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..d0484c17 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:51:792:93 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-1 17:18:51:794:887 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-1 17:18:51:796:703 + Q4-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q4 finished at: 2022-4-1 17:18:51:892:38 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-1 17:18:51:894:878 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-1 17:18:51:896:667 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:18:51:898:19 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:51:992:459 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-1 17:18:51:995:395 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-1 17:18:52:17:11 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:18:52:18:320 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/tidb_per/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..97915f9e --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:52:272:338 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (saving,500,) (checking,500,) + (1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-1 17:18:52:275:353 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:52:372:473 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (saving,500,) (checking,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + (2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-1 17:18:52:376:201 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-1 17:18:52:379:43 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:52:380:507 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-1 17:18:52:474:286 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:52:475:571 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,saving,1400) (kevin,checking,1400) + (1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + (2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-1 17:18:52:477:746 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:52:478:777 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/iat_mda_step_iat.txt b/test_result/centralizend_result/tidb_per/repeatable-read/iat_mda_step_iat.txt new file mode 100644 index 00000000..a005a361 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:53:190:390 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 17:18:53:192:537 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:53:290:310 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:18:53:292:443 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-1 17:18:53:392:212 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 17:18:53:394:298 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-1 17:18:53:491:82 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 17:18:53:591:371 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-1 17:18:53:691:347 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:18:53:791:19 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:18:53:891:58 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:18:53:991:89 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:18:53:993:927 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:18:53:997:549 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/tidb_per/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..ce54079c --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:57:701:203 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:18:57:703:186 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:57:802:14 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:18:57:804:2 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:18:57:805:397 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-1 17:18:57:901:199 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 17:18:57:903:797 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-1 17:18:57:905:480 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:57:906:818 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-1 17:18:58:2:354 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 17:18:58:3:548 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-1 17:18:58:6:281 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 17:18:58:7:454 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/tidb_per/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..5930da18 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,209 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:56:931:108 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:18:56:933:786 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:57:31:145 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:18:57:33:835 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-1 17:18:57:131:140 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-1 17:18:57:133:44 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:18:57:134:436 + Q8-T4 execute sql: 'BEGIN PESSIMISTIC;' + Q8 finished at: 2022-4-1 17:18:57:232:93 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 17:18:57:234:91 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:57:235:518 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-1 17:18:57:332:848 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:18:57:334:21 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-1 17:18:57:433:728 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-1 17:18:57:435:1 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 17:18:57:439:101 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 17:18:57:440:182 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/tidb_per/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..bef0d401 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:54:256:184 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-1 17:18:54:258:397 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:54:356:97 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:18:54:358:122 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-1 17:18:54:456:88 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 17:18:54:457:959 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-1 17:18:54:556:826 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-1 17:18:54:656:712 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-1 17:18:54:760:759 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:18:54:856:628 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:18:54:956:695 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:18:55:57:24 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 17:18:55:59:491 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:18:55:60:539 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/tidb_per/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..954fe524 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:55:307:587 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-1 17:18:55:311:953 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:55:407:651 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-1 17:18:55:409:755 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-1 17:18:55:507:558 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-1 17:18:55:509:581 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-1 17:18:55:608:352 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-1 17:18:55:708:614 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-1 17:18:55:808:578 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:18:55:908:46 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:18:56:8:412 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:18:56:108:35 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:18:56:110:722 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:18:56:111:752 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/tidb_per/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..25319fe8 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:58:265:658 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 17:18:58:267:749 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-1 17:18:58:269:824 + Q4-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q4 finished at: 2022-4-1 17:18:58:365:700 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-1 17:18:58:367:995 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-1 17:18:58:370:1 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:18:58:371:356 + Q8-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q8 finished at: 2022-4-1 17:18:58:465:628 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-1 17:18:58:467:815 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 17:18:58:469:876 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:18:58:471:10 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-1 17:18:58:566:403 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-1 17:18:58:567:913 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-1 17:18:58:570:640 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-1 17:18:58:571:805 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/tidb_per/repeatable-read/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..8ad969aa --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,164 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:56:366:289 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-1 17:18:56:368:417 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:56:466:234 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-1 17:18:56:468:499 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:18:56:470:188 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-1 17:18:56:472:319 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-1 17:18:56:474:129 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:18:56:475:578 + Q9-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q9 finished at: 2022-4-1 17:18:56:566:275 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-1 17:18:56:568:376 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-1 17:18:56:570:21 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-1 17:18:56:571:981 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-1 17:18:56:573:596 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:18:56:574:963 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-1 17:18:56:667:487 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-1 17:18:56:668:701 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-1 17:18:56:671:432 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-1 17:18:56:672:415 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/tidb_per/repeatable-read/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..c7d0b286 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:49:812:969 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 17:18:49:814:851 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:49:916:341 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:18:49:918:346 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:18:49:919:885 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-1 17:18:50:14:70 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:18:50:15:517 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:18:50:17:873 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:50:18:977 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/tidb_per/repeatable-read/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..94cae838 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:49:351:711 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:18:49:353:431 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:49:451:816 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:18:49:453:678 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:18:49:454:952 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 17:18:49:552:238 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:18:49:553:497 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:18:49:555:579 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:49:556:577 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:49:557:448 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..aca8bdff --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_double_write_skew1.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:28:138:748 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:28:140:648 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:28:239:473 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:28:241:395 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:18:28:243:160 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:18:28:441:732 +Q6 finished at: 2022-4-1 17:18:28:442:240 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:28:539:148 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-1 17:18:28:541:816 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:28:542:945 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..70a229b1 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:28:788:384 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:28:790:351 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:28:888:319 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:28:890:393 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:18:28:892:374 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:28:893:595 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-1 17:18:28:989:292 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:28:990:668 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-1 17:18:28:993:224 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:28:994:272 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..cbd6eeb1 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_double_write_skew2.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:29:244:577 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:29:246:796 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:29:344:454 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:29:345:987 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 17:18:29:451:966 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:18:29:462:756 + Q5 finished at: 2022-4-1 17:18:29:463:476 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:18:29:545:854 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:29:548:441 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:29:549:500 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_read_skew.txt b/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_read_skew.txt new file mode 100644 index 00000000..48ffd56d --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:29:804:940 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:18:29:806:847 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:29:908:199 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:29:911:129 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:18:29:913:132 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 17:18:30:8:805 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:18:30:106:512 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:30:205:139 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:30:207:970 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:30:209:37 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_read_skew2.txt b/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_read_skew2.txt new file mode 100644 index 00000000..89330ca0 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:31:389:299 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:31:391:502 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:31:488:264 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:18:31:490:480 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:18:31:492:406 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:18:31:588:997 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:18:31:590:309 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:18:31:687:923 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:31:690:578 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:31:692:60 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..c8593962 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:31:956:142 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:31:957:945 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:32:57:522 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:18:32:59:404 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:18:32:61:352 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:32:62:346 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:18:32:161:33 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:32:162:475 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:32:165:488 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:32:166:585 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..a943b74a --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:30:478:821 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 17:18:30:481:599 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:30:580:254 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:30:582:245 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:18:30:584:42 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:30:585:586 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 17:18:30:680:414 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:30:681:659 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-1 17:18:30:683:809 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:30:684:794 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..aee32930 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:30:932:928 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-1 17:18:30:941:337 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:31:32:161 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-1 17:18:31:34:288 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-1 17:18:31:36:75 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:31:37:441 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-1 17:18:31:133:687 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:31:134:768 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-1 17:18:31:137:277 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:31:138:399 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_write_read_skew.txt b/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..35ab3b08 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:27:42:324 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:27:44:53 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:27:142:591 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:27:144:598 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:18:27:146:611 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-1 17:18:27:242:964 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:18:27:342:758 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:27:442:580 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:27:444:919 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:27:445:844 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..2cda2b7b --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:27:688:525 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:27:690:229 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:27:788:397 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:27:790:120 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:18:27:791:784 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:27:792:952 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 17:18:27:889:167 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:27:890:325 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:27:892:528 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:27:893:466 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/rat_mda_step_rat.txt b/test_result/centralizend_result/tidb_per/repeatable-read/rat_mda_step_rat.txt new file mode 100644 index 00000000..25612b58 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:32:421:217 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:32:441:957 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:32:524:124 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:32:525:995 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-1 17:18:32:527:868 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-1 17:18:32:621:211 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-1 17:18:32:623:57 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-1 17:18:32:625:121 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-1 17:18:32:722:306 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:18:32:723:685 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:18:32:821:546 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:18:32:921:503 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:18:32:925:124 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:18:32:926:239 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/tidb_per/repeatable-read/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..d655be63 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN PESSIMISTIC;' + Q1 finished at: 2022-4-1 17:18:33:175:349 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-1 17:18:33:178:48 +Q3-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q3 finished at: 2022-4-1 17:18:33:275:332 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-1 17:18:33:277:24 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-1 17:18:33:376:151 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-1 17:18:33:379:154 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 17:18:33:382:46 + Q8-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q8 finished at: 2022-4-1 17:18:33:476:92 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-1 17:18:33:478:21 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-1 17:18:33:577:317 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-1 17:18:33:675:683 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:18:33:775:786 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-1 17:18:33:875:531 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:18:33:876:755 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-1 17:18:33:880:56 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-1 17:18:33:880:967 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/tidb_per/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..cebe2755 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:34:126:580 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:34:128:346 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:34:226:456 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:34:228:73 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 17:18:34:230:716 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-1 17:18:34:326:558 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-1 17:18:34:328:327 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-1 17:18:34:330:967 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-1 17:18:34:433:684 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:18:34:435:312 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:18:34:526:767 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:18:34:626:835 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-1 17:18:34:628:946 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:18:34:629:912 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/tidb_per/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..91a9724b --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:34:868:785 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-1 17:18:34:872:877 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:34:968:938 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-1 17:18:34:970:802 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-1 17:18:34:973:126 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-1 17:18:35:68:941 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-1 17:18:35:70:663 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-1 17:18:35:73:89 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-1 17:18:35:170:447 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-1 17:18:35:171:726 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:18:35:269:112 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:18:35:372:213 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-1 17:18:35:375:42 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-1 17:18:35:376:80 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/rat_sda_dirty_read.txt b/test_result/centralizend_result/tidb_per/repeatable-read/rat_sda_dirty_read.txt new file mode 100644 index 00000000..f2f8c6df --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:23:340:585 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:23:342:483 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:23:441:152 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:18:23:442:965 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-1 17:18:23:543:99 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:23:640:304 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-1 17:18:23:642:911 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:18:23:643:834 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/rat_sda_intermediate_read.txt b/test_result/centralizend_result/tidb_per/repeatable-read/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..e54303fd --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_intermediate_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:24:524:952 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:24:526:999 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:24:624:877 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:18:24:626:601 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-1 17:18:24:728:575 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:24:824:939 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:18:24:926:390 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 17:18:24:928:728 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:24:929:876 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/tidb_per/repeatable-read/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..06b3e66d --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:25:169:701 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:25:171:733 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:25:269:676 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-1 17:18:25:271:819 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:18:25:273:581 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-1 17:18:25:370:474 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:18:25:371:815 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-1 17:18:25:373:932 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:25:374:912 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/rat_sda_lost_self_update.txt b/test_result/centralizend_result/tidb_per/repeatable-read/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..95584d5f --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_lost_self_update #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:26:496:957 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:26:498:608 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:26:597:25 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 17:18:26:697:678 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 17:18:26:713:125 + Q4 finished at: 2022-4-1 17:18:26:747:442 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:18:26:797:191 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:18:26:799:257 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:26:800:94 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/tidb_per/repeatable-read/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..5d195ed9 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:23:881:129 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:18:23:882:814 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:23:981:190 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:18:23:982:928 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-1 17:18:24:81:768 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:24:181:367 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:18:24:281:132 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:18:24:283:324 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:24:284:186 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/tidb_per/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..d6b6c4a7 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:25:613:427 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 17:18:25:615:709 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:25:713:446 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-1 17:18:25:715:99 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:18:25:716:215 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 17:18:25:814:728 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:18:25:815:707 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-1 17:18:25:817:454 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:25:818:300 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/tidb_per/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..42195cfc --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:26:53:8 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-1 17:18:26:57:856 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:26:153:74 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-1 17:18:26:155:17 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:18:26:156:234 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-1 17:18:26:254:22 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:18:26:255:10 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-1 17:18:26:256:875 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:26:257:770 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/tidb_half-predicate-read-skew_repeatable-read.txt b/test_result/centralizend_result/tidb_per/repeatable-read/tidb_half-predicate-read-skew_repeatable-read.txt new file mode 100644 index 00000000..9392d87b --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/tidb_half-predicate-read-skew_repeatable-read.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: half-predicate-read-skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------tidb_half-predicate-read-skew test prepare---------- +T1 execute sql: 'DROP TABLE IF EXISTS t1;' +T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + +----------tidb_half-predicate-read-skew test run---------- +T1 execute sql: 'select * from t1 where v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + + T2 execute sql: 'update t1 set v=2 where k=1;' + T2 execute sql: 'insert into t1 values(0,0);' +T1 execute sql: 'select * from t1 where k=1;' + current_result: + (1,1) + *(1) expected_result: + (1,1) + (2) expected_result: + (1,2) + + T3 execute sql: 'select * from t1;' + current_result: + (0,0) (1,2) + *(1) expected_result: + (0,0) (1,2) + *(2) expected_result: + (0,0) (1,2) + + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/tidb_half-predicate-write-skew_repeatable-read.txt b/test_result/centralizend_result/tidb_per/repeatable-read/tidb_half-predicate-write-skew_repeatable-read.txt new file mode 100644 index 00000000..ef528ad4 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/tidb_half-predicate-write-skew_repeatable-read.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: half-predicate-write-skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------tidb_half-predicate-write-skew test prepare---------- +T1 execute sql: 'DROP TABLE IF EXISTS t1;' +T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + +----------tidb_half-predicate-write-skew test run---------- +T1 execute sql: 'select * from t1 where v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + + T2 execute sql: 'select * from t1 where k=1;' + current_result: + (1,1) + (1) expected_result: + (1,2) + *(2) expected_result: + (1,1) + +T1 execute sql: 'update t1 set v=2 where k=1;' + T2 execute sql: 'insert into t1 values(0,0);' + T3 execute sql: 'select * from t1;' + current_result: + (0,0) (1,2) + *(1) expected_result: + (0,0) (1,2) + *(2) expected_result: + (0,0) (1,2) + + +Test Result: Exception +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..b5987602 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:39:456:404 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:39:458:134 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:39:556:527 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:39:558:289 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-1 17:18:39:664:20 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:39:669:237 + Q5 finished at: 2022-4-1 17:18:39:669:533 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:39:670:828 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:39:673:157 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:39:674:42 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..ff5b2b98 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,35 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:39:919:549 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:39:921:293 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:40:19:806 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:40:21:628 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:18:40:140:366 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:18:40:219:938 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25-TiDB-v4.0.10]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-1 17:18:40:738:250 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25-TiDB-v4.0.10]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..a5bc1ae6 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,35 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:40:992:612 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:40:994:500 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:41:92:591 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:41:94:573 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:18:41:217:550 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:18:41:294:149 +Q6 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25-TiDB-v4.0.10]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-1 17:18:41:815:491 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25-TiDB-v4.0.10]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..2d318df2 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:42:64:173 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:42:65:861 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:42:164:117 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:42:165:846 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-1 17:18:42:284:635 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:42:285:986 +Q7 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25-TiDB-v4.0.10]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-1 17:18:42:982:480 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25-TiDB-v4.0.10]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..5642a1f3 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:43:233:215 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:18:43:234:834 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:43:333:235 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:43:335:173 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:18:43:336:759 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:18:43:543:321 +Q6 finished at: 2022-4-1 17:18:43:543:771 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:18:43:545:119 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:43:547:365 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:43:548:404 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..9aee3526 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:43:800:846 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-1 17:18:43:802:505 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:43:904:125 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:43:906:337 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-1 17:18:43:908:331 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:18:44:121:557 +Q6 finished at: 2022-4-1 17:18:44:121:880 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:44:201:368 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:44:203:758 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:44:204:741 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..55275f9c --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:44:464:798 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:44:466:616 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:44:567:1 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:18:44:569:647 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:18:44:670:231 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:18:44:685:987 + Q5 finished at: 2022-4-1 17:18:44:718:311 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-1 17:18:44:765:234 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:44:767:659 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:44:768:716 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..c38774ba --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:45:23:698 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:45:25:469 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:45:123:609 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:18:45:125:363 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-1 17:18:45:232:662 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:45:430:631 + Q5 finished at: 2022-4-1 17:18:45:477:930 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:18:45:479:338 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:45:482:74 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:45:483:163 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..8b8510dd --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:45:733:818 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:45:735:590 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:45:833:625 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-1 17:18:45:835:455 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-1 17:18:45:941:569 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-1 17:18:45:957:453 + Q5 finished at: 2022-4-1 17:18:45:957:842 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:45:959:216 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-1 17:18:45:964:820 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:45:965:963 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/tidb_per/repeatable-read/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..e59c9f71 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/wat_mda_step_wat_c1.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: mda_step_wat_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:46:221:206 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:46:223:106 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:46:321:192 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:46:323:25 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-1 17:18:46:424:27 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 17:18:46:434:556 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-1 17:18:46:534:511 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-1 17:18:46:628:209 + Q8 finished at: 2022-4-1 17:18:46:628:520 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:18:46:721:954 +Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25-TiDB-v4.0.10]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-1 17:18:47:434:504 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25-TiDB-v4.0.10]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/tidb_per/repeatable-read/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..2bd1da08 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/wat_mda_step_wat_c2.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: mda_step_wat_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:47:689:987 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:47:691:750 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:47:790:686 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-1 17:18:47:792:661 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-1 17:18:47:892:71 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-1 17:18:48:95:309 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-1 17:18:48:200:495 + Q10-T2 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-1 17:18:48:302:211 + Q8 finished at: 2022-4-1 17:18:48:342:272 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-1 17:18:48:491:37 +Q9 failed reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25-TiDB-v4.0.10]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-1 17:18:49:100:688 + +Test Result: Rollback +Reason: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.25-TiDB-v4.0.10]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/tidb_per/repeatable-read/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..c2ae16f5 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:35:621:612 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:35:623:482 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:35:721:575 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-1 17:18:35:822:416 + Q4 finished at: 2022-4-1 17:18:35:822:549 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:35:921:778 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 17:18:35:923:951 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-1 17:18:35:948:426 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:35:949:734 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/tidb_per/repeatable-read/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..f62b8419 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:36:171:816 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:36:173:508 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:36:271:738 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-1 17:18:36:378:337 + Q4 finished at: 2022-4-1 17:18:36:378:621 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:36:472:270 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-1 17:18:36:474:591 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-1 17:18:36:496:216 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:36:497:395 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/wat_sda_full_write.txt b/test_result/centralizend_result/tidb_per/repeatable-read/wat_sda_full_write.txt new file mode 100644 index 00000000..79754370 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_full_write #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:36:726:925 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:36:728:791 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:36:826:967 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-1 17:18:36:927:342 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 17:18:36:932:775 + Q4 finished at: 2022-4-1 17:18:36:933:137 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:18:37:27:145 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-1 17:18:37:29:486 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:37:30:425 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/wat_sda_full_write_committed.txt b/test_result/centralizend_result/tidb_per/repeatable-read/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..c6cb147c --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_full_write_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:37:277:443 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:37:279:91 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:37:377:292 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-1 17:18:37:477:773 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:18:37:488:445 + Q4 finished at: 2022-4-1 17:18:37:488:738 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:18:37:489:903 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-1 17:18:37:491:986 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:37:492:963 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/tidb_per/repeatable-read/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..74875ee6 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:38:953:266 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-1 17:18:38:955:48 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:39:53:300 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-1 17:18:39:153:833 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:18:39:169:936 + Q4 finished at: 2022-4-1 17:18:39:203:317 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-1 17:18:39:204:807 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:18:39:207:130 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:39:208:236 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/tidb_per/repeatable-read/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..78524700 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:37:735:732 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 17:18:37:737:319 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:37:835:664 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:18:37:837:558 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-1 17:18:38:50:696 +Q5 finished at: 2022-4-1 17:18:38:51:106 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-1 17:18:38:52:418 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:18:38:54:550 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:38:55:608 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/repeatable-read/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/tidb_per/repeatable-read/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..047ebb94 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/repeatable-read/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-1 17:18:38:302:254 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-1 17:18:38:304:184 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-1 17:18:38:402:343 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-1 17:18:38:404:211 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-1 17:18:38:612:120 +Q5 finished at: 2022-4-1 17:18:38:612:440 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-1 17:18:38:702:519 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-1 17:18:38:704:894 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-1 17:18:38:706:128 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/tidb_per/result_summary/read-committed_total-result.txt b/test_result/centralizend_result/tidb_per/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..38745346 --- /dev/null +++ b/test_result/centralizend_result/tidb_per/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/tidb_per/result_summary/repeatable-read_total-result.txt b/test_result/centralizend_result/tidb_per/result_summary/repeatable-read_total-result.txt new file mode 100644 index 00000000..42d5fc7b --- /dev/null +++ b/test_result/centralizend_result/tidb_per/result_summary/repeatable-read_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/centralizend_result/yugabyte/README.md b/test_result/centralizend_result/yugabyte/README.md new file mode 100644 index 00000000..1bcc0961 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/README.md @@ -0,0 +1,48 @@ +# `YugabyteDB`测试说明 + +## 测试环境 + +`Ubuntu22.04` | `yugabyte 2.19.2` | `unixODBC 2.3.9` + +## 数据库简介 + +`YugabyteDB` 是一个高性能的开源分布式 `SQL` 数据库,旨在支持全球部署的业务关键型应用程序。它结合了传统的 `RDBMS`(关系数据库管理系统)的 ACID (原子性、一致性、隔离性、持久性)事务特性和 `Internet` 级别的水平可扩展性、高可用性和地理分布特性。 + +`YugabyteDB` 使用 Raft 分布式共识算法确保强一致性,并且可以容忍网络分区和节点故障,从而实现高可用性。支持多种数据模型,包括文档存储(通过 `YCQL`,兼容 Apache Cassandra 查询语言)和关系存储(通过 `YSQL`,兼容 `PostgreSQL`)。`YugabyteDB` 支持全局 `ACID` 事务,这意味着即使在分布式环境中,也能保证数据的完整性和一致性。`YugabyteDB` 的 `SQL` 接口(`YSQL`)与 `PostgreSQL` 高度兼容,这使得许多现有的应用程序和工具能够无缝迁移到 `YugabyteDB`。`YugabyteDB` 是为云而生的数据库,支持多云、混合云和 `Kubernetes` 部署。 + +## 隔离级别 + +`YugabyteDB`在事务层支持三种隔离级别:可串行化(`Serializable`)、快照(`Snapshot`)和已提交读(`Read Committed`)。`YSQL API`的默认隔离级别本质上是快照隔离(即与`PostgreSQL`的可重复读(`REPEATABLE READ`)相同) + +已提交读(`Read committed`):目前处于`Beta`阶段。只有在`YB-TServer`标志`yb_enable_read_committed_isolation`设置为`true`时,才支持已提交读隔离。 + +快照(`Snapshot`):默认情况下,`yb_enable_read_committed_isolation`标志为`false`,在这种情况下,`YugabyteDB`事务层的已提交读隔离级别将回退到更严格的快照(`Snapshot`)隔离(此时,`YSQL`的`READ COMMITTED`也会使用快照隔离)。 + +可串行化(`Serializable`),它要求一组可串行化事务的任何并发执行都保证产生与按某种串行顺序(一次一个事务)运行它们相同的效果。 + +## 实际测试说明 + +### 关于驱动程序`ODBC` + +`YugabyteDB` 是 `PostgreSQL` 兼容的,因此它通常可以使用 `PostgreSQL` 的 `ODBC` 驱动程序。 + +安装 `PostgreSQL ODBC` 驱动程序: + +```shell +sudo apt-get install odbc-postgresql +``` + +### 关于隔离级别设置 + +注意:`YugabyteDB`的事务隔离级别要在每个事务开始时设置,而不是在线程连接时设置 + +由于已提交读(`Read committed`)特性仅在`beta`版本存在,因此并未测试。 + +快照(`Snapshot`)级别的设置命令为:`BEGIN TRANSACTION;`(默认隔离级别) + +可串行化(`Serializable`)级别的设置命令为:` BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;` + + + + + diff --git a/test_result/centralizend_result/yugabyte/serializable/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/yugabyte/serializable/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..75db201e --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/iat_dda_read_skew_committed.txt @@ -0,0 +1,46 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:27:52:380:145 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:27:52:380:529 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-10-4 10:27:52:392:372 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:27:53:381:664 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:27:53:484:82 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-10-4 10:27:53:499:356 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-10-4 10:27:53:502:615 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-10-4 10:27:53:503:360 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q7 failed reason: 错误: Heartbeat: Transaction 27341f5a-bbeb-4768-9e54-5d76b7770b36 expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction 27341f5a-bbeb-4768-9e54-5d76b errcode: 40001 +Q7 failed at: 2023-10-4 10:27:55:91:48 + +Test Result: Rollback +Reason: Err:错误: Heartbeat: Transaction 27341f5a-bbeb-4768-9e54-5d76b7770b36 expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction 27341f5a-bbeb-4768-9e54-5d76b + diff --git a/test_result/centralizend_result/yugabyte/serializable/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/yugabyte/serializable/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..e77c79cb --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:27:57:802:478 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:27:57:803:911 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-10-4 10:27:57:840:139 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:27:58:802:532 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:27:58:929:130 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-10-4 10:27:58:946:627 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q5 failed at: 2023-10-4 10:27:59:449:707 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/iat_dda_write_skew.txt b/test_result/centralizend_result/yugabyte/serializable/iat_dda_write_skew.txt new file mode 100644 index 00000000..3a6f12c6 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/iat_dda_write_skew.txt @@ -0,0 +1,49 @@ +#### db_type: yugabyte #### +#### test_type: dda_write_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:28:2:548:401 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:28:2:548:810 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-10-4 10:28:2:560:863 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:28:3:549:538 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:28:3:624:312 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-10-4 10:28:3:640:162 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q5 failed at: 2023-10-4 10:28:4:143:339 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/yugabyte/serializable/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..5fe3c986 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/iat_dda_write_skew_committed.txt @@ -0,0 +1,49 @@ +#### db_type: yugabyte #### +#### test_type: dda_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:28:18:786:923 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:28:18:788:527 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-10-4 10:28:18:825:132 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:28:19:786:837 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:28:19:925:700 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-10-4 10:28:19:942:678 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q5 failed at: 2023-10-4 10:28:20:445:748 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/yugabyte/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..8b709c3b --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,44 @@ +#### db_type: yugabyte #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab (class,value) VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab (class,value) VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab (class,value) VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab (class,value) VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:28:8:377:206 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:28:8:378:501 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2023-10-4 10:28:8:422:4 +Q3-T1 execute sql: 'INSERT INTO mytab (class,value) VALUES (2, 30);' +Q3 finished at: 2023-10-4 10:28:8:428:163 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2023-10-4 10:28:9:377:183 + Q4-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q4 finished at: 2023-10-4 10:28:9:485:236 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + Q5 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q5 failed at: 2023-10-4 10:28:10:2:754 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/yugabyte/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..2909d891 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,53 @@ +#### db_type: yugabyte #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account (name,type,balance) VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account (name,type,balance) VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:28:13:243:611 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:28:13:244:994 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2023-10-4 10:28:13:265:353 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:28:14:243:699 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:28:14:377:65 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2023-10-4 10:28:14:407:777 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2023-10-4 10:28:14:411:312 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-10-4 10:28:14:412:42 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 failed reason: 错误: Heartbeat: Transaction e2d8197d-9fa7-4b37-8719-97648596fa38 expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction e2d8197d-9fa7-4b37-8719-97648 errcode: 40001 +Q7 failed at: 2023-10-4 10:28:15:952:316 + +Test Result: Rollback +Reason: Err:错误: Heartbeat: Transaction e2d8197d-9fa7-4b37-8719-97648596fa38 expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction e2d8197d-9fa7-4b37-8719-97648 + diff --git a/test_result/centralizend_result/yugabyte/serializable/iat_mda_step_iat.txt b/test_result/centralizend_result/yugabyte/serializable/iat_mda_step_iat.txt new file mode 100644 index 00000000..ca1103d2 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/iat_mda_step_iat.txt @@ -0,0 +1,87 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_iat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:28:23:555:999 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:28:23:557:380 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2023-10-4 10:28:23:594:160 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:28:24:556:69 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:28:24:689:483 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2023-10-4 10:28:24:707:112 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-10-4 10:28:25:554:668 + Q5-T3 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q5 finished at: 2023-10-4 10:28:25:608:402 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2023-10-4 10:28:25:625:24 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 +Q7 failed at: 2023-10-4 10:28:27:265:249 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/yugabyte/serializable/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..dafc7908 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,48 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:29:9:662:600 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:29:9:663:988 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2023-10-4 10:29:9:700:694 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:29:10:662:695 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:29:10:773:634 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q4 failed at: 2023-10-4 10:29:11:190:661 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/yugabyte/serializable/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..79d11abd --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,109 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:29:1:874:188 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:29:1:875:564 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2023-10-4 10:29:1:912:254 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:29:2:874:249 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:29:2:979:146 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2023-10-4 10:29:2:995:582 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-10-4 10:29:3:874:282 + Q5-T3 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q5 finished at: 2023-10-4 10:29:4:18:44 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2023-10-4 10:29:4:36:258 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2023-10-4 10:29:4:37:127 + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2023-10-4 10:29:4:873:309 + Q8-T4 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q8 finished at: 2023-10-4 10:29:4:927:724 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q9 failed at: 2023-10-4 10:29:5:843:648 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/yugabyte/serializable/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..d7f63b32 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,87 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:28:34:483:85 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:28:34:484:514 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2023-10-4 10:28:34:522:655 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:28:35:483:39 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:28:35:569:837 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2023-10-4 10:28:35:585:753 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-10-4 10:28:36:483:30 + Q5-T3 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q5 finished at: 2023-10-4 10:28:36:611:596 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2023-10-4 10:28:36:628:364 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 +Q7 failed at: 2023-10-4 10:28:38:193:42 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/yugabyte/serializable/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..60dd93de --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,84 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:28:45:326:842 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:28:45:328:336 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2023-10-4 10:28:45:375:752 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:28:46:326:740 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:28:46:404:501 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2023-10-4 10:28:46:421:381 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-10-4 10:28:47:326:913 + Q5-T3 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q5 finished at: 2023-10-4 10:28:47:411:15 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2023-10-4 10:28:47:424:475 +Q7-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q7 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 +Q7 failed at: 2023-10-4 10:28:49:37:413 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/yugabyte/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..6dadd04c --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,82 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:29:15:410:551 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:29:15:411:912 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2023-10-4 10:29:15:449:364 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2023-10-4 10:29:15:458:59 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2023-10-4 10:29:16:410:538 + Q4-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q4 finished at: 2023-10-4 10:29:16:544:530 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2023-10-4 10:29:16:562:190 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q6 failed at: 2023-10-4 10:29:17:165:167 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/yugabyte/serializable/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..aef23058 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,85 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:28:56:11:999 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:28:56:12:577 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2023-10-4 10:28:56:29:446 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:28:57:13:139 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:28:57:158:3 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2023-10-4 10:28:57:175:178 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-10-4 10:28:57:176:569 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2023-10-4 10:28:57:179:814 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q7 failed at: 2023-10-4 10:28:57:882:697 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/yugabyte/serializable/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..26bad2d2 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/iat_sda_lost_update_committed.txt @@ -0,0 +1,43 @@ +#### db_type: yugabyte #### +#### test_type: sda_lost_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:27:46:756:629 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:27:46:757:972 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2023-10-4 10:27:46:794:877 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:27:47:756:580 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:27:47:831:466 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-10-4 10:27:47:848:496 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-10-4 10:27:47:849:348 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 failed reason: 错误: Heartbeat: Transaction 8e2473ee-9e04-4c7d-8a74-d9e6ba88174e expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction 8e2473ee-9e04-4c7d-8a74-d9e6b errcode: 40001 +Q6 failed at: 2023-10-4 10:27:49:366:92 + +Test Result: Rollback +Reason: Err:错误: Heartbeat: Transaction 8e2473ee-9e04-4c7d-8a74-d9e6ba88174e expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction 8e2473ee-9e04-4c7d-8a74-d9e6b + diff --git a/test_result/centralizend_result/yugabyte/serializable/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/yugabyte/serializable/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..ddc913cd --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,39 @@ +#### db_type: yugabyte #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:27:41:974:175 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:27:41:975:741 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-10-4 10:27:42:12:502 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:27:42:974:168 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:27:43:91:718 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q4 failed at: 2023-10-4 10:27:43:506:616 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/yugabyte/serializable/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..c305f41a --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/rat_dda_double_write_skew1.txt @@ -0,0 +1,44 @@ +#### db_type: yugabyte #### +#### test_type: dda_double_write_skew1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:24:30:332:873 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:24:30:334:251 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:24:30:370:650 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:24:31:332:872 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:24:31:407:492 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-10-4 10:24:31:421:891 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-10-4 10:24:31:425:112 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q6 failed reason: 错误: Heartbeat: Transaction c3e44cf6-54a4-49f2-89c9-9d47196c6732 expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction c3e44cf6-54a4-49f2-89c9-9d471 errcode: 40001 +Q6 failed at: 2023-10-4 10:24:32:942:131 + +Test Result: Rollback +Reason: Err:错误: Heartbeat: Transaction c3e44cf6-54a4-49f2-89c9-9d47196c6732 expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction c3e44cf6-54a4-49f2-89c9-9d471 + diff --git a/test_result/centralizend_result/yugabyte/serializable/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/yugabyte/serializable/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..dfec5781 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,35 @@ +#### db_type: yugabyte #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:24:36:978:756 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:24:36:980:405 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:24:36:994:60 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:24:37:977:277 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:24:38:22:342 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-10-4 10:24:38:39:976 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q5 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q5 failed at: 2023-10-4 10:24:38:543:260 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/yugabyte/serializable/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..e225a198 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/rat_dda_double_write_skew2.txt @@ -0,0 +1,48 @@ +#### db_type: yugabyte #### +#### test_type: dda_double_write_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:24:41:817:181 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:24:41:818:610 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:24:41:855:113 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:24:42:816:955 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:24:42:923:458 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-10-4 10:24:42:940:984 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2023-10-4 10:24:42:944:114 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2023-10-4 10:24:43:821:919 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-10-4 10:24:43:825:426 + Q8-T2 execute opt: 'COMMIT'; + Q8 failed reason: 错误: Heartbeat: Transaction 05053ca1-4284-4bef-bc81-c2b85db9ee4d expired or aborted by a conflict: 40001 errcode: 40001 + Q8 failed at: 2023-10-4 10:24:45:624:250 + +Test Result: Rollback +Err:错误: Heartbeat: Transaction 05053ca1-4284-4bef-bc81-c2b85db9ee4d expired or aborted by a conflict: 40001 + diff --git a/test_result/centralizend_result/yugabyte/serializable/rat_dda_read_skew.txt b/test_result/centralizend_result/yugabyte/serializable/rat_dda_read_skew.txt new file mode 100644 index 00000000..24911e7c --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/rat_dda_read_skew.txt @@ -0,0 +1,42 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:24:48:379:367 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:24:48:380:944 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-10-4 10:24:48:419:461 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:24:49:379:368 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:24:49:480:592 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-10-4 10:24:49:496:760 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q5 failed at: 2023-10-4 10:24:49:999:330 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/rat_dda_read_skew2.txt b/test_result/centralizend_result/yugabyte/serializable/rat_dda_read_skew2.txt new file mode 100644 index 00000000..8fe47f50 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/rat_dda_read_skew2.txt @@ -0,0 +1,42 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:25:5:629:639 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:25:5:631:95 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:25:5:667:158 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:25:6:629:615 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:25:6:739:404 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-10-4 10:25:6:754:615 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q5 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q5 failed at: 2023-10-4 10:25:7:256:923 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/yugabyte/serializable/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..c551ac70 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/rat_dda_read_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:25:11:665:890 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:25:11:667:303 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:25:11:703:149 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:25:12:665:884 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:25:12:785:233 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-10-4 10:25:12:803:651 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q5 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q5 failed at: 2023-10-4 10:25:13:307:158 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/yugabyte/serializable/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..7b351445 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,46 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:24:55:144:630 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:24:55:146:48 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (1,0) (0,0) + (1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2023-10-4 10:24:55:183:450 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:24:56:144:501 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:24:56:243:632 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2023-10-4 10:24:56:258:448 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2023-10-4 10:24:56:261:392 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-10-4 10:24:56:262:319 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' +Q7 failed reason: 错误: Heartbeat: Transaction 6d20edea-23d0-4d1e-9c50-cd21b79a915a expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction 6d20edea-23d0-4d1e-9c50-cd21b errcode: 40001 +Q7 failed at: 2023-10-4 10:24:57:853:350 + +Test Result: Rollback +Reason: Err:错误: Heartbeat: Transaction 6d20edea-23d0-4d1e-9c50-cd21b79a915a expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction 6d20edea-23d0-4d1e-9c50-cd21b + diff --git a/test_result/centralizend_result/yugabyte/serializable/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/yugabyte/serializable/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..97f4f9ff --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,38 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:25:0:862:957 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:25:0:864:436 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2023-10-4 10:25:0:912:259 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:25:1:863:23 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:25:1:997:359 + Q4-T2 execute sql: 'INSERT into t1 (k,v) VALUES(1,0);' + Q4 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q4 failed at: 2023-10-4 10:25:2:406:338 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/rat_dda_write_read_skew.txt b/test_result/centralizend_result/yugabyte/serializable/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..6b7d72fc --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/rat_dda_write_read_skew.txt @@ -0,0 +1,35 @@ +#### db_type: yugabyte #### +#### test_type: dda_write_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:24:18:318:445 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:24:18:319:828 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:24:18:336:377 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:24:19:318:515 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:24:19:438:407 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-10-4 10:24:19:455:275 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q5 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q5 failed at: 2023-10-4 10:24:19:958:113 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/yugabyte/serializable/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..0c9bb7f5 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,46 @@ +#### db_type: yugabyte #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:24:24:844:923 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:24:24:846:493 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:24:24:865:632 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:24:25:844:632 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:24:25:946:403 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-10-4 10:24:25:962:97 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-10-4 10:24:25:965:605 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-10-4 10:24:25:966:528 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q7 failed reason: 错误: Heartbeat: Transaction 6bd4f7be-223f-474d-8fe3-aab5e7297cf7 expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction 6bd4f7be-223f-474d-8fe3-aab5e errcode: 40001 +Q7 failed at: 2023-10-4 10:24:27:553:882 + +Test Result: Rollback +Reason: Err:错误: Heartbeat: Transaction 6bd4f7be-223f-474d-8fe3-aab5e7297cf7 expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction 6bd4f7be-223f-474d-8fe3-aab5e + diff --git a/test_result/centralizend_result/yugabyte/serializable/rat_mda_step_rat.txt b/test_result/centralizend_result/yugabyte/serializable/rat_mda_step_rat.txt new file mode 100644 index 00000000..b8ae5cd8 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/rat_mda_step_rat.txt @@ -0,0 +1,36 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_rat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:25:16:401:935 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:25:16:403:232 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:25:16:439:683 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:25:17:400:586 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:25:17:445:583 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-10-4 10:25:17:461:504 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q5 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q5 failed at: 2023-10-4 10:25:17:964:384 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/yugabyte/serializable/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..3713bd17 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,64 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2023-10-4 10:25:24:123:447 + Q1-T4 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q1 finished at: 2023-10-4 10:25:24:241:804 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2023-10-4 10:25:24:259:529 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2023-10-4 10:25:25:123:439 +Q3-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q3 finished at: 2023-10-4 10:25:25:124:870 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 +Q4 failed at: 2023-10-4 10:25:25:561:896 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/yugabyte/serializable/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..d582cb1f --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,59 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:25:33:821:403 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:25:33:822:809 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:25:33:858:898 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:25:34:821:353 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:25:34:930:807 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2023-10-4 10:25:34:946:891 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2023-10-4 10:25:34:952:957 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-10-4 10:25:35:821:476 + Q6-T3 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q6 finished at: 2023-10-4 10:25:35:888:279 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2023-10-4 10:25:35:904:289 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + Q8 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q8 failed at: 2023-10-4 10:25:36:710:730 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/yugabyte/serializable/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..6269879a --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,73 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:25:41:559:753 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:25:41:561:70 +Q2-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 1);' +Q2 finished at: 2023-10-4 10:25:41:574:656 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:25:42:559:643 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:25:42:664:988 + Q4-T2 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 1);' + Q4 finished at: 2023-10-4 10:25:42:673:393 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2023-10-4 10:25:42:685:955 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-10-4 10:25:43:559:831 + Q6-T3 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q6 finished at: 2023-10-4 10:25:43:713:869 + Q7-T3 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 1);' + Q7 finished at: 2023-10-4 10:25:43:724:272 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2023-10-4 10:25:43:737:813 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' +Q9 failed reason: 错误: Heartbeat: Transaction 46a81d7d-9d1c-4180-99ba-7ea8c50e8451 expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction 46a81d7d-9d1c-4180-99ba-7ea8c errcode: 40001 +Q9 failed at: 2023-10-4 10:25:45:502:996 + +Test Result: Rollback +Reason: Err:错误: Heartbeat: Transaction 46a81d7d-9d1c-4180-99ba-7ea8c50e8451 expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction 46a81d7d-9d1c-4180-99ba-7ea8c + diff --git a/test_result/centralizend_result/yugabyte/serializable/rat_sda_dirty_read.txt b/test_result/centralizend_result/yugabyte/serializable/rat_sda_dirty_read.txt new file mode 100644 index 00000000..e19c3b49 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/rat_sda_dirty_read.txt @@ -0,0 +1,32 @@ +#### db_type: yugabyte #### +#### test_type: sda_dirty_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k, v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:23:37:809:697 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:23:37:810:280 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:23:37:828:647 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:23:38:811:511 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:23:38:888:180 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + Q4 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q4 failed at: 2023-10-4 10:23:39:304:649 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/rat_sda_intermediate_read.txt b/test_result/centralizend_result/yugabyte/serializable/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..b55451bd --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/rat_sda_intermediate_read.txt @@ -0,0 +1,32 @@ +#### db_type: yugabyte #### +#### test_type: sda_intermediate_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:23:50:391:370 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:23:50:392:948 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:23:50:428:893 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:23:51:391:185 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:23:51:507:754 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q4 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q4 failed at: 2023-10-4 10:23:51:925:305 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/yugabyte/serializable/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..457e8393 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,43 @@ +#### db_type: yugabyte #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:23:57:48:735 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:23:57:50:156 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:23:57:86:127 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:23:58:48:477 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:23:58:170:772 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2023-10-4 10:23:58:186:397 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-10-4 10:23:58:187:86 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 failed reason: 错误: Heartbeat: Transaction bc3b7206-50fb-43d8-b17a-0af6cdaf96a3 expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction bc3b7206-50fb-43d8-b17a-0af6c errcode: 40001 +Q6 failed at: 2023-10-4 10:23:59:658:126 + +Test Result: Rollback +Reason: Err:错误: Heartbeat: Transaction bc3b7206-50fb-43d8-b17a-0af6cdaf96a3 expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction bc3b7206-50fb-43d8-b17a-0af6c + diff --git a/test_result/centralizend_result/yugabyte/serializable/rat_sda_lost_self_update.txt b/test_result/centralizend_result/yugabyte/serializable/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..2126733c --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/rat_sda_lost_self_update.txt @@ -0,0 +1,45 @@ +#### db_type: yugabyte #### +#### test_type: sda_lost_self_update #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:24:11:936:713 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:24:11:938:70 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:24:11:952:477 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:24:12:936:509 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:24:13:62:432 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-10-4 10:24:13:80:411 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2023-10-4 10:24:13:942:90 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2023-10-4 10:24:13:945:661 + Q7-T2 execute opt: 'COMMIT'; + Q7 failed reason: 错误: Heartbeat: Transaction 29aec9c8-7907-4971-8374-a5f067268fc8 expired or aborted by a conflict: 40001 errcode: 40001 + Q7 failed at: 2023-10-4 10:24:15:643:523 + +Test Result: Rollback +Err:错误: Heartbeat: Transaction 29aec9c8-7907-4971-8374-a5f067268fc8 expired or aborted by a conflict: 40001 + diff --git a/test_result/centralizend_result/yugabyte/serializable/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/yugabyte/serializable/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..e6dbe74c --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/rat_sda_non_repeatable_read.txt @@ -0,0 +1,39 @@ +#### db_type: yugabyte #### +#### test_type: sda_non_repeatable_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:23:43:767:698 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:23:43:769:132 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-10-4 10:23:43:804:748 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:23:44:767:678 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:23:44:900:961 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q4 failed at: 2023-10-4 10:23:45:316:603 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/yugabyte/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..7d71a993 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,39 @@ +#### db_type: yugabyte #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:24:2:422:522 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:24:2:422:974 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2023-10-4 10:24:2:437:888 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:24:3:423:925 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:24:3:482:778 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q4 failed at: 2023-10-4 10:24:3:896:223 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/yugabyte/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..5ebeaab3 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,38 @@ +#### db_type: yugabyte #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:24:7:3:303 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:24:7:4:710 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2023-10-4 10:24:7:51:690 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:24:8:3:181 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:24:8:124:32 + Q4-T2 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' + Q4 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q4 failed at: 2023-10-4 10:24:8:532:711 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/yugabyte/serializable/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..4b0de30d --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,60 @@ +#### db_type: yugabyte #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:26:29:865:879 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:26:29:867:414 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:26:29:903:896 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:26:30:865:782 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:26:31:10:278 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-10-4 10:26:31:24:922 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2023-10-4 10:26:31:27:854 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-10-4 10:26:31:28:687 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2023-10-4 10:26:31:870:304 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-10-4 10:26:31:874:103 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,2) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-10-4 10:26:32:30:348 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-10-4 10:26:32:30:689 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/serializable/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/yugabyte/serializable/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..bdba8b02 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,53 @@ +#### db_type: yugabyte #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:26:34:833:646 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:26:34:835:107 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:26:34:847:732 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:26:35:833:614 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:26:35:967:656 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-10-4 10:26:35:986:832 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2023-10-4 10:26:35:994:649 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-10-4 10:26:36:838:194 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-10-4 10:26:36:841:754 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-10-4 10:26:37:836:13 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,2) (1,2) + + Q9 finished at: 2023-10-4 10:26:37:996:571 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-10-4 10:26:37:996:922 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/serializable/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/yugabyte/serializable/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..fa238053 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,53 @@ +#### db_type: yugabyte #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:26:40:988:372 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:26:40:989:769 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:26:41:25:236 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:26:41:988:361 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:26:42:105:254 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-10-4 10:26:42:123:330 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2023-10-4 10:26:42:126:405 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-10-4 10:26:42:992:667 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-10-4 10:26:43:990:685 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-10-4 10:26:44:990:803 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + (2) expected_result: + (0,2) (1,2) + + Q9 finished at: 2023-10-4 10:26:45:135:93 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-10-4 10:26:45:135:440 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/serializable/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/yugabyte/serializable/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..bc23d87f --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,53 @@ +#### db_type: yugabyte #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:26:47:857:485 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:26:47:859:0 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:26:47:895:295 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:26:48:857:484 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:26:48:983:469 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-10-4 10:26:48:999:650 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2023-10-4 10:26:49:2:754 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-10-4 10:26:49:3:562 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2023-10-4 10:26:49:861:444 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-10-4 10:26:49:864:972 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + (2) expected_result: + (0,2) (1,2) + + Q9 finished at: 2023-10-4 10:26:50:6:750 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-10-4 10:26:50:7:93 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/serializable/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/yugabyte/serializable/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..ad9547d8 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,44 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:26:52:806:64 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:26:52:807:549 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-10-4 10:26:52:844:138 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:26:53:805:950 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:26:53:910:640 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-10-4 10:26:53:926:746 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-10-4 10:26:53:931:233 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 failed reason: 错误: Heartbeat: Transaction 3d50a33d-89fc-4316-a225-7b6a724065d7 expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction 3d50a33d-89fc-4316-a225-7b6a7 errcode: 40001 +Q6 failed at: 2023-10-4 10:26:55:415:586 + +Test Result: Rollback +Reason: Err:错误: Heartbeat: Transaction 3d50a33d-89fc-4316-a225-7b6a724065d7 expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction 3d50a33d-89fc-4316-a225-7b6a7 + diff --git a/test_result/centralizend_result/yugabyte/serializable/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/yugabyte/serializable/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..580d4dc0 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,44 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:26:58:756:297 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:26:58:757:712 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-10-4 10:26:58:794:327 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:26:59:756:225 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:26:59:893:264 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-10-4 10:26:59:911:318 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-10-4 10:26:59:916:279 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 failed reason: 错误: Heartbeat: Transaction 17363c9c-fe4d-4265-b8ce-bc060a5a8740 expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction 17363c9c-fe4d-4265-b8ce-bc060 errcode: 40001 +Q6 failed at: 2023-10-4 10:27:1:366:25 + +Test Result: Rollback +Reason: Err:错误: Heartbeat: Transaction 17363c9c-fe4d-4265-b8ce-bc060a5a8740 expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction 17363c9c-fe4d-4265-b8ce-bc060 + diff --git a/test_result/centralizend_result/yugabyte/serializable/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/yugabyte/serializable/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..4935bfe4 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,44 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:27:5:619:774 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:27:5:620:291 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:27:5:635:234 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:27:6:620:964 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:27:6:744:809 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-10-4 10:27:6:760:459 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2023-10-4 10:27:6:763:798 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 +Q6 failed at: 2023-10-4 10:27:8:230:936 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/serializable/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/yugabyte/serializable/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..d688e66e --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,46 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:27:11:318:214 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:27:11:319:571 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:27:11:333:192 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:27:12:318:5 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:27:12:436:837 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-10-4 10:27:12:454:699 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2023-10-4 10:27:12:457:949 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-10-4 10:27:13:323:199 + Q7-T2 execute opt: 'COMMIT'; + Q7 failed reason: 错误: Heartbeat: Transaction 41e10ffb-6e64-4a0e-ba0b-5de12735f6a6 expired or aborted by a conflict: 40001 errcode: 40001 + Q7 failed at: 2023-10-4 10:27:15:24:907 + +Test Result: Rollback +Err:错误: Heartbeat: Transaction 41e10ffb-6e64-4a0e-ba0b-5de12735f6a6 expired or aborted by a conflict: 40001 + diff --git a/test_result/centralizend_result/yugabyte/serializable/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/yugabyte/serializable/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..a1e43540 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,60 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:27:18:101:460 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:27:18:102:990 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:27:18:138:391 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:27:19:101:441 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:27:19:231:505 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-10-4 10:27:19:248:568 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2023-10-4 10:27:19:252:549 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-10-4 10:27:19:255:892 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2023-10-4 10:27:20:105:937 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-10-4 10:27:20:109:522 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,2) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-10-4 10:27:20:265:414 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-10-4 10:27:20:265:763 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/serializable/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/yugabyte/serializable/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..7b1aefcd --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/wat_mda_step_wat_c1.txt @@ -0,0 +1,72 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_wat_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:27:23:37:541 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:27:23:38:974 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:27:23:74:995 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:27:24:37:648 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:27:24:170:394 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-10-4 10:27:24:186:778 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2023-10-4 10:27:24:189:925 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-10-4 10:27:25:37:601 + Q6-T3 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q6 finished at: 2023-10-4 10:27:25:183:850 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2023-10-4 10:27:25:199:189 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' + Q8 finished at: 2023-10-4 10:27:25:202:163 +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q9 finished at: 2023-10-4 10:27:26:42:586 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-10-4 10:27:26:46:229 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-10-4 10:27:27:40:420 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-10-4 10:27:28:40:511 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,3) (2,3) + *(1) expected_result: + (0,2) (1,3) (2,3) + (2) expected_result: + (0,2) (1,2) (2,3) + (3) expected_result: + (0,1) (1,3) (2,3) + (4) expected_result: + (0,1) (1,3) (2,1) + (5) expected_result: + (0,2) (1,2) (2,1) + (6) expected_result: + (0,1) (1,2) (2,1) + + Q13 finished at: 2023-10-4 10:27:28:200:436 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-10-4 10:27:28:200:777 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/serializable/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/yugabyte/serializable/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..9cf5b9e0 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/wat_mda_step_wat_c2.txt @@ -0,0 +1,72 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_wat_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:27:31:54:977 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:27:31:56:502 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:27:31:92:245 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:27:32:55:4 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:27:32:194:683 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-10-4 10:27:32:213:206 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-10-4 10:27:33:55:0 + Q5-T3 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q5 finished at: 2023-10-4 10:27:33:199:118 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6 finished at: 2023-10-4 10:27:34:63:244 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2023-10-4 10:27:35:112:580 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' + Q8 finished at: 2023-10-4 10:27:35:120:387 +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q9 finished at: 2023-10-4 10:27:36:59:972 + Q10-T2 execute opt: 'COMMIT'; + Q10 finished at: 2023-10-4 10:27:37:58:30 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2023-10-4 10:27:38:57:722 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-10-4 10:27:39:58:59 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,3) (2,3) + (1) expected_result: + (0,2) (1,3) (2,3) + (2) expected_result: + (0,2) (1,2) (2,3) + *(3) expected_result: + (0,1) (1,3) (2,3) + (4) expected_result: + (0,1) (1,3) (2,1) + (5) expected_result: + (0,2) (1,2) (2,1) + (6) expected_result: + (0,1) (1,2) (2,1) + + Q13 finished at: 2023-10-4 10:27:39:221:802 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-10-4 10:27:39:222:175 + +The current result is consistent with the [(3) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/serializable/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/yugabyte/serializable/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..1e3affed --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,50 @@ +#### db_type: yugabyte #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:25:49:538:945 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:25:49:540:354 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:25:49:554:623 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:25:50:537:501 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:25:50:585:442 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-10-4 10:25:50:601:138 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2023-10-4 10:25:51:542:46 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-10-4 10:25:52:541:449 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2023-10-4 10:25:52:666:876 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2023-10-4 10:25:52:853:310 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-10-4 10:25:52:853:892 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/serializable/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/yugabyte/serializable/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..596ced1a --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,50 @@ +#### db_type: yugabyte #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:25:55:360:633 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:25:55:362:88 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:25:55:398:360 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:25:56:360:760 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:25:56:362:237 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-10-4 10:25:56:379:319 +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2023-10-4 10:25:57:362:933 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-10-4 10:25:58:363:77 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2023-10-4 10:25:58:395:650 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2023-10-4 10:25:58:721:274 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-10-4 10:25:58:721:934 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/serializable/wat_sda_full_write.txt b/test_result/centralizend_result/yugabyte/serializable/wat_sda_full_write.txt new file mode 100644 index 00000000..8bfd4144 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/wat_sda_full_write.txt @@ -0,0 +1,50 @@ +#### db_type: yugabyte #### +#### test_type: sda_full_write #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:26:1:404:629 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:26:1:406:50 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:26:1:441:443 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:26:2:404:554 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:26:2:405:990 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-10-4 10:26:2:460:566 +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2023-10-4 10:26:3:409:180 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2023-10-4 10:26:3:412:830 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-10-4 10:26:4:407:96 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2023-10-4 10:26:4:441:353 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-10-4 10:26:4:443:48 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/serializable/wat_sda_full_write_committed.txt b/test_result/centralizend_result/yugabyte/serializable/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..ece1c204 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/wat_sda_full_write_committed.txt @@ -0,0 +1,50 @@ +#### db_type: yugabyte #### +#### test_type: sda_full_write_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:26:7:344:698 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:26:7:345:606 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:26:7:381:997 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:26:8:345:560 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:26:8:472:905 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-10-4 10:26:8:490:30 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-10-4 10:26:8:491:77 +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2023-10-4 10:26:9:349:794 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-10-4 10:26:9:353:165 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,3) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,3) + + Q8 finished at: 2023-10-4 10:26:9:512:636 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-10-4 10:26:9:512:978 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/serializable/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/yugabyte/serializable/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..0323fe59 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,57 @@ +#### db_type: yugabyte #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:26:24:988:780 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:26:24:990:228 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:26:25:25:712 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:26:25:988:847 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:26:26:128:26 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-10-4 10:26:26:144:265 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-10-4 10:26:26:145:171 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2023-10-4 10:26:26:993:552 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-10-4 10:26:26:996:856 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-10-4 10:26:27:130:407 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-10-4 10:26:27:130:741 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/serializable/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/yugabyte/serializable/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..d7f1ab9e --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/wat_sda_lost_update_c1.txt @@ -0,0 +1,41 @@ +#### db_type: yugabyte #### +#### test_type: sda_lost_update_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:26:12:317:848 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:26:12:319:203 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2023-10-4 10:26:12:355:567 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:26:13:317:845 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:26:13:421:342 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-10-4 10:26:13:438:878 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 failed reason: 错误: Heartbeat: Transaction 86a4d602-f177-452d-a3e4-ba21e0ffccf1 expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction 86a4d602-f177-452d-a3e4-ba21e errcode: 40001 +Q5 failed at: 2023-10-4 10:26:14:827:218 + +Test Result: Rollback +Reason: Err:错误: Heartbeat: Transaction 86a4d602-f177-452d-a3e4-ba21e0ffccf1 expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction 86a4d602-f177-452d-a3e4-ba21e + diff --git a/test_result/centralizend_result/yugabyte/serializable/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/yugabyte/serializable/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..289e5a62 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/serializable/wat_sda_lost_update_c2.txt @@ -0,0 +1,39 @@ +#### db_type: yugabyte #### +#### test_type: sda_lost_update_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:26:18:33:361 +Q1-T1 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' +Q1 finished at: 2023-10-4 10:26:18:34:810 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2023-10-4 10:26:18:72:17 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:26:19:33:401 + Q3-T2 execute sql: 'BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;' + Q3 finished at: 2023-10-4 10:26:19:161:350 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q4 failed at: 2023-10-4 10:26:19:576:923 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/snapshot/iat_dda_read_skew_committed.txt b/test_result/centralizend_result/yugabyte/snapshot/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..9174179e --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/iat_dda_read_skew_committed.txt @@ -0,0 +1,67 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_skew_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:33:37:11:514 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:33:37:12:655 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-10-4 10:33:37:41:976 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:33:38:11:290 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:33:38:141:645 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-10-4 10:33:38:158:732 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-10-4 10:33:38:165:869 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-10-4 10:33:38:168:974 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2023-10-4 10:33:39:14:911 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-10-4 10:33:39:17:91 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-10-4 10:33:39:168:59 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-10-4 10:33:39:168:408 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/snapshot/iat_dda_read_write_skew1_committed.txt b/test_result/centralizend_result/yugabyte/snapshot/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..58d894d4 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,46 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:33:41:813:193 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:33:41:814:454 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-10-4 10:33:41:843:689 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:33:42:813:128 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:33:42:888:387 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-10-4 10:33:42:904:889 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-10-4 10:33:42:907:910 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-10-4 10:33:42:908:896 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 +Q7 failed at: 2023-10-4 10:33:44:519:859 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/snapshot/iat_dda_write_skew.txt b/test_result/centralizend_result/yugabyte/snapshot/iat_dda_write_skew.txt new file mode 100644 index 00000000..baf6dc2e --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/iat_dda_write_skew.txt @@ -0,0 +1,65 @@ +#### db_type: yugabyte #### +#### test_type: dda_write_skew #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:33:47:133:893 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:33:47:135:166 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-10-4 10:33:47:163:742 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:33:48:133:846 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:33:48:261:44 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-10-4 10:33:48:272:298 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-10-4 10:33:48:277:384 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-10-4 10:33:49:143:884 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-10-4 10:33:49:147:297 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-10-4 10:33:50:136:279 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-10-4 10:33:50:298:249 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2023-10-4 10:33:50:298:622 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/yugabyte/snapshot/iat_dda_write_skew_committed.txt b/test_result/centralizend_result/yugabyte/snapshot/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..c97e482a --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/iat_dda_write_skew_committed.txt @@ -0,0 +1,65 @@ +#### db_type: yugabyte #### +#### test_type: dda_write_skew_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:34:3:93:457 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:34:3:94:610 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-10-4 10:34:3:105:430 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:34:4:93:478 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:34:4:197:24 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-10-4 10:34:4:209:851 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-10-4 10:34:4:215:682 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-10-4 10:34:4:219:178 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2023-10-4 10:34:5:104:8 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-10-4 10:34:5:107:608 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-10-4 10:34:5:247:422 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-10-4 10:34:5:247:769 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/yugabyte/snapshot/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/centralizend_result/yugabyte/snapshot/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..57ebc930 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,76 @@ +#### db_type: yugabyte #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab (class,value) VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab (class,value) VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab (class,value) VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab (class,value) VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:33:53:27:204 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:33:53:28:509 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2023-10-4 10:33:53:40:696 +Q3-T1 execute sql: 'INSERT INTO mytab (class,value) VALUES (2, 30);' +Q3 finished at: 2023-10-4 10:33:53:45:690 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2023-10-4 10:33:54:27:141 + Q4-T2 execute sql: 'BEGIN TRANSACTION;' + Q4 finished at: 2023-10-4 10:33:54:146:969 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2023-10-4 10:33:54:160:326 + Q6-T2 execute sql: 'INSERT INTO mytab (class,value) VALUES (1, 300);' + Q6 finished at: 2023-10-4 10:33:54:165:493 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-10-4 10:33:54:168:959 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-10-4 10:33:55:29:443 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2023-10-4 10:33:55:194:242 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2023-10-4 10:33:55:195:288 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-10-4 10:33:55:195:620 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/yugabyte/snapshot/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/centralizend_result/yugabyte/snapshot/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..6c257c08 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,65 @@ +#### db_type: yugabyte #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type))' +Q0-T1 execute sql: 'INSERT into account (name,type,balance) VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account (name,type,balance) VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:33:58:116:987 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:33:58:118:247 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2023-10-4 10:33:58:173:418 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:33:59:117:77 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:33:59:248:620 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2023-10-4 10:33:59:277:786 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2023-10-4 10:33:59:283:967 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-10-4 10:33:59:284:763 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2023-10-4 10:34:0:133:882 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-10-4 10:34:0:137:700 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2023-10-4 10:34:0:292:41 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-10-4 10:34:0:292:377 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/yugabyte/snapshot/iat_mda_step_iat.txt b/test_result/centralizend_result/yugabyte/snapshot/iat_mda_step_iat.txt new file mode 100644 index 00000000..278c078c --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/iat_mda_step_iat.txt @@ -0,0 +1,115 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_iat #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:34:8:1:8 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:34:8:2:308 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2023-10-4 10:34:8:31:349 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:34:9:0:915 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:34:9:103:827 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2023-10-4 10:34:9:117:143 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-10-4 10:34:10:0:903 + Q5-T3 execute sql: 'BEGIN TRANSACTION;' + Q5 finished at: 2023-10-4 10:34:10:150:314 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2023-10-4 10:34:10:164:662 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2023-10-4 10:34:11:11:683 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2023-10-4 10:34:12:11:759 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2023-10-4 10:34:13:9:423 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-10-4 10:34:14:3:655 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-10-4 10:34:15:3:904 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-10-4 10:34:16:3:505 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2023-10-4 10:34:16:162:697 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-10-4 10:34:16:163:50 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/yugabyte/snapshot/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/centralizend_result/yugabyte/snapshot/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..e9f176b7 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,114 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:34:55:448:203 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:34:55:449:415 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2023-10-4 10:34:55:479:83 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:34:56:448:311 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:34:56:561:663 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2023-10-4 10:34:56:577:200 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-10-4 10:34:56:578:122 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-10-4 10:34:57:448:203 + Q6-T3 execute sql: 'BEGIN TRANSACTION;' + Q6 finished at: 2023-10-4 10:34:57:581:664 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2023-10-4 10:34:57:596:313 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2023-10-4 10:34:57:600:349 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-10-4 10:34:57:601:240 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2023-10-4 10:34:58:452:564 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2023-10-4 10:34:58:454:665 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2023-10-4 10:34:58:623:705 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2023-10-4 10:34:58:624:70 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/snapshot/iat_mda_step_iat_cross_phenomenon.txt b/test_result/centralizend_result/yugabyte/snapshot/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..bc744396 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,217 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:34:47:240:131 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:34:47:240:559 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2023-10-4 10:34:47:250:301 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:34:48:241:577 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:34:48:376:572 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2023-10-4 10:34:48:390:650 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-10-4 10:34:49:241:512 + Q5-T3 execute sql: 'BEGIN TRANSACTION;' + Q5 finished at: 2023-10-4 10:34:49:366:914 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2023-10-4 10:34:49:382:248 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2023-10-4 10:34:49:382:981 + Q8-T4 execute opt: 'BEGIN;' + Q8 finished at: 2023-10-4 10:34:50:241:721 + Q8-T4 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2023-10-4 10:34:50:382:466 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2023-10-4 10:34:50:397:198 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2023-10-4 10:34:50:397:964 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2023-10-4 10:34:51:247:167 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2023-10-4 10:34:51:249:499 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2023-10-4 10:34:52:247:762 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2023-10-4 10:34:52:250:12 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2023-10-4 10:34:52:428:164 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2023-10-4 10:34:52:428:545 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/snapshot/iat_mda_step_iat_predicate_based_delete.txt b/test_result/centralizend_result/yugabyte/snapshot/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..48400904 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,115 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:34:19:268:705 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:34:19:269:978 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2023-10-4 10:34:19:300:327 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:34:20:268:700 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:34:20:343:221 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2023-10-4 10:34:20:356:445 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-10-4 10:34:21:268:741 + Q5-T3 execute sql: 'BEGIN TRANSACTION;' + Q5 finished at: 2023-10-4 10:34:21:383:132 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2023-10-4 10:34:21:395:150 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2023-10-4 10:34:22:279:540 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2023-10-4 10:34:23:279:108 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2023-10-4 10:34:24:279:296 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-10-4 10:34:25:271:221 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-10-4 10:34:26:271:111 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-10-4 10:34:27:271:359 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2023-10-4 10:34:27:425:317 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-10-4 10:34:27:425:678 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/yugabyte/snapshot/iat_mda_step_iat_predicate_based_insert.txt b/test_result/centralizend_result/yugabyte/snapshot/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..9ae22071 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,112 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:34:30:69:859 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:34:30:71:284 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2023-10-4 10:34:30:89:717 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:34:31:69:812 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:34:31:217:604 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2023-10-4 10:34:31:232:120 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-10-4 10:34:32:69:885 + Q5-T3 execute sql: 'BEGIN TRANSACTION;' + Q5 finished at: 2023-10-4 10:34:32:211:749 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2023-10-4 10:34:32:225:707 +Q7-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q7 finished at: 2023-10-4 10:34:33:76:807 + Q8-T2 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' + Q8 finished at: 2023-10-4 10:34:34:81:75 + Q9-T3 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 0);' + Q9 finished at: 2023-10-4 10:34:35:81:85 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-10-4 10:34:36:72:282 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-10-4 10:34:37:72:457 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-10-4 10:34:38:72:447 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2023-10-4 10:34:38:236:984 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-10-4 10:34:38:237:350 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/yugabyte/snapshot/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/centralizend_result/yugabyte/snapshot/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..6cbdd3c0 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,146 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:35:1:666:495 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:35:1:667:782 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2023-10-4 10:35:1:698:454 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2023-10-4 10:35:1:704:499 + Q4-T2 execute opt: 'BEGIN;' + Q4 finished at: 2023-10-4 10:35:2:666:485 + Q4-T2 execute sql: 'BEGIN TRANSACTION;' + Q4 finished at: 2023-10-4 10:35:2:780:750 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2023-10-4 10:35:2:792:784 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2023-10-4 10:35:2:797:846 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-10-4 10:35:2:798:585 + Q8-T3 execute opt: 'BEGIN;' + Q8 finished at: 2023-10-4 10:35:3:666:672 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2023-10-4 10:35:3:807:889 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2023-10-4 10:35:3:822:64 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2023-10-4 10:35:3:823:215 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2023-10-4 10:35:3:823:645 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2023-10-4 10:35:4:677:185 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2023-10-4 10:35:4:680:517 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2023-10-4 10:35:4:740:692 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2023-10-4 10:35:4:743:125 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/yugabyte/snapshot/iat_mda_step_iat_uname_anomaly.txt b/test_result/centralizend_result/yugabyte/snapshot/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..5cfef131 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,170 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:34:41:90:148 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:34:41:91:345 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2023-10-4 10:34:41:121:789 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:34:42:90:140 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:34:42:202:69 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2023-10-4 10:34:42:215:114 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-10-4 10:34:42:218:788 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2023-10-4 10:34:42:219:934 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2023-10-4 10:34:42:223:154 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-10-4 10:34:42:224:19 + Q9-T3 execute opt: 'BEGIN;' + Q9 finished at: 2023-10-4 10:34:43:88:855 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2023-10-4 10:34:43:142:665 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2023-10-4 10:34:43:156:639 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2023-10-4 10:34:43:158:746 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2023-10-4 10:34:43:160:0 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2023-10-4 10:34:43:161:107 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2023-10-4 10:34:43:161:814 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2023-10-4 10:34:44:94:834 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2023-10-4 10:34:44:97:115 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2023-10-4 10:34:44:251:580 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2023-10-4 10:34:44:251:973 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/snapshot/iat_sda_lost_update_committed.txt b/test_result/centralizend_result/yugabyte/snapshot/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..0dc52410 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/iat_sda_lost_update_committed.txt @@ -0,0 +1,43 @@ +#### db_type: yugabyte #### +#### test_type: sda_lost_update_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:33:31:549:914 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:33:31:551:270 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2023-10-4 10:33:31:581:25 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:33:32:549:943 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:33:32:651:978 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-10-4 10:33:32:669:297 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-10-4 10:33:32:672:759 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 +Q6 failed at: 2023-10-4 10:33:34:156:890 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/snapshot/iat_sda_non_repeatable_read_committed.txt b/test_result/centralizend_result/yugabyte/snapshot/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..6ff77633 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,64 @@ +#### db_type: yugabyte #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:33:26:437:947 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:33:26:439:360 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-10-4 10:33:26:468:605 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:33:27:437:867 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:33:27:512:316 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2023-10-4 10:33:27:528:823 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-10-4 10:33:27:529:833 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2023-10-4 10:33:28:441:533 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-10-4 10:33:28:443:592 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-10-4 10:33:28:594:601 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-10-4 10:33:28:594:935 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/snapshot/rat_dda_double_write_skew1.txt b/test_result/centralizend_result/yugabyte/snapshot/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..04a0ced6 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/rat_dda_double_write_skew1.txt @@ -0,0 +1,44 @@ +#### db_type: yugabyte #### +#### test_type: dda_double_write_skew1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:30:14:80:825 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:30:14:82:61 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:30:14:118:570 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:30:15:80:877 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:30:15:215:206 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-10-4 10:30:15:234:900 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-10-4 10:30:15:236:66 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q6 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 +Q6 failed at: 2023-10-4 10:30:16:690:884 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/snapshot/rat_dda_double_write_skew1_committed.txt b/test_result/centralizend_result/yugabyte/snapshot/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..5d3e1bdd --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,46 @@ +#### db_type: yugabyte #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:30:20:931:567 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:30:20:932:804 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:30:20:969:123 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:30:21:931:496 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:30:22:31:356 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-10-4 10:30:22:47:393 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-10-4 10:30:22:48:536 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-10-4 10:30:22:49:354 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 +Q7 failed at: 2023-10-4 10:30:23:641:374 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/snapshot/rat_dda_double_write_skew2.txt b/test_result/centralizend_result/yugabyte/snapshot/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..4a79d691 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/rat_dda_double_write_skew2.txt @@ -0,0 +1,37 @@ +#### db_type: yugabyte #### +#### test_type: dda_double_write_skew2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:30:26:544:722 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:30:26:545:977 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:30:26:582:412 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:30:27:544:886 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:30:27:665:559 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-10-4 10:30:27:682:602 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2023-10-4 10:30:27:685:519 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q6 failed reason: 错误: Heartbeat: Transaction b50a26d9-3ecd-45e3-8809-dde1988588ed expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction b50a26d9-3ecd-45e3-8809-dde19 errcode: 40001 +Q6 failed at: 2023-10-4 10:30:29:154:163 + +Test Result: Rollback +Reason: Err:错误: Heartbeat: Transaction b50a26d9-3ecd-45e3-8809-dde1988588ed expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction b50a26d9-3ecd-45e3-8809-dde19 + diff --git a/test_result/centralizend_result/yugabyte/snapshot/rat_dda_read_skew.txt b/test_result/centralizend_result/yugabyte/snapshot/rat_dda_read_skew.txt new file mode 100644 index 00000000..37b927da --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/rat_dda_read_skew.txt @@ -0,0 +1,67 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_skew #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:30:32:278:358 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:30:32:278:792 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-10-4 10:30:32:288:243 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:30:33:279:648 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:30:33:420:54 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-10-4 10:30:33:438:223 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-10-4 10:30:33:441:411 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2023-10-4 10:30:34:283:832 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-10-4 10:30:35:282:223 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-10-4 10:30:36:280:749 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-10-4 10:30:36:445:765 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-10-4 10:30:36:446:105 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/snapshot/rat_dda_read_skew2.txt b/test_result/centralizend_result/yugabyte/snapshot/rat_dda_read_skew2.txt new file mode 100644 index 00000000..71483a21 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/rat_dda_read_skew2.txt @@ -0,0 +1,67 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_skew2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:30:49:372:458 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:30:49:373:578 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:30:49:409:399 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:30:50:372:542 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:30:50:492:168 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-10-4 10:30:50:504:854 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-10-4 10:30:50:505:835 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-10-4 10:30:51:379:689 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-10-4 10:30:51:383:251 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2023-10-4 10:30:52:373:370 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-10-4 10:30:52:528:208 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-10-4 10:30:52:528:555 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/snapshot/rat_dda_read_skew2_committed.txt b/test_result/centralizend_result/yugabyte/snapshot/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..6857152e --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/rat_dda_read_skew2_committed.txt @@ -0,0 +1,67 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_skew2_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:30:55:316:963 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:30:55:318:294 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:30:55:354:698 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:30:56:317:131 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:30:56:450:970 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-10-4 10:30:56:464:973 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-10-4 10:30:56:465:965 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-10-4 10:30:56:466:364 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2023-10-4 10:30:57:324:522 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-10-4 10:30:57:327:975 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-10-4 10:30:57:481:274 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-10-4 10:30:57:481:616 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/snapshot/rat_dda_read_skew_predicate_based_delete.txt b/test_result/centralizend_result/yugabyte/snapshot/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..eb00c256 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,65 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:30:39:388:749 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:30:39:389:954 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (1,0) (0,0) + (1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2023-10-4 10:30:39:420:103 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:30:40:388:793 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:30:40:518:782 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2023-10-4 10:30:40:535:527 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2023-10-4 10:30:40:538:660 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-10-4 10:30:40:539:434 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (1,0) (0,0) + (1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2023-10-4 10:30:41:392:666 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-10-4 10:30:41:396:383 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2023-10-4 10:30:41:549:102 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-10-4 10:30:41:549:448 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/yugabyte/snapshot/rat_dda_read_skew_predicate_based_insert.txt b/test_result/centralizend_result/yugabyte/snapshot/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..be91f435 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,65 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:30:44:288:434 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:30:44:289:669 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2023-10-4 10:30:44:331:174 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:30:45:288:585 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:30:45:392:498 + Q4-T2 execute sql: 'INSERT into t1 (k,v) VALUES(1,0);' + Q4 finished at: 2023-10-4 10:30:45:402:706 + Q5-T2 execute sql: 'INSERT into t1 (k,v) VALUES(0,0);' + Q5 finished at: 2023-10-4 10:30:45:405:812 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-10-4 10:30:45:406:686 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2023-10-4 10:30:46:292:221 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-10-4 10:30:46:294:645 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2023-10-4 10:30:46:367:36 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-10-4 10:30:46:367:366 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/snapshot/rat_dda_write_read_skew.txt b/test_result/centralizend_result/yugabyte/snapshot/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..114e7173 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/rat_dda_write_read_skew.txt @@ -0,0 +1,65 @@ +#### db_type: yugabyte #### +#### test_type: dda_write_read_skew #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:30:2:136:478 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:30:2:137:642 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:30:2:173:475 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:30:3:136:491 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:30:3:211:952 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-10-4 10:30:3:227:548 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-10-4 10:30:3:228:602 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2023-10-4 10:30:4:140:409 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2023-10-4 10:30:5:138:980 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-10-4 10:30:6:139:8 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-10-4 10:30:6:285:200 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-10-4 10:30:6:285:537 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/yugabyte/snapshot/rat_dda_write_read_skew_committed.txt b/test_result/centralizend_result/yugabyte/snapshot/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..c9c8f614 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,65 @@ +#### db_type: yugabyte #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:30:9:67:225 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:30:9:68:572 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:30:9:104:482 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:30:10:67:436 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:30:10:200:256 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-10-4 10:30:10:219:335 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2023-10-4 10:30:10:220:527 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-10-4 10:30:10:221:455 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2023-10-4 10:30:11:71:261 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2023-10-4 10:30:11:75:21 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2023-10-4 10:30:11:230:929 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2023-10-4 10:30:11:231:286 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/yugabyte/snapshot/rat_mda_step_rat.txt b/test_result/centralizend_result/yugabyte/snapshot/rat_mda_step_rat.txt new file mode 100644 index 00000000..df4bf75c --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/rat_mda_step_rat.txt @@ -0,0 +1,115 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_rat #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:31:0:259:983 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:31:0:261:169 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:31:0:297:871 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:31:1:260:149 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:31:1:388:533 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-10-4 10:31:1:405:75 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2023-10-4 10:31:1:406:244 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-10-4 10:31:2:260:151 + Q6-T3 execute sql: 'BEGIN TRANSACTION;' + Q6 finished at: 2023-10-4 10:31:2:401:490 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2023-10-4 10:31:2:417:32 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2023-10-4 10:31:2:418:275 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2023-10-4 10:31:3:265:221 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-10-4 10:31:3:268:734 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-10-4 10:31:4:262:464 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-10-4 10:31:5:262:750 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2023-10-4 10:31:5:420:318 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-10-4 10:31:5:420:696 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/yugabyte/snapshot/rat_mda_step_rat_long_fork.txt b/test_result/centralizend_result/yugabyte/snapshot/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..1ef7cf5a --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,217 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN;' + Q1 finished at: 2023-10-4 10:31:8:215:142 + Q1-T4 execute sql: 'BEGIN TRANSACTION;' + Q1 finished at: 2023-10-4 10:31:8:347:519 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2023-10-4 10:31:8:360:604 +Q3-T1 execute opt: 'BEGIN;' +Q3 finished at: 2023-10-4 10:31:9:215:111 +Q3-T1 execute sql: 'BEGIN TRANSACTION;' +Q3 finished at: 2023-10-4 10:31:9:216:377 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2023-10-4 10:31:9:250:538 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-10-4 10:31:10:215:250 + Q5-T3 execute sql: 'BEGIN TRANSACTION;' + Q5 finished at: 2023-10-4 10:31:10:345:875 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2023-10-4 10:31:10:360:76 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2023-10-4 10:31:10:361:625 + Q8-T2 execute opt: 'BEGIN;' + Q8 finished at: 2023-10-4 10:31:11:215:465 + Q8-T2 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2023-10-4 10:31:11:353:465 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2023-10-4 10:31:11:371:163 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2023-10-4 10:31:12:221:246 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2023-10-4 10:31:13:217:767 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2023-10-4 10:31:14:218:106 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2023-10-4 10:31:15:216:485 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-10-4 10:31:15:219:10 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2023-10-4 10:31:15:277:656 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2023-10-4 10:31:15:279:936 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/snapshot/rat_mda_step_rat_predicate_based_delete.txt b/test_result/centralizend_result/yugabyte/snapshot/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..87eba5f5 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,115 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:31:18:204:829 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:31:18:206:84 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:31:18:241:649 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:31:19:204:830 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:31:19:314:467 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2023-10-4 10:31:19:330:638 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2023-10-4 10:31:19:334:820 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-10-4 10:31:20:204:884 + Q6-T3 execute sql: 'BEGIN TRANSACTION;' + Q6 finished at: 2023-10-4 10:31:20:329:928 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2023-10-4 10:31:20:345:211 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2023-10-4 10:31:20:348:715 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2023-10-4 10:31:21:222:857 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-10-4 10:31:21:226:612 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-10-4 10:31:22:207:534 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-10-4 10:31:23:207:226 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2023-10-4 10:31:23:346:463 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-10-4 10:31:23:346:844 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/yugabyte/snapshot/rat_mda_step_rat_predicate_based_insert.txt b/test_result/centralizend_result/yugabyte/snapshot/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..e27a8886 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,112 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:31:26:369:117 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:31:26:370:458 +Q2-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 1);' +Q2 finished at: 2023-10-4 10:31:26:393:917 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:31:27:368:971 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:31:27:469:928 + Q4-T2 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 1);' + Q4 finished at: 2023-10-4 10:31:27:478:938 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2023-10-4 10:31:27:489:618 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-10-4 10:31:28:369:325 + Q6-T3 execute sql: 'BEGIN TRANSACTION;' + Q6 finished at: 2023-10-4 10:31:28:498:581 + Q7-T3 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 1);' + Q7 finished at: 2023-10-4 10:31:28:508:663 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2023-10-4 10:31:28:522:914 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2023-10-4 10:31:29:408:368 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2023-10-4 10:31:29:411:949 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2023-10-4 10:31:30:371:577 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2023-10-4 10:31:31:371:549 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2023-10-4 10:31:31:533:725 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2023-10-4 10:31:31:534:76 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/centralizend_result/yugabyte/snapshot/rat_sda_dirty_read.txt b/test_result/centralizend_result/yugabyte/snapshot/rat_sda_dirty_read.txt new file mode 100644 index 00000000..410617f8 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/rat_sda_dirty_read.txt @@ -0,0 +1,51 @@ +#### db_type: yugabyte #### +#### test_type: sda_dirty_read #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k, v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:29:21:253:917 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:29:21:255:305 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:29:21:292:40 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:29:22:254:302 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:29:22:359:404 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2023-10-4 10:29:22:373:156 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2023-10-4 10:29:23:257:469 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-10-4 10:29:24:255:127 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2023-10-4 10:29:24:414:929 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2023-10-4 10:29:24:415:278 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/snapshot/rat_sda_intermediate_read.txt b/test_result/centralizend_result/yugabyte/snapshot/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..cc6756d3 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/rat_sda_intermediate_read.txt @@ -0,0 +1,57 @@ +#### db_type: yugabyte #### +#### test_type: sda_intermediate_read #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:29:34:269:607 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:29:34:270:867 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:29:34:308:207 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:29:35:269:528 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:29:35:397:995 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2023-10-4 10:29:35:412:429 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2023-10-4 10:29:36:272:928 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-10-4 10:29:37:270:222 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-10-4 10:29:38:271:660 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2023-10-4 10:29:38:422:850 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-10-4 10:29:38:423:276 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/snapshot/rat_sda_intermediate_read_committed.txt b/test_result/centralizend_result/yugabyte/snapshot/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..00880091 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,57 @@ +#### db_type: yugabyte #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:29:41:317:141 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:29:41:318:340 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:29:41:354:751 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:29:42:317:248 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:29:42:418:236 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2023-10-4 10:29:42:429:411 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-10-4 10:29:42:429:807 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2023-10-4 10:29:43:324:919 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-10-4 10:29:43:328:396 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2023-10-4 10:29:43:481:245 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-10-4 10:29:43:481:595 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/snapshot/rat_sda_lost_self_update.txt b/test_result/centralizend_result/yugabyte/snapshot/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..36386fbf --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/rat_sda_lost_self_update.txt @@ -0,0 +1,34 @@ +#### db_type: yugabyte #### +#### test_type: sda_lost_self_update #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:29:56:217:720 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:29:56:218:977 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:29:56:233:438 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:29:57:217:841 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:29:57:350:525 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-10-4 10:29:57:368:610 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q5 failed reason: 错误: Heartbeat: Transaction 381f9a85-f082-41e4-a4db-cb6bd1d3e3a0 expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction 381f9a85-f082-41e4-a4db-cb6bd errcode: 40001 +Q5 failed at: 2023-10-4 10:29:58:727:449 + +Test Result: Rollback +Reason: Err:错误: Heartbeat: Transaction 381f9a85-f082-41e4-a4db-cb6bd1d3e3a0 expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction 381f9a85-f082-41e4-a4db-cb6bd + diff --git a/test_result/centralizend_result/yugabyte/snapshot/rat_sda_non_repeatable_read.txt b/test_result/centralizend_result/yugabyte/snapshot/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..03d1575e --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/rat_sda_non_repeatable_read.txt @@ -0,0 +1,64 @@ +#### db_type: yugabyte #### +#### test_type: sda_non_repeatable_read #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:29:27:403:81 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:29:27:404:466 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-10-4 10:29:27:434:537 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:29:28:403:168 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:29:28:504:318 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2023-10-4 10:29:28:520:343 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2023-10-4 10:29:29:406:857 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2023-10-4 10:29:30:405:637 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-10-4 10:29:31:404:352 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2023-10-4 10:29:31:540:717 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-10-4 10:29:31:541:67 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/centralizend_result/yugabyte/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..b1a6dea0 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,64 @@ +#### db_type: yugabyte #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:29:46:338:577 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:29:46:339:784 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2023-10-4 10:29:46:370:863 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:29:47:338:652 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:29:47:462:93 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2023-10-4 10:29:47:478:898 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-10-4 10:29:47:479:547 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2023-10-4 10:29:48:338:440 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-10-4 10:29:48:338:898 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2023-10-4 10:29:48:397:959 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-10-4 10:29:48:398:307 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/centralizend_result/yugabyte/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..1e1a422b --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,63 @@ +#### db_type: yugabyte #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:29:51:221:580 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:29:51:222:899 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2023-10-4 10:29:51:264:825 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:29:52:221:533 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:29:52:351:235 + Q4-T2 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' + Q4 finished at: 2023-10-4 10:29:52:361:823 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2023-10-4 10:29:52:362:848 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2023-10-4 10:29:53:225:330 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2023-10-4 10:29:53:227:542 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2023-10-4 10:29:53:366:0 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2023-10-4 10:29:53:366:371 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/centralizend_result/yugabyte/snapshot/wat_dda_double_write_skew2_committed.txt b/test_result/centralizend_result/yugabyte/snapshot/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..a3e4697d --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,35 @@ +#### db_type: yugabyte #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:32:15:124:694 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:32:15:125:971 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:32:15:162:26 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:32:16:124:708 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:32:16:253:759 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2023-10-4 10:32:16:269:812 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q5 failed at: 2023-10-4 10:32:16:772:349 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/snapshot/wat_dda_full_write_skew_c1.txt b/test_result/centralizend_result/yugabyte/snapshot/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..de26e696 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,35 @@ +#### db_type: yugabyte #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:32:19:878:566 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:32:19:879:863 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:32:19:915:912 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:32:20:878:446 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:32:21:8:537 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-10-4 10:32:21:26:262 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q5 failed at: 2023-10-4 10:32:21:529:58 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/snapshot/wat_dda_full_write_skew_c2.txt b/test_result/centralizend_result/yugabyte/snapshot/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..cf404f02 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,35 @@ +#### db_type: yugabyte #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:32:25:833:671 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:32:25:834:917 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:32:25:849:470 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:32:26:833:615 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:32:26:974:419 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-10-4 10:32:26:991:684 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q5 failed at: 2023-10-4 10:32:27:494:766 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/snapshot/wat_dda_full_write_skew_committed.txt b/test_result/centralizend_result/yugabyte/snapshot/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..fd151f3d --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: yugabyte #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:32:32:616:646 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:32:32:617:904 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:32:32:632:810 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:32:33:616:539 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:32:33:692:147 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-10-4 10:32:33:707:767 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q5 failed at: 2023-10-4 10:32:34:210:892 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/snapshot/wat_dda_read_write_skew1_c1.txt b/test_result/centralizend_result/yugabyte/snapshot/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..86bfe11a --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,44 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:32:37:491:249 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:32:37:492:494 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-10-4 10:32:37:522:539 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:32:38:491:248 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:32:38:607:831 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-10-4 10:32:38:625:470 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-10-4 10:32:38:628:342 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 +Q6 failed at: 2023-10-4 10:32:40:104:594 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/snapshot/wat_dda_read_write_skew1_c2.txt b/test_result/centralizend_result/yugabyte/snapshot/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..53be84f1 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,46 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:32:43:157:114 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:32:43:158:420 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2023-10-4 10:32:43:187:919 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:32:44:157:100 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:32:44:276:427 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-10-4 10:32:44:294:901 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2023-10-4 10:32:44:297:946 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2023-10-4 10:32:45:162:869 + Q7-T2 execute opt: 'COMMIT'; + Q7 failed reason: 错误: Heartbeat: Transaction 84c469ef-6e1e-457c-a845-7d3219ec1e2f expired or aborted by a conflict: 40001 errcode: 40001 + Q7 failed at: 2023-10-4 10:32:46:863:797 + +Test Result: Rollback +Err:错误: Heartbeat: Transaction 84c469ef-6e1e-457c-a845-7d3219ec1e2f expired or aborted by a conflict: 40001 + diff --git a/test_result/centralizend_result/yugabyte/snapshot/wat_dda_read_write_skew2_c1.txt b/test_result/centralizend_result/yugabyte/snapshot/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..90452384 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,44 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:32:49:894:316 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:32:49:895:541 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:32:49:932:65 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:32:50:894:376 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:32:51:26:657 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-10-4 10:32:51:40:931 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2023-10-4 10:32:51:45:934 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 failed reason: 错误: Heartbeat: Transaction bd441a52-2034-46c9-88c2-dc78fc51b42e expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction bd441a52-2034-46c9-88c2-dc78f errcode: 40001 +Q6 failed at: 2023-10-4 10:32:52:504:119 + +Test Result: Rollback +Reason: Err:错误: Heartbeat: Transaction bd441a52-2034-46c9-88c2-dc78fc51b42e expired or aborted by a conflict: 40001: . Errors from tablet servers: [Operation expired (yb/tablet/transaction_coordinator.cc:1706): Heartbeat: Transaction bd441a52-2034-46c9-88c2-dc78f + diff --git a/test_result/centralizend_result/yugabyte/snapshot/wat_dda_read_write_skew2_c2.txt b/test_result/centralizend_result/yugabyte/snapshot/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..0eecf637 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,42 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:32:55:713:867 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:32:55:715:216 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:32:55:752:266 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:32:56:713:798 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:32:56:841:795 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-10-4 10:32:56:854:739 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q5 failed at: 2023-10-4 10:32:57:358:33 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/snapshot/wat_dda_read_write_skew2_committed.txt b/test_result/centralizend_result/yugabyte/snapshot/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..814a7547 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: yugabyte #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:33:2:400:914 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:33:2:402:275 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:33:2:438:853 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:33:3:400:959 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:33:3:522:732 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2023-10-4 10:33:3:536:497 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q5 failed at: 2023-10-4 10:33:4:39:673 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/snapshot/wat_mda_step_wat_c1.txt b/test_result/centralizend_result/yugabyte/snapshot/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..72d3946e --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/wat_mda_step_wat_c1.txt @@ -0,0 +1,44 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_wat_c1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:33:7:376:118 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:33:7:377:316 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:33:7:413:228 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:33:8:376:157 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:33:8:522:903 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-10-4 10:33:8:539:789 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2023-10-4 10:33:8:542:955 + Q6-T3 execute opt: 'BEGIN;' + Q6 finished at: 2023-10-4 10:33:9:376:37 + Q6-T3 execute sql: 'BEGIN TRANSACTION;' + Q6 finished at: 2023-10-4 10:33:9:504:75 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2023-10-4 10:33:9:519:38 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' + Q8 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q8 failed at: 2023-10-4 10:33:10:321:676 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/snapshot/wat_mda_step_wat_c2.txt b/test_result/centralizend_result/yugabyte/snapshot/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..18424beb --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/wat_mda_step_wat_c2.txt @@ -0,0 +1,40 @@ +#### db_type: yugabyte #### +#### test_type: mda_step_wat_c2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:33:15:462:155 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:33:15:463:362 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:33:15:499:876 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:33:16:462:93 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:33:16:592:232 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2023-10-4 10:33:16:611:322 + Q5-T3 execute opt: 'BEGIN;' + Q5 finished at: 2023-10-4 10:33:17:462:173 + Q5-T3 execute sql: 'BEGIN TRANSACTION;' + Q5 finished at: 2023-10-4 10:33:17:579:818 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q6 failed at: 2023-10-4 10:33:19:71:59 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/snapshot/wat_sda_dirty_write_1abort.txt b/test_result/centralizend_result/yugabyte/snapshot/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..57ecca83 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,32 @@ +#### db_type: yugabyte #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:31:34:528:665 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:31:34:529:910 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:31:34:566:904 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:31:35:528:552 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:31:35:653:734 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q4 failed at: 2023-10-4 10:31:36:70:236 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/snapshot/wat_sda_dirty_write_2commit.txt b/test_result/centralizend_result/yugabyte/snapshot/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..5f1d14dd --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,32 @@ +#### db_type: yugabyte #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:31:40:228:293 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:31:40:229:566 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:31:40:266:416 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:31:41:228:276 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:31:41:334:770 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q4 failed at: 2023-10-4 10:31:41:751:241 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/snapshot/wat_sda_full_write.txt b/test_result/centralizend_result/yugabyte/snapshot/wat_sda_full_write.txt new file mode 100644 index 00000000..7d38e000 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/wat_sda_full_write.txt @@ -0,0 +1,32 @@ +#### db_type: yugabyte #### +#### test_type: sda_full_write #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:31:45:932:591 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:31:45:933:831 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:31:45:970:595 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:31:46:932:669 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:31:47:57:986 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q4 failed at: 2023-10-4 10:31:47:473:317 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/snapshot/wat_sda_full_write_committed.txt b/test_result/centralizend_result/yugabyte/snapshot/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..b0c1e71e --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/wat_sda_full_write_committed.txt @@ -0,0 +1,32 @@ +#### db_type: yugabyte #### +#### test_type: sda_full_write_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:31:51:794:365 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:31:51:795:540 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:31:51:832:267 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:31:52:794:368 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:31:52:871:52 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q4 failed at: 2023-10-4 10:31:53:284:471 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/snapshot/wat_sda_lost_self_update_committed.txt b/test_result/centralizend_result/yugabyte/snapshot/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..d2a200a9 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,32 @@ +#### db_type: yugabyte #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:32:10:107:964 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:32:10:109:192 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2023-10-4 10:32:10:124:851 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:32:11:107:792 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:32:11:205:647 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 + Q4 failed at: 2023-10-4 10:32:11:620:573 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/centralizend_result/yugabyte/snapshot/wat_sda_lost_update_c1.txt b/test_result/centralizend_result/yugabyte/snapshot/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..a750b3da --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/wat_sda_lost_update_c1.txt @@ -0,0 +1,45 @@ +#### db_type: yugabyte #### +#### test_type: sda_lost_update_c1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:31:56:764:956 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:31:56:766:105 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2023-10-4 10:31:56:795:937 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:31:57:764:891 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:31:57:895:814 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-10-4 10:31:57:915:932 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2023-10-4 10:31:58:772:805 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2023-10-4 10:31:58:776:172 + Q7-T2 execute opt: 'COMMIT'; + Q7 failed reason: 错误: Heartbeat: Transaction 0dd95d51-ca46-4742-8d67-2af4dc58d293 expired or aborted by a conflict: 40001 errcode: 40001 + Q7 failed at: 2023-10-4 10:32:0:471:688 + +Test Result: Rollback +Err:错误: Heartbeat: Transaction 0dd95d51-ca46-4742-8d67-2af4dc58d293 expired or aborted by a conflict: 40001 + diff --git a/test_result/centralizend_result/yugabyte/snapshot/wat_sda_lost_update_c2.txt b/test_result/centralizend_result/yugabyte/snapshot/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..9205dd44 --- /dev/null +++ b/test_result/centralizend_result/yugabyte/snapshot/wat_sda_lost_update_c2.txt @@ -0,0 +1,41 @@ +#### db_type: yugabyte #### +#### test_type: sda_lost_update_c2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = snapshot for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 (k,v) VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN;' +Q1 finished at: 2023-10-4 10:32:3:206:789 +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2023-10-4 10:32:3:207:972 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2023-10-4 10:32:3:238:284 + Q3-T2 execute opt: 'BEGIN;' + Q3 finished at: 2023-10-4 10:32:4:206:840 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2023-10-4 10:32:4:311:446 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2023-10-4 10:32:4:327:857 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 failed reason: 错误: 由于同步更新而无法串行访问 errcode: 40001 +Q5 failed at: 2023-10-4 10:32:5:713:739 + +Test Result: Rollback +Reason: Err:错误: 由于同步更新而无法串行访问 + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/result_summary/serializable_total-result.txt b/test_result/distributed_result/crdb_test/crdb_dist/result_summary/serializable_total-result.txt new file mode 100644 index 00000000..af5c58de --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/result_summary/serializable_total-result.txt @@ -0,0 +1,107 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Avoid + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Avoid + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Avoid + +rat_mda_step_rat_predicate_based_insert: Avoid + +wat_sda_dirty_write_1abort: Timeout + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Rollback + +iat_dda_write_skew_predicate_based-intersecting_data: Avoid + +iat_dda_write_skew_predicate_based-overdraft_protection: Rollback + +iat_dda_write_skew_committed: Rollback + +iat_mda_step_iat: Rollback + +iat_mda_step_iat_predicate_based_delete: Rollback + +iat_mda_step_iat_predicate_based_insert: Rollback + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Rollback diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_dda_read_skew_committed.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..2410e404 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_dda_read_skew_committed.txt @@ -0,0 +1,75 @@ +#### db_type: crdb #### +#### test_type: dda_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:36:26:203:890 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-11 0:36:26:922:251 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:36:27:203:961 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-11 0:36:27:267:657 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-11 0:36:27:331:236 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-11 0:36:27:395:316 +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q7 finished at: 2022-4-11 0:36:28:857:273 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-11 0:36:28:915:31 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-11 0:36:38:201:272 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-11 0:36:38:888:167 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-11 0:36:39:685:667 + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-11 0:36:39:743:568 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..17202cb7 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,43 @@ +#### db_type: crdb #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:36:44:617:572 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-11 0:36:45:324:834 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:36:45:620:156 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-11 0:36:45:684:269 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-11 0:36:45:748:124 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-11 0:36:45:811:124 +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_write_too_old: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_W errcode: HY000 +Q7 failed at: 2022-4-11 0:36:47:324:860 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_write_too_old: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_W + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_dda_write_skew.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_dda_write_skew.txt new file mode 100644 index 00000000..23f7b920 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_dda_write_skew.txt @@ -0,0 +1,50 @@ +#### db_type: crdb #### +#### test_type: dda_write_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:37:1:529:759 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-11 0:37:2:236:706 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:37:2:535:373 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-11 0:37:3:309:651 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-11 0:37:3:374:792 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-4-11 0:37:3:536:355 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE errcode: HY000 +Q7 failed at: 2022-4-11 0:37:4:299:120 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_dda_write_skew_committed.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..016328cf --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_dda_write_skew_committed.txt @@ -0,0 +1,52 @@ +#### db_type: crdb #### +#### test_type: dda_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-13 14:44:9:858:657 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-13 14:44:10:523:515 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-13 14:44:14:864:101 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-13 14:44:15:509:851 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-13 14:44:15:565:930 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-13 14:44:15:618:832 +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-4-13 14:44:19:863:24 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE errcode: HY000 +Q8 failed at: 2022-4-13 14:44:20:725:7 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..36ab62dc --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,77 @@ +#### db_type: crdb #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:37:19:331:595 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-11 0:37:19:391:411 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-11 0:37:19:451:712 + Q4-T2 execute sql: 'BEGIN TRANSACTION;' + Q4 finished at: 2022-4-11 0:37:20:341:445 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-11 0:37:21:343:356 + current_result: + (330,) + *(1) expected_result: + (330,) + (2) expected_result: + (300,) + + Q5 finished at: 2022-4-11 0:37:21:347:330 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-11 0:37:21:401:151 + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-11 0:37:21:461:435 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-11 0:37:31:341:360 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-11 0:37:31:403:706 + Q11-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q11 finished at: 2022-4-11 0:37:31:465:385 + Q12-T3 execute sql: 'DROP TABLE mytab;' + Q12 finished at: 2022-4-11 0:37:31:532:686 + Q13-T3 execute sql: 'COMMIT TRANSACTION;' + Q13 finished at: 2022-4-11 0:37:31:680:174 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..c8b7c1d5 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,50 @@ +#### db_type: crdb #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:37:36:66:298 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-11 0:37:36:999:691 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:37:37:60:110 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-11 0:37:38:38:234 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' +Q7 finished at: 2022-4-11 0:37:38:66:948 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-11 0:37:38:363:474 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-11 0:37:38:419:723 +Q8 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE errcode: HY000 +Q8 failed at: 2022-4-11 0:37:38:924:428 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_mda_step_iat.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_mda_step_iat.txt new file mode 100644 index 00000000..50166211 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_mda_step_iat.txt @@ -0,0 +1,88 @@ +#### db_type: crdb #### +#### test_type: mda_step_iat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-13 14:45:54:623:580 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + (2,0,2,1) + (5) expected_result: + (2,0,2,1) + (6) expected_result: + (2,0,2,1) + +Q2 finished at: 2022-4-13 14:45:55:397:283 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-13 14:45:59:621:940 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,,3) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + + Q4 finished at: 2022-4-13 14:46:0:298:816 + Q5-T3 execute sql: 'BEGIN TRANSACTION;' + Q5 finished at: 2022-4-13 14:46:4:625:888 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-4-13 14:46:5:260:710 +Q7-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q7 finished at: 2022-4-13 14:46:9:629:210 + Q8-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q8 finished at: 2022-4-13 14:46:14:626:62 + Q9-T3 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q9 finished at: 2022-4-13 14:46:19:635:811 +Q10-T1 execute sql: 'COMMIT TRANSACTION;' +Q10 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE errcode: HY000 +Q10 failed at: 2022-4-13 14:46:25:638:495 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..5d59ff27 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,128 @@ +#### db_type: crdb #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:40:0:959:422 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + (3) expected_result: + (0,1,0,3) + (4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-11 0:40:1:651:966 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:40:1:961:748 + Q4-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q4 finished at: 2022-4-11 0:40:2:22:240 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-11 0:40:2:79:519 + Q6-T3 execute sql: 'BEGIN TRANSACTION;' + Q6 finished at: 2022-4-11 0:40:2:961:927 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,0) + + Q7 finished at: 2022-4-11 0:40:3:636:653 + Q8-T3 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q8 finished at: 2022-4-11 0:40:3:699:437 + Q9-T3 execute sql: 'COMMIT TRANSACTION;' + Q9 finished at: 2022-4-11 0:40:3:765:984 +Q10-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,0) + (5) expected_result: + (1,3,1,1) + (6) expected_result: + (1,3,1,1) + +Q10 finished at: 2022-4-11 0:40:4:902:26 +Q11-T1 execute sql: 'COMMIT TRANSACTION;' +Q11 finished at: 2022-4-11 0:40:4:960:318 + Q12-T4 execute sql: 'BEGIN TRANSACTION;' + Q12 finished at: 2022-4-11 0:40:13:963:330 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,3) + + Q13 finished at: 2022-4-11 0:40:15:203:270 + Q14-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q14 finished at: 2022-4-11 0:40:15:907:992 + Q15-T4 execute sql: 'COMMIT TRANSACTION;' + Q15 finished at: 2022-4-11 0:40:15:967:910 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..2049b939 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,245 @@ +#### db_type: crdb #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-13 14:44:37:691:800 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + *(5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,3) + (7) expected_result: + (0,1,0,3) + *(8) expected_result: + (0,1,0,0) + (9) expected_result: + (0,1,0,3) + (10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,0) + (12) expected_result: + (0,1,0,3) + (13) expected_result: + (0,1,0,3) + (14) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-13 14:44:38:310:514 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-13 14:44:42:688:796 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + *(7) expected_result: + (1,3,1,0) + (8) expected_result: + (1,3,1,1) + *(9) expected_result: + (1,3,1,0) + (10) expected_result: + (1,3,1,1) + (11) expected_result: + (1,3,1,1) + (12) expected_result: + (1,3,1,1) + (13) expected_result: + (1,3,1,1) + *(14) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-13 14:44:43:336:732 + Q5-T3 execute sql: 'BEGIN TRANSACTION;' + Q5 finished at: 2022-4-13 14:44:47:694:692 + Q6-T3 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q6 finished at: 2022-4-13 14:44:47:753:904 + Q7-T3 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-13 14:44:47:810:406 + Q8-T4 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-13 14:44:52:686:253 + Q9-T4 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q9 finished at: 2022-4-13 14:44:52:743:987 + Q10-T4 execute sql: 'COMMIT TRANSACTION;' + Q10 finished at: 2022-4-13 14:44:52:794:342 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + (3) expected_result: + (0,1,0,3) + (4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,0) + *(6) expected_result: + (0,1,0,0) + *(7) expected_result: + (0,1,0,0) + *(8) expected_result: + (0,1,0,0) + (9) expected_result: + (0,1,0,3) + (10) expected_result: + (0,1,0,3) + (11) expected_result: + (0,1,0,3) + *(12) expected_result: + (0,1,0,0) + (13) expected_result: + (0,1,0,3) + (14) expected_result: + (0,1,0,3) + + Q11 finished at: 2022-4-13 14:44:58:320:197 + Q12-T2 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-13 14:44:58:370:605 +Q13-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,0) + *(4) expected_result: + (1,3,1,0) + (5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,0) + (7) expected_result: + (1,3,1,1) + (8) expected_result: + (1,3,1,1) + *(9) expected_result: + (1,3,1,0) + (10) expected_result: + (1,3,1,1) + (11) expected_result: + (1,3,1,1) + (12) expected_result: + (1,3,1,1) + *(13) expected_result: + (1,3,1,0) + (14) expected_result: + (1,3,1,1) + +Q13 finished at: 2022-4-13 14:45:3:267:17 +Q14-T1 execute sql: 'COMMIT TRANSACTION;' +Q14 finished at: 2022-4-13 14:45:3:316:265 + Q15-T5 execute sql: 'BEGIN TRANSACTION;' + Q15 finished at: 2022-4-13 14:45:7:689:392 + Q16-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,3) + *(7) expected_result: + (0,1,0,3) + *(8) expected_result: + (0,1,0,3) + *(9) expected_result: + (0,1,0,3) + *(10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,3) + *(12) expected_result: + (0,1,0,3) + *(13) expected_result: + (0,1,0,3) + *(14) expected_result: + (0,1,0,3) + + Q16 finished at: 2022-4-13 14:45:8:418:998 + Q17-T5 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + *(7) expected_result: + (1,3,1,1) + *(8) expected_result: + (1,3,1,1) + *(9) expected_result: + (1,3,1,1) + *(10) expected_result: + (1,3,1,1) + *(11) expected_result: + (1,3,1,1) + *(12) expected_result: + (1,3,1,1) + *(13) expected_result: + (1,3,1,1) + *(14) expected_result: + (1,3,1,1) + + Q17 finished at: 2022-4-13 14:45:9:76:482 + Q18-T5 execute sql: 'COMMIT TRANSACTION;' + Q18 finished at: 2022-4-13 14:45:9:125:854 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..32e5f921 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,92 @@ +#### db_type: crdb #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:38:33:306:179 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-11 0:38:34:47:850 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:38:34:308:824 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + null + *(6) expected_result: + (0,1,0,0) + + Q4 finished at: 2022-4-11 0:38:35:188:491 + Q5-T3 execute sql: 'BEGIN TRANSACTION;' + Q5 finished at: 2022-4-11 0:38:35:301:986 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + null + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + null + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-4-11 0:38:36:42:449 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE value1=0;' +Q7 finished at: 2022-4-11 0:38:36:576:295 + Q8-T2 execute sql: 'DELETE FROM t2 WHERE value1=1;' + Q8 finished at: 2022-4-11 0:38:37:312:170 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE value1=2;' +Q10-T1 execute sql: 'COMMIT TRANSACTION;' +Q10 finished at: 2022-4-11 0:38:39:311:98 + Q9 finished at: 2022-4-11 0:38:39:319:241 + Q11-T2 execute sql: 'COMMIT TRANSACTION;' + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q11 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE errcode: HY000 + Q11 failed at: 2022-4-11 0:38:41:414:690 + Q12 finished at: 2022-4-11 0:38:41:577:581 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..3c96efda --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,89 @@ +#### db_type: crdb #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:38:56:464:222 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,0,2,0) + (5) expected_result: + (2,0,2,0) + (6) expected_result: + (2,0,2,0) + +Q2 finished at: 2022-4-11 0:38:57:194:95 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:38:57:458:728 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + null + (1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,0) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1,0,0) + *(6) expected_result: + null + + Q4 finished at: 2022-4-11 0:38:58:137:833 + Q5-T3 execute sql: 'BEGIN TRANSACTION;' + Q5 finished at: 2022-4-11 0:38:58:459:275 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' + current_result: + null + (1) expected_result: + (1,3,1,0) + *(2) expected_result: + null + (3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,0) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-11 0:38:59:417:241 +Q7 finished at: 2022-4-11 0:38:59:465:998 + Q8-T2 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + Q8 finished at: 2022-4-11 0:39:0:460:236 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + Q9 finished at: 2022-4-11 0:39:1:465:176 +Q10-T1 execute sql: 'COMMIT TRANSACTION;' +Q10 finished at: 2022-4-11 0:39:2:469:918 + Q11-T2 execute sql: 'COMMIT TRANSACTION;' + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q11 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE errcode: HY000 + Q11 failed at: 2022-4-11 0:39:4:573:15 + Q12 finished at: 2022-4-11 0:39:4:644:557 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..7526ba89 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,123 @@ +#### db_type: crdb #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-13 14:45:21:712:81 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + *(5) expected_result: + (0,1,0,0) + *(6) expected_result: + (0,1,0,0) + +Q2 finished at: 2022-4-13 14:45:22:380:988 +Q3-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + +Q3 finished at: 2022-4-13 14:45:23:35:581 + Q4-T2 execute sql: 'BEGIN TRANSACTION;' + Q4 finished at: 2022-4-13 14:45:26:713:838 + Q5-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,0) + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q5 finished at: 2022-4-13 14:45:27:363:840 + Q6-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q6 finished at: 2022-4-13 14:45:27:417:996 + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-13 14:45:27:471:30 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-13 14:45:31:726:955 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + (4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,0) + *(6) expected_result: + (0,1,0,0) + + Q9 finished at: 2022-4-13 14:45:32:347:447 + Q10-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + (2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + (5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,0) + + Q10 finished at: 2022-4-13 14:45:33:35:269 + Q11-T3 execute sql: 'COMMIT TRANSACTION;' + Q11 finished at: 2022-4-13 14:45:33:89:804 +Q12-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q12 finished at: 2022-4-13 14:45:36:716:196 +Q13-T1 execute sql: 'COMMIT TRANSACTION;' +Q13 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE errcode: HY000 +Q13 failed at: 2022-4-13 14:45:38:72:419 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..b5a51c77 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,184 @@ +#### db_type: crdb #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 1:4:30:562:799 +Q2-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,2) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + +Q2 finished at: 2022-4-11 1:4:31:279:356 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 1:4:31:552:630 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,2) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + (0,1,0,2) + (6) expected_result: + (0,1,0,2) + + Q4 finished at: 2022-4-11 1:4:32:229:873 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-11 1:4:32:287:496 + Q6-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-11 1:4:32:548:424 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,0) + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-4-11 1:4:33:328:709 + Q7-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q7 finished at: 2022-4-11 1:4:33:389:999 + Q8-T2 execute sql: 'COMMIT TRANSACTION;' + Q8 finished at: 2022-4-11 1:4:33:453:639 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + *(4) expected_result: + (2,0,2,0) + *(5) expected_result: + (2,0,2,0) + *(6) expected_result: + (2,0,2,0) + + Q10 finished at: 2022-4-11 1:4:34:107:784 + Q11-T3 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q11 finished at: 2022-4-11 1:4:34:164:395 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + (2,0,2,2) + (5) expected_result: + (2,0,2,1) + (6) expected_result: + (2,0,2,1) + +Q15 finished at: 2022-4-11 1:4:34:170:607 +Q16-T1 execute sql: 'COMMIT TRANSACTION;' +Q16 finished at: 2022-4-11 1:4:34:234:390 + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,0) + + Q12 finished at: 2022-4-11 1:4:34:812:614 + Q13-T3 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q13 finished at: 2022-4-11 1:4:34:864:352 + Q14-T3 execute sql: 'COMMIT TRANSACTION;' + Q14 finished at: 2022-4-11 1:4:34:915:353 + Q17-T4 execute sql: 'BEGIN TRANSACTION;' + Q17 finished at: 2022-4-11 1:4:43:560:977 + Q18-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,2) (2,0,2,1) + *(1) expected_result: + (0,1,0,2) (2,0,2,1) + *(2) expected_result: + (0,1,0,2) (2,0,2,1) + *(3) expected_result: + (0,1,0,2) (2,0,2,1) + *(4) expected_result: + (0,1,0,2) (2,0,2,1) + *(5) expected_result: + (0,1,0,2) (2,0,2,1) + *(6) expected_result: + (0,1,0,2) (2,0,2,1) + + Q18 finished at: 2022-4-11 1:4:44:516:50 + Q19-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q19 finished at: 2022-4-11 1:4:45:200:297 + Q20-T4 execute sql: 'COMMIT TRANSACTION;' + Q20 finished at: 2022-4-11 1:4:45:260:365 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_sda_lost_update_committed.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..8dfb100f --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_sda_lost_update_committed.txt @@ -0,0 +1,38 @@ +#### db_type: crdb #### +#### test_type: sda_lost_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-13 14:46:52:210:42 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-13 14:46:52:872:832 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-13 14:46:57:210:908 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-13 14:46:57:264:718 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-13 14:46:57:317:347 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649832412.183854643,0 t errcode: HY000 +Q6 failed at: 2022-4-13 14:47:2:822:108 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649832412.183854643,0 t + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..d379608a --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,61 @@ +#### db_type: crdb #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:35:51:539:255 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 0:35:52:205:81 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:35:52:275:179 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-11 0:35:52:332:963 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-11 0:35:52:389:428 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-11 0:35:53:901:791 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-11 0:35:53:952:885 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-11 0:36:3:277:907 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-11 0:36:4:553:212 + Q10-T3 execute sql: 'COMMIT TRANSACTION;' + Q10 finished at: 2022-4-11 0:36:4:613:927 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_double_write_skew1.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..9317a999 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_double_write_skew1.txt @@ -0,0 +1,34 @@ +#### db_type: crdb #### +#### test_type: dda_double_write_skew1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:23:41:336:651 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-11 0:23:41:389:392 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:23:42:345:813 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-11 0:23:42:404:637 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' +Q6 finished at: 2022-4-11 0:23:43:406:560 + Q5 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA errcode: HY000 + Q5 failed at: 2022-4-11 0:23:44:515:518 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..81e88f72 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,36 @@ +#### db_type: crdb #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:24:0:218:7 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-11 0:24:0:278:449 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:24:1:217:865 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-11 0:24:1:278:157 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' +Q7 finished at: 2022-4-11 0:24:2:273:31 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-11 0:24:2:334:9 + Q5 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA errcode: HY000 + Q5 failed at: 2022-4-11 0:24:4:98:640 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_double_write_skew2.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..33a50693 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_double_write_skew2.txt @@ -0,0 +1,68 @@ +#### db_type: crdb #### +#### test_type: dda_double_write_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:24:17:135:564 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-11 0:24:17:188:202 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:24:18:143:523 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-11 0:24:18:204:658 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q6 finished at: 2022-4-11 0:24:19:808:3 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-11 0:24:19:867:841 + Q5 finished at: 2022-4-11 0:24:19:876:733 + Q8-T2 execute sql: 'COMMIT TRANSACTION;' + Q8 finished at: 2022-4-11 0:24:20:146:705 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-11 0:24:30:149:717 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,2) + *(1) expected_result: + (0,1,0,2) + *(2) expected_result: + (0,1,0,2) + + Q10 finished at: 2022-4-11 0:24:30:894:441 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-11 0:24:31:581:984 + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-11 0:24:31:645:315 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_read_skew.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_read_skew.txt new file mode 100644 index 00000000..512c1ec4 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_read_skew.txt @@ -0,0 +1,75 @@ +#### db_type: crdb #### +#### test_type: dda_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:24:36:242:119 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-11 0:24:36:926:576 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:24:37:250:386 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-11 0:24:37:574:9 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-11 0:24:37:635:103 +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q6 finished at: 2022-4-11 0:24:38:922:993 + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-11 0:24:39:248:845 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-11 0:24:40:250:227 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-11 0:24:50:255:38 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-11 0:24:50:973:240 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-11 0:24:51:708:150 + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-11 0:24:51:771:348 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_read_skew2.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_read_skew2.txt new file mode 100644 index 00000000..ea6834d6 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_read_skew2.txt @@ -0,0 +1,75 @@ +#### db_type: crdb #### +#### test_type: dda_read_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-13 11:31:45:309:13 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-13 11:31:45:363:655 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-13 11:31:55:316:700 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-13 11:31:55:975:995 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-4-13 11:32:5:312:942 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-13 11:32:5:368:597 + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-4-13 11:32:6:5:528 + Q8-T2 execute sql: 'COMMIT TRANSACTION;' + Q8 finished at: 2022-4-13 11:32:15:311:121 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-13 11:32:25:315:346 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-13 11:32:26:11:947 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-13 11:32:26:645:924 + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-13 11:32:26:696:277 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..a7737eaf --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_read_skew2_committed.txt @@ -0,0 +1,75 @@ +#### db_type: crdb #### +#### test_type: dda_read_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-13 11:30:26:235:807 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-13 11:30:26:290:607 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-13 11:30:36:236:16 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-13 11:30:36:893:813 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-4-13 11:30:46:244:942 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-13 11:30:46:297:395 + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-4-13 11:30:46:905:362 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-13 11:30:46:954:509 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-13 11:30:56:236:151 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-13 11:30:56:853:44 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-13 11:30:57:495:301 + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-13 11:30:57:544:933 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..1f40d2ca --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,75 @@ +#### db_type: crdb #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:53:13:888:75 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value2=0;' + current_result: + (0,1,0,0) + (1) expected_result: + null + *(2) expected_result: + (0,1,0,0) + +Q2 finished at: 2022-4-11 0:53:14:551:933 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:53:14:611:317 + Q4-T2 execute sql: 'DELETE FROM t2 WHERE value1=1;' + Q4 finished at: 2022-4-11 0:53:14:674:204 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE value1=0;' + Q5 finished at: 2022-4-11 0:53:14:735:113 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-11 0:53:14:795:75 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE value2=0;' + current_result: + (0,1,0,0) + (1) expected_result: + null + *(2) expected_result: + (0,1,0,0) + +Q7 finished at: 2022-4-11 0:53:16:239:234 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-11 0:53:16:303:77 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-11 0:53:25:601:652 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q10 finished at: 2022-4-11 0:53:26:321:270 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q11 finished at: 2022-4-11 0:53:27:36:812 + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-11 0:53:27:90:523 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..4541d615 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,62 @@ +#### db_type: crdb #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:25:14:93:27 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-11 0:25:14:826:643 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:25:15:93:555 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-11 0:25:15:153:722 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-11 0:25:15:212:973 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-11 0:25:15:273:459 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-11 0:25:17:24:741 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-11 0:25:17:79:801 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-11 0:25:26:96:474 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q10 finished at: 2022-4-11 0:25:26:779:803 + Q11-T3 execute sql: 'COMMIT TRANSACTION;' + Q11 finished at: 2022-4-11 0:25:26:842:15 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_write_read_skew.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..5f630d4c --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_write_read_skew.txt @@ -0,0 +1,75 @@ +#### db_type: crdb #### +#### test_type: dda_write_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:23:2:342:542 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-11 0:23:2:399:840 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:23:3:350:35 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-11 0:23:3:411:498 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1; ' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q6 finished at: 2022-4-11 0:23:5:266:568 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-11 0:23:6:366:102 + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-4-11 0:23:6:998:634 + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-11 0:23:7:51:731 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-11 0:23:16:346:876 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-11 0:23:17:144:896 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-11 0:23:18:129:181 + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-11 0:23:18:188:752 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..8a5c4042 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,75 @@ +#### db_type: crdb #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:23:23:31:244 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-11 0:23:23:123:11 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:23:24:31:850 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-11 0:23:24:84:242 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q7 finished at: 2022-4-11 0:23:25:662:872 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-11 0:23:25:726:630 + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-4-11 0:23:26:492:863 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-11 0:23:26:550:382 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-11 0:23:35:37:328 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-11 0:23:35:751:772 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-11 0:23:36:713:180 + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-11 0:23:36:774:914 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_mda_step_rat.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_mda_step_rat.txt new file mode 100644 index 00000000..313c6151 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_mda_step_rat.txt @@ -0,0 +1,131 @@ +#### db_type: crdb #### +#### test_type: mda_step_rat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:26:6:950:808 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-11 0:26:7:5:934 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:26:7:958:482 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-11 0:26:8:24:756 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + Q6-T3 execute sql: 'BEGIN TRANSACTION;' + Q6 finished at: 2022-4-11 0:26:8:958:201 + Q7-T3 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + (2,0,2,1) + (5) expected_result: + (2,0,2,1) + (6) expected_result: + (2,0,2,1) + +Q9 finished at: 2022-4-11 0:26:10:585:53 +Q10-T1 execute sql: 'COMMIT TRANSACTION;' +Q10 finished at: 2022-4-11 0:26:10:645:925 + Q7 finished at: 2022-4-11 0:26:10:652:455 + Q8-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + (3) expected_result: + (0,1,0,0) + (4) expected_result: + (0,1,0,0) + *(5) expected_result: + (0,1,0,3) + (6) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-4-11 0:26:11:519:440 + Q11-T2 execute sql: 'COMMIT TRANSACTION;' + Q11 finished at: 2022-4-11 0:26:11:580:534 + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + (2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + (5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,0) + + Q8 finished at: 2022-4-11 0:26:12:205:369 + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-11 0:26:12:264:995 + Q13-T4 execute sql: 'BEGIN TRANSACTION;' + Q13 finished at: 2022-4-11 0:26:21:953:291 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) (2,0,2,1) + *(1) expected_result: + (0,1,0,3) (2,0,2,1) + *(2) expected_result: + (0,1,0,3) (2,0,2,1) + *(3) expected_result: + (0,1,0,3) (2,0,2,1) + *(4) expected_result: + (0,1,0,3) (2,0,2,1) + *(5) expected_result: + (0,1,0,3) (2,0,2,1) + *(6) expected_result: + (0,1,0,3) (2,0,2,1) + + Q14 finished at: 2022-4-11 0:26:22:777:690 + Q15-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q15 finished at: 2022-4-11 0:26:23:469:758 + Q16-T4 execute sql: 'COMMIT TRANSACTION;' + Q16 finished at: 2022-4-11 0:26:23:527:604 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..dcac0b75 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,245 @@ +#### db_type: crdb #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN TRANSACTION;' + Q1 finished at: 2022-4-11 0:26:28:93:96 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + (4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + (7) expected_result: + (0,1,0,3) + (8) expected_result: + (0,1,0,3) + *(9) expected_result: + (0,1,0,0) + (10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,0) + (12) expected_result: + (0,1,0,3) + *(13) expected_result: + (0,1,0,0) + *(14) expected_result: + (0,1,0,0) + + Q2 finished at: 2022-4-11 0:26:28:810:50 +Q3-T1 execute sql: 'BEGIN TRANSACTION;' +Q3 finished at: 2022-4-11 0:26:29:88:12 +Q4-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q4 finished at: 2022-4-11 0:26:29:141:174 + Q5-T3 execute sql: 'BEGIN TRANSACTION;' + Q5 finished at: 2022-4-11 0:26:30:93:321 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + (7) expected_result: + (1,3,1,1) + *(8) expected_result: + (1,3,1,0) + (9) expected_result: + (1,3,1,1) + (10) expected_result: + (1,3,1,1) + *(11) expected_result: + (1,3,1,0) + *(12) expected_result: + (1,3,1,0) + *(13) expected_result: + (1,3,1,0) + (14) expected_result: + (1,3,1,1) + + Q6 finished at: 2022-4-11 0:26:30:820:568 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + Q8-T2 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-11 0:26:31:101:492 + Q9-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q9 finished at: 2022-4-11 0:26:31:168:35 + Q10-T4 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + *(7) expected_result: + (1,3,1,0) + (8) expected_result: + (1,3,1,1) + (9) expected_result: + (1,3,1,1) + (10) expected_result: + (1,3,1,1) + (11) expected_result: + (1,3,1,1) + *(12) expected_result: + (1,3,1,0) + *(13) expected_result: + (1,3,1,0) + *(14) expected_result: + (1,3,1,0) + + Q10 finished at: 2022-4-11 0:26:32:949:584 +Q11-T1 execute sql: 'COMMIT TRANSACTION;' +Q11 finished at: 2022-4-11 0:26:33:98:350 + current_result: + (0,1,0,3) + (1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + (6) expected_result: + (0,1,0,0) + *(7) expected_result: + (0,1,0,3) + *(8) expected_result: + (0,1,0,3) + *(9) expected_result: + (0,1,0,3) + (10) expected_result: + (0,1,0,0) + (11) expected_result: + (0,1,0,0) + (12) expected_result: + (0,1,0,0) + *(13) expected_result: + (0,1,0,3) + *(14) expected_result: + (0,1,0,3) + + Q7 finished at: 2022-4-11 0:26:33:765:995 + Q12-T2 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-11 0:26:34:99:219 + Q13-T3 execute sql: 'COMMIT TRANSACTION;' + Q13 finished at: 2022-4-11 0:26:35:101:650 + Q14-T4 execute sql: 'COMMIT TRANSACTION;' + Q14 finished at: 2022-4-11 0:26:36:98:767 + Q15-T5 execute sql: 'BEGIN TRANSACTION;' + Q15 finished at: 2022-4-11 0:26:46:98:658 + Q16-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,3) + *(7) expected_result: + (0,1,0,3) + *(8) expected_result: + (0,1,0,3) + *(9) expected_result: + (0,1,0,3) + *(10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,3) + *(12) expected_result: + (0,1,0,3) + *(13) expected_result: + (0,1,0,3) + *(14) expected_result: + (0,1,0,3) + + Q16 finished at: 2022-4-11 0:26:47:299:352 + Q17-T5 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + *(7) expected_result: + (1,3,1,1) + *(8) expected_result: + (1,3,1,1) + *(9) expected_result: + (1,3,1,1) + *(10) expected_result: + (1,3,1,1) + *(11) expected_result: + (1,3,1,1) + *(12) expected_result: + (1,3,1,1) + *(13) expected_result: + (1,3,1,1) + *(14) expected_result: + (1,3,1,1) + + Q17 finished at: 2022-4-11 0:26:47:963:256 + Q18-T5 execute sql: 'COMMIT TRANSACTION;' + Q18 finished at: 2022-4-11 0:26:48:109:915 + +The current result is consistent with the [(13) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..ce98c643 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,112 @@ +#### db_type: crdb #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:26:52:557:816 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-11 0:26:52:634:185 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:26:53:835:600 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-11 0:26:53:903:408 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute sql: 'BEGIN TRANSACTION;' + Q6 finished at: 2022-4-11 0:26:54:563:265 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-11 0:26:54:629:465 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-11 0:26:55:561:904 +Q10-T1 execute sql: 'COMMIT TRANSACTION;' +Q10 finished at: 2022-4-11 0:26:55:622:208 + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-11 0:26:55:634:334 + Q11-T2 execute sql: 'COMMIT TRANSACTION;' + Q11 finished at: 2022-4-11 0:26:56:561:806 + current_result: + (,) + *(1) expected_result: + (,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q8 finished at: 2022-4-11 0:26:56:566:668 + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-11 0:26:57:566:536 + Q13-T4 execute sql: 'BEGIN TRANSACTION;' + Q13 finished at: 2022-4-11 0:27:7:558:508 + Q14-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q14 finished at: 2022-4-11 0:27:8:560:456 + Q15-T4 execute sql: 'COMMIT TRANSACTION;' + Q15 finished at: 2022-4-11 0:27:8:618:290 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..e7680903 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,109 @@ +#### db_type: crdb #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:27:12:873:412 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-11 0:27:12:940:973 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:27:13:880:441 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-11 0:27:13:945:534 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute sql: 'BEGIN TRANSACTION;' + Q6 finished at: 2022-4-11 0:27:14:866:3 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-11 0:27:14:920:25 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-11 0:27:15:876:359 +Q10-T1 execute sql: 'COMMIT TRANSACTION;' +Q10 finished at: 2022-4-11 0:27:15:936:178 + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-11 0:27:15:949:258 + Q11-T2 execute sql: 'COMMIT TRANSACTION;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + (4) expected_result: + (,) + *(5) expected_result: + (1,) + (6) expected_result: + (,) + + Q8 finished at: 2022-4-11 0:27:16:886:473 + Q11 finished at: 2022-4-11 0:27:17:155:576 + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-11 0:27:17:875:971 + Q13-T4 execute sql: 'BEGIN TRANSACTION;' + Q13 finished at: 2022-4-11 0:27:28:142:514 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q14 finished at: 2022-4-11 0:27:29:435:488 + Q15-T4 execute sql: 'COMMIT TRANSACTION;' + Q15 finished at: 2022-4-11 0:27:29:533:501 + +The current result is consistent with the [(5) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_sda_dirty_read.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_sda_dirty_read.txt new file mode 100644 index 00000000..bba31edc --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_sda_dirty_read.txt @@ -0,0 +1,48 @@ +#### db_type: crdb #### +#### test_type: sda_dirty_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:20:48:270:975 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 0:20:48:326:205 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:20:49:278:82 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-11 0:20:50:282:269 + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-11 0:20:59:5:514 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-11 0:20:59:59:863 + Q7-T3 execute sql: 'BEGIN TRANSACTION;' + Q7 finished at: 2022-4-11 0:21:1:272:675 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q8 finished at: 2022-4-11 0:21:9:88:63 + Q9-T3 execute sql: 'COMMIT TRANSACTION;' + Q9 finished at: 2022-4-11 0:21:9:417:80 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_sda_intermediate_read.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..44110c89 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_sda_intermediate_read.txt @@ -0,0 +1,54 @@ +#### db_type: crdb #### +#### test_type: sda_intermediate_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:21:32:495:361 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 0:21:32:548:499 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:21:33:767:527 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-11 0:21:34:506:786 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-11 0:21:36:515:359 + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-11 0:21:37:189:652 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-11 0:21:37:248:833 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-11 0:21:46:508:806 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q9 finished at: 2022-4-11 0:21:47:231:810 + Q10-T3 execute sql: 'COMMIT TRANSACTION;' + Q10 finished at: 2022-4-11 0:21:47:294:186 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..399cdd11 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,54 @@ +#### db_type: crdb #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:21:51:618:577 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 0:21:51:680:321 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:21:52:620:459 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-11 0:21:53:612:546 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-11 0:21:53:667:920 + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-11 0:21:54:331:694 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-11 0:21:54:394:872 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-11 0:22:3:615:511 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q9 finished at: 2022-4-11 0:22:4:613:548 + Q10-T3 execute sql: 'COMMIT TRANSACTION;' + Q10 finished at: 2022-4-11 0:22:4:668:432 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_sda_lost_self_update.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..5ca8554d --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_sda_lost_self_update.txt @@ -0,0 +1,54 @@ +#### db_type: crdb #### +#### test_type: sda_lost_self_update #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:22:43:701:99 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 0:22:43:761:443 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:22:44:703:170 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-11 0:22:47:932:877 +Q6-T1 execute sql: 'COMMIT TRANSACTION;' +Q6 finished at: 2022-4-11 0:22:47:986:155 + Q4 finished at: 2022-4-11 0:22:48:1:541 + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-11 0:22:48:62:911 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-11 0:22:56:700:495 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q9 finished at: 2022-4-11 0:22:57:706:484 + Q10-T3 execute sql: 'COMMIT TRANSACTION;' + Q10 finished at: 2022-4-11 0:22:57:769:481 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..168b91c5 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_sda_non_repeatable_read.txt @@ -0,0 +1,61 @@ +#### db_type: crdb #### +#### test_type: sda_non_repeatable_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-13 14:47:19:796:350 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-13 14:47:20:442:636 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-13 14:47:24:797:347 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-13 14:47:24:851:499 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-13 14:47:30:440:779 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-13 14:47:34:803:772 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-13 14:47:39:796:692 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-13 14:47:44:804:568 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-13 14:47:45:498:389 + Q10-T3 execute sql: 'COMMIT TRANSACTION;' + Q10 finished at: 2022-4-13 14:47:45:557:789 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..091a1480 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,61 @@ +#### db_type: crdb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:22:8:997:980 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-11 0:22:9:929:554 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:22:10:262:111 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-11 0:22:10:325:595 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-11 0:22:10:395:495 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-11 0:22:12:615:962 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-11 0:22:12:672:994 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-11 0:22:20:994:781 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q9 finished at: 2022-4-11 0:22:21:991:882 + Q10-T3 execute sql: 'COMMIT TRANSACTION;' + Q10 finished at: 2022-4-11 0:22:22:55:381 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..52fc86e0 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,60 @@ +#### db_type: crdb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:22:26:567:430 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-11 0:22:27:283:384 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:22:27:566:956 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-11 0:22:27:627:332 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-11 0:22:27:688:15 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-11 0:22:29:216:396 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-11 0:22:29:265:760 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-11 0:22:38:563:850 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q9 finished at: 2022-4-11 0:22:39:318:374 + Q10-T3 execute sql: 'COMMIT TRANSACTION;' + Q10 finished at: 2022-4-11 0:22:39:374:393 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..3f7482dd --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,68 @@ +#### db_type: crdb #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:31:12:54:331 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-11 0:31:12:112:680 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:31:13:53:56 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-11 0:31:13:107:457 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q7 finished at: 2022-4-11 0:31:14:728:114 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-11 0:31:14:789:218 + Q5 finished at: 2022-4-11 0:31:14:799:674 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-11 0:31:14:862:280 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-11 0:31:24:61:589 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,2) + *(1) expected_result: + (0,1,0,2) + (2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-11 0:31:25:779:222 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-11 0:31:26:443:694 + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-11 0:31:26:503:668 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..0a88ef14 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,34 @@ +#### db_type: crdb #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:31:31:87:477 +Q2-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q2 finished at: 2022-4-11 0:31:31:143:529 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:31:32:82:34 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-11 0:31:32:136:704 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q5 finished at: 2022-4-11 0:31:33:156:372 +Q6 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA errcode: HY000 +Q6 failed at: 2022-4-11 0:31:33:748:878 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..7a0c0f91 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,34 @@ +#### db_type: crdb #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:31:48:920:389 +Q2-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q2 finished at: 2022-4-11 0:31:48:975:501 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:31:49:927:209 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-11 0:31:49:989:62 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-4-11 0:31:50:984:890 + Q5 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA errcode: HY000 + Q5 failed at: 2022-4-11 0:31:51:479:113 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..f1a01fa1 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,36 @@ +#### db_type: crdb #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:32:7:779:790 +Q2-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q2 finished at: 2022-4-11 0:32:7:834:129 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:32:8:787:448 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-11 0:32:8:848:318 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-4-11 0:32:9:844:826 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-11 0:32:9:899:510 + Q5 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA errcode: HY000 + Q5 failed at: 2022-4-11 0:32:10:337:529 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..ce323135 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,43 @@ +#### db_type: crdb #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:32:24:679:264 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-11 0:32:25:407:197 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:32:25:671:486 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-11 0:32:25:735:380 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-11 0:32:25:797:246 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q8-T2 execute sql: 'COMMIT TRANSACTION;' + Q8 finished at: 2022-4-11 0:32:27:681:264 +Q6 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_write_too_old: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_W errcode: HY000 +Q6 failed at: 2022-4-11 0:32:28:295:392 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_write_too_old: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_W + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..a0570940 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,43 @@ +#### db_type: crdb #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:32:42:561:224 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-11 0:32:43:272:75 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:32:43:570:309 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-11 0:32:43:625:548 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-11 0:32:43:680:27 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-11 0:32:45:575:177 +Q6 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_write_too_old: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_W errcode: HY000 +Q6 failed at: 2022-4-11 0:32:46:189:636 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_write_too_old: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_W + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..07a69147 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,43 @@ +#### db_type: crdb #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-13 11:33:19:639:637 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-13 11:33:19:695:232 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-13 11:33:29:636:693 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-13 11:33:30:339:943 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-4-13 11:33:39:643:173 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-13 11:33:39:698:394 + Q5 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_write_too_old: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_W errcode: HY000 + Q5 failed at: 2022-4-13 11:33:40:212:427 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_write_too_old: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_W + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..0fca67b7 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,43 @@ +#### db_type: crdb #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-13 11:39:44:888:265 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-13 11:39:44:943:813 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-13 11:39:49:884:600 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-13 11:39:50:525:712 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-4-13 11:39:54:891:503 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-13 11:40:4:899:304 + Q5 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_write_too_old: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_W errcode: HY000 + Q5 failed at: 2022-4-13 11:40:5:412:236 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_write_too_old: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_W + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..b35f2ceb --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,43 @@ +#### db_type: crdb #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-13 11:40:58:124:336 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-13 11:40:58:179:417 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-13 11:41:3:123:835 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-13 11:41:3:849:88 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-4-13 11:41:8:128:576 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-13 11:41:8:183:974 + Q5 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_write_too_old: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_W errcode: HY000 + Q5 failed at: 2022-4-13 11:41:8:704:889 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_write_too_old: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_W + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_mda_step_wat_c1.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..72298ce9 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_mda_step_wat_c1.txt @@ -0,0 +1,47 @@ +#### db_type: crdb #### +#### test_type: mda_step_wat_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:33:55:435:879 +Q2-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q2 finished at: 2022-4-11 0:33:55:490:466 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:33:56:440:111 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-11 0:33:56:510:85 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q6-T3 execute sql: 'BEGIN TRANSACTION;' + Q6 finished at: 2022-4-11 0:33:57:440:759 + Q7-T3 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=2;' +Q9-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' +Q9 finished at: 2022-4-11 0:33:58:442:344 +Q10-T1 execute sql: 'COMMIT TRANSACTION;' +Q10 finished at: 2022-4-11 0:33:58:500:497 + Q5 finished at: 2022-4-11 0:33:58:509:400 + Q7 finished at: 2022-4-11 0:33:58:515:186 + Q8-T3 execute sql: 'UPDATE t2 SET value2=3 WHERE value1=1;' + Q11-T2 execute sql: 'COMMIT TRANSACTION;' + Q8 finished at: 2022-4-11 0:33:59:449:133 + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-11 0:34:0:436:607 + Q11 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE errcode: HY000 + Q11 failed at: 2022-4-11 0:34:0:726:252 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_mda_step_wat_c2.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..5bb3375b --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_mda_step_wat_c2.txt @@ -0,0 +1,47 @@ +#### db_type: crdb #### +#### test_type: mda_step_wat_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES FROM (MINVALUE) TO (2), PARTITION p1 VALUES FROM (2) TO (MAXVALUE));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:34:15:374:226 +Q2-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q2 finished at: 2022-4-11 0:34:15:434:413 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:34:16:372:193 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-11 0:34:16:429:44 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q6-T3 execute sql: 'BEGIN TRANSACTION;' + Q6 finished at: 2022-4-11 0:34:17:377:889 + Q7-T3 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=2;' +Q9-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' +Q9 finished at: 2022-4-11 0:34:18:376:681 +Q11-T1 execute sql: 'COMMIT TRANSACTION;' +Q11 finished at: 2022-4-11 0:34:20:376:663 + Q5 finished at: 2022-4-11 0:34:20:385:75 + Q10-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-11 0:34:20:392:982 + Q8-T3 execute sql: 'UPDATE t2 SET value2=3 WHERE value1=1;' + Q8 finished at: 2022-4-11 0:34:20:453:225 + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-11 0:34:21:384:282 + Q10 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE errcode: HY000 + Q10 failed at: 2022-4-11 0:34:21:439:625 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..0d3e0d99 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,42 @@ +#### db_type: crdb #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:28:18:634:500 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 0:28:18:700:933 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:28:19:597:715 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-11 0:28:20:602:823 + Q7-T3 execute sql: 'BEGIN TRANSACTION;' + Q7 finished at: 2022-4-11 0:28:31:587:42 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,2) + + Q8 finished at: 2022-4-11 0:28:40:426:477 + Q9-T3 execute sql: 'COMMIT TRANSACTION;' + Q9 finished at: 2022-4-11 0:28:40:482:999 + Q4 failed reason: Timeout has been expired. Connection will be closed., [1] errcode: HY000 + Q4 failed at: 2022-4-11 0:28:50:6:409 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..357be636 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,45 @@ +#### db_type: crdb #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:29:24:696:241 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 0:29:24:757:802 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:29:25:690:361 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'COMMIT TRANSACTION;' +Q5 finished at: 2022-4-11 0:29:26:698:829 + Q4 finished at: 2022-4-11 0:29:26:706:675 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-11 0:29:27:689:488 + Q7-T3 execute sql: 'BEGIN TRANSACTION;' + Q7 finished at: 2022-4-11 0:29:37:694:602 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-11 0:29:38:472:287 + Q9-T3 execute sql: 'COMMIT TRANSACTION;' + Q9 finished at: 2022-4-11 0:29:38:532:271 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_sda_full_write.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_sda_full_write.txt new file mode 100644 index 00000000..97dc0b95 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_sda_full_write.txt @@ -0,0 +1,47 @@ +#### db_type: crdb #### +#### test_type: sda_full_write #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:29:43:127:759 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 0:29:43:191:594 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:29:44:120:152 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-11 0:29:45:122:211 +Q6-T1 execute sql: 'COMMIT TRANSACTION;' +Q6 finished at: 2022-4-11 0:29:45:180:224 + Q4 finished at: 2022-4-11 0:29:45:191:206 + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-11 0:29:46:391:80 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-11 0:29:56:126:326 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q9 finished at: 2022-4-11 0:29:56:835:204 + Q10-T3 execute sql: 'COMMIT TRANSACTION;' + Q10 finished at: 2022-4-11 0:29:56:895:509 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_sda_full_write_committed.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..99f076bd --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_sda_full_write_committed.txt @@ -0,0 +1,47 @@ +#### db_type: crdb #### +#### test_type: sda_full_write_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:30:1:212:624 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 0:30:1:275:714 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:30:2:204:263 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-11 0:30:3:213:958 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-11 0:30:3:269:604 + Q4 finished at: 2022-4-11 0:30:3:545:477 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-11 0:30:3:601:639 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-11 0:30:13:212:455 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q9 finished at: 2022-4-11 0:30:14:126:639 + Q10-T3 execute sql: 'COMMIT TRANSACTION;' + Q10 finished at: 2022-4-11 0:30:14:184:459 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..8b808b8c --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,54 @@ +#### db_type: crdb #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:30:54:753:221 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 0:30:54:815:940 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:30:55:744:775 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-11 0:30:57:369:122 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-11 0:30:57:425:340 + Q4 finished at: 2022-4-11 0:30:57:435:601 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-11 0:30:57:763:731 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-11 0:31:6:753:376 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q9 finished at: 2022-4-11 0:31:7:436:495 + Q10-T3 execute sql: 'COMMIT TRANSACTION;' + Q10 finished at: 2022-4-11 0:31:7:496:121 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_sda_lost_update_c1.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..e9b41dd8 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_sda_lost_update_c1.txt @@ -0,0 +1,38 @@ +#### db_type: crdb #### +#### test_type: sda_lost_update_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:30:18:522:626 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-11 0:30:19:263:84 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:30:19:513:263 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-11 0:30:19:569:665 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-11 0:30:21:523:568 +Q5 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649608218.488774953,0 t errcode: HY000 +Q5 failed at: 2022-4-11 0:30:22:42:837 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649608218.488774953,0 t + diff --git a/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_sda_lost_update_c2.txt b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..23d6dda4 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_dist/serializable/wat_sda_lost_update_c2.txt @@ -0,0 +1,38 @@ +#### db_type: crdb #### +#### test_type: sda_lost_update_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-11 0:30:36:114:449 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-11 0:30:36:816:469 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-11 0:30:37:108:971 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-11 0:30:37:168:186 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-11 0:30:39:109:716 +Q5 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649608236.079703279,0 t errcode: HY000 +Q5 failed at: 2022-4-11 0:30:39:621:962 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649608236.079703279,0 t + diff --git a/test_result/distributed_result/crdb_test/crdb_single/result_summary/serializable_total-result.txt b/test_result/distributed_result/crdb_test/crdb_single/result_summary/serializable_total-result.txt new file mode 100644 index 00000000..af5c58de --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/result_summary/serializable_total-result.txt @@ -0,0 +1,107 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Avoid + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Avoid + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Avoid + +rat_mda_step_rat_predicate_based_insert: Avoid + +wat_sda_dirty_write_1abort: Timeout + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Rollback + +iat_dda_write_skew_predicate_based-intersecting_data: Avoid + +iat_dda_write_skew_predicate_based-overdraft_protection: Rollback + +iat_dda_write_skew_committed: Rollback + +iat_mda_step_iat: Rollback + +iat_mda_step_iat_predicate_based_delete: Rollback + +iat_mda_step_iat_predicate_based_insert: Rollback + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Rollback diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_dda_read_skew_committed.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..ad9e5892 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_dda_read_skew_committed.txt @@ -0,0 +1,64 @@ +#### db_type: crdb #### +#### test_type: dda_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:41:45:44:847 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,3) + +Q2 finished at: 2022-4-10 23:41:45:758:993 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:41:46:51:124 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-10 23:41:46:115:505 + Q5-T2 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' + Q5 finished at: 2022-4-10 23:41:46:179:772 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-10 23:41:46:241:917 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,3) + *(1) expected_result: + (1,3) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-10 23:41:47:696:271 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-10 23:41:47:753:959 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-10 23:41:57:50:650 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,3) (1,1) + *(1) expected_result: + (0,3) (1,1) + *(2) expected_result: + (0,3) (1,1) + + Q10 finished at: 2022-4-10 23:41:57:745:386 + Q11-T3 execute sql: 'COMMIT TRANSACTION;' + Q11 finished at: 2022-4-10 23:41:57:803:646 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..bef47cd2 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,41 @@ +#### db_type: crdb #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:42:2:176:881 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,3) + +Q2 finished at: 2022-4-10 23:42:2:843:630 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:42:3:175:592 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-10 23:42:3:239:24 + Q5-T2 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' + Q5 finished at: 2022-4-10 23:42:3:301:256 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-10 23:42:3:364:368 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649605322.144604879,0 t errcode: HY000 +Q7 failed at: 2022-4-10 23:42:4:879:570 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649605322.144604879,0 t + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_dda_write_skew.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_dda_write_skew.txt new file mode 100644 index 00000000..8e06f7b0 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_dda_write_skew.txt @@ -0,0 +1,50 @@ +#### db_type: crdb #### +#### test_type: dda_write_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:42:18:864:150 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,3) + +Q2 finished at: 2022-4-10 23:42:19:627:278 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:42:19:865:667 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-10 23:42:20:859:478 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' + current_result: + (1,3) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,3) + + Q4 finished at: 2022-4-10 23:42:20:894:444 + Q5-T2 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q7 finished at: 2022-4-10 23:42:20:912:456 + Q5 finished at: 2022-4-10 23:42:20:956:780 + Q8-T2 execute sql: 'COMMIT TRANSACTION;' + Q8 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE errcode: HY000 + Q8 failed at: 2022-4-10 23:42:22:672:657 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_dda_write_skew_committed.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..13c7f124 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_dda_write_skew_committed.txt @@ -0,0 +1,50 @@ +#### db_type: crdb #### +#### test_type: dda_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:43:10:243:975 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,3) + +Q2 finished at: 2022-4-10 23:43:10:993:430 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:43:11:245:827 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-10 23:43:12:239:260 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-10 23:43:12:292:14 + current_result: + (1,3) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,3) + + Q4 finished at: 2022-4-10 23:43:12:959:995 + Q5-T2 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' + Q5 finished at: 2022-4-10 23:43:13:22:264 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE errcode: HY000 + Q6 failed at: 2022-4-10 23:43:13:686:108 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..2fe90481 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,77 @@ +#### db_type: crdb #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:42:36:590:296 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-10 23:42:36:652:717 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-10 23:42:36:712:702 + Q4-T2 execute sql: 'BEGIN TRANSACTION;' + Q4 finished at: 2022-4-10 23:42:37:591:732 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-10 23:42:38:585:287 + current_result: + (330,) + *(1) expected_result: + (330,) + (2) expected_result: + (300,) + + Q5 finished at: 2022-4-10 23:42:38:604:641 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-10 23:42:38:665:671 + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-10 23:42:38:727:530 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-10 23:42:48:583:375 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-10 23:42:48:638:836 + Q11-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q11 finished at: 2022-4-10 23:42:48:693:965 + Q12-T3 execute sql: 'DROP TABLE mytab;' + Q12 finished at: 2022-4-10 23:42:48:758:38 + Q13-T3 execute sql: 'COMMIT TRANSACTION;' + Q13 finished at: 2022-4-10 23:42:49:144:840 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..24c6f665 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,50 @@ +#### db_type: crdb #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-13 14:54:32:839:78 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-13 14:54:33:560:708 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-13 14:54:37:839:230 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-13 14:54:38:529:5 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-13 14:54:38:614:834 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-13 14:54:38:672:816 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-13 14:54:42:838:551 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE errcode: HY000 +Q8 failed at: 2022-4-13 14:54:43:699:944 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_mda_step_iat.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_mda_step_iat.txt new file mode 100644 index 00000000..3aa927c5 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_mda_step_iat.txt @@ -0,0 +1,86 @@ +#### db_type: crdb #### +#### test_type: mda_step_iat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-13 14:55:33:155:956 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-13 14:55:33:785:711 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-13 14:55:38:159:312 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,3) + (2) expected_result: + (0,3) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,3) + *(6) expected_result: + (0,1) + + Q4 finished at: 2022-4-13 14:55:38:940:604 + Q5-T3 execute sql: 'BEGIN TRANSACTION;' + Q5 finished at: 2022-4-13 14:55:43:157:302 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,3) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,3) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,3) + *(6) expected_result: + (1,3) + + Q6 finished at: 2022-4-13 14:55:43:852:293 +Q7-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q7 finished at: 2022-4-13 14:55:48:159:856 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-13 14:55:53:162:831 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-13 14:55:58:154:519 +Q10-T1 execute sql: 'COMMIT TRANSACTION;' +Q10 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE errcode: HY000 +Q10 failed at: 2022-4-13 14:56:4:168:709 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..f9e063a1 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,109 @@ +#### db_type: crdb #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:52:52:536:729 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + (3) expected_result: + (0,3) + (4) expected_result: + (0,3) + *(5) expected_result: + (0,1) + (6) expected_result: + (0,3) + +Q2 finished at: 2022-4-10 23:52:53:298:866 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:52:53:542:457 + Q4-T2 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' + Q4 finished at: 2022-4-10 23:52:53:602:723 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-10 23:52:53:661:112 + Q6-T3 execute sql: 'BEGIN TRANSACTION;' + Q6 finished at: 2022-4-10 23:52:54:807:195 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (0,3) + *(1) expected_result: + (0,3) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,3) + *(4) expected_result: + (0,3) + (5) expected_result: + (0,1) + (6) expected_result: + (0,1) + + Q7 finished at: 2022-4-10 23:52:55:699:439 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-10 23:52:55:761:176 + Q9-T3 execute sql: 'COMMIT TRANSACTION;' + Q9 finished at: 2022-4-10 23:52:55:822:142 + current_result: + (1,3) + *(1) expected_result: + (1,3) + *(2) expected_result: + (1,3) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,3) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-10 23:52:56:184:944 +Q11-T1 execute sql: 'COMMIT TRANSACTION;' +Q11 finished at: 2022-4-10 23:52:56:241:826 + Q12-T4 execute sql: 'BEGIN TRANSACTION;' + Q12 finished at: 2022-4-10 23:53:5:544:552 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,3) (1,1) + *(1) expected_result: + (0,3) (1,1) + *(2) expected_result: + (0,3) (1,1) + *(3) expected_result: + (0,3) (1,1) + *(4) expected_result: + (0,3) (1,1) + *(5) expected_result: + (0,3) (1,1) + *(6) expected_result: + (0,3) (1,1) + + Q13 finished at: 2022-4-10 23:53:6:258:78 + Q14-T4 execute sql: 'COMMIT TRANSACTION;' + Q14 finished at: 2022-4-10 23:53:6:317:187 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..15528bee --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,210 @@ +#### db_type: crdb #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:52:32:130:120 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + *(5) expected_result: + (0,1) + (6) expected_result: + (0,3) + (7) expected_result: + (0,3) + *(8) expected_result: + (0,1) + (9) expected_result: + (0,3) + (10) expected_result: + (0,3) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,3) + (13) expected_result: + (0,3) + (14) expected_result: + (0,3) + +Q2 finished at: 2022-4-10 23:52:32:831:983 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:52:33:126:724 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,3) + *(1) expected_result: + (1,3) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,3) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,3) + *(6) expected_result: + (1,3) + *(7) expected_result: + (1,3) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,3) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,3) + + Q4 finished at: 2022-4-10 23:52:33:882:112 + Q5-T3 execute sql: 'BEGIN TRANSACTION;' + Q5 finished at: 2022-4-10 23:52:34:133:866 + Q6-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' + Q6 finished at: 2022-4-10 23:52:34:196:807 + Q7-T3 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-10 23:52:34:519:64 + Q8-T4 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-10 23:52:35:134:725 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-10 23:52:35:198:934 + Q10-T4 execute sql: 'COMMIT TRANSACTION;' + Q10 finished at: 2022-4-10 23:52:35:259:652 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + (3) expected_result: + (0,3) + (4) expected_result: + (0,3) + *(5) expected_result: + (0,1) + *(6) expected_result: + (0,1) + *(7) expected_result: + (0,1) + *(8) expected_result: + (0,1) + (9) expected_result: + (0,3) + (10) expected_result: + (0,3) + (11) expected_result: + (0,3) + *(12) expected_result: + (0,1) + (13) expected_result: + (0,3) + (14) expected_result: + (0,3) + + Q11 finished at: 2022-4-10 23:52:36:963:327 + Q12-T2 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-10 23:52:37:16:970 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,3) + *(1) expected_result: + (1,3) + *(2) expected_result: + (1,3) + *(3) expected_result: + (1,3) + *(4) expected_result: + (1,3) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,3) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,3) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,3) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-10 23:52:37:733:279 +Q14-T1 execute sql: 'COMMIT TRANSACTION;' +Q14 finished at: 2022-4-10 23:52:37:788:118 + Q15-T5 execute sql: 'BEGIN TRANSACTION;' + Q15 finished at: 2022-4-10 23:52:47:132:671 + Q16-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,3) (1,1) + *(1) expected_result: + (0,3) (1,1) + *(2) expected_result: + (0,3) (1,1) + *(3) expected_result: + (0,3) (1,1) + *(4) expected_result: + (0,3) (1,1) + *(5) expected_result: + (0,3) (1,1) + *(6) expected_result: + (0,3) (1,1) + *(7) expected_result: + (0,3) (1,1) + *(8) expected_result: + (0,3) (1,1) + *(9) expected_result: + (0,3) (1,1) + *(10) expected_result: + (0,3) (1,1) + *(11) expected_result: + (0,3) (1,1) + *(12) expected_result: + (0,3) (1,1) + *(13) expected_result: + (0,3) (1,1) + *(14) expected_result: + (0,3) (1,1) + + Q16 finished at: 2022-4-10 23:52:48:88:134 + Q17-T5 execute sql: 'COMMIT TRANSACTION;' + Q17 finished at: 2022-4-10 23:52:48:145:382 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..d5bf2e04 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,90 @@ +#### db_type: crdb #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:45:8:435:405 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-10 23:45:9:111:873 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:45:9:436:105 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + null + *(6) expected_result: + (0,1) + + Q4 finished at: 2022-4-10 23:45:10:159:766 + Q5-T3 execute sql: 'BEGIN TRANSACTION;' + Q5 finished at: 2022-4-10 23:45:10:439:914 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' + current_result: + (1,3) + (1) expected_result: + null + *(2) expected_result: + (1,3) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,3) + *(6) expected_result: + (1,3) + + Q6 finished at: 2022-4-10 23:45:11:390:649 +Q7 finished at: 2022-4-10 23:45:11:710:950 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-10 23:45:12:439:388 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-10 23:45:13:717:125 +Q10-T1 execute sql: 'COMMIT TRANSACTION;' +Q10 finished at: 2022-4-10 23:45:14:436:71 + Q11-T2 execute sql: 'COMMIT TRANSACTION;' + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-10 23:45:16:444:961 + Q11 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE errcode: HY000 + Q11 failed at: 2022-4-10 23:45:16:541:819 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..ab94beea --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,87 @@ +#### db_type: crdb #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:45:30:976:29 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,0) + (5) expected_result: + (2,0) + (6) expected_result: + (2,0) + +Q2 finished at: 2022-4-10 23:45:31:773:917 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:45:31:975:689 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q5-T3 execute sql: 'BEGIN TRANSACTION;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-10 23:45:32:980:456 + Q5 finished at: 2022-4-10 23:45:33:252:918 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q7 finished at: 2022-4-10 23:45:33:984:539 + current_result: + null + (1) expected_result: + (1,3) + *(2) expected_result: + null + (3) expected_result: + (1,3) + (4) expected_result: + (1,3) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-10 23:45:34:52:358 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + Q8 finished at: 2022-4-10 23:45:34:977:604 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-10 23:45:35:981:729 +Q10-T1 execute sql: 'COMMIT TRANSACTION;' +Q10 finished at: 2022-4-10 23:45:36:980:497 + Q11-T2 execute sql: 'COMMIT TRANSACTION;' + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-10 23:45:38:982:784 + Q11 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE errcode: HY000 + Q11 failed at: 2022-4-10 23:45:39:81:284 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..0cc8a346 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,121 @@ +#### db_type: crdb #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-13 14:55:0:461:108 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + *(5) expected_result: + (0,1) + *(6) expected_result: + (0,1) + +Q2 finished at: 2022-4-13 14:55:1:107:506 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,3) + *(1) expected_result: + (1,3) + *(2) expected_result: + (1,3) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,3) + (6) expected_result: + (1,1) + +Q3 finished at: 2022-4-13 14:55:1:758:154 + Q4-T2 execute sql: 'BEGIN TRANSACTION;' + Q4 finished at: 2022-4-13 14:55:5:472:765 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,3) + *(1) expected_result: + (1,3) + *(2) expected_result: + (1,3) + *(3) expected_result: + (1,3) + *(4) expected_result: + (1,3) + *(5) expected_result: + (1,3) + *(6) expected_result: + (1,3) + + Q5 finished at: 2022-4-13 14:55:6:81:838 + Q6-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q6 finished at: 2022-4-13 14:55:6:142:984 + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-13 14:55:6:204:333 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-13 14:55:10:456:699 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,3) + (2) expected_result: + (0,3) + *(3) expected_result: + (0,1) + (4) expected_result: + (0,3) + *(5) expected_result: + (0,1) + *(6) expected_result: + (0,1) + + Q9 finished at: 2022-4-13 14:55:11:127:581 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + *(1) expected_result: + (1,1) + (2) expected_result: + (1,3) + *(3) expected_result: + (1,1) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,3) + (6) expected_result: + (1,3) + + Q10 finished at: 2022-4-13 14:55:11:753:842 + Q11-T3 execute sql: 'COMMIT TRANSACTION;' + Q11 finished at: 2022-4-13 14:55:11:803:243 +Q12-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q12 finished at: 2022-4-13 14:55:15:465:462 +Q13-T1 execute sql: 'COMMIT TRANSACTION;' +Q13 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE errcode: HY000 +Q13 failed at: 2022-4-13 14:55:16:821:790 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#retry_serializable: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SE + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..2c78b1d3 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,165 @@ +#### db_type: crdb #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:51:35:103:489 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-10 23:51:35:914:460 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:51:36:97:56 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-10 23:51:36:779:935 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-10 23:51:36:843:156 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-10 23:51:37:100:117 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-10 23:51:37:861:890 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-10 23:51:37:927:158 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-10 23:51:38:170:814 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-10 23:51:38:233:14 + Q8-T2 execute sql: 'COMMIT TRANSACTION;' + Q8 finished at: 2022-4-10 23:51:38:293:877 + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-10 23:51:38:960:730 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-10 23:51:39:25:957 + Q14-T3 execute sql: 'COMMIT TRANSACTION;' + Q14 finished at: 2022-4-10 23:51:39:84:440 + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-10 23:51:41:163:121 +Q16-T1 execute sql: 'COMMIT TRANSACTION;' +Q16 finished at: 2022-4-10 23:51:41:217:677 + Q17-T4 execute sql: 'BEGIN TRANSACTION;' + Q17 finished at: 2022-4-10 23:51:48:90:222 + Q18-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q18 finished at: 2022-4-10 23:51:48:791:416 + Q19-T4 execute sql: 'COMMIT TRANSACTION;' + Q19 finished at: 2022-4-10 23:51:48:842:725 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_sda_lost_update_committed.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..84e46402 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_sda_lost_update_committed.txt @@ -0,0 +1,38 @@ +#### db_type: crdb #### +#### test_type: sda_lost_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:41:8:1:24 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-10 23:41:8:708:146 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:41:9:0:757 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-10 23:41:9:63:196 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-10 23:41:9:124:901 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649605267.968943689,0 t errcode: HY000 +Q6 failed at: 2022-4-10 23:41:10:609:789 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649605267.968943689,0 t + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..ba166c72 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,61 @@ +#### db_type: crdb #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:40:50:859:611 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-10 23:40:51:566:551 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:40:51:849:650 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-10 23:40:51:905:358 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-10 23:40:51:961:177 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-10 23:40:53:741:718 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-10 23:40:53:799:394 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-10 23:41:2:855:91 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-10 23:41:3:618:103 + Q10-T3 execute sql: 'COMMIT TRANSACTION;' + Q10 finished at: 2022-4-10 23:41:3:674:833 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_double_write_skew1.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..fff57753 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_double_write_skew1.txt @@ -0,0 +1,39 @@ +#### db_type: crdb #### +#### test_type: dda_double_write_skew1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:4:44:873:336 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-10 23:4:45:207:282 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:4:45:878:520 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-10 23:4:45:942:68 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q6 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA errcode: HY000 +Q6 failed at: 2022-4-10 23:4:47:534:326 + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-10 23:4:47:578:416 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..f9f68dee --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,39 @@ +#### db_type: crdb #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:5:3:549:545 +Q2-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q2 finished at: 2022-4-10 23:5:3:609:115 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:5:4:548:331 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-10 23:5:4:604:168 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA errcode: HY000 +Q7 failed at: 2022-4-10 23:5:6:314:501 + current_result: + (0,1) + (1) expected_result: + (0,3) + *(2) expected_result: + (0,1) + + Q5 finished at: 2022-4-10 23:5:7:301:815 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_double_write_skew2.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..5330a88b --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_double_write_skew2.txt @@ -0,0 +1,57 @@ +#### db_type: crdb #### +#### test_type: dda_double_write_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:5:20:246:174 +Q2-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q2 finished at: 2022-4-10 23:5:20:573:492 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:5:21:243:418 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-10 23:5:21:299:82 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,3) + *(1) expected_result: + (1,3) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-10 23:5:22:848:930 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-10 23:5:22:910:238 + Q5 finished at: 2022-4-10 23:5:22:913:989 + Q8-T2 execute sql: 'COMMIT TRANSACTION;' + Q8 finished at: 2022-4-10 23:5:23:252:207 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-10 23:5:33:246:360 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,3) (1,1) + + Q10 finished at: 2022-4-10 23:5:33:944:918 + Q11-T3 execute sql: 'COMMIT TRANSACTION;' + Q11 finished at: 2022-4-10 23:5:34:4:5 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_read_skew.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_read_skew.txt new file mode 100644 index 00000000..cc22f443 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_read_skew.txt @@ -0,0 +1,64 @@ +#### db_type: crdb #### +#### test_type: dda_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:5:38:414:279 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,3) + +Q2 finished at: 2022-4-10 23:5:39:178:90 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:5:39:419:698 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-10 23:5:39:477:282 + Q5-T2 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' + Q5 finished at: 2022-4-10 23:5:39:532:77 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,3) + *(1) expected_result: + (1,3) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-10 23:5:41:52:641 + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-10 23:5:41:425:851 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-10 23:5:42:416:857 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-10 23:5:52:422:43 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,3) (1,1) + *(1) expected_result: + (0,3) (1,1) + *(2) expected_result: + (0,3) (1,1) + + Q10 finished at: 2022-4-10 23:5:53:107:998 + Q11-T3 execute sql: 'COMMIT TRANSACTION;' + Q11 finished at: 2022-4-10 23:5:53:166:808 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_read_skew2.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_read_skew2.txt new file mode 100644 index 00000000..b3782c77 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_read_skew2.txt @@ -0,0 +1,64 @@ +#### db_type: crdb #### +#### test_type: dda_read_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-13 11:25:1:477:337 +Q2-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q2 finished at: 2022-4-13 11:25:1:532:769 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-13 11:25:11:475:917 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,3) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,3) + + Q4 finished at: 2022-4-13 11:25:12:131:351 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-13 11:25:21:479:90 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-13 11:25:21:531:960 + current_result: + (0,1) + (1) expected_result: + (0,3) + *(2) expected_result: + (0,1) + + Q5 finished at: 2022-4-13 11:25:22:132:550 + Q8-T2 execute sql: 'COMMIT TRANSACTION;' + Q8 finished at: 2022-4-13 11:25:31:478:736 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-13 11:27:11:482:156 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,3) (1,1) + *(1) expected_result: + (0,3) (1,1) + *(2) expected_result: + (0,3) (1,1) + + Q10 finished at: 2022-4-13 11:27:12:105:119 + Q11-T3 execute sql: 'COMMIT TRANSACTION;' + Q11 finished at: 2022-4-13 11:27:12:160:411 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..696b9784 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_read_skew2_committed.txt @@ -0,0 +1,64 @@ +#### db_type: crdb #### +#### test_type: dda_read_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-13 11:28:3:484:676 +Q2-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q2 finished at: 2022-4-13 11:28:3:541:244 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-13 11:28:13:481:72 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,3) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,3) + + Q4 finished at: 2022-4-13 11:28:14:204:527 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-13 11:28:23:486:319 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-13 11:28:23:541:85 + current_result: + (0,1) + (1) expected_result: + (0,3) + *(2) expected_result: + (0,1) + + Q5 finished at: 2022-4-13 11:28:24:123:34 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-13 11:28:24:176:33 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-13 11:28:33:483:28 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,3) (1,1) + *(1) expected_result: + (0,3) (1,1) + *(2) expected_result: + (0,3) (1,1) + + Q10 finished at: 2022-4-13 11:28:34:143:58 + Q11-T3 execute sql: 'COMMIT TRANSACTION;' + Q11 finished at: 2022-4-13 11:28:34:192:669 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..dde2c4c0 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,64 @@ +#### db_type: crdb #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:5:57:570:281 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-10 23:5:58:305:773 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:5:58:579:168 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-10 23:5:58:643:519 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-10 23:5:58:705:220 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-10 23:5:58:763:188 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-10 23:6:0:280:876 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-10 23:6:0:340:7 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-10 23:6:9:578:831 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q10 finished at: 2022-4-10 23:6:10:287:309 + Q11-T3 execute sql: 'COMMIT TRANSACTION;' + Q11 finished at: 2022-4-10 23:6:10:344:914 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..49a02b26 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,62 @@ +#### db_type: crdb #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:6:14:598:695 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-10 23:6:15:282:957 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:6:15:606:535 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-10 23:6:15:668:983 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-10 23:6:15:730:305 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-10 23:6:15:794:667 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-10 23:6:17:290:74 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-10 23:6:17:349:467 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-10 23:6:26:605:855 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q10 finished at: 2022-4-10 23:6:27:244:501 + Q11-T3 execute sql: 'COMMIT TRANSACTION;' + Q11 finished at: 2022-4-10 23:6:27:304:406 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_write_read_skew.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..6017c7ed --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_write_read_skew.txt @@ -0,0 +1,64 @@ +#### db_type: crdb #### +#### test_type: dda_write_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:4:7:210:843 +Q2-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q2 finished at: 2022-4-10 23:4:7:275:661 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:4:8:201:99 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-10 23:4:8:260:951 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,3) + *(1) expected_result: + (1,3) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-10 23:4:9:839:720 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-10 23:4:11:213:226 + current_result: + (0,3) + *(1) expected_result: + (0,3) + (2) expected_result: + (0,1) + + Q5 finished at: 2022-4-10 23:4:12:118:674 + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-10 23:4:12:175:714 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-10 23:4:21:208:806 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,3) (1,1) + *(1) expected_result: + (0,3) (1,1) + *(2) expected_result: + (0,3) (1,1) + + Q10 finished at: 2022-4-10 23:4:23:243:982 + Q11-T3 execute sql: 'COMMIT TRANSACTION;' + Q11 finished at: 2022-4-10 23:4:23:303:658 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..fcc037ef --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,64 @@ +#### db_type: crdb #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:4:27:706:71 +Q2-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q2 finished at: 2022-4-10 23:4:27:770:203 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:4:28:673:130 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-10 23:4:28:729:113 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,3) + *(1) expected_result: + (1,3) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-10 23:4:30:353:441 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-10 23:4:30:409:296 + current_result: + (0,3) + *(1) expected_result: + (0,3) + (2) expected_result: + (0,1) + + Q5 finished at: 2022-4-10 23:4:31:400:810 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-10 23:4:31:462:92 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-10 23:4:39:680:628 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,3) (1,1) + *(1) expected_result: + (0,3) (1,1) + *(2) expected_result: + (0,3) (1,1) + + Q10 finished at: 2022-4-10 23:4:40:418:798 + Q11-T3 execute sql: 'COMMIT TRANSACTION;' + Q11 finished at: 2022-4-10 23:4:40:478:600 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_mda_step_rat.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_mda_step_rat.txt new file mode 100644 index 00000000..679c7aa6 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_mda_step_rat.txt @@ -0,0 +1,112 @@ +#### db_type: crdb #### +#### test_type: mda_step_rat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:9:38:119:687 +Q2-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q2 finished at: 2022-4-10 23:9:38:184:238 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:9:39:117:108 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-10 23:9:39:180:256 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q6-T3 execute sql: 'BEGIN TRANSACTION;' + Q6 finished at: 2022-4-10 23:9:40:116:400 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-10 23:9:40:179:530 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-10 23:9:41:793:948 +Q10-T1 execute sql: 'COMMIT TRANSACTION;' +Q10 finished at: 2022-4-10 23:9:41:849:890 + current_result: + (0,3) + *(1) expected_result: + (0,3) + *(2) expected_result: + (0,3) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,3) + (6) expected_result: + (0,1) + + Q5 finished at: 2022-4-10 23:9:42:728:469 + Q11-T2 execute sql: 'COMMIT TRANSACTION;' + Q11 finished at: 2022-4-10 23:9:42:792:299 + current_result: + (1,1) + *(1) expected_result: + (1,1) + (2) expected_result: + (1,3) + *(3) expected_result: + (1,1) + *(4) expected_result: + (1,1) + (5) expected_result: + (1,3) + (6) expected_result: + (1,3) + + Q8 finished at: 2022-4-10 23:9:43:452:945 + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-10 23:9:43:515:870 + Q13-T4 execute sql: 'BEGIN TRANSACTION;' + Q13 finished at: 2022-4-10 23:9:53:115:362 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,3) (1,1) (2,1) + *(1) expected_result: + (0,3) (1,1) (2,1) + *(2) expected_result: + (0,3) (1,1) (2,1) + *(3) expected_result: + (0,3) (1,1) (2,1) + *(4) expected_result: + (0,3) (1,1) (2,1) + *(5) expected_result: + (0,3) (1,1) (2,1) + *(6) expected_result: + (0,3) (1,1) (2,1) + + Q14 finished at: 2022-4-10 23:9:54:95:534 + Q15-T4 execute sql: 'COMMIT TRANSACTION;' + Q15 finished at: 2022-4-10 23:9:54:146:570 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..aafd7ab3 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,210 @@ +#### db_type: crdb #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN TRANSACTION;' + Q1 finished at: 2022-4-10 23:9:58:523:358 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,3) + *(3) expected_result: + (0,1) + (4) expected_result: + (0,3) + (5) expected_result: + (0,3) + *(6) expected_result: + (0,1) + (7) expected_result: + (0,3) + (8) expected_result: + (0,3) + *(9) expected_result: + (0,1) + (10) expected_result: + (0,3) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,3) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q2 finished at: 2022-4-10 23:9:59:239:564 +Q3-T1 execute sql: 'BEGIN TRANSACTION;' +Q3 finished at: 2022-4-10 23:9:59:522:529 +Q4-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q4 finished at: 2022-4-10 23:9:59:580:174 + Q5-T3 execute sql: 'BEGIN TRANSACTION;' + Q5 finished at: 2022-4-10 23:10:0:519:813 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,3) + *(1) expected_result: + (1,3) + *(2) expected_result: + (1,3) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,3) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,3) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,3) + *(12) expected_result: + (1,3) + *(13) expected_result: + (1,3) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-10 23:10:1:293:13 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q8-T2 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-10 23:10:1:527:401 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-10 23:10:1:590:756 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,3) + *(1) expected_result: + (1,3) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,3) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,3) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,3) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,3) + *(13) expected_result: + (1,3) + *(14) expected_result: + (1,3) + + Q10 finished at: 2022-4-10 23:10:3:164:683 +Q11-T1 execute sql: 'COMMIT TRANSACTION;' +Q11 finished at: 2022-4-10 23:10:3:525:64 + current_result: + (0,3) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,3) + *(4) expected_result: + (0,3) + *(5) expected_result: + (0,3) + (6) expected_result: + (0,1) + *(7) expected_result: + (0,3) + *(8) expected_result: + (0,3) + *(9) expected_result: + (0,3) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,3) + *(14) expected_result: + (0,3) + + Q7 finished at: 2022-4-10 23:10:4:188:691 + Q12-T2 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-10 23:10:4:525:429 + Q13-T3 execute sql: 'COMMIT TRANSACTION;' + Q13 finished at: 2022-4-10 23:10:5:526:4 + Q14-T4 execute sql: 'COMMIT TRANSACTION;' + Q14 finished at: 2022-4-10 23:10:6:525:131 + Q15-T5 execute sql: 'BEGIN TRANSACTION;' + Q15 finished at: 2022-4-10 23:10:16:523:708 + Q16-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,3) (1,1) + *(1) expected_result: + (0,3) (1,1) + *(2) expected_result: + (0,3) (1,1) + *(3) expected_result: + (0,3) (1,1) + *(4) expected_result: + (0,3) (1,1) + *(5) expected_result: + (0,3) (1,1) + *(6) expected_result: + (0,3) (1,1) + *(7) expected_result: + (0,3) (1,1) + *(8) expected_result: + (0,3) (1,1) + *(9) expected_result: + (0,3) (1,1) + *(10) expected_result: + (0,3) (1,1) + *(11) expected_result: + (0,3) (1,1) + *(12) expected_result: + (0,3) (1,1) + *(13) expected_result: + (0,3) (1,1) + *(14) expected_result: + (0,3) (1,1) + + Q16 finished at: 2022-4-10 23:10:17:239:194 + Q17-T5 execute sql: 'COMMIT TRANSACTION;' + Q17 finished at: 2022-4-10 23:10:17:302:353 + +The current result is consistent with the [(13) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..e4594135 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,112 @@ +#### db_type: crdb #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:10:21:767:62 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-10 23:10:21:832:403 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:10:22:768:589 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-10 23:10:22:832:591 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute sql: 'BEGIN TRANSACTION;' + Q6 finished at: 2022-4-10 23:10:23:767:86 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-10 23:10:23:832:307 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-10 23:10:24:764:602 +Q10-T1 execute sql: 'COMMIT TRANSACTION;' +Q10 finished at: 2022-4-10 23:10:24:824:406 + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-10 23:10:24:834:567 + Q11-T2 execute sql: 'COMMIT TRANSACTION;' + Q11 finished at: 2022-4-10 23:10:25:771:147 + current_result: + (,) + *(1) expected_result: + (,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q8 finished at: 2022-4-10 23:10:25:776:173 + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-10 23:10:26:770:326 + Q13-T4 execute sql: 'BEGIN TRANSACTION;' + Q13 finished at: 2022-4-10 23:10:36:766:872 + Q14-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q14 finished at: 2022-4-10 23:10:37:515:412 + Q15-T4 execute sql: 'COMMIT TRANSACTION;' + Q15 finished at: 2022-4-10 23:10:37:573:573 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..54eac4cf --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,109 @@ +#### db_type: crdb #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:10:41:850:440 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-10 23:10:41:921:774 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:10:42:844:42 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-10 23:10:42:906:453 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute sql: 'BEGIN TRANSACTION;' + Q6 finished at: 2022-4-10 23:10:43:843:474 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-10 23:10:43:904:669 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-10 23:10:44:846:113 +Q10-T1 execute sql: 'COMMIT TRANSACTION;' +Q10 finished at: 2022-4-10 23:10:44:908:513 + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-10 23:10:44:916:156 + Q11-T2 execute sql: 'COMMIT TRANSACTION;' + Q11 finished at: 2022-4-10 23:10:45:847:790 + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + (4) expected_result: + (,) + *(5) expected_result: + (1,) + (6) expected_result: + (,) + + Q8 finished at: 2022-4-10 23:10:45:854:904 + Q12-T3 execute sql: 'COMMIT TRANSACTION;' + Q12 finished at: 2022-4-10 23:10:46:846:336 + Q13-T4 execute sql: 'BEGIN TRANSACTION;' + Q13 finished at: 2022-4-10 23:10:56:837:277 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q14 finished at: 2022-4-10 23:10:57:555:965 + Q15-T4 execute sql: 'COMMIT TRANSACTION;' + Q15 finished at: 2022-4-10 23:10:57:605:846 + +The current result is consistent with the [(5) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_sda_dirty_read.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_sda_dirty_read.txt new file mode 100644 index 00000000..17b1f73e --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_sda_dirty_read.txt @@ -0,0 +1,48 @@ +#### db_type: crdb #### +#### test_type: sda_dirty_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 22:59:35:79:313 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-10 22:59:35:136:214 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 22:59:36:74:646 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-10 22:59:37:202:611 + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-10 22:59:46:16:43 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-10 22:59:46:68:717 + Q7-T3 execute sql: 'BEGIN TRANSACTION;' + Q7 finished at: 2022-4-10 22:59:48:70:485 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q8 finished at: 2022-4-10 22:59:56:264:153 + Q9-T3 execute sql: 'COMMIT TRANSACTION;' + Q9 finished at: 2022-4-10 22:59:56:321:756 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_sda_intermediate_read.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..f5b30b75 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_sda_intermediate_read.txt @@ -0,0 +1,54 @@ +#### db_type: crdb #### +#### test_type: sda_intermediate_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:0:19:399:26 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-10 23:0:19:719:602 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:0:20:391:282 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-10 23:0:21:394:81 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-10 23:0:23:399:567 + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-10 23:0:24:15:977 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-10 23:0:24:68:289 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-10 23:0:33:396:467 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q9 finished at: 2022-4-10 23:0:34:76:113 + Q10-T3 execute sql: 'COMMIT TRANSACTION;' + Q10 finished at: 2022-4-10 23:0:34:133:725 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..bd251c3e --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,54 @@ +#### db_type: crdb #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:0:38:729:882 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-10 23:0:38:786:233 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:0:39:732:268 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-10 23:0:40:739:560 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-10 23:0:40:801:726 + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-10 23:0:41:699:423 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-10 23:0:41:751:677 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-10 23:0:50:844:227 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q9 finished at: 2022-4-10 23:0:52:90:857 + Q10-T3 execute sql: 'COMMIT TRANSACTION;' + Q10 finished at: 2022-4-10 23:0:52:145:803 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_sda_lost_self_update.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..e939808b --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_sda_lost_self_update.txt @@ -0,0 +1,54 @@ +#### db_type: crdb #### +#### test_type: sda_lost_self_update #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:1:30:983:655 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-10 23:1:31:46:790 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:1:31:978:102 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-10 23:1:33:696:961 +Q6-T1 execute sql: 'COMMIT TRANSACTION;' +Q6 finished at: 2022-4-10 23:1:33:760:685 + Q4 finished at: 2022-4-10 23:1:33:766:662 + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-10 23:1:33:978:831 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-10 23:1:43:980:792 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q9 finished at: 2022-4-10 23:1:44:704:179 + Q10-T3 execute sql: 'COMMIT TRANSACTION;' + Q10 finished at: 2022-4-10 23:1:44:758:813 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..c69c9b9b --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_sda_non_repeatable_read.txt @@ -0,0 +1,61 @@ +#### db_type: crdb #### +#### test_type: sda_non_repeatable_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-13 14:56:30:728:381 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-13 14:56:31:370:910 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-13 14:56:35:732:762 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-13 14:56:35:795:595 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-13 14:56:41:335:407 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-13 14:56:45:735:673 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-13 14:56:50:732:814 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-13 14:56:55:723:420 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-13 14:56:56:389:146 + Q10-T3 execute sql: 'COMMIT TRANSACTION;' + Q10 finished at: 2022-4-13 14:56:56:436:166 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..1a833f4a --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,61 @@ +#### db_type: crdb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:0:56:449:14 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-10 23:0:57:193:645 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:0:57:451:441 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-10 23:0:57:511:366 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-10 23:0:57:575:205 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-10 23:0:59:157:281 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-10 23:0:59:218:64 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-10 23:1:8:453:831 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q9 finished at: 2022-4-10 23:1:9:120:525 + Q10-T3 execute sql: 'COMMIT TRANSACTION;' + Q10 finished at: 2022-4-10 23:1:9:192:832 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..17e641b6 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,60 @@ +#### db_type: crdb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:1:13:552:689 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-10 23:1:14:303:655 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:1:14:544:379 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-10 23:1:14:599:840 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-10 23:1:14:656:890 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-10 23:1:16:305:97 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-10 23:1:16:360:310 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-10 23:1:25:548:549 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q9 finished at: 2022-4-10 23:1:26:331:900 + Q10-T3 execute sql: 'COMMIT TRANSACTION;' + Q10 finished at: 2022-4-10 23:1:26:383:270 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..2975fbde --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,57 @@ +#### db_type: crdb #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:26:0:656:361 +Q2-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q2 finished at: 2022-4-10 23:26:0:722:999 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:26:1:653:545 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-10 23:26:1:717:900 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,3) + *(1) expected_result: + (1,3) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-10 23:26:3:306:511 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-10 23:26:3:363:896 + Q5 finished at: 2022-4-10 23:26:3:378:617 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-10 23:26:3:434:258 + Q9-T3 execute sql: 'BEGIN TRANSACTION;' + Q9 finished at: 2022-4-10 23:26:12:652:128 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,3) (1,1) + + Q10 finished at: 2022-4-10 23:26:13:628:354 + Q11-T3 execute sql: 'COMMIT TRANSACTION;' + Q11 finished at: 2022-4-10 23:26:13:679:545 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..a4406be0 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,34 @@ +#### db_type: crdb #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:26:18:96:99 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-10 23:26:18:435:368 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:26:19:87:206 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-10 23:26:19:144:42 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-10 23:26:20:156:817 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-10 23:26:20:220:842 + Q5 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA errcode: HY000 + Q5 failed at: 2022-4-10 23:26:20:657:61 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..8dc9ea07 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,32 @@ +#### db_type: crdb #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:26:36:544:514 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-10 23:26:36:609:276 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:26:37:536:160 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-10 23:26:37:592:693 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-10 23:26:38:607:70 +Q6 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA errcode: HY000 +Q6 failed at: 2022-4-10 23:26:39:202:582 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..546e0129 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,34 @@ +#### db_type: crdb #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:26:56:111:969 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-10 23:26:56:175:981 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:26:57:111:835 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-10 23:26:57:172:478 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-10 23:26:58:167:422 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-10 23:26:58:224:149 +Q7 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA errcode: HY000 +Q7 failed at: 2022-4-10 23:26:58:870:286 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..2ef87672 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,41 @@ +#### db_type: crdb #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-13 14:57:8:812:823 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,3) + +Q2 finished at: 2022-4-13 14:57:9:517:120 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-13 14:57:13:816:323 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-13 14:57:13:875:205 + Q5-T2 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' + Q5 finished at: 2022-4-13 14:57:13:933:636 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute sql: 'COMMIT TRANSACTION;' + Q8 finished at: 2022-4-13 14:57:23:819:604 +Q6 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649833028.786071639,0 t errcode: HY000 +Q6 failed at: 2022-4-13 14:57:24:431:97 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649833028.786071639,0 t + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..c4fe7c80 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,41 @@ +#### db_type: crdb #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-13 14:57:41:430:156 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,3) + +Q2 finished at: 2022-4-13 14:57:42:77:12 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-13 14:57:46:433:657 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-13 14:57:46:494:126 + Q5-T2 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' + Q5 finished at: 2022-4-13 14:57:46:557:131 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-13 14:57:56:435:887 +Q6 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649833061.403802746,0 t errcode: HY000 +Q6 failed at: 2022-4-13 14:57:57:46:131 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649833061.403802746,0 t + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..45cf1874 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,41 @@ +#### db_type: crdb #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:27:49:433:195 +Q2-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q2 finished at: 2022-4-10 23:27:49:496:181 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:27:50:428:392 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,3) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,3) + + Q4 finished at: 2022-4-10 23:27:51:161:516 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-10 23:27:51:436:865 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-10 23:27:51:499:990 + Q5 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649604470.398056723,0 t errcode: HY000 + Q5 failed at: 2022-4-10 23:27:52:10:200 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649604470.398056723,0 t + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..491873ab --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,41 @@ +#### db_type: crdb #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:28:7:120:184 +Q2-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q2 finished at: 2022-4-10 23:28:7:185:32 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:28:8:118:784 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,3) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,3) + + Q4 finished at: 2022-4-10 23:28:8:814:717 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-10 23:28:9:123:65 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-10 23:28:11:123:822 + Q5 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649604488.084931377,0 t errcode: HY000 + Q5 failed at: 2022-4-10 23:28:11:820:214 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649604488.084931377,0 t + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..6a48c564 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,41 @@ +#### db_type: crdb #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 3);' + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:28:26:67:418 +Q2-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q2 finished at: 2022-4-10 23:28:26:131:135 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:28:26:790:762 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,3) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,3) + + Q4 finished at: 2022-4-10 23:28:27:459:335 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-10 23:28:27:797:714 +Q8-T1 execute sql: 'COMMIT TRANSACTION;' +Q8 finished at: 2022-4-10 23:28:27:861:182 + Q5 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649604506.760633062,0 t errcode: HY000 + Q5 failed at: 2022-4-10 23:28:28:372:348 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649604506.760633062,0 t + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_mda_step_wat_c1.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..3e321810 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_mda_step_wat_c1.txt @@ -0,0 +1,41 @@ +#### db_type: crdb #### +#### test_type: mda_step_wat_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:32:7:897:423 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-10 23:32:7:954:15 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:32:8:901:813 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-10 23:32:8:964:269 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute sql: 'BEGIN TRANSACTION;' + Q6 finished at: 2022-4-10 23:32:9:891:403 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-10 23:32:9:943:715 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q9 finished at: 2022-4-10 23:32:10:954:712 +Q10-T1 execute sql: 'COMMIT TRANSACTION;' +Q10 finished at: 2022-4-10 23:32:11:8:709 + Q5 finished at: 2022-4-10 23:32:11:30:241 + Q8 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA errcode: HY000 + Q8 failed at: 2022-4-10 23:32:11:831:931 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_mda_step_wat_c2.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..4127cefd --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_mda_step_wat_c2.txt @@ -0,0 +1,41 @@ +#### db_type: crdb #### +#### test_type: mda_step_wat_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:32:27:617:153 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-10 23:32:27:671:194 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:32:28:620:177 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-10 23:32:28:682:215 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute sql: 'BEGIN TRANSACTION;' + Q6 finished at: 2022-4-10 23:32:29:613:25 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-10 23:32:29:664:700 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-10 23:32:30:685:660 + Q10-T2 execute sql: 'COMMIT TRANSACTION;' +Q9 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA errcode: HY000 +Q9 failed at: 2022-4-10 23:32:31:570:525 + Q10 finished at: 2022-4-10 23:32:31:628:115 + Q8 finished at: 2022-4-10 23:32:31:634:699 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html#abort_reason_pusher_aborted: restart transaction: TransactionRetryWithProtoRefreshError: TransactionAbortedError(ABORT_REA + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..6901a30a --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,42 @@ +#### db_type: crdb #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:18:22:352:872 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-10 23:18:22:415:888 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:18:23:76:950 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-10 23:18:24:86:388 + Q7-T3 execute sql: 'BEGIN TRANSACTION;' + Q7 finished at: 2022-4-10 23:18:35:81:285 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,2) + + Q8 finished at: 2022-4-10 23:18:43:53:311 + Q9-T3 execute sql: 'COMMIT TRANSACTION;' + Q9 finished at: 2022-4-10 23:18:43:382:778 + Q4 failed reason: Timeout has been expired. Connection will be closed., [1] errcode: HY000 + Q4 failed at: 2022-4-10 23:18:53:485:619 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..1cb4689a --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,45 @@ +#### db_type: crdb #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:22:15:0:316 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-10 23:22:15:62:851 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:22:15:993:940 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'COMMIT TRANSACTION;' +Q5 finished at: 2022-4-10 23:22:17:1:966 + Q4 finished at: 2022-4-10 23:22:17:9:837 + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-10 23:22:18:6:520 + Q7-T3 execute sql: 'BEGIN TRANSACTION;' + Q7 finished at: 2022-4-10 23:22:28:2:467 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-10 23:22:28:993:585 + Q9-T3 execute sql: 'COMMIT TRANSACTION;' + Q9 finished at: 2022-4-10 23:22:29:57:949 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_sda_full_write.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_sda_full_write.txt new file mode 100644 index 00000000..ba043475 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_sda_full_write.txt @@ -0,0 +1,47 @@ +#### db_type: crdb #### +#### test_type: sda_full_write #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:22:33:389:154 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-10 23:22:33:450:823 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:22:34:399:525 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-10 23:22:35:399:719 +Q6-T1 execute sql: 'COMMIT TRANSACTION;' +Q6 finished at: 2022-4-10 23:22:35:457:357 + Q4 finished at: 2022-4-10 23:22:35:479:684 + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-10 23:22:36:395:41 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-10 23:22:46:397:324 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q9 finished at: 2022-4-10 23:22:48:133:995 + Q10-T3 execute sql: 'COMMIT TRANSACTION;' + Q10 finished at: 2022-4-10 23:22:48:197:186 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_sda_full_write_committed.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..1ea74b7b --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_sda_full_write_committed.txt @@ -0,0 +1,47 @@ +#### db_type: crdb #### +#### test_type: sda_full_write_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:22:52:537:64 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-10 23:22:52:600:429 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:22:53:536:169 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-10 23:22:54:537:136 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-10 23:22:54:590:997 + Q4 finished at: 2022-4-10 23:22:54:606:17 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-10 23:22:54:664:35 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-10 23:23:4:542:354 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q9 finished at: 2022-4-10 23:23:5:551:960 + Q10-T3 execute sql: 'COMMIT TRANSACTION;' + Q10 finished at: 2022-4-10 23:23:5:608:705 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..87f4c7dc --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,54 @@ +#### db_type: crdb #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:23:46:181:809 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-10 23:23:46:507:193 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:23:47:186:8 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-10 23:23:49:86:703 +Q7-T1 execute sql: 'COMMIT TRANSACTION;' +Q7 finished at: 2022-4-10 23:23:49:147:991 + Q4 finished at: 2022-4-10 23:23:49:153:491 + Q5-T2 execute sql: 'COMMIT TRANSACTION;' + Q5 finished at: 2022-4-10 23:23:49:216:432 + Q8-T3 execute sql: 'BEGIN TRANSACTION;' + Q8 finished at: 2022-4-10 23:23:58:179:55 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q9 finished at: 2022-4-10 23:23:58:869:472 + Q10-T3 execute sql: 'COMMIT TRANSACTION;' + Q10 finished at: 2022-4-10 23:23:58:926:495 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_sda_lost_update_c1.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..f3a73537 --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_sda_lost_update_c1.txt @@ -0,0 +1,38 @@ +#### db_type: crdb #### +#### test_type: sda_lost_update_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-13 14:58:19:7:992 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-13 14:58:19:724:603 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-13 14:58:24:16:813 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-13 14:58:24:81:529 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute sql: 'COMMIT TRANSACTION;' + Q7 finished at: 2022-4-13 14:58:34:19:348 +Q5 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649833098.981855541,0 t errcode: HY000 +Q5 failed at: 2022-4-13 14:58:34:525:884 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649833098.981855541,0 t + diff --git a/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_sda_lost_update_c2.txt b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..7a41b4fd --- /dev/null +++ b/test_result/distributed_result/crdb_test/crdb_single/serializable/wat_sda_lost_update_c2.txt @@ -0,0 +1,38 @@ +#### db_type: crdb #### +#### test_type: sda_lost_update_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN TRANSACTION;' +Q1 finished at: 2022-4-10 23:23:27:555:87 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-10 23:23:28:323:100 + Q3-T2 execute sql: 'BEGIN TRANSACTION;' + Q3 finished at: 2022-4-10 23:23:28:559:476 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-10 23:23:28:619:530 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute sql: 'COMMIT TRANSACTION;' + Q6 finished at: 2022-4-10 23:23:30:564:210 +Q5 failed reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649604207.528359096,0 t errcode: HY000 +Q5 failed at: 2022-4-10 23:23:31:79:894 + +Test Result: Rollback +Reason: Server error [SQL state: 40001]. Server's hint: See: https://www.cockroachlabs.com/docs/v21.2/transaction-retry-error-reference.html: restart transaction: TransactionRetryWithProtoRefreshError: WriteTooOldError: write at timestamp 1649604207.528359096,0 t + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_dda_read_skew_committed.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..b0278d33 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: gp #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:28:28:243:109 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:28:28:256:41 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:28:29:243:106 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 13:28:29:262:81 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 13:28:29:268:545 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:28:29:291:688 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-11 13:28:30:250:568 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:28:30:252:196 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 13:28:40:252:505 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:28:40:252:691 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..81a9c03b --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:28:44:330:175 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:28:44:343:561 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:28:45:330:185 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 13:28:45:343:817 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 13:28:45:350:455 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:28:45:365:891 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-11 13:28:46:337:33 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:28:46:372:110 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 13:28:56:338:995 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:28:56:339:184 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_dda_write_skew.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..8f2cb44f --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: gp #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:29:0:410:248 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:29:0:423:54 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:29:1:410:263 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 13:29:1:424:714 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 13:29:1:432:142 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 13:29:3:429:986 +Q6 finished at: 2022-4-11 13:29:3:435:394 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:29:3:453:378 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 13:29:13:419:24 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 13:29:13:419:211 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_dda_write_skew_committed.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..884a9c91 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: gp #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:29:49:634:863 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:29:49:648:78 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:29:50:634:856 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 13:29:50:651:176 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 13:29:50:658:538 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:29:50:677:868 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-11 13:29:51:641:747 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:29:51:657:373 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 13:30:1:643:571 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:30:1:643:786 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..3411b53b --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: gp #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:29:17:485:628 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-11 13:29:17:498:315 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-11 13:29:17:504:700 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-11 13:29:18:485:650 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-11 13:29:18:502:877 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-11 13:29:18:508:361 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 13:29:18:532:783 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:29:19:500:245 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-11 13:29:29:493:931 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-11 13:29:29:499:593 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 13:29:29:499:793 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..d8fa33d6 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: gp #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:29:33:568:391 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-11 13:29:33:585:74 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:29:34:568:371 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-11 13:29:34:585:115 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-11 13:29:34:594:236 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:29:34:607:888 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-11 13:29:35:577:847 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:29:35:592:234 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,saving,1400) (kevin,checking,1400) + (1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + (2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-11 13:29:45:578:339 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:29:45:578:551 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_mda_step_iat.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..468b5b2e --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: gp #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:30:5:709:312 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-11 13:30:5:722:296 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:30:6:709:314 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-11 13:30:6:724:300 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-11 13:30:7:709:312 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-11 13:30:7:722:646 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-11 13:30:8:716:535 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 13:30:11:739:686 + Q8 finished at: 2022-4-11 13:30:11:744:941 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 13:30:12:722:803 + Q9 finished at: 2022-4-11 13:30:12:728:7 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 13:30:13:727:225 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-11 13:30:23:726:885 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 13:30:23:727:92 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..53c6f291 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,106 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:31:48:104:567 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:31:48:117:642 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:31:49:104:570 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-11 13:31:49:118:428 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 13:31:49:131:438 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-11 13:31:50:104:546 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-11 13:31:50:117:483 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-11 13:31:50:124:16 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:31:50:141:450 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2022-4-11 13:31:51:112:108 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-11 13:31:51:113:753 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-11 13:32:1:113:193 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-11 13:32:1:114:837 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..c7112e90 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,207 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:31:29:11:26 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:31:29:24:160 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:31:30:11:7 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 13:31:30:25:551 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-11 13:31:31:11:15 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-11 13:31:31:23:400 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 13:31:31:36:918 + Q8-T4 execute opt: 'BEGIN' + Q8 finished at: 2022-4-11 13:31:32:11:38 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-11 13:31:32:23:762 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:31:32:36:582 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-4-11 13:31:33:19:257 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 13:31:33:20:923 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-11 13:31:34:18:795 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-11 13:31:34:20:497 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-11 13:31:44:28:445 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-11 13:31:44:28:714 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..752fe7f8 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:30:27:792:799 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-11 13:30:27:806:849 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:30:28:792:792 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-11 13:30:28:807:91 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-11 13:30:29:792:791 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-11 13:30:29:805:790 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-11 13:30:30:799:460 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 13:30:33:807:568 + Q8 finished at: 2022-4-11 13:30:33:812:731 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 13:30:34:805:309 + Q9 finished at: 2022-4-11 13:30:34:810:378 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 13:30:35:805:341 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-11 13:30:45:800:887 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 13:30:45:801:93 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..9cdb9a18 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:30:49:838:513 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-11 13:30:49:851:716 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:30:50:838:509 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-11 13:30:50:852:382 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-11 13:30:51:838:522 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-11 13:30:51:851:639 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-11 13:30:52:847:449 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-11 13:30:53:852:597 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-11 13:30:54:852:731 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 13:30:55:859:56 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 13:30:56:850:623 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 13:30:57:851:402 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-11 13:31:7:848:108 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 13:31:7:848:311 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..0e27281b --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (100) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:32:5:175:885 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-11 13:32:5:187:156 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-11 13:32:5:192:290 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-11 13:32:6:175:890 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-11 13:32:6:187:194 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-11 13:32:6:194:36 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 13:32:6:212:583 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-11 13:32:7:175:897 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-11 13:32:7:186:987 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-11 13:32:7:192:121 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 13:32:7:193:789 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-11 13:32:8:182:924 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-11 13:32:8:209:478 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-11 13:32:18:181:586 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-11 13:32:18:183:253 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..70dc0acc --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,162 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:31:11:921:554 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-11 13:31:11:934:529 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:31:12:921:569 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-11 13:31:12:935:673 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 13:31:12:942:408 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-11 13:31:12:949:713 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-11 13:31:12:956:321 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 13:31:12:968:810 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-11 13:31:13:921:649 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-11 13:31:13:935:288 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-11 13:31:13:943:266 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-11 13:31:13:951:443 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-11 13:31:13:958:686 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 13:31:13:974:776 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2022-4-11 13:31:14:929:122 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-11 13:31:14:930:771 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-11 13:31:24:930:268 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-11 13:31:24:930:487 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_sda_lost_update_committed.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..b29f9875 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: gp #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:28:12:174:972 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-11 13:28:12:186:132 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:28:13:174:959 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-11 13:28:13:188:982 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 13:28:13:200:521 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-11 13:28:14:182:162 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:28:14:224:895 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-11 13:28:24:182:843 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:28:24:183:46 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..10795041 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,60 @@ +#### db_type: gp #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:27:56:101:345 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:27:56:112:951 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:27:57:101:318 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-11 13:27:57:122:74 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 13:27:57:138:650 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-11 13:27:58:107:82 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:27:58:108:737 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-11 13:28:8:116:447 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:28:8:116:646 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:28:8:116:859 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_double_write_skew1.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..292af6d3 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,67 @@ +#### db_type: gp #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:17:0:864:906 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:17:0:877:359 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:17:1:864:894 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 13:17:1:877:397 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 13:17:1:885:731 +Q6-T1 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 13:17:3:892:190 +Q6 finished at: 2022-4-11 13:17:3:898:787 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:17:4:879:336 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-11 13:17:14:873:597 + Q10-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,2) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,2) + + Q10 finished at: 2022-4-11 13:17:14:878:946 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 13:17:14:879:142 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..53a9800d --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,67 @@ +#### db_type: gp #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:17:18:964:120 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:17:18:976:547 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:17:19:964:114 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 13:17:19:977:583 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 13:17:19:985:940 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:17:19:998:284 +Q7-T1 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-11 13:17:20:972:300 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:17:20:991:901 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-11 13:17:30:972:644 + Q10-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,2) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,2) + + Q10 finished at: 2022-4-11 13:17:30:978:56 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 13:17:30:978:345 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_double_write_skew2.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..41339a08 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,67 @@ +#### db_type: gp #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 14:13:45:942:612 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 14:13:45:952:492 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 14:13:46:942:598 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 14:13:46:963:335 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-11 14:13:47:950:923 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 14:13:47:970:912 + Q5 finished at: 2022-4-11 14:13:47:977:518 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 14:13:48:958:146 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q9 finished at: 2022-4-11 14:13:58:959:554 + Q10-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,1) + *(1) expected_result: + (1,1) + *(2) expected_result: + (1,1) + + Q10 finished at: 2022-4-11 14:13:58:965:17 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 14:13:58:965:192 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_read_skew.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..97753cdb --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: gp #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:17:52:116:320 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:17:52:129:716 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:17:53:116:325 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 13:17:53:128:493 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 13:17:53:134:920 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-11 13:17:54:123:929 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 13:17:55:138:163 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:17:56:118:30 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 13:18:6:124:863 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:18:6:125:66 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_read_skew2.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..c239f8a6 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: gp #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:18:42:309:712 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:18:42:322:87 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:18:43:309:726 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 13:18:43:323:786 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 13:18:43:330:885 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-11 13:18:44:316:649 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:18:44:341:271 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 13:18:45:311:367 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 13:18:55:318:323 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:18:55:318:533 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..d35fba94 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: gp #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:18:59:381:988 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:18:59:394:269 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:19:0:381:985 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 13:19:0:396:514 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 13:19:0:403:455 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:19:0:405:71 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-11 13:19:1:389:8 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:19:1:405:312 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 13:19:11:390:361 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:19:11:390:602 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..d5fa94e7 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,61 @@ +#### db_type: gp #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:18:10:192:574 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-11 13:18:10:205:743 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:18:11:192:411 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-11 13:18:11:207:67 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-11 13:18:11:214:35 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:18:11:226:632 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-11 13:18:12:200:87 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:18:12:201:789 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-11 13:18:22:201:135 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:18:22:201:339 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..f03096d5 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,59 @@ +#### db_type: gp #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:18:26:242:464 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-11 13:18:26:255:717 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:18:27:242:471 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-11 13:18:27:260:464 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-11 13:18:27:268:980 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:18:27:285:775 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (1,0) (0,0) + (1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-11 13:18:28:250:299 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:18:28:252:151 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-11 13:18:38:250:989 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:18:38:251:192 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_write_read_skew.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..be51af82 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,72 @@ +#### db_type: gp #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:16:26:646:386 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:16:26:658:893 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:16:27:646:386 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 13:16:27:658:827 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 13:16:27:667:383 +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-11 13:16:28:655:457 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 13:16:29:659:274 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:16:30:659:707 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-11 13:16:40:655:804 + Q10-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,1) + *(1) expected_result: + (1,1) + *(2) expected_result: + (1,1) + + Q10 finished at: 2022-4-11 13:16:40:661:128 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 13:16:40:661:324 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..048da071 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,74 @@ +#### db_type: gp #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:16:44:770:87 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:16:44:782:534 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:16:45:770:83 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 13:16:45:782:287 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 13:16:45:790:511 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:16:45:807:603 +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-11 13:16:46:779:36 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:16:46:792:89 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-11 13:16:56:778:790 + Q10-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,1) + *(1) expected_result: + (1,1) + *(2) expected_result: + (1,1) + + Q10 finished at: 2022-4-11 13:16:56:784:114 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 13:16:56:784:290 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_mda_step_rat.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..3acd03b9 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,147 @@ +#### db_type: gp #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t3;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t3 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t3 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:19:15:502:523 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:19:15:515:78 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:19:16:502:515 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 13:19:16:515:785 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 13:19:16:524:70 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-11 13:19:17:502:526 + Q7-T3 execute sql: 'UPDATE t3 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-11 13:19:17:515:243 + Q8-T3 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-11 13:19:17:523:768 +Q9-T1 execute sql: 'SELECT * FROM t3 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,113-0,1) + (5) expected_result: + (2,113-0,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-11 13:19:18:511:671 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 13:19:18:523:749 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 13:19:19:521:445 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 13:19:20:515:387 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + *(3) expected_result: + (0,1) + (4) expected_result: + + (5) expected_result: + + *(6) expected_result: + (0,1) + + Q13 finished at: 2022-4-11 13:19:30:520:177 + Q14-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,1) + *(1) expected_result: + (1,1) + *(2) expected_result: + (1,1) + *(3) expected_result: + (1,1) + *(4) expected_result: + (1,1) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + + Q14 finished at: 2022-4-11 13:19:30:526:548 + Q15-T4 execute sql: 'SELECT * FROM t3 ORDER BY k;' + current_result: + (2,1) + *(1) expected_result: + (2,1) + *(2) expected_result: + (2,1) + *(3) expected_result: + (2,1) + *(4) expected_result: + (2,1) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + + Q15 finished at: 2022-4-11 13:19:30:532:66 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-11 13:19:30:532:279 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..1cbccd46 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: gp #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN' + Q1 finished at: 2022-4-11 13:19:34:599:125 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-11 13:19:34:612:809 +Q3-T1 execute opt: 'BEGIN' +Q3 finished at: 2022-4-11 13:19:35:599:129 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-11 13:19:35:613:728 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-11 13:19:36:599:117 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-11 13:19:36:612:388 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-11 13:19:36:619:930 + Q8-T2 execute opt: 'BEGIN' + Q8 finished at: 2022-4-11 13:19:37:599:135 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-11 13:19:38:607:154 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-11 13:19:39:612:666 + Q9 finished at: 2022-4-11 13:19:39:621:536 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 13:19:40:613:921 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-11 13:19:41:600:913 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 13:19:51:600:938 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-11 13:19:51:606:565 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-11 13:19:51:608:206 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..ad3cd39c --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,147 @@ +#### db_type: gp #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t3;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t3 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t3 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:19:55:722:138 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:19:55:734:477 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:19:56:722:142 + Q4-T2 execute sql: 'DELETE FROM t2 WHERE k=1;' + Q4 finished at: 2022-4-11 13:19:56:735:572 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-11 13:19:56:745:853 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-11 13:19:57:722:162 + Q7-T3 execute sql: 'DELETE FROM t3 WHERE k=2;' + Q7 finished at: 2022-4-11 13:19:57:734:303 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t2 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-11 13:19:57:749:78 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t3 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-11 13:19:58:733:11 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 13:19:58:743:969 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 13:19:59:739:709 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 13:20:0:749:123 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-11 13:20:10:729:965 + Q14-T4 execute sql: 'SELECT * FROM t2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q14 finished at: 2022-4-11 13:20:10:737:945 + Q15-T4 execute sql: 'SELECT * FROM t3;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q15 finished at: 2022-4-11 13:20:10:745:887 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-11 13:20:10:747:558 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..9299ecef --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: gp #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:20:14:789:553 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-11 13:20:14:803:270 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:20:15:789:549 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-11 13:20:15:808:310 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-11 13:20:15:817:946 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-11 13:20:16:789:596 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-11 13:20:16:808:933 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-11 13:20:16:821:345 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-11 13:20:17:799:761 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 13:20:17:829:946 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 13:20:18:806:158 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 13:20:19:802:742 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-11 13:20:29:798:261 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 13:20:29:799:959 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_sda_dirty_read.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..a19873f1 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: gp #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:14:28:151:230 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:14:28:164:344 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:14:29:151:232 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-11 13:14:29:169:681 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-11 13:14:30:153:18 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:14:31:152:864 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-11 13:14:41:166:834 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 13:14:41:167:18 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_sda_intermediate_read.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..9421f313 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: gp #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:15:3:286:140 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:15:3:299:30 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:15:4:286:130 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-11 13:15:4:297:417 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-11 13:15:5:293:604 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:15:6:287:758 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:15:7:306:113 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-11 13:15:17:293:831 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:15:17:294:28 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..9a80b4bf --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: gp #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:15:21:349:635 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:15:21:362:313 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:15:22:349:451 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-11 13:15:22:360:210 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 13:15:22:361:763 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-11 13:15:23:356:514 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:15:23:371:993 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-11 13:15:33:356:962 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:15:33:357:142 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_sda_lost_self_update.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..deea38f6 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: gp #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:16:9:519:499 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:16:9:532:194 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:16:10:519:487 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-11 13:16:11:525:43 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-11 13:16:11:539:210 + Q4 finished at: 2022-4-11 13:16:11:548:153 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 13:16:12:535:39 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-11 13:16:22:527:251 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:16:22:527:539 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..14ea3650 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: gp #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:14:45:218:408 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:14:45:229:771 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:14:46:218:394 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-11 13:14:46:234:597 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-11 13:14:47:224:998 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:14:48:231:779 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:14:49:220:102 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-11 13:14:59:226:62 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:14:59:226:268 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..f1383500 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,58 @@ +#### db_type: gp #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:15:37:416:880 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-11 13:15:37:430:276 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:15:38:416:821 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-11 13:15:38:430:991 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 13:15:38:450:952 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-11 13:15:39:424:371 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:15:39:426:11 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-11 13:15:49:424:466 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:15:49:424:697 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..012c9126 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,57 @@ +#### db_type: gp #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:15:53:465:400 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-11 13:15:53:478:720 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:15:54:465:410 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-11 13:15:54:481:264 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 13:15:54:495:94 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-11 13:15:55:472:962 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:15:55:474:611 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-11 13:16:5:473:387 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:16:5:473:628 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..fd0f02ac --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,56 @@ +#### db_type: gp #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:23:34:300:947 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:23:34:313:969 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:23:35:300:945 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-11 13:23:36:308:739 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:23:36:324:811 + Q4 finished at: 2022-4-11 13:23:36:333:955 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-11 13:23:36:340:532 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:23:36:363:606 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 13:23:46:310:138 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:23:46:310:349 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..5c42321e --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,36 @@ +#### db_type: gp #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 14:30:26:321:153 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 14:30:26:331:20 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 14:30:27:321:164 + Q4-T2 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 14:30:27:344:822 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected errcode: 40P01 + Q5 failed at: 2022-4-11 14:30:28:849:711 +Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q6 failed at: 2022-4-11 14:30:48:926:164 + +Test Result: Rollback +Reason: ERROR: deadlock detected + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..a96174fd --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,36 @@ +#### db_type: gp #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 14:29:49:429:200 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 14:29:49:438:780 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 14:29:50:429:184 + Q4-T2 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 14:29:50:451:423 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected errcode: 40P01 + Q5 failed at: 2022-4-11 14:29:51:956:233 +Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q6 failed at: 2022-4-11 14:30:12:33:960 + +Test Result: Rollback +Reason: ERROR: deadlock detected + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..e37a44d9 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,36 @@ +#### db_type: gp #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 14:29:11:943:237 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 14:29:11:953:44 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 14:29:12:943:197 + Q4-T2 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 14:29:12:963:453 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected errcode: 40P01 + Q5 failed at: 2022-4-11 14:29:14:468:97 +Q7 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q7 failed at: 2022-4-11 14:29:34:648:142 + +Test Result: Rollback +Reason: ERROR: deadlock detected + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..5f0c2fdf --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:24:41:676:204 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:24:41:689:463 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:24:42:676:194 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 13:24:42:689:644 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 13:24:42:696:0 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 13:24:44:694:873 +Q6 finished at: 2022-4-11 13:24:44:700:107 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:24:44:724:550 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 13:24:54:684:950 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:24:54:685:251 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..aeaeec4e --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:24:58:737:766 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:24:58:750:754 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:24:59:737:755 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 13:24:59:751:70 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 13:24:59:757:495 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 13:25:1:752:161 +Q6 finished at: 2022-4-11 13:25:1:757:356 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:25:2:756:56 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 13:25:12:746:384 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:25:12:746:594 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..d549f64c --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:25:16:801:23 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:25:16:813:258 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:25:17:801:18 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 13:25:17:815:6 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-11 13:25:18:807:728 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:25:18:819:541 + Q5 finished at: 2022-4-11 13:25:18:825:18 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 13:25:19:822:869 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 13:25:29:809:554 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:25:29:809:767 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..342a0c92 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:25:33:864:185 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:25:33:876:425 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:25:34:864:192 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 13:25:34:877:60 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-11 13:25:35:871:105 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:25:37:887:285 + Q5 finished at: 2022-4-11 13:25:37:892:450 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 13:25:37:910:921 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 13:25:47:872:813 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:25:47:873:42 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..069d55e2 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:25:51:943:76 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:25:51:955:482 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:25:52:943:78 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 13:25:52:957:758 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-11 13:25:53:950:16 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:25:53:965:830 + Q5 finished at: 2022-4-11 13:25:53:970:948 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:25:53:991:369 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 13:26:3:951:610 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:26:3:951:928 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_mda_step_wat_c1.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..8c8571f1 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,46 @@ +#### db_type: gp #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t3;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t3 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t3 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 10:27:15:66:491 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 10:27:15:77:63 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 10:27:16:66:583 + Q4-T2 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 10:27:16:88:477 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 10:27:17:66:543 + Q7-T3 execute sql: 'UPDATE t3 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-18 10:27:17:88:845 + Q8-T3 execute sql: 'UPDATE t2 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t3 SET v=1 WHERE k=2;' + Q8 failed reason: ERROR: deadlock detected errcode: 40P01 + Q8 failed at: 2022-4-18 10:27:18:893:920 + Q5 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 + Q5 failed at: 2022-4-18 10:27:36:593:549 +Q9 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q9 failed at: 2022-4-18 10:27:38:971:702 + +Test Result: Rollback +Reason: ERROR: deadlock detected + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_mda_step_wat_c2.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..85d7daa4 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,46 @@ +#### db_type: gp #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t3;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t3 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t3 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 10:28:16:924:365 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 10:28:16:934:866 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 10:28:17:924:318 + Q4-T2 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 10:28:17:946:639 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 10:28:18:924:399 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t3 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-18 10:28:20:938:598 + Q8-T3 execute sql: 'UPDATE t2 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t3 SET v=1 WHERE k=2;' + Q8 failed reason: ERROR: deadlock detected errcode: 40P01 + Q8 failed at: 2022-4-18 10:28:22:743:804 + Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 + Q6 failed at: 2022-4-18 10:28:40:529:723 +Q9 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q9 failed at: 2022-4-18 10:28:42:829:829 + +Test Result: Rollback +Reason: ERROR: deadlock detected + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..0ad55b45 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: gp #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:21:35:805:367 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:21:35:818:372 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:21:36:805:370 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-11 13:21:37:807:92 + Q4 finished at: 2022-4-11 13:21:37:816:867 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:21:38:819:506 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-11 13:21:48:821:135 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-11 13:21:48:839:330 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:21:48:839:547 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..8d8912d3 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: gp #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:21:52:889:392 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:21:52:901:889 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:21:53:889:256 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-11 13:21:54:902:380 + Q4 finished at: 2022-4-11 13:21:54:911:740 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:21:55:902:296 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-11 13:22:5:897:52 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-11 13:22:5:920:977 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:22:5:921:161 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_sda_full_write.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..890ba4b6 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: gp #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:22:9:975:542 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:22:9:987:982 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:22:10:975:538 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-11 13:22:11:982:482 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-11 13:22:12:7:636 + Q4 finished at: 2022-4-11 13:22:12:16:850 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 13:22:12:989:283 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-11 13:22:22:983:206 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:22:22:983:423 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_sda_full_write_committed.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..8435ab06 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: gp #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:22:27:37:164 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:22:27:49:662 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:22:28:37:161 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-11 13:22:29:44:111 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:22:29:59:384 + Q4 finished at: 2022-4-11 13:22:29:68:337 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 13:22:29:80:922 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-11 13:22:39:44:728 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:22:39:44:941 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..d4619b50 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: gp #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:23:18:230:757 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:23:18:243:349 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:23:19:230:738 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-11 13:23:20:236:160 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:23:20:250:693 + Q4 finished at: 2022-4-11 13:23:20:260:309 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 13:23:20:279:986 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-11 13:23:30:238:225 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:23:30:238:429 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_sda_lost_update_c1.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..7b11e073 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: gp #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:22:43:102:64 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-11 13:22:43:113:152 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:22:44:102:76 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-11 13:22:44:115:741 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 13:22:46:116:849 +Q5 finished at: 2022-4-11 13:22:46:122:427 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-11 13:22:46:137:26 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-11 13:22:56:109:787 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:22:56:109:987 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_sda_lost_update_c2.txt b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..ccfbbfbf --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: gp #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:23:0:160:695 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-11 13:23:0:171:578 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:23:1:160:686 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-11 13:23:1:174:211 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:23:3:179:339 +Q5 finished at: 2022-4-11 13:23:3:184:679 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:23:4:174:489 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-11 13:23:14:168:551 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:23:14:168:739 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/result_summary/read-committed_total-result.txt b/test_result/distributed_result/gp_test/gp_dist/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..18ad6ce8 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Avoid + +wat_mda_step_wat_c2: Avoid + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/gp_test/gp_dist/result_summary/serializable_total-result.txt b/test_result/distributed_result/gp_test/gp_dist/result_summary/serializable_total-result.txt new file mode 100644 index 00000000..1ba5280a --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/result_summary/serializable_total-result.txt @@ -0,0 +1,107 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Rollback + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Rollback + +wat_sda_full_write: Rollback + +wat_sda_full_write_committed: Rollback + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Rollback + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/iat_dda_read_skew_committed.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..4a01c038 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_dda_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: gp #### +#### test_type: dda_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:55:10:100:907 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:55:10:114:341 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:55:11:100:904 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 13:55:11:113:623 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 13:55:11:120:6 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:55:11:136:736 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-11 13:55:12:108:598 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:55:12:110:214 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 13:55:22:110:554 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:55:22:110:850 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..08accb28 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:55:26:170:724 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:55:26:185:99 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:55:27:170:706 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 13:55:27:183:926 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 13:55:27:190:768 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:55:27:203:120 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 failed reason: ERROR: could not serialize access due to concurrent update (seg3 9.134.190.63:6001 pid=28565); errcode: 40001 +Q7 failed at: 2022-4-11 13:55:28:879:340 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg3 9.134.190.63:6001 pid=28565); + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/iat_dda_write_skew.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_dda_write_skew.txt new file mode 100644 index 00000000..90661229 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: gp #### +#### test_type: dda_write_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:55:42:237:124 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:55:42:251:614 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:55:43:237:118 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 13:55:43:250:233 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 13:55:43:257:418 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 13:55:45:263:319 +Q6 finished at: 2022-4-11 13:55:45:268:585 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:55:45:292:395 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 13:55:55:246:120 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 13:55:55:246:311 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/iat_dda_write_skew_committed.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..168e6f9c --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: gp #### +#### test_type: dda_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:56:31:498:775 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:56:31:512:72 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:56:32:498:754 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 13:56:32:512:861 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 13:56:32:520:134 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:56:32:537:893 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-11 13:56:33:505:865 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:56:33:523:923 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 13:56:43:507:302 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:56:43:507:503 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..acc0dbf7 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: gp #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:55:59:316:494 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-11 13:55:59:328:904 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-11 13:55:59:335:256 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-11 13:56:0:316:498 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-11 13:56:0:332:411 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-11 13:56:0:337:787 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 13:56:0:358:298 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:56:1:333:446 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-11 13:56:11:324:997 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-11 13:56:11:330:587 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 13:56:11:330:804 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..67b2321a --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: gp #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:56:15:404:237 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-11 13:56:15:420:829 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:56:16:404:229 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-11 13:56:16:421:931 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-11 13:56:16:431:710 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:56:16:449:883 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-11 13:56:17:413:696 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:56:17:428:680 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,saving,1400) (kevin,checking,1400) + (1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + (2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-11 13:56:27:413:881 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:56:27:414:97 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/iat_mda_step_iat.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_mda_step_iat.txt new file mode 100644 index 00000000..4291b00d --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: gp #### +#### test_type: mda_step_iat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:56:47:591:170 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-11 13:56:47:604:777 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:56:48:591:152 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-11 13:56:48:605:846 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-11 13:56:49:591:161 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-11 13:56:49:604:240 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-11 13:56:50:598:202 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 13:56:53:606:145 + Q8 finished at: 2022-4-11 13:56:53:611:386 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 13:56:54:605:709 + Q9 finished at: 2022-4-11 13:56:54:611:103 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 13:56:55:614:25 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-11 13:57:5:602:752 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 13:57:5:602:966 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..37be143f --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:58:29:958:204 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:58:29:971:662 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:58:30:958:185 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-11 13:58:30:970:994 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 13:58:30:982:91 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-11 13:58:31:958:193 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-11 13:58:31:971:931 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-11 13:58:31:978:615 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:58:31:995:707 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-11 13:58:32:965:979 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-11 13:58:32:967:682 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-11 13:58:42:967:386 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-11 13:58:42:969:68 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..d609349e --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,209 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:58:10:875:450 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:58:10:888:902 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:58:11:875:456 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 13:58:11:888:621 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-11 13:58:12:875:465 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-11 13:58:12:888:55 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 13:58:12:904:134 + Q8-T4 execute opt: 'BEGIN' + Q8 finished at: 2022-4-11 13:58:13:875:502 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-11 13:58:13:889:279 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:58:13:904:170 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-11 13:58:14:883:195 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 13:58:14:884:960 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-11 13:58:15:883:684 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-11 13:58:15:885:503 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-11 13:58:25:886:706 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-11 13:58:25:886:969 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..f9df15df --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:57:9:672:840 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-11 13:57:9:686:116 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:57:10:672:818 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-11 13:57:10:685:674 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-11 13:57:11:672:843 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-11 13:57:11:685:803 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-11 13:57:12:679:764 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 13:57:15:690:454 + Q8 finished at: 2022-4-11 13:57:15:695:449 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 13:57:16:690:253 + Q9 finished at: 2022-4-11 13:57:16:695:377 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 13:57:17:688:6 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-11 13:57:27:680:950 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 13:57:27:681:152 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..8ce3ccc7 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:57:31:721:617 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-11 13:57:31:735:169 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:57:32:721:613 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-11 13:57:32:736:43 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-11 13:57:33:721:637 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-11 13:57:33:734:728 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-11 13:57:34:729:980 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-11 13:57:35:735:111 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-11 13:57:36:735:146 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 13:57:37:732:923 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 13:57:38:735:515 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 13:57:39:736:889 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-11 13:57:49:731:164 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 13:57:49:731:375 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..84ccc00d --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (100) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:58:47:30:663 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-11 13:58:47:42:294 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-11 13:58:47:48:472 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-11 13:58:48:30:725 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-11 13:58:48:44:804 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-11 13:58:48:51:652 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 13:58:48:68:370 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-11 13:58:49:30:681 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-11 13:58:49:41:747 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-11 13:58:49:46:972 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 13:58:49:48:592 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-11 13:58:50:37:838 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-11 13:58:50:52:923 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-11 13:59:0:36:335 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-11 13:59:0:38:28 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..678737df --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,164 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:57:53:806:540 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-11 13:57:53:819:782 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:57:54:806:531 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-11 13:57:54:820:755 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 13:57:54:827:608 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-11 13:57:54:834:631 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-11 13:57:54:841:193 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 13:57:54:853:940 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-11 13:57:55:806:532 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-11 13:57:55:823:451 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-11 13:57:55:830:201 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-11 13:57:55:837:461 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-11 13:57:55:844:349 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 13:57:55:856:448 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-11 13:57:56:814:423 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-11 13:57:56:816:159 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-11 13:58:6:815:422 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-11 13:58:6:815:734 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/iat_sda_lost_update_committed.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..179bb34d --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_sda_lost_update_committed.txt @@ -0,0 +1,39 @@ +#### db_type: gp #### +#### test_type: sda_lost_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:54:54:37:631 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-11 13:54:54:48:987 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:54:55:37:633 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-11 13:54:55:51:36 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 13:54:55:70:355 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=4086); errcode: 40001 +Q6 failed at: 2022-4-11 13:54:56:646:994 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=4086); + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..23d6681f --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: gp #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:54:37:966:724 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:54:37:978:448 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:54:38:966:685 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-11 13:54:38:981:915 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 13:54:38:998:251 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-11 13:54:39:972:251 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:54:39:974:25 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-11 13:54:49:976:368 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:54:49:976:552 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:54:49:976:698 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_double_write_skew1.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..9cb7115e --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_double_write_skew1.txt @@ -0,0 +1,44 @@ +#### db_type: gp #### +#### test_type: dda_double_write_skew1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:36:14:861:461 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:36:14:873:579 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:36:15:861:464 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 13:36:15:873:744 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 13:36:15:882:348 +Q6-T1 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 13:36:17:878:738 +Q6 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=27958); errcode: 40001 +Q6 failed at: 2022-4-11 13:36:18:486:587 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=27958); + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..35322115 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,44 @@ +#### db_type: gp #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:36:33:0:717 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:36:33:13:113 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:36:34:0:734 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 13:36:34:13:204 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 13:36:34:21:859 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:36:34:94:239 +Q7-T1 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' +Q7 failed reason: ERROR: could not serialize access due to concurrent update (seg2 9.134.190.63:6000 pid=24868); errcode: 40001 +Q7 failed at: 2022-4-11 13:36:35:715:366 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg2 9.134.190.63:6000 pid=24868); + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_double_write_skew2.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..cf27b81f --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_double_write_skew2.txt @@ -0,0 +1,44 @@ +#### db_type: gp #### +#### test_type: dda_double_write_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 14:12:1:617:368 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 14:12:1:627:243 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 14:12:2:617:371 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 14:12:2:633:33 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-11 14:12:3:625:636 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 14:12:3:639:580 + Q5 failed reason: ERROR: could not serialize access due to concurrent update (seg0 9.135.218.12:6000 pid=12112); errcode: 40001 + Q5 failed at: 2022-4-11 14:12:4:147:403 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg0 9.135.218.12:6000 pid=12112); + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_read_skew.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_read_skew.txt new file mode 100644 index 00000000..7fdaafbb --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: gp #### +#### test_type: dda_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:37:6:175:411 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:37:6:188:330 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:37:7:175:412 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 13:37:7:189:219 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 13:37:7:195:737 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-11 13:37:8:182:589 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 13:37:9:191:663 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:37:10:177:41 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 13:37:20:183:874 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:37:20:184:80 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_read_skew2.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_read_skew2.txt new file mode 100644 index 00000000..d7dccc49 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: gp #### +#### test_type: dda_read_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:37:56:363:978 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:37:56:376:248 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:37:57:363:962 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 13:37:57:378:425 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 13:37:57:385:571 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-11 13:37:58:370:640 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:37:58:382:387 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 13:37:59:365:635 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 13:38:9:372:550 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:38:9:372:782 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..586958e8 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: gp #### +#### test_type: dda_read_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:38:13:428:469 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:38:13:440:561 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:38:14:428:477 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 13:38:14:442:823 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 13:38:14:450:242 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:38:14:451:915 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-11 13:38:15:435:186 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:38:15:450:522 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 13:38:25:436:905 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:38:25:437:134 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..2dba7941 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: gp #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 14:42:20:744:911 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0 ORDER BY k;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-11 14:42:20:758:738 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 14:42:21:744:890 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-11 14:42:21:759:309 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-11 14:42:21:765:607 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 14:42:21:780:428 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0 ORDER BY k;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-11 14:42:22:753:19 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 14:42:22:754:609 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-11 14:42:32:756:73 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 14:42:32:756:273 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..3863c875 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: gp #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:37:40:298:714 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-11 13:37:40:311:359 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:37:41:298:703 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-11 13:37:41:317:114 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-11 13:37:41:325:724 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:37:41:340:700 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-11 13:37:42:306:108 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:37:42:307:696 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-11 13:37:52:307:40 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:37:52:307:265 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_write_read_skew.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..09c16bda --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_write_read_skew.txt @@ -0,0 +1,72 @@ +#### db_type: gp #### +#### test_type: dda_write_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:35:40:664:552 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:35:40:676:719 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:35:41:664:546 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 13:35:41:677:297 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 13:35:41:686:15 +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-11 13:35:42:673:102 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 13:35:43:682:505 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:35:44:678:857 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-11 13:35:54:673:650 + Q10-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,1) + *(1) expected_result: + (1,1) + *(2) expected_result: + (1,1) + + Q10 finished at: 2022-4-11 13:35:54:678:743 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 13:35:54:678:948 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..ed3ab7fd --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,72 @@ +#### db_type: gp #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:35:58:766:72 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:35:58:778:313 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:35:59:766:61 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 13:35:59:778:437 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 13:35:59:787:22 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:35:59:802:426 +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-11 13:36:0:774:754 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:36:0:792:958 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-11 13:36:10:774:488 + Q10-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,1) + *(1) expected_result: + (1,1) + *(2) expected_result: + (1,1) + + Q10 finished at: 2022-4-11 13:36:10:779:522 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 13:36:10:779:698 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/rat_mda_step_rat.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_mda_step_rat.txt new file mode 100644 index 00000000..de69b286 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_mda_step_rat.txt @@ -0,0 +1,147 @@ +#### db_type: gp #### +#### test_type: mda_step_rat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t3;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t3 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t3 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:38:29:557:146 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:38:29:569:632 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:38:30:555:31 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 13:38:30:567:599 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 13:38:30:576:271 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-11 13:38:31:555:18 + Q7-T3 execute sql: 'UPDATE t3 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-11 13:38:31:567:136 + Q8-T3 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-11 13:38:31:575:271 +Q9-T1 execute sql: 'SELECT * FROM t3 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,113-0,1) + (5) expected_result: + (2,113-0,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-11 13:38:32:563:705 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 13:38:32:580:902 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 13:38:33:572:320 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 13:38:34:573:645 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + *(3) expected_result: + (0,1) + (4) expected_result: + + (5) expected_result: + + *(6) expected_result: + (0,1) + + Q13 finished at: 2022-4-11 13:38:44:566:250 + Q14-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,1) + *(1) expected_result: + (1,1) + *(2) expected_result: + (1,1) + *(3) expected_result: + (1,1) + *(4) expected_result: + (1,1) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + + Q14 finished at: 2022-4-11 13:38:44:571:886 + Q15-T4 execute sql: 'SELECT * FROM t3 ORDER BY k;' + current_result: + (2,1) + *(1) expected_result: + (2,1) + *(2) expected_result: + (2,1) + *(3) expected_result: + (2,1) + *(4) expected_result: + (2,1) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + + Q15 finished at: 2022-4-11 13:38:44:577:361 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-11 13:38:44:577:589 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..c0eea391 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: gp #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN' + Q1 finished at: 2022-4-11 13:38:48:639:888 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-11 13:38:48:653:581 +Q3-T1 execute opt: 'BEGIN' +Q3 finished at: 2022-4-11 13:38:49:639:884 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-11 13:38:49:651:940 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-11 13:38:50:639:891 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-11 13:38:50:652:638 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-11 13:38:50:659:438 + Q8-T2 execute opt: 'BEGIN' + Q8 finished at: 2022-4-11 13:38:51:639:915 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-11 13:38:52:647:830 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-11 13:38:53:660:350 + Q9 finished at: 2022-4-11 13:38:53:669:392 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 13:38:54:669:607 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-11 13:38:55:641:599 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 13:39:5:641:675 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-11 13:39:5:647:381 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-11 13:39:5:649:67 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..28310e71 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,147 @@ +#### db_type: gp #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t3;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t3 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t3 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:39:9:760:662 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:39:9:772:763 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:39:10:760:673 + Q4-T2 execute sql: 'DELETE FROM t2 WHERE k=1;' + Q4 finished at: 2022-4-11 13:39:10:773:77 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-11 13:39:10:783:420 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-11 13:39:11:760:656 + Q7-T3 execute sql: 'DELETE FROM t3 WHERE k=2;' + Q7 finished at: 2022-4-11 13:39:11:772:310 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t2 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-11 13:39:11:781:941 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t3 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-11 13:39:12:771:128 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 13:39:12:783:957 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 13:39:13:772:754 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 13:39:14:778:651 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-11 13:39:24:768:746 + Q14-T4 execute sql: 'SELECT * FROM t2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q14 finished at: 2022-4-11 13:39:24:776:753 + Q15-T4 execute sql: 'SELECT * FROM t3;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q15 finished at: 2022-4-11 13:39:24:784:539 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-11 13:39:24:786:203 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..e6c8dde7 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: gp #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:39:28:826:993 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-11 13:39:28:840:354 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:39:29:826:987 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-11 13:39:29:846:263 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-11 13:39:29:856:195 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-11 13:39:30:827:3 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-11 13:39:30:845:157 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-11 13:39:30:854:475 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-11 13:39:31:836:855 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 13:39:31:863:835 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 13:39:32:843:901 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 13:39:33:843:914 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-11 13:39:43:835:679 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 13:39:43:837:446 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/rat_sda_dirty_read.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_sda_dirty_read.txt new file mode 100644 index 00000000..477c731d --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: gp #### +#### test_type: sda_dirty_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:33:42:185:77 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:33:42:197:932 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:33:43:185:49 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-11 13:33:43:198:324 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-11 13:33:44:186:649 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:33:45:186:841 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-11 13:33:55:194:449 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 13:33:55:194:633 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/rat_sda_intermediate_read.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..cc7c946f --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: gp #### +#### test_type: sda_intermediate_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:34:17:339:390 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:34:17:351:659 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:34:18:339:385 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-11 13:34:18:352:316 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-11 13:34:19:346:261 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:34:20:341:79 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:34:21:354:415 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-11 13:34:31:346:917 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:34:31:347:113 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..0082d2e3 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: gp #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:34:35:406:692 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:34:35:418:948 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:34:36:406:728 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-11 13:34:36:421:68 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 13:34:36:422:777 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-11 13:34:37:413:665 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:34:37:444:974 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-11 13:34:47:414:79 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:34:47:414:257 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/rat_sda_lost_self_update.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..3963a3a3 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_sda_lost_self_update.txt @@ -0,0 +1,39 @@ +#### db_type: gp #### +#### test_type: sda_lost_self_update #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:35:23:575:612 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:35:23:588:64 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:35:24:575:630 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-11 13:35:25:580:983 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-11 13:35:25:595:890 + Q4 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=27962); errcode: 40001 + Q4 failed at: 2022-4-11 13:35:26:6:847 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=27962); + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..6ddb2204 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: gp #### +#### test_type: sda_non_repeatable_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:33:59:262:927 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:33:59:273:777 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:34:0:262:933 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-11 13:34:0:277:803 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-11 13:34:1:268:595 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:34:2:287:518 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:34:3:264:579 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-11 13:34:13:270:872 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:34:13:271:50 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..94d6f239 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: gp #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:34:51:462:992 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-11 13:34:51:475:855 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:34:52:462:993 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-11 13:34:52:476:583 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 13:34:52:493:428 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-11 13:34:53:470:262 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:34:53:471:850 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-11 13:35:3:470:399 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:35:3:470:586 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..618f55bf --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: gp #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:35:7:513:381 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-11 13:35:7:526:344 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:35:8:513:378 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-11 13:35:8:528:544 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 13:35:8:545:717 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-11 13:35:9:520:856 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:35:9:522:396 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-11 13:35:19:521:127 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:35:19:521:342 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..794a5a3e --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: gp #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:45:38:663:23 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:45:38:675:514 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:45:39:663:18 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-11 13:45:40:670:568 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:45:40:682:4 + Q4 finished at: 2022-4-11 13:45:40:691:133 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 failed reason: ERROR: could not serialize access due to concurrent update (seg3 9.134.190.63:6001 pid=26712); errcode: 40001 + Q5 failed at: 2022-4-11 13:45:41:199:429 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg3 9.134.190.63:6001 pid=26712); + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..a2a94a4f --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,36 @@ +#### db_type: gp #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 14:26:34:941:476 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 14:26:34:951:230 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 14:26:35:941:428 + Q4-T2 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 14:26:35:955:681 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected errcode: 40P01 + Q5 failed at: 2022-4-11 14:26:37:460:618 +Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q6 failed at: 2022-4-11 14:26:57:546:426 + +Test Result: Rollback +Reason: ERROR: deadlock detected + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..3bb5ff04 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,36 @@ +#### db_type: gp #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 14:27:24:434:872 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 14:27:24:444:489 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 14:27:25:434:850 + Q4-T2 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 14:27:25:450:870 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected errcode: 40P01 + Q5 failed at: 2022-4-11 14:27:26:955:571 +Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q6 failed at: 2022-4-11 14:27:47:39:825 + +Test Result: Rollback +Reason: ERROR: deadlock detected + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..3ec5761f --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,36 @@ +#### db_type: gp #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 14:28:3:351:512 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 14:28:3:361:393 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 14:28:4:351:486 + Q4-T2 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 14:28:4:367:576 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected errcode: 40P01 + Q5 failed at: 2022-4-11 14:28:5:872:516 +Q7 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q7 failed at: 2022-4-11 14:28:26:56:516 + +Test Result: Rollback +Reason: ERROR: deadlock detected + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..4e5df3ed --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,42 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:46:46:23:38 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:46:46:35:950 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:46:47:23:22 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 13:46:47:35:477 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 13:46:47:42:28 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 13:46:49:36:308 +Q6 failed reason: ERROR: could not serialize access due to concurrent update (seg0 9.135.218.12:6000 pid=32037); errcode: 40001 +Q6 failed at: 2022-4-11 13:46:49:643:18 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg0 9.135.218.12:6000 pid=32037); + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..ef6ba9e2 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,42 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:47:3:83:78 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:47:3:96:111 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:47:4:83:66 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 13:47:4:95:456 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 13:47:4:102:256 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 13:47:6:96:798 +Q6 failed reason: ERROR: could not serialize access due to concurrent update (seg0 9.135.218.12:6000 pid=32037); errcode: 40001 +Q6 failed at: 2022-4-11 13:47:6:703:542 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg0 9.135.218.12:6000 pid=32037); + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..bcd4ae31 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,42 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:47:21:139:395 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:47:21:152:273 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:47:22:139:382 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 13:47:22:152:619 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-11 13:47:23:146:171 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:47:23:164:674 + Q5 failed reason: ERROR: could not serialize access due to concurrent update (seg2 9.134.190.63:6000 pid=26711); errcode: 40001 + Q5 failed at: 2022-4-11 13:47:23:672:173 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg2 9.134.190.63:6000 pid=26711); + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..aedf408e --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,42 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:47:38:201:792 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:47:38:214:227 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:47:39:201:783 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 13:47:39:215:85 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-11 13:47:40:208:857 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:47:42:214:908 + Q5 failed reason: ERROR: could not serialize access due to concurrent update (seg2 9.134.190.63:6000 pid=26711); errcode: 40001 + Q5 failed at: 2022-4-11 13:47:42:721:854 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg2 9.134.190.63:6000 pid=26711); + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..7aa1d324 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:47:56:256:35 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:47:56:268:679 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:47:57:256:25 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 13:47:57:269:408 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-11 13:47:58:262:862 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 13:47:58:275:74 + Q5 failed reason: ERROR: could not serialize access due to concurrent update (seg2 9.134.190.63:6000 pid=26711); errcode: 40001 + Q5 failed at: 2022-4-11 13:47:58:781:950 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg2 9.134.190.63:6000 pid=26711); + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/wat_mda_step_wat_c1.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..bab01714 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_mda_step_wat_c1.txt @@ -0,0 +1,46 @@ +#### db_type: gp #### +#### test_type: mda_step_wat_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t3;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t3 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t3 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 10:26:24:666:112 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 10:26:24:676:649 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 10:26:25:666:125 + Q4-T2 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 10:26:25:683:297 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 10:26:26:666:100 + Q7-T3 execute sql: 'UPDATE t3 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-18 10:26:26:681:333 + Q8-T3 execute sql: 'UPDATE t2 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t3 SET v=1 WHERE k=2;' + Q8 failed reason: ERROR: deadlock detected errcode: 40P01 + Q8 failed at: 2022-4-18 10:26:28:486:341 + Q5 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 + Q5 failed at: 2022-4-18 10:26:46:188:337 +Q9 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q9 failed at: 2022-4-18 10:26:48:571:363 + +Test Result: Rollback +Reason: ERROR: deadlock detected + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/wat_mda_step_wat_c2.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..79f8ec2a --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_mda_step_wat_c2.txt @@ -0,0 +1,46 @@ +#### db_type: gp #### +#### test_type: mda_step_wat_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t3;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'CREATE TABLE t3 (k INT, v INT) DISTRIBUTED RANDOMLY PARTITION BY RANGE(v) (PARTITION p0 START (0) INCLUSIVE END (2) EXCLUSIVE, PARTITION p1 START (2) INCLUSIVE END (4) EXCLUSIVE);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t3 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 10:25:42:110:483 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 10:25:42:120:885 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 10:25:43:110:489 + Q4-T2 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 10:25:43:125:810 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 10:25:44:110:572 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t3 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-18 10:25:46:124:223 + Q8-T3 execute sql: 'UPDATE t2 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t3 SET v=1 WHERE k=2;' + Q8 failed reason: ERROR: deadlock detected errcode: 40P01 + Q8 failed at: 2022-4-18 10:25:47:929:71 + Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 + Q6 failed at: 2022-4-18 10:26:5:715:812 +Q9 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q9 failed at: 2022-4-18 10:26:8:15:745 + +Test Result: Rollback +Reason: ERROR: deadlock detected + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..06ac2eb2 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: gp #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:43:40:235:706 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:43:40:248:753 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:43:41:235:715 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-11 13:43:42:237:502 + Q4 finished at: 2022-4-11 13:43:42:247:738 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:43:43:256:487 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-11 13:43:53:245:434 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-11 13:43:53:261:748 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:43:53:261:950 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..cee85466 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,30 @@ +#### db_type: gp #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:43:57:320:807 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:43:57:333:280 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:43:58:320:795 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-11 13:43:59:332:508 + Q4 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=32041); errcode: 40001 + Q4 failed at: 2022-4-11 13:43:59:744:424 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=32041); + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/wat_sda_full_write.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_sda_full_write.txt new file mode 100644 index 00000000..4b624eb1 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_sda_full_write.txt @@ -0,0 +1,32 @@ +#### db_type: gp #### +#### test_type: sda_full_write #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:44:14:372:696 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:44:14:385:206 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:44:15:372:681 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-11 13:44:16:379:609 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-11 13:44:16:399:418 + Q4 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=32041); errcode: 40001 + Q4 failed at: 2022-4-11 13:44:16:810:102 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=32041); + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/wat_sda_full_write_committed.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..bc49a41e --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_sda_full_write_committed.txt @@ -0,0 +1,32 @@ +#### db_type: gp #### +#### test_type: sda_full_write_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:44:31:428:514 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:44:31:441:29 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:44:32:428:501 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-11 13:44:33:435:446 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:44:33:448:873 + Q4 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=32041); errcode: 40001 + Q4 failed at: 2022-4-11 13:44:33:859:726 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=32041); + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..1c77877e --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,39 @@ +#### db_type: gp #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:45:22:598:789 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 13:45:22:611:278 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:45:23:598:783 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-11 13:45:24:604:451 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 13:45:24:624:510 + Q4 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=32041); errcode: 40001 + Q4 failed at: 2022-4-11 13:45:25:35:153 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=32041); + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/wat_sda_lost_update_c1.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..3ea46809 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_sda_lost_update_c1.txt @@ -0,0 +1,39 @@ +#### db_type: gp #### +#### test_type: sda_lost_update_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:44:47:481:207 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-11 13:44:47:492:382 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:44:48:481:183 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-11 13:44:48:494:59 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 13:44:50:498:358 +Q5 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=32038); errcode: 40001 +Q5 failed at: 2022-4-11 13:44:51:5:422 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=32038); + diff --git a/test_result/distributed_result/gp_test/gp_dist/serializable/wat_sda_lost_update_c2.txt b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..be06cafd --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_dist/serializable/wat_sda_lost_update_c2.txt @@ -0,0 +1,39 @@ +#### db_type: gp #### +#### test_type: sda_lost_update_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:45:4:545:87 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-11 13:45:4:556:254 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:45:5:545:212 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-11 13:45:5:558:65 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 13:45:7:560:662 +Q5 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=32038); errcode: 40001 +Q5 failed at: 2022-4-11 13:45:8:67:826 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=32038); + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/iat_dda_read_skew_committed.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..b6985d44 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: gp #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:57:12:824:612 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 12:57:12:836:415 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:57:13:824:601 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 12:57:13:838:35 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 12:57:13:844:653 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:57:13:861:813 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-11 12:57:14:830:225 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:57:14:831:814 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 12:57:24:833:421 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:57:24:833:635 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..64be99f9 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:57:28:891:725 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 12:57:28:902:737 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:57:29:891:689 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 12:57:29:905:956 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 12:57:29:913:3 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:57:29:934:634 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-11 12:57:30:898:664 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:57:30:912:990 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 12:57:40:900:16 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:57:40:900:220 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/iat_dda_write_skew.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..92de881c --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: gp #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:57:44:954:218 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 12:57:44:965:161 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:57:45:954:211 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 12:57:45:966:381 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 12:57:45:973:199 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 12:57:47:971:687 +Q6 finished at: 2022-4-11 12:57:47:976:856 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:57:47:987:530 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 12:57:57:962:623 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 12:57:57:962:815 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/iat_dda_write_skew_committed.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..0eb68f98 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: gp #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:58:34:214:936 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 12:58:34:226:988 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:58:35:214:931 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 12:58:35:229:13 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 12:58:35:235:678 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:58:35:253:244 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-11 12:58:36:221:808 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:58:36:239:644 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 12:58:46:223:202 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:58:46:223:390 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..ee29034a --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: gp #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:58:2:27:841 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-11 12:58:2:40:668 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-11 12:58:2:47:702 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-11 12:58:3:27:832 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-11 12:58:3:43:541 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-11 12:58:3:49:83 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 12:58:3:60:256 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:58:4:38:820 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-11 12:58:14:36:252 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-11 12:58:14:41:574 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 12:58:14:41:767 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..00fa66da --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: gp #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:58:18:132:300 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-11 12:58:18:152:908 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:58:19:132:287 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-11 12:58:19:151:431 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-11 12:58:19:160:654 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:58:19:180:65 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-11 12:58:20:141:752 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:58:20:155:678 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,saving,1400) (kevin,checking,1400) + (1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + (2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-11 12:58:30:141:896 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:58:30:142:205 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/iat_mda_step_iat.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..703e462b --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: gp #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:58:50:295:955 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-11 12:58:50:309:8 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:58:51:295:964 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-11 12:58:51:308:413 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-11 12:58:52:295:957 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-11 12:58:52:307:56 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-11 12:58:53:303:46 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 12:58:56:308:676 + Q8 finished at: 2022-4-11 12:58:56:314:21 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 12:58:57:318:846 + Q9 finished at: 2022-4-11 12:58:57:324:197 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 12:58:58:317:573 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-11 12:59:8:313:72 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 12:59:8:313:297 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..f8111cf1 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,106 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:0:32:676:97 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:0:32:687:336 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:0:33:676:115 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-11 13:0:33:688:652 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 13:0:33:705:569 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-11 13:0:34:676:103 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-11 13:0:34:687:346 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-11 13:0:34:694:145 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 13:0:34:708:150 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2022-4-11 13:0:35:681:898 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-11 13:0:35:683:602 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-11 13:0:45:684:686 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-11 13:0:45:686:324 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..9c5d4d22 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,207 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:0:13:587:775 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 13:0:13:599:304 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 13:0:14:587:773 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 13:0:14:600:200 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-11 13:0:15:587:790 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-11 13:0:15:600:92 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 13:0:15:614:753 + Q8-T4 execute opt: 'BEGIN' + Q8 finished at: 2022-4-11 13:0:16:587:806 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-11 13:0:16:601:195 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 13:0:16:621:377 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-4-11 13:0:17:593:523 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 13:0:17:595:211 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-11 13:0:18:593:442 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-11 13:0:18:595:73 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-11 13:0:28:604:844 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-11 13:0:28:605:94 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..940d1826 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:59:12:391:894 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-11 12:59:12:405:321 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:59:13:391:881 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-11 12:59:13:403:845 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-11 12:59:14:391:879 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-11 12:59:14:402:767 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-11 12:59:15:399:318 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 12:59:18:408:286 + Q8 finished at: 2022-4-11 12:59:18:413:359 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 12:59:19:410:954 + Q9 finished at: 2022-4-11 12:59:19:415:820 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 12:59:20:407:94 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-11 12:59:30:399:762 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 12:59:30:399:982 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..bab370fb --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:59:34:442:817 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-11 12:59:34:455:886 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:59:35:442:810 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-11 12:59:35:454:769 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-11 12:59:36:442:825 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-11 12:59:36:454:141 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-11 12:59:37:452:621 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 12:59:40:454:709 + Q8 finished at: 2022-4-11 12:59:40:460:817 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 12:59:41:459:30 + Q9 finished at: 2022-4-11 12:59:41:464:939 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 12:59:42:459:789 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-11 12:59:52:451:683 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 12:59:52:451:913 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..1f35803c --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 13:0:49:745:803 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-11 13:0:49:756:794 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-11 13:0:49:762:113 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-11 13:0:50:745:818 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-11 13:0:50:757:8 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-11 13:0:50:764:51 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 13:0:50:784:126 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-11 13:0:51:745:834 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-11 13:0:51:756:937 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-11 13:0:51:762:302 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 13:0:51:763:961 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-11 13:0:52:752:819 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-11 13:0:52:779:326 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-11 13:1:2:751:335 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-11 13:1:2:752:897 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..aaba9d81 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,162 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:59:56:520:289 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-11 12:59:56:532:261 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:59:57:520:310 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-11 12:59:57:532:451 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 12:59:57:539:348 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-11 12:59:57:544:663 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-11 12:59:57:551:283 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 12:59:57:564:423 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-11 12:59:58:520:304 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-11 12:59:58:533:161 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-11 12:59:58:539:707 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-11 12:59:58:544:765 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-11 12:59:58:551:89 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 12:59:58:562:80 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2022-4-11 12:59:59:527:889 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-11 12:59:59:529:518 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-11 13:0:9:528:928 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-11 13:0:9:529:148 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/iat_sda_lost_update_committed.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..b53235ef --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: gp #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:56:56:760:790 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-11 12:56:56:771:607 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:56:57:760:786 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-11 12:56:57:774:778 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 12:56:57:790:899 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-11 12:56:58:767:808 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:56:58:780:903 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-11 12:57:8:768:445 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 12:57:8:768:629 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..00313de2 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,60 @@ +#### db_type: gp #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:56:40:695:132 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 12:56:40:706:456 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:56:41:695:147 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-11 12:56:41:715:677 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 12:56:41:727:347 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-11 12:56:42:701:59 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:56:42:702:672 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-11 12:56:52:710:383 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 12:56:52:710:592 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:56:52:710:762 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_double_write_skew1.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..9f06ada5 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,67 @@ +#### db_type: gp #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:27:22:891:679 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:27:22:904:191 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:27:23:891:667 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 12:27:23:905:272 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 12:27:23:913:682 +Q6-T1 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 12:27:25:910:859 +Q6 finished at: 2022-4-11 12:27:25:917:647 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:27:26:909:471 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-11 12:27:36:900:27 + Q10-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,2) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,2) + + Q10 finished at: 2022-4-11 12:27:36:905:218 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 12:27:36:905:412 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..67c508fa --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,67 @@ +#### db_type: gp #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:27:40:986:935 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:27:40:999:448 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:27:41:986:896 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 12:27:42:6:552 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 12:27:42:12:749 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:27:42:29:768 +Q7-T1 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-11 12:27:42:995:398 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:27:43:19:82 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-11 12:27:52:995:249 + Q10-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,2) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,2) + + Q10 finished at: 2022-4-11 12:27:53:0:336 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 12:27:53:0:541 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_double_write_skew2.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..17f1165a --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,67 @@ +#### db_type: gp #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:27:57:124:301 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:27:57:136:830 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:27:58:124:285 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 12:27:58:138:424 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-11 12:27:59:131:141 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:27:59:150:438 + Q5 finished at: 2022-4-11 12:27:59:156:776 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 12:28:0:174:342 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q9 finished at: 2022-4-11 12:28:10:132:716 + Q10-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,1) + *(1) expected_result: + (1,1) + *(2) expected_result: + (1,1) + + Q10 finished at: 2022-4-11 12:28:10:137:842 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 12:28:10:138:37 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_read_skew.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..ae56cb79 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: gp #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:28:14:209:141 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 12:28:14:220:192 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:28:15:209:145 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 12:28:15:223:42 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 12:28:15:229:202 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-11 12:28:16:214:668 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 12:28:17:229:82 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:28:18:210:853 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 12:28:28:217:417 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:28:28:217:636 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_read_skew2.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..6007c42f --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: gp #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:29:4:416:265 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:29:4:428:685 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:29:5:416:273 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 12:29:5:432:430 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 12:29:5:437:250 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-11 12:29:6:423:165 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:29:6:439:77 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 12:29:7:417:821 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 12:29:17:424:729 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:29:17:424:951 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..469436d7 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: gp #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:29:21:481:608 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:29:21:493:978 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:29:22:481:594 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 12:29:22:494:30 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 12:29:22:498:786 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:29:22:500:516 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-11 12:29:23:488:522 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:29:23:513:26 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 12:29:33:490:41 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:29:33:490:277 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..91d11a13 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,61 @@ +#### db_type: gp #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:28:32:276:152 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-11 12:28:32:289:396 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:28:33:276:168 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-11 12:28:33:287:901 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-11 12:28:33:293:696 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:28:33:317:498 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-11 12:28:34:283:500 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:28:34:285:109 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-11 12:28:44:284:608 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:28:44:284:818 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..5b0a7b5c --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,59 @@ +#### db_type: gp #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:28:48:332:127 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-11 12:28:48:345:381 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:28:49:332:137 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-11 12:28:49:347:26 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-11 12:28:49:359:723 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:28:49:377:865 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (1,0) (0,0) + (1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-11 12:28:50:339:522 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:28:50:341:300 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-11 12:29:0:340:613 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:29:0:340:825 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_write_read_skew.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..15f720fb --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,72 @@ +#### db_type: gp #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:26:48:619:914 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:26:48:632:521 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:26:49:619:905 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 12:26:49:632:16 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 12:26:49:638:334 +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-11 12:26:50:626:913 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 12:26:51:634:706 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:26:52:639:176 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-11 12:27:2:629:0 + Q10-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,1) + *(1) expected_result: + (1,1) + *(2) expected_result: + (1,1) + + Q10 finished at: 2022-4-11 12:27:2:634:428 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 12:27:2:634:648 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..e4e305aa --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,74 @@ +#### db_type: gp #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:27:6:782:146 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:27:6:794:893 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:27:7:782:184 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 12:27:7:795:507 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 12:27:7:801:792 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:27:7:815:66 +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-11 12:27:8:789:99 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:27:8:807:443 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-11 12:27:18:790:633 + Q10-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,1) + *(1) expected_result: + (1,1) + *(2) expected_result: + (1,1) + + Q10 finished at: 2022-4-11 12:27:18:796:196 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 12:27:18:796:423 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/rat_mda_step_rat.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..3a3e1153 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,147 @@ +#### db_type: gp #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t3;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t3 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t3 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:29:37:624:541 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:29:37:637:247 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:29:38:624:552 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 12:29:38:636:695 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 12:29:38:642:930 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-11 12:29:39:624:553 + Q7-T3 execute sql: 'UPDATE t3 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-11 12:29:39:637:370 + Q8-T3 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-11 12:29:39:644:47 +Q9-T1 execute sql: 'SELECT * FROM t3 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-11 12:29:40:633:658 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 12:29:40:651:684 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 12:29:41:635:472 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 12:29:42:638:795 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + *(5) expected_result: + (0,1) + *(6) expected_result: + (0,1) + + Q13 finished at: 2022-4-11 12:29:52:642:211 + Q14-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,1) + *(1) expected_result: + (1,1) + *(2) expected_result: + (1,1) + *(3) expected_result: + (1,1) + *(4) expected_result: + (1,1) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + + Q14 finished at: 2022-4-11 12:29:52:647:726 + Q15-T4 execute sql: 'SELECT * FROM t3 ORDER BY k;' + current_result: + (2,1) + *(1) expected_result: + (2,1) + *(2) expected_result: + (2,1) + *(3) expected_result: + (2,1) + *(4) expected_result: + (2,1) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + + Q15 finished at: 2022-4-11 12:29:52:653:273 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-11 12:29:52:653:624 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..31fd4b13 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: gp #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN' + Q1 finished at: 2022-4-11 12:29:56:716:583 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-11 12:29:56:728:78 +Q3-T1 execute opt: 'BEGIN' +Q3 finished at: 2022-4-11 12:29:57:716:572 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-11 12:29:57:730:595 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-11 12:29:58:716:574 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-11 12:29:58:727:790 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-11 12:29:58:733:578 + Q8-T2 execute opt: 'BEGIN' + Q8 finished at: 2022-4-11 12:29:59:716:602 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-11 12:30:0:722:308 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-11 12:30:1:731:342 + Q9 finished at: 2022-4-11 12:30:1:740:282 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 12:30:2:734:326 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-11 12:30:3:718:331 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 12:30:13:718:302 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-11 12:30:13:724:159 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-11 12:30:13:725:890 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..c6fdda55 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,147 @@ +#### db_type: gp #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t3;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t3 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t3 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:30:17:849:106 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:30:17:861:243 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:30:18:849:89 + Q4-T2 execute sql: 'DELETE FROM t2 WHERE k=1;' + Q4 finished at: 2022-4-11 12:30:18:860:686 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-11 12:30:18:868:872 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-11 12:30:19:849:103 + Q7-T3 execute sql: 'DELETE FROM t3 WHERE k=2;' + Q7 finished at: 2022-4-11 12:30:19:861:17 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t2 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-11 12:30:19:870:547 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t3 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-11 12:30:20:859:958 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 12:30:20:874:557 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 12:30:21:862:557 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 12:30:22:866:921 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-11 12:30:32:856:984 + Q14-T4 execute sql: 'SELECT * FROM t2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q14 finished at: 2022-4-11 12:30:32:864:698 + Q15-T4 execute sql: 'SELECT * FROM t3;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q15 finished at: 2022-4-11 12:30:32:872:245 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-11 12:30:32:873:820 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..47c93493 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: gp #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:30:36:910:79 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-11 12:30:36:924:326 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:30:37:910:54 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-11 12:30:37:920:583 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-11 12:30:37:928:228 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-11 12:30:38:910:66 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-11 12:30:38:921:47 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-11 12:30:38:929:41 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-11 12:30:39:923:369 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 12:30:39:936:799 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 12:30:40:921:702 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 12:30:41:921:472 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-11 12:30:51:918:607 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 12:30:51:920:192 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/rat_sda_dirty_read.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..7d20b6e2 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: gp #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:24:50:95:376 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:24:50:108:195 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:24:51:95:357 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-11 12:24:51:114:278 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-11 12:24:52:97:77 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:24:53:96:940 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-11 12:25:3:110:845 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 12:25:3:111:27 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/rat_sda_intermediate_read.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..e3cf2923 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: gp #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:25:25:241:31 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:25:25:253:513 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:25:26:241:12 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-11 12:25:26:251:576 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-11 12:25:27:247:909 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:25:28:242:588 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:25:29:259:82 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-11 12:25:39:248:524 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 12:25:39:248:706 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..df059c11 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: gp #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:25:43:309:658 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:25:43:322:103 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:25:44:309:659 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-11 12:25:44:320:175 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 12:25:44:321:665 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-11 12:25:45:316:573 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:25:45:332:82 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-11 12:25:55:317:153 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 12:25:55:317:334 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/rat_sda_lost_self_update.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..adc2ebce --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: gp #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:26:31:496:312 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:26:31:508:775 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:26:32:496:289 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-11 12:26:33:501:763 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-11 12:26:33:519:780 + Q4 finished at: 2022-4-11 12:26:33:528:677 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 12:26:34:511:691 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-11 12:26:44:503:899 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 12:26:44:504:88 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..0f92c2a0 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: gp #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:25:7:176:922 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 12:25:7:188:12 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:25:8:176:914 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-11 12:25:8:191:523 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-11 12:25:9:182:541 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:25:10:195:946 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:25:11:178:573 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-11 12:25:21:184:595 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 12:25:21:184:779 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..32fd6117 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,58 @@ +#### db_type: gp #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:25:59:375:160 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-11 12:25:59:389:560 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:26:0:375:154 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-11 12:26:0:386:776 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 12:26:0:409:85 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-11 12:26:1:382:552 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:26:1:384:170 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-11 12:26:11:382:638 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 12:26:11:382:827 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..dc23ada2 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,57 @@ +#### db_type: gp #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:26:15:427:112 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-11 12:26:15:440:834 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:26:16:427:264 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-11 12:26:16:442:948 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 12:26:16:458:141 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-11 12:26:17:434:517 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:26:17:436:124 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-11 12:26:27:434:713 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 12:26:27:434:894 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..1df88bfc --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,67 @@ +#### db_type: gp #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:44:48:698:135 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:44:48:710:664 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:44:49:698:149 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 12:44:49:710:580 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-11 12:44:50:705:10 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:44:50:716:500 + Q5 finished at: 2022-4-11 12:44:50:723:168 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:44:50:735:376 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q9 finished at: 2022-4-11 12:45:0:707:137 + Q10-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,1) + *(1) expected_result: + (1,1) + *(2) expected_result: + (1,1) + + Q10 finished at: 2022-4-11 12:45:0:712:461 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 12:45:0:712:644 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..4393731b --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,36 @@ +#### db_type: gp #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:45:4:800:874 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:45:4:813:547 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:45:5:800:891 + Q4-T2 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 12:45:5:813:537 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected errcode: 40P01 + Q5 failed at: 2022-4-11 12:45:7:318:489 +Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q6 failed at: 2022-4-11 12:45:27:405:777 + +Test Result: Rollback +Reason: ERROR: deadlock detected + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..76421f95 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,36 @@ +#### db_type: gp #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:45:31:494:447 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:45:31:506:904 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:45:32:494:457 + Q4-T2 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 12:45:32:508:343 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected errcode: 40P01 + Q5 failed at: 2022-4-11 12:45:34:13:59 +Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q6 failed at: 2022-4-11 12:45:54:99:341 + +Test Result: Rollback +Reason: ERROR: deadlock detected + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..6d3b6948 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,36 @@ +#### db_type: gp #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:45:58:184:883 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:45:58:197:534 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:45:59:184:886 + Q4-T2 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 12:45:59:199:26 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected errcode: 40P01 + Q5 failed at: 2022-4-11 12:46:0:703:824 +Q7 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q7 failed at: 2022-4-11 12:46:20:889:734 + +Test Result: Rollback +Reason: ERROR: deadlock detected + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..5008ea7f --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:46:24:982:105 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 12:46:24:993:109 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:46:25:982:142 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 12:46:25:995:970 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 12:46:26:10:163 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 12:46:27:999:579 +Q6 finished at: 2022-4-11 12:46:28:10:408 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:46:28:27:112 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 12:46:37:990:499 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:46:37:990:716 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..96f7a007 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:46:42:87:134 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 12:46:42:98:402 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:46:43:87:121 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 12:46:43:101:238 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 12:46:43:108:7 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 12:46:45:111:223 +Q6 finished at: 2022-4-11 12:46:45:116:517 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:46:46:113:20 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 12:46:56:95:411 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:46:56:95:632 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..1cf1917e --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:47:0:161:609 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:47:0:174:224 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:47:1:161:607 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 12:47:1:174:977 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-11 12:47:2:168:480 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:47:2:184:748 + Q5 finished at: 2022-4-11 12:47:2:190:185 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 12:47:3:186:317 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 12:47:13:169:895 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:47:13:170:104 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..ed090d74 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:47:17:233:611 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:47:17:246:271 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:47:18:233:562 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 12:47:18:244:549 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-11 12:47:19:240:425 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:47:21:246:438 + Q5 finished at: 2022-4-11 12:47:21:252:95 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 12:47:21:265:337 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 12:47:31:241:859 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:47:31:242:207 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..35516b2f --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:47:35:303:274 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:47:35:315:853 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:47:36:303:277 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 12:47:36:316:164 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-11 12:47:37:310:111 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:47:37:322:263 + Q5 finished at: 2022-4-11 12:47:37:327:895 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:47:37:339:976 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 12:47:47:311:744 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:47:47:311:975 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/wat_mda_step_wat_c1.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..46c5a4d2 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,46 @@ +#### db_type: gp #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t3;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t3 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t3 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 10:20:57:467:238 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 10:20:57:481:193 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 10:20:58:467:214 + Q4-T2 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 10:20:58:489:466 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 10:20:59:467:220 + Q7-T3 execute sql: 'UPDATE t3 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-18 10:20:59:489:312 + Q8-T3 execute sql: 'UPDATE t2 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t3 SET v=1 WHERE k=2;' + Q8 failed reason: ERROR: deadlock detected errcode: 40P01 + Q8 failed at: 2022-4-18 10:21:1:294:582 + Q5 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 + Q5 failed at: 2022-4-18 10:21:18:994:830 +Q9 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q9 failed at: 2022-4-18 10:21:21:372:464 + +Test Result: Rollback +Reason: ERROR: deadlock detected + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/wat_mda_step_wat_c2.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..e032ea6f --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,46 @@ +#### db_type: gp #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t3;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t3 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t3 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 10:20:17:994:618 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 10:20:18:8:721 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 10:20:18:994:599 + Q4-T2 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 10:20:19:20:289 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 10:20:19:994:719 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t3 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-18 10:20:22:9:184 + Q8-T3 execute sql: 'UPDATE t2 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t3 SET v=1 WHERE k=2;' + Q8 failed reason: ERROR: deadlock detected errcode: 40P01 + Q8 failed at: 2022-4-18 10:20:23:814:261 + Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 + Q6 failed at: 2022-4-18 10:20:41:599:828 +Q9 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q9 failed at: 2022-4-18 10:20:43:899:746 + +Test Result: Rollback +Reason: ERROR: deadlock detected + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..953e4592 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: gp #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:42:50:137:988 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:42:50:150:890 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:42:51:137:963 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-11 12:42:52:139:961 + Q4 finished at: 2022-4-11 12:42:52:149:614 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:42:53:152:119 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-11 12:43:3:162:715 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-11 12:43:3:188:644 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 12:43:3:188:910 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..7338eb48 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: gp #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:43:7:239:57 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:43:7:251:435 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:43:8:238:853 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-11 12:43:9:254:358 + Q4 finished at: 2022-4-11 12:43:9:263:507 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:43:10:255:567 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-11 12:43:20:246:673 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-11 12:43:20:265:739 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 12:43:20:265:942 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/wat_sda_full_write.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..a66f25cd --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: gp #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:43:24:316:654 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:43:24:329:552 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:43:25:316:501 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-11 12:43:26:323:243 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-11 12:43:26:335:503 + Q4 finished at: 2022-4-11 12:43:26:345:44 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 12:43:27:342:123 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-11 12:43:37:323:986 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 12:43:37:324:162 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/wat_sda_full_write_committed.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..5c10574f --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: gp #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:43:41:378:669 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:43:41:391:394 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:43:42:378:656 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-11 12:43:43:386:754 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:43:43:411:554 + Q4 finished at: 2022-4-11 12:43:43:420:732 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 12:43:43:432:831 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-11 12:43:53:386:144 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 12:43:53:386:345 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..024990d2 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: gp #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:44:32:587:289 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:44:32:599:761 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:44:33:587:292 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-11 12:44:34:592:579 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:44:34:607:481 + Q4 finished at: 2022-4-11 12:44:34:616:636 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 12:44:34:629:835 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-11 12:44:44:594:675 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 12:44:44:594:974 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/wat_sda_lost_update_c1.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..787d7383 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: gp #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:43:57:463:501 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-11 12:43:57:474:623 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:43:58:463:495 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-11 12:43:58:477:357 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 12:44:0:492:231 +Q5 finished at: 2022-4-11 12:44:0:497:768 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-11 12:44:0:509:12 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-11 12:44:10:471:185 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 12:44:10:471:368 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/read-committed/wat_sda_lost_update_c2.txt b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..96bfee69 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: gp #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:44:14:524:775 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-11 12:44:14:535:860 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:44:15:524:733 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-11 12:44:15:539:234 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:44:17:538:894 +Q5 finished at: 2022-4-11 12:44:17:544:151 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:44:18:536:518 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-11 12:44:28:532:175 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 12:44:28:532:591 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/result_summary/read-committed_total-result.txt b/test_result/distributed_result/gp_test/gp_single/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..18ad6ce8 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Avoid + +wat_mda_step_wat_c2: Avoid + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/gp_test/gp_single/result_summary/serializable_total-result.txt b/test_result/distributed_result/gp_test/gp_single/result_summary/serializable_total-result.txt new file mode 100644 index 00000000..1ba5280a --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/result_summary/serializable_total-result.txt @@ -0,0 +1,107 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Rollback + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Rollback + +wat_sda_full_write: Rollback + +wat_sda_full_write_committed: Rollback + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Rollback + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/iat_dda_read_skew_committed.txt b/test_result/distributed_result/gp_test/gp_single/serializable/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..0fd72e06 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/iat_dda_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: gp #### +#### test_type: dda_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:18:44:307:450 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 12:18:44:318:851 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:18:45:307:601 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 12:18:45:320:35 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 12:18:45:326:441 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:18:45:347:255 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-11 12:18:46:313:35 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:18:46:314:798 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 12:18:56:316:873 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:18:56:317:188 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/gp_test/gp_single/serializable/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..d2de88f3 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:19:0:378:11 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 12:19:0:389:248 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:19:1:378:11 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 12:19:1:394:396 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 12:19:1:400:615 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:19:1:426:426 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=23981); errcode: 40001 +Q7 failed at: 2022-4-11 12:19:3:86:619 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=23981); + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/iat_dda_write_skew.txt b/test_result/distributed_result/gp_test/gp_single/serializable/iat_dda_write_skew.txt new file mode 100644 index 00000000..fa83cdef --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: gp #### +#### test_type: dda_write_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:19:16:445:656 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 12:19:16:457:64 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:19:17:445:675 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 12:19:17:456:729 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 12:19:17:463:421 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 12:19:19:461:53 +Q6 finished at: 2022-4-11 12:19:19:467:278 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:19:19:478:310 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 12:19:29:454:96 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 12:19:29:454:279 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/iat_dda_write_skew_committed.txt b/test_result/distributed_result/gp_test/gp_single/serializable/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..5206ac97 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: gp #### +#### test_type: dda_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:20:5:692:127 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 12:20:5:703:37 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:20:6:692:128 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 12:20:6:704:531 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 12:20:6:711:73 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:20:6:725:671 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-11 12:20:7:699:597 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:20:7:715:416 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 12:20:17:700:938 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:20:17:701:150 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/gp_test/gp_single/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..5fd18f76 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: gp #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:19:33:509:540 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-11 12:19:33:522:207 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-11 12:19:33:529:390 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-11 12:19:34:509:535 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-11 12:19:34:523:965 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-11 12:19:34:529:928 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 12:19:34:545:233 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:19:35:524:216 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-11 12:19:45:517:849 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-11 12:19:45:523:387 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 12:19:45:523:617 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/gp_test/gp_single/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..de686585 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: gp #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:19:49:615:72 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-11 12:19:49:635:67 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:19:50:615:65 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-11 12:19:50:631:776 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-11 12:19:50:641:706 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:19:50:658:58 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-11 12:19:51:624:719 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:19:51:640:13 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,saving,1400) (kevin,checking,1400) + (1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + (2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-11 12:20:1:624:737 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:20:1:625:24 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/iat_mda_step_iat.txt b/test_result/distributed_result/gp_test/gp_single/serializable/iat_mda_step_iat.txt new file mode 100644 index 00000000..f4947b76 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: gp #### +#### test_type: mda_step_iat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:20:21:763:720 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-11 12:20:21:777:194 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:20:22:763:717 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-11 12:20:22:775:652 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-11 12:20:23:763:737 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-11 12:20:23:775:12 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-11 12:20:24:770:839 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 12:20:27:778:95 + Q8 finished at: 2022-4-11 12:20:27:783:445 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 12:20:28:793:183 + Q9 finished at: 2022-4-11 12:20:28:798:738 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 12:20:29:775:444 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-11 12:20:39:775:395 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 12:20:39:775:706 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/gp_test/gp_single/serializable/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..62bfe290 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:22:4:172:489 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 12:22:4:184:48 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:22:5:172:472 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-11 12:22:5:184:761 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 12:22:5:201:887 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-11 12:22:6:172:470 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-11 12:22:6:183:448 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-11 12:22:6:190:23 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 12:22:6:208:481 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-11 12:22:7:178:103 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-11 12:22:7:179:877 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-11 12:22:17:181:210 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-11 12:22:17:182:964 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/gp_test/gp_single/serializable/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..c280ac51 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,209 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:21:45:63:889 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 12:21:45:75:442 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:21:46:63:883 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 12:21:46:75:89 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-11 12:21:47:63:878 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-11 12:21:47:76:502 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 12:21:47:91:991 + Q8-T4 execute opt: 'BEGIN' + Q8 finished at: 2022-4-11 12:21:48:63:904 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-11 12:21:48:78:214 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:21:48:92:263 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-11 12:21:49:69:489 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 12:21:49:71:61 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-11 12:21:50:69:563 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-11 12:21:50:71:253 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-11 12:22:0:74:799 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-11 12:22:0:75:38 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/gp_test/gp_single/serializable/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..51105eba --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:20:43:844:136 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-11 12:20:43:857:511 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:20:44:844:142 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-11 12:20:44:854:935 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-11 12:20:45:844:161 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-11 12:20:45:855:320 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-11 12:20:46:850:760 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 12:20:49:857:131 + Q8 finished at: 2022-4-11 12:20:49:862:2 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 12:20:50:860:806 + Q9 finished at: 2022-4-11 12:20:50:866:162 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 12:20:51:857:20 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-11 12:21:1:852:447 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 12:21:1:852:653 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/gp_test/gp_single/serializable/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..fc70a83d --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:21:5:900:133 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-11 12:21:5:913:887 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:21:6:900:107 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-11 12:21:6:912:4 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-11 12:21:7:900:118 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-11 12:21:7:911:199 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-11 12:21:8:910:12 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 12:21:11:914:840 + Q8 finished at: 2022-4-11 12:21:11:920:812 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 12:21:12:917:291 + Q9 finished at: 2022-4-11 12:21:12:923:470 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 12:21:13:913:821 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-11 12:21:23:908:886 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 12:21:23:909:89 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/gp_test/gp_single/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..6c4e80ee --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:22:21:240:343 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-11 12:22:21:251:747 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-11 12:22:21:256:829 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-11 12:22:22:240:331 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-11 12:22:22:251:697 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-11 12:22:22:258:276 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 12:22:22:280:960 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-11 12:22:23:240:358 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-11 12:22:23:251:801 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-11 12:22:23:257:516 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 12:22:23:259:173 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-11 12:22:24:247:466 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-11 12:22:24:265:113 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-11 12:22:34:246:355 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-11 12:22:34:248:50 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/gp_test/gp_single/serializable/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..4b1e1abc --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,164 @@ +#### db_type: gp #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:21:27:973:860 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-11 12:21:27:984:959 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:21:28:973:855 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-11 12:21:28:986:144 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 12:21:28:992:778 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-11 12:21:28:997:741 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-11 12:21:29:9:845 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 12:21:29:25:907 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-11 12:21:29:973:866 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-11 12:21:29:987:476 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-11 12:21:29:994:281 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-11 12:21:29:999:552 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-11 12:21:30:10:526 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 12:21:30:26:919 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-11 12:21:30:981:610 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-11 12:21:30:983:287 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-11 12:21:40:982:520 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-11 12:21:40:982:739 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/iat_sda_lost_update_committed.txt b/test_result/distributed_result/gp_test/gp_single/serializable/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..45a5aa16 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/iat_sda_lost_update_committed.txt @@ -0,0 +1,39 @@ +#### db_type: gp #### +#### test_type: sda_lost_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:18:28:244:17 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-11 12:18:28:255:195 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:18:29:243:996 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-11 12:18:29:257:536 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 12:18:29:273:805 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=23981); errcode: 40001 +Q6 failed at: 2022-4-11 12:18:30:852:827 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=23981); + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/gp_test/gp_single/serializable/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..f106cddf --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: gp #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:18:12:170:972 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 12:18:12:182:556 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:18:13:170:943 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-11 12:18:13:185:182 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 12:18:13:205:733 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-11 12:18:14:176:567 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:18:14:178:280 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-11 12:18:24:180:384 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 12:18:24:180:600 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:18:24:180:789 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_double_write_skew1.txt b/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..96f3921b --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_double_write_skew1.txt @@ -0,0 +1,44 @@ +#### db_type: gp #### +#### test_type: dda_double_write_skew1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:4:4:941:179 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:4:4:953:655 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:4:5:941:184 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 12:4:5:954:905 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 12:4:5:961:226 +Q6-T1 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 12:4:7:954:742 +Q6 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=14973); errcode: 40001 +Q6 failed at: 2022-4-11 12:4:8:563:44 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=14973); + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..e4b6886b --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,44 @@ +#### db_type: gp #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:4:23:48:742 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:4:23:61:150 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:4:24:48:747 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 12:4:24:61:214 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 12:4:24:67:587 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:4:24:95:416 +Q7-T1 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' +Q7 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=14973); errcode: 40001 +Q7 failed at: 2022-4-11 12:4:25:758:717 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=14973); + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_double_write_skew2.txt b/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..9e7eeb38 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_double_write_skew2.txt @@ -0,0 +1,44 @@ +#### db_type: gp #### +#### test_type: dda_double_write_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:4:39:171:436 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:4:39:184:127 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:4:40:171:413 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 12:4:40:184:130 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-11 12:4:41:178:498 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:4:41:194:116 + Q5 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=14977); errcode: 40001 + Q5 failed at: 2022-4-11 12:4:41:702:105 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=14977); + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_read_skew.txt b/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_read_skew.txt new file mode 100644 index 00000000..15665ee0 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: gp #### +#### test_type: dda_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:4:56:228:69 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 12:4:56:239:345 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:4:57:228:61 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 12:4:57:240:533 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 12:4:57:246:933 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-11 12:4:58:233:567 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 12:4:59:243:209 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:5:0:229:780 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 12:5:10:236:698 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:5:10:236:934 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_read_skew2.txt b/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_read_skew2.txt new file mode 100644 index 00000000..bdc4ba16 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: gp #### +#### test_type: dda_read_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:5:46:425:298 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:5:46:437:993 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:5:47:425:294 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 12:5:47:436:193 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 12:5:47:441:205 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-11 12:5:48:432:197 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:5:48:452:623 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 12:5:49:426:928 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 12:5:59:434:303 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:5:59:434:608 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..077280af --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: gp #### +#### test_type: dda_read_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:6:3:496:202 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:6:3:508:763 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:6:4:496:187 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 12:6:4:508:409 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 12:6:4:513:500 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:6:4:515:182 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-11 12:6:5:503:228 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:6:5:517:55 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-11 12:6:15:504:955 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:6:15:505:263 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..1765ae14 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: gp #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:5:14:305:418 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-11 12:5:14:318:640 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:5:15:305:418 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-11 12:5:15:318:556 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-11 12:5:15:324:635 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:5:15:339:725 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-11 12:5:16:312:679 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:5:16:314:381 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-11 12:5:26:313:879 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:5:26:314:83 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..89e94c42 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: gp #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:5:30:353:821 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-11 12:5:30:367:362 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:5:31:353:824 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-11 12:5:31:370:157 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-11 12:5:31:377:972 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:5:31:391:314 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-11 12:5:32:361:188 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:5:32:362:847 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-11 12:5:42:362:165 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-11 12:5:42:362:403 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_write_read_skew.txt b/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..068d6b3f --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_write_read_skew.txt @@ -0,0 +1,72 @@ +#### db_type: gp #### +#### test_type: dda_write_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:3:30:726:490 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:3:30:739:182 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:3:31:726:439 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 12:3:31:738:858 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 12:3:31:745:429 +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-11 12:3:32:733:733 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 12:3:33:749:919 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:3:34:738:708 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-11 12:3:44:735:457 + Q10-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,1) + *(1) expected_result: + (1,1) + *(2) expected_result: + (1,1) + + Q10 finished at: 2022-4-11 12:3:44:740:726 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 12:3:44:740:922 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..7e34b375 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,72 @@ +#### db_type: gp #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:3:48:830:815 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:3:48:843:415 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:3:49:830:813 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 12:3:49:844:639 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 12:3:49:851:35 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:3:49:867:294 +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-11 12:3:50:837:721 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:3:50:853:345 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-11 12:4:0:839:348 + Q10-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,1) + *(1) expected_result: + (1,1) + *(2) expected_result: + (1,1) + + Q10 finished at: 2022-4-11 12:4:0:844:636 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 12:4:0:844:825 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/rat_mda_step_rat.txt b/test_result/distributed_result/gp_test/gp_single/serializable/rat_mda_step_rat.txt new file mode 100644 index 00000000..b3d91cb3 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/rat_mda_step_rat.txt @@ -0,0 +1,147 @@ +#### db_type: gp #### +#### test_type: mda_step_rat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t3;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t3 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t3 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:6:19:642:821 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:6:19:655:264 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:6:20:642:821 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 12:6:20:655:223 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-11 12:6:20:661:711 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-11 12:6:21:642:825 + Q7-T3 execute sql: 'UPDATE t3 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-11 12:6:21:655:691 + Q8-T3 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-11 12:6:21:662:343 +Q9-T1 execute sql: 'SELECT * FROM t3 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-11 12:6:22:651:951 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 12:6:22:666:507 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 12:6:23:654:9 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 12:6:24:670:71 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + *(5) expected_result: + (0,1) + *(6) expected_result: + (0,1) + + Q13 finished at: 2022-4-11 12:6:34:653:647 + Q14-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,1) + *(1) expected_result: + (1,1) + *(2) expected_result: + (1,1) + *(3) expected_result: + (1,1) + *(4) expected_result: + (1,1) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + + Q14 finished at: 2022-4-11 12:6:34:659:227 + Q15-T4 execute sql: 'SELECT * FROM t3 ORDER BY k;' + current_result: + (2,1) + *(1) expected_result: + (2,1) + *(2) expected_result: + (2,1) + *(3) expected_result: + (2,1) + *(4) expected_result: + (2,1) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + + Q15 finished at: 2022-4-11 12:6:34:664:774 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-11 12:6:34:665:79 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/gp_test/gp_single/serializable/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..1191b92c --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: gp #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN' + Q1 finished at: 2022-4-11 12:6:38:764:429 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-11 12:6:38:776:112 +Q3-T1 execute opt: 'BEGIN' +Q3 finished at: 2022-4-11 12:6:39:764:432 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-11 12:6:39:778:749 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-11 12:6:40:764:433 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-11 12:6:40:775:460 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-11 12:6:40:780:756 + Q8-T2 execute opt: 'BEGIN' + Q8 finished at: 2022-4-11 12:6:41:764:449 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-11 12:6:42:770:186 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-11 12:6:43:779:599 + Q9 finished at: 2022-4-11 12:6:43:788:755 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 12:6:44:781:985 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-11 12:6:45:766:228 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 12:6:55:766:260 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-11 12:6:55:771:942 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-11 12:6:55:773:574 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/gp_test/gp_single/serializable/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..2fcb3598 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,147 @@ +#### db_type: gp #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t3;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t3 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t3 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:6:59:913:458 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:6:59:925:784 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:7:0:913:443 + Q4-T2 execute sql: 'DELETE FROM t2 WHERE k=1;' + Q4 finished at: 2022-4-11 12:7:0:925:642 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-11 12:7:0:933:969 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-11 12:7:1:913:396 + Q7-T3 execute sql: 'DELETE FROM t3 WHERE k=2;' + Q7 finished at: 2022-4-11 12:7:1:925:559 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t2 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-11 12:7:1:934:241 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t3 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-11 12:7:2:924:242 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 12:7:2:938:953 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 12:7:3:931:162 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 12:7:4:925:437 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-11 12:7:14:921:228 + Q14-T4 execute sql: 'SELECT * FROM t2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q14 finished at: 2022-4-11 12:7:14:929:68 + Q15-T4 execute sql: 'SELECT * FROM t3;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q15 finished at: 2022-4-11 12:7:14:936:762 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-11 12:7:14:938:439 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/gp_test/gp_single/serializable/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..30aa0ee1 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: gp #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:7:18:975:868 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-11 12:7:18:990:249 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:7:19:975:845 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-11 12:7:19:985:822 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-11 12:7:19:993:703 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-11 12:7:20:975:845 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-11 12:7:20:987:55 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-11 12:7:20:994:909 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-11 12:7:21:988:753 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-11 12:7:22:9:565 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-11 12:7:22:988:679 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-11 12:7:23:991:163 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-11 12:7:33:984:524 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-11 12:7:33:986:270 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/rat_sda_dirty_read.txt b/test_result/distributed_result/gp_test/gp_single/serializable/rat_sda_dirty_read.txt new file mode 100644 index 00000000..0795ce32 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: gp #### +#### test_type: sda_dirty_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:1:32:218:982 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:1:32:232:108 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:1:33:218:944 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-11 12:1:33:232:505 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-11 12:1:34:220:657 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:1:35:220:679 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-11 12:1:45:228:353 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 12:1:45:228:552 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/rat_sda_intermediate_read.txt b/test_result/distributed_result/gp_test/gp_single/serializable/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..c0361c87 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: gp #### +#### test_type: sda_intermediate_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:2:7:401:43 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:2:7:413:584 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:2:8:401:10 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-11 12:2:8:411:946 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-11 12:2:9:408:35 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:2:10:402:725 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:2:11:445:464 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-11 12:2:21:408:718 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 12:2:21:408:898 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/gp_test/gp_single/serializable/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..95f9c6da --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: gp #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:2:25:461:403 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:2:25:473:978 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:2:26:461:405 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-11 12:2:26:473:444 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 12:2:26:475:17 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-11 12:2:27:468:401 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:2:27:481:619 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-11 12:2:37:469:126 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 12:2:37:469:332 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/rat_sda_lost_self_update.txt b/test_result/distributed_result/gp_test/gp_single/serializable/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..ea52e305 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/rat_sda_lost_self_update.txt @@ -0,0 +1,39 @@ +#### db_type: gp #### +#### test_type: sda_lost_self_update #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:3:13:640:927 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:3:13:653:568 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:3:14:640:884 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-11 12:3:15:646:444 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-11 12:3:15:663:204 + Q4 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=14977); errcode: 40001 + Q4 failed at: 2022-4-11 12:3:16:73:779 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=14977); + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/gp_test/gp_single/serializable/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..fb4d7acc --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: gp #### +#### test_type: sda_non_repeatable_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:1:49:307:355 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 12:1:49:318:471 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:1:50:307:365 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-11 12:1:50:322:6 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-11 12:1:51:312:969 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:1:52:319:684 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:1:53:309:18 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-11 12:2:3:315:464 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 12:2:3:315:643 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/gp_test/gp_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..a1db5262 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: gp #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:2:41:531:947 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-11 12:2:41:545:180 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:2:42:531:905 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-11 12:2:42:543:982 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 12:2:42:561:783 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-11 12:2:43:539:338 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:2:43:540:969 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-11 12:2:53:539:699 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 12:2:53:539:927 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/gp_test/gp_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..c0dc52ad --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: gp #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:2:57:577:870 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-11 12:2:57:591:165 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:2:58:577:848 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-11 12:2:58:592:408 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-11 12:2:58:607:338 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-11 12:2:59:585:376 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:2:59:586:984 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-11 12:3:9:585:471 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 12:3:9:585:663 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..682e8fba --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,44 @@ +#### db_type: gp #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:11:58:415:697 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:11:58:428:52 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:11:59:415:704 + Q4-T2 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-11 12:11:59:428:110 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-11 12:12:0:422:599 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:12:0:443:257 + Q5 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20625); errcode: 40001 + Q5 failed at: 2022-4-11 12:12:0:951:946 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20625); + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..ff8b71bb --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,36 @@ +#### db_type: gp #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 14:21:14:825:804 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 14:21:14:838:710 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 14:21:15:825:871 + Q4-T2 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 14:21:15:840:625 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected errcode: 40P01 + Q5 failed at: 2022-4-11 14:21:17:345:264 +Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q6 failed at: 2022-4-11 14:21:37:430:869 + +Test Result: Rollback +Reason: ERROR: deadlock detected + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..4ea3d24e --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,36 @@ +#### db_type: gp #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 14:22:17:554:901 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 14:22:17:567:537 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 14:22:18:554:778 + Q4-T2 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 14:22:18:569:288 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected errcode: 40P01 + Q5 failed at: 2022-4-11 14:22:20:74:185 +Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q6 failed at: 2022-4-11 14:22:40:159:610 + +Test Result: Rollback +Reason: ERROR: deadlock detected + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..f4970452 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,36 @@ +#### db_type: gp #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 14:22:57:696:729 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 14:22:57:709:336 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 14:22:58:696:742 + Q4-T2 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 14:22:58:716:641 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t2 SET v=1 WHERE k=1;' + Q5 failed reason: ERROR: deadlock detected errcode: 40P01 + Q5 failed at: 2022-4-11 14:23:0:221:676 +Q7 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q7 failed at: 2022-4-11 14:23:20:401:658 + +Test Result: Rollback +Reason: ERROR: deadlock detected + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..889c8086 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,42 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:13:5:814:929 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 12:13:5:825:798 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:13:6:814:906 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 12:13:6:827:342 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 12:13:6:833:805 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-11 12:13:8:848:579 +Q6 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20622); errcode: 40001 +Q6 failed at: 2022-4-11 12:13:9:455:223 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20622); + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..4be37c54 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,42 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:13:22:883:667 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-11 12:13:22:894:686 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:13:23:883:653 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-11 12:13:23:896:137 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-11 12:13:23:902:589 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 12:13:25:899:821 +Q6 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20622); errcode: 40001 +Q6 failed at: 2022-4-11 12:13:26:506:921 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20622); + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..d9343406 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,42 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:13:40:947:387 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:13:40:959:690 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:13:41:947:393 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 12:13:41:958:354 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-11 12:13:42:954:179 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:13:42:968:258 + Q5 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20625); errcode: 40001 + Q5 failed at: 2022-4-11 12:13:43:474:986 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20625); + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..3915c919 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,42 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:13:58:24:437 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:13:58:36:925 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:13:59:24:401 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 12:13:59:35:336 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-11 12:14:0:31:515 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:14:2:43:884 + Q5 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20625); errcode: 40001 + Q5 failed at: 2022-4-11 12:14:2:550:546 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20625); + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..59bfdf1c --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: gp #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:14:16:91:17 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:14:16:103:308 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:14:17:91:5 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-11 12:14:17:101:925 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-11 12:14:18:97:643 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-11 12:14:18:125:63 + Q5 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20625); errcode: 40001 + Q5 failed at: 2022-4-11 12:14:18:631:592 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20625); + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/wat_mda_step_wat_c1.txt b/test_result/distributed_result/gp_test/gp_single/serializable/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..19c01b13 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/wat_mda_step_wat_c1.txt @@ -0,0 +1,46 @@ +#### db_type: gp #### +#### test_type: mda_step_wat_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t3;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t3 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t3 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 10:22:34:300:123 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 10:22:34:314:172 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 10:22:35:300:252 + Q4-T2 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 10:22:35:319:757 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 10:22:36:300:147 + Q7-T3 execute sql: 'UPDATE t3 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-18 10:22:36:315:760 + Q8-T3 execute sql: 'UPDATE t2 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t3 SET v=1 WHERE k=2;' + Q8 failed reason: ERROR: deadlock detected errcode: 40P01 + Q8 failed at: 2022-4-18 10:22:38:120:775 + Q5 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 + Q5 failed at: 2022-4-18 10:22:55:824:997 +Q9 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q9 failed at: 2022-4-18 10:22:58:205:2 + +Test Result: Rollback +Reason: ERROR: deadlock detected + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/wat_mda_step_wat_c2.txt b/test_result/distributed_result/gp_test/gp_single/serializable/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..2edb6fc0 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/wat_mda_step_wat_c2.txt @@ -0,0 +1,46 @@ +#### db_type: gp #### +#### test_type: mda_step_wat_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t3;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'CREATE TABLE t3 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t3 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 10:23:13:219:398 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 10:23:13:233:50 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 10:23:14:219:413 + Q4-T2 execute sql: 'UPDATE t2 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 10:23:14:235:774 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 10:23:15:219:431 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t3 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-18 10:23:17:233:454 + Q8-T3 execute sql: 'UPDATE t2 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t3 SET v=1 WHERE k=2;' + Q8 failed reason: ERROR: deadlock detected errcode: 40P01 + Q8 failed at: 2022-4-18 10:23:19:38:590 + Q6 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 + Q6 failed at: 2022-4-18 10:23:36:824:434 +Q9 failed reason: ERROR: canceling statement due to lock timeout; errcode: 55P03 +Q9 failed at: 2022-4-18 10:23:39:124:442 + +Test Result: Rollback +Reason: ERROR: deadlock detected + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/gp_test/gp_single/serializable/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..89ef5fb6 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: gp #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:9:59:920:531 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:9:59:933:361 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:10:0:920:565 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-11 12:10:1:922:233 + Q4 finished at: 2022-4-11 12:10:1:933:98 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:10:2:951:842 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-11 12:10:12:929:946 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-11 12:10:12:949:221 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-11 12:10:12:949:408 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/gp_test/gp_single/serializable/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..a26a17fd --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,30 @@ +#### db_type: gp #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:10:17:5:734 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:10:17:18:152 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:10:18:5:738 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-11 12:10:19:23:242 + Q4 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20625); errcode: 40001 + Q4 failed at: 2022-4-11 12:10:19:434:57 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20625); + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/wat_sda_full_write.txt b/test_result/distributed_result/gp_test/gp_single/serializable/wat_sda_full_write.txt new file mode 100644 index 00000000..f9e2a27f --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/wat_sda_full_write.txt @@ -0,0 +1,32 @@ +#### db_type: gp #### +#### test_type: sda_full_write #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:10:34:60:675 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:10:34:73:32 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:10:35:60:848 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-11 12:10:36:67:372 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-11 12:10:36:90:348 + Q4 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20625); errcode: 40001 + Q4 failed at: 2022-4-11 12:10:36:500:936 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20625); + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/wat_sda_full_write_committed.txt b/test_result/distributed_result/gp_test/gp_single/serializable/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..7a2c2404 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/wat_sda_full_write_committed.txt @@ -0,0 +1,32 @@ +#### db_type: gp #### +#### test_type: sda_full_write_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:10:51:113:556 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:10:51:125:949 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:10:52:113:544 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-11 12:10:53:120:225 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:10:53:143:813 + Q4 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20625); errcode: 40001 + Q4 failed at: 2022-4-11 12:10:53:554:39 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20625); + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/gp_test/gp_single/serializable/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..a79a2e68 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,39 @@ +#### db_type: gp #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:11:42:303:393 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-11 12:11:42:315:789 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:11:43:303:391 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-11 12:11:44:308:581 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-11 12:11:44:352:983 + Q4 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20625); errcode: 40001 + Q4 failed at: 2022-4-11 12:11:44:763:409 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20625); + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/wat_sda_lost_update_c1.txt b/test_result/distributed_result/gp_test/gp_single/serializable/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..dffec363 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/wat_sda_lost_update_c1.txt @@ -0,0 +1,39 @@ +#### db_type: gp #### +#### test_type: sda_lost_update_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:11:7:168:297 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-11 12:11:7:179:295 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:11:8:168:308 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-11 12:11:8:182:815 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-11 12:11:10:187:226 +Q5 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20622); errcode: 40001 +Q5 failed at: 2022-4-11 12:11:10:693:851 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20622); + diff --git a/test_result/distributed_result/gp_test/gp_single/serializable/wat_sda_lost_update_c2.txt b/test_result/distributed_result/gp_test/gp_single/serializable/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..e7c0de33 --- /dev/null +++ b/test_result/distributed_result/gp_test/gp_single/serializable/wat_sda_lost_update_c2.txt @@ -0,0 +1,39 @@ +#### db_type: gp #### +#### test_type: sda_lost_update_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-11 12:11:24:227:728 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-11 12:11:24:238:715 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-11 12:11:25:227:726 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-11 12:11:25:240:299 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-11 12:11:27:247:511 +Q5 failed reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20622); errcode: 40001 +Q5 failed at: 2022-4-11 12:11:27:754:317 + +Test Result: Rollback +Reason: ERROR: could not serialize access due to concurrent update (seg1 9.135.218.12:6001 pid=20622); + diff --git a/test_result/distributed_result/mongodb_dist/mongodb_snapshot_total-result.txt b/test_result/distributed_result/mongodb_dist/mongodb_snapshot_total-result.txt new file mode 100644 index 00000000..38119496 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/mongodb_snapshot_total-result.txt @@ -0,0 +1,96 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Rollback + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Rollback + +rat_sda_lost_self_update: Rollback + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +wat_sda_dirty_write_1abort: Rollback + +wat_sda_dirty_write_2commit: Rollback + +wat_sda_full_write: Rollback + +wat_sda_full_write_committed: Rollback + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Rollback + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_uname_anomaly: Rollback + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/iat_dda_read_skew_committed.txt b/test_result/distributed_result/mongodb_dist/snapshot/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..8f0fcbb6 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/iat_dda_read_skew_committed.txt @@ -0,0 +1,45 @@ +#### db_type: mongodb #### +#### test_type: dda_read_skew_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + + T2 start transaction success + T2 execute stmt: 't1.put(601, 1)' + T2 execute stmt: 't1.put(0, 1)' + T2 COMMIT transaction success +T1 execute stmt: 't1.get(601)' + current_result: + (601,0) + *(1) expected_result: + (601,0) + (2) expected_result: + (601,1) + +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,1) (601,1) + *(1) expected_result: + (0,1) (601,1) + *(2) expected_result: + (0,1) (601,1) + + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/mongodb_dist/snapshot/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..a4681d19 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,28 @@ +#### db_type: mongodb #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + + T2 start transaction success + T2 execute stmt: 't1.put(601, 2)' + T2 execute stmt: 't1.put(0, 1)' + T2 COMMIT transaction success +T1 execute stmt: 't1.put(601, 1)' +[ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/iat_dda_write_skew.txt b/test_result/distributed_result/mongodb_dist/snapshot/iat_dda_write_skew.txt new file mode 100644 index 00000000..ca5fd893 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/iat_dda_write_skew.txt @@ -0,0 +1,43 @@ +#### db_type: mongodb #### +#### test_type: dda_write_skew #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + + T2 start transaction success + T2 execute stmt: 't1.get(601)' + current_result: + (601,0) + (1) expected_result: + (601,1) + *(2) expected_result: + (601,0) + + T2 execute stmt: 't1.put(0, 1)' +T1 execute stmt: 't1.put(601, 1)' +T1 COMMIT transaction success + T2 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,1) (601,1) + *(1) expected_result: + (0,1) (601,1) + *(2) expected_result: + (0,1) (601,1) + + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/iat_dda_write_skew_committed.txt b/test_result/distributed_result/mongodb_dist/snapshot/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..a26cd522 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/iat_dda_write_skew_committed.txt @@ -0,0 +1,43 @@ +#### db_type: mongodb #### +#### test_type: dda_write_skew_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + + T2 start transaction success + T2 execute stmt: 't1.get(601)' + current_result: + (601,0) + (1) expected_result: + (601,1) + *(2) expected_result: + (601,0) + + T2 execute stmt: 't1.put(0, 1)' +T1 COMMIT transaction success +T1 execute stmt: 't1.put(601, 1)' + T2 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,1) (601,1) + *(1) expected_result: + (0,1) (601,1) + *(2) expected_result: + (0,1) (601,1) + + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/iat_mda_step_iat.txt b/test_result/distributed_result/mongodb_dist/snapshot/iat_mda_step_iat.txt new file mode 100644 index 00000000..8d2a8754 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/iat_mda_step_iat.txt @@ -0,0 +1,87 @@ +#### db_type: mongodb #### +#### test_type: mda_step_iat #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 execute stmt: 't1.put(602, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(602)' + current_result: + (602,0) + *(1) expected_result: + (602,0) + *(2) expected_result: + (602,0) + *(3) expected_result: + (602,0) + (4) expected_result: + (602,1) + (5) expected_result: + (602,1) + (6) expected_result: + (602,1) + + T2 start transaction success + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + T3 start transaction success + T3 execute stmt: 't1.get(601)' + current_result: + (601,0) + (1) expected_result: + (601,1) + *(2) expected_result: + (601,0) + (3) expected_result: + (601,1) + (4) expected_result: + (601,1) + *(5) expected_result: + (601,0) + *(6) expected_result: + (601,0) + +T1 execute stmt: 't1.put(0, 1)' + T2 execute stmt: 't1.put(601, 1)' + T3 execute stmt: 't1.put(602, 1)' +T1 COMMIT transaction success + T2 COMMIT transaction success + T3 COMMIT transaction success + T4 execute stmt: 't1.get(*)' + current_result: + (0,1) (601,1) (602,1) + *(1) expected_result: + (0,1) (601,1) (602,1) + *(2) expected_result: + (0,1) (601,1) (602,1) + *(3) expected_result: + (0,1) (601,1) (602,1) + *(4) expected_result: + (0,1) (601,1) (602,1) + *(5) expected_result: + (0,1) (601,1) (602,1) + *(6) expected_result: + (0,1) (601,1) (602,1) + + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/mongodb_dist/snapshot/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..a40742fa --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,87 @@ +#### db_type: mongodb #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + + T2 start transaction success + T2 execute stmt: 't1.put(0, 1)' + T2 COMMIT transaction success + T3 start transaction success + T3 execute stmt: 't1.get(0)' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + T3 execute stmt: 't1.put(601, 1)' + T3 COMMIT transaction success +T1 execute stmt: 't1.get(601)' + current_result: + (601,0) + *(1) expected_result: + (601,0) + *(2) expected_result: + (601,0) + (3) expected_result: + (601,1) + *(4) expected_result: + (601,0) + (5) expected_result: + (601,1) + (6) expected_result: + (601,1) + +T1 COMMIT transaction success + T4 execute stmt: 't1.get(*)' + current_result: + (0,1) (601,1) + *(1) expected_result: + (0,1) (601,1) + *(2) expected_result: + (0,1) (601,1) + *(3) expected_result: + (0,1) (601,1) + *(4) expected_result: + (0,1) (601,1) + *(5) expected_result: + (0,1) (601,1) + *(6) expected_result: + (0,1) (601,1) + + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/mongodb_dist/snapshot/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..bd28717c --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,185 @@ +#### db_type: mongodb #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + T2 start transaction success + T2 execute stmt: 't1.get(1)' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + T3 start transaction success + T3 execute stmt: 't1.put(0, 1)' + T3 COMMIT transaction success + T4 start transaction success + T4 execute stmt: 't1.put(1, 1)' + T4 COMMIT transaction success + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + T2 COMMIT transaction success +T1 execute stmt: 't1.get(1)' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +T1 COMMIT transaction success + T4 execute stmt: 't1.get(*)' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/mongodb_dist/snapshot/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..e748a068 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,117 @@ +#### db_type: mongodb #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +T1 execute stmt: 't1.get(1)' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + + T2 start transaction success + T2 execute stmt: 't1.get(1)' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + T2 execute stmt: 't1.put(1, 20)' + T2 COMMIT transaction success + T3 start transaction success + T3 execute stmt: 't1.get(0)' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + T3 execute stmt: 't1.get(1)' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + T3 COMMIT transaction success +T1 execute stmt: 't1.put(0, 11)' +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/mongodb_dist/snapshot/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..4086ff34 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,69 @@ +#### db_type: mongodb #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' +T1 execute stmt: 't1.put(2, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(1)' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + + T2 start transaction success + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + T2 execute stmt: 't1.put(0, 1)' + T2 execute stmt: 't1.get(1)' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + T2 execute stmt: 't1.put(1,1)' + T3 start transaction success + T3 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/iat_sda_lost_update_committed.txt b/test_result/distributed_result/mongodb_dist/snapshot/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..9b004276 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/iat_sda_lost_update_committed.txt @@ -0,0 +1,26 @@ +#### db_type: mongodb #### +#### test_type: sda_lost_update_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + T2 COMMIT transaction success +T1 execute stmt: 't1.put(0, 1)' +[ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/mongodb_dist/snapshot/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..53530f5a --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,43 @@ +#### db_type: mongodb #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + + T2 start transaction success + T2 execute stmt: 't1.put(0, 1)' + T2 COMMIT transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_double_write_skew1.txt b/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..a4984519 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_double_write_skew1.txt @@ -0,0 +1,27 @@ +#### db_type: mongodb #### +#### test_type: dda_double_write_skew1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(601, 1)' + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + +T1 execute stmt: 't1.put(601, 2)' +[ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..8ab48d5f --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,28 @@ +#### db_type: mongodb #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(601, 1)' + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + T2 COMMIT transaction success +T1 execute stmt: 't1.put(601, 2)' +[ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_double_write_skew2.txt b/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..7533535c --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_double_write_skew2.txt @@ -0,0 +1,19 @@ +#### db_type: mongodb #### +#### test_type: dda_double_write_skew2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(601, 1)' + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_read_skew.txt b/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_read_skew.txt new file mode 100644 index 00000000..b13d069a --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_read_skew.txt @@ -0,0 +1,43 @@ +#### db_type: mongodb #### +#### test_type: dda_read_skew #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 start transaction success +T1 execute stmt: 't1.getpred(0)' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,1) (601,1) + + T2 start transaction success + T2 execute stmt: 't1.put(601, 1)' + T2 execute stmt: 't1.put(0, 1)' +T1 execute stmt: 't1.getpred(601)' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,1) (601,1) + + T2 COMMIT transaction success +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (601,1) (0,1) + *(1) expected_result: + (601,1) (0,1) + *(2) expected_result: + (601,1) (0,1) + + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_read_skew2.txt b/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_read_skew2.txt new file mode 100644 index 00000000..d9df65d5 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_read_skew2.txt @@ -0,0 +1,45 @@ +#### db_type: mongodb #### +#### test_type: dda_read_skew2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.get(601)' + current_result: + (601,0) + (1) expected_result: + (601,1) + *(2) expected_result: + (601,0) + + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + +T1 execute stmt: 't1.put(601, 1)' + T2 COMMIT transaction success +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,1) (601,1) + *(1) expected_result: + (0,1) (601,1) + *(2) expected_result: + (0,1) (601,1) + + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..15d8f6d6 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_read_skew2_committed.txt @@ -0,0 +1,45 @@ +#### db_type: mongodb #### +#### test_type: dda_read_skew2_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.get(601)' + current_result: + (601,0) + (1) expected_result: + (601,1) + *(2) expected_result: + (601,0) + + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + T2 COMMIT transaction success +T1 execute stmt: 't1.put(601, 1)' +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,1) (601,1) + *(1) expected_result: + (0,1) (601,1) + *(2) expected_result: + (0,1) (601,1) + + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..077f583f --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,43 @@ +#### db_type: mongodb #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 start transaction success +T1 execute stmt: 't1.getpred(0)' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,1) + + T2 start transaction success + T2 execute stmt: 't1.put(601, 1)' + T2 execute stmt: 't1.put(0, 1)' +T1 execute stmt: 't1.getpred(601)' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (601,1) + + T2 COMMIT transaction success +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (601,1) (0,1) + *(1) expected_result: + (601,1) (0,1) + *(2) expected_result: + (601,1) (0,1) + + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..128e7d0e --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,43 @@ +#### db_type: mongodb #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 start transaction success +T1 execute stmt: 't1.getpred(0)' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,1) + + T2 start transaction success + T2 execute stmt: 't1.put(601, 1)' + T2 execute stmt: 't1.put(0, 1)' +T1 execute stmt: 't1.getpred(601)' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (601,1) + + T2 COMMIT transaction success +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (601,1) (0,1) + *(1) expected_result: + (601,1) (0,1) + *(2) expected_result: + (601,1) (0,1) + + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_write_read_skew.txt b/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..c30f83d5 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_write_read_skew.txt @@ -0,0 +1,43 @@ +#### db_type: mongodb #### +#### test_type: dda_write_read_skew #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(601, 1)' + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + +T1 execute stmt: 't1.get(601)' + current_result: + (601,0) + *(1) expected_result: + (601,0) + (2) expected_result: + (601,1) + + T2 COMMIT transaction success +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,1) (601,1) + *(1) expected_result: + (0,1) (601,1) + *(2) expected_result: + (0,1) (601,1) + + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..c6f6fa79 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,43 @@ +#### db_type: mongodb #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(601, 1)' + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + T2 COMMIT transaction success +T1 execute stmt: 't1.get(601)' + current_result: + (601,0) + *(1) expected_result: + (601,0) + (2) expected_result: + (601,1) + +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,1) (601,1) + *(1) expected_result: + (0,1) (601,1) + *(2) expected_result: + (0,1) (601,1) + + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/rat_mda_step_rat.txt b/test_result/distributed_result/mongodb_dist/snapshot/rat_mda_step_rat.txt new file mode 100644 index 00000000..3fbfe268 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/rat_mda_step_rat.txt @@ -0,0 +1,87 @@ +#### db_type: mongodb #### +#### test_type: mda_step_rat #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 execute stmt: 't1.put(602, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(601, 1)' + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + T3 start transaction success + T3 execute stmt: 't1.put(602, 1)' + T3 execute stmt: 't1.get(601)' + current_result: + (601,0) + (1) expected_result: + (601,1) + *(2) expected_result: + (601,0) + (3) expected_result: + (601,1) + (4) expected_result: + (601,1) + *(5) expected_result: + (601,0) + *(6) expected_result: + (601,0) + +T1 execute stmt: 't1.get(602)' + current_result: + (602,0) + *(1) expected_result: + (602,0) + *(2) expected_result: + (602,0) + *(3) expected_result: + (602,0) + (4) expected_result: + (602,1) + (5) expected_result: + (602,1) + (6) expected_result: + (602,1) + +T1 COMMIT transaction success + T2 COMMIT transaction success + T3 COMMIT transaction success + T4 execute stmt: 't1.get(*)' + current_result: + (0,1) (601,1) (602,1) + *(1) expected_result: + (0,1) (601,1) (602,1) + *(2) expected_result: + (0,1) (601,1) (602,1) + *(3) expected_result: + (0,1) (601,1) (602,1) + *(4) expected_result: + (0,1) (601,1) (602,1) + *(5) expected_result: + (0,1) (601,1) (602,1) + *(6) expected_result: + (0,1) (601,1) (602,1) + + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/mongodb_dist/snapshot/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..6037504c --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,185 @@ +#### db_type: mongodb #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(1, 0)' + T4 start transaction success + T4 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T3 start transaction success + T3 execute stmt: 't1.get(1)' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + T3 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + T2 start transaction success + T2 execute stmt: 't1.put(1, 1)' + T4 execute stmt: 't1.get(1)' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + +T1 COMMIT transaction success + T2 COMMIT transaction success + T3 COMMIT transaction success + T4 COMMIT transaction success + T4 execute stmt: 't1.get(*)' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/rat_sda_dirty_read.txt b/test_result/distributed_result/mongodb_dist/snapshot/rat_sda_dirty_read.txt new file mode 100644 index 00000000..9c0caa07 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/rat_sda_dirty_read.txt @@ -0,0 +1,29 @@ +#### db_type: mongodb #### +#### test_type: sda_dirty_read #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 start transaction success +T1 execute stmt: 't1.put(0, 0)' + T2 start transaction success + T2 execute stmt: 't1.get(0)' + current_result: + null + *(1) expected_result: + null + + T2 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + null + *(1) expected_result: + null + + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/rat_sda_intermediate_read.txt b/test_result/distributed_result/mongodb_dist/snapshot/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..ded07c96 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/rat_sda_intermediate_read.txt @@ -0,0 +1,36 @@ +#### db_type: mongodb #### +#### test_type: sda_intermediate_read #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + +T1 execute stmt: 't1.put(0, 2)' + T2 COMMIT transaction success +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/mongodb_dist/snapshot/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..74e1fee4 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,36 @@ +#### db_type: mongodb #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.get(0)' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + T2 COMMIT transaction success +T1 execute stmt: 't1.put(0, 2)' +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/rat_sda_lost_self_update.txt b/test_result/distributed_result/mongodb_dist/snapshot/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..943c62cc --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/rat_sda_lost_self_update.txt @@ -0,0 +1,17 @@ +#### db_type: mongodb #### +#### test_type: sda_lost_self_update #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/mongodb_dist/snapshot/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..4d66d15f --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/rat_sda_non_repeatable_read.txt @@ -0,0 +1,43 @@ +#### db_type: mongodb #### +#### test_type: sda_non_repeatable_read #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + + T2 start transaction success + T2 execute stmt: 't1.put(0, 1)' +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + + T2 COMMIT transaction success +T1 COMMIT transaction success + T3 execute stmt: 't1.get(*)' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/mongodb_dist/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..ce7c1634 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,25 @@ +#### db_type: mongodb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 start transaction success +T1 execute stmt: 't1.getpred(0)' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + + T2 start transaction success + T2 execute stmt: 't1.put(0, 0)' + T2 COMMIT transaction success +T1 execute stmt: 't1.getpred(0)' +[ERROR] in MongoConnector::ExecFindkV ->Unable to read from a snapshot due to pending collection catalog changes; please retry the operation. Snapshot timestamp is Timestamp(1651682652, 4). Collection minimum is Timestamp(1651682652, 5): generic server error + +Test Result: Rollback +Reason: Unable to read from a snapshot due to pending collection catalog changes; please retry the operation. Snapshot timestamp is Timestamp(1651682652, 4). Collection minimum is Timestamp(1651682652, 5): generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/mongodb_dist/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..22b954ea --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,25 @@ +#### db_type: mongodb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 start transaction success +T1 execute stmt: 't1.getpred(0)' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + + T2 start transaction success + T2 execute stmt: 't1.put(0, 0)' + T2 COMMIT transaction success +T1 execute stmt: 't1.getpred(0)' +[ERROR] in MongoConnector::ExecFindkV ->Unable to read from a snapshot due to pending collection catalog changes; please retry the operation. Snapshot timestamp is Timestamp(1651682651, 15). Collection minimum is Timestamp(1651682652, 1): generic server error + +Test Result: Rollback +Reason: Unable to read from a snapshot due to pending collection catalog changes; please retry the operation. Snapshot timestamp is Timestamp(1651682651, 15). Collection minimum is Timestamp(1651682652, 1): generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..6a0533e9 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,19 @@ +#### db_type: mongodb #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(601, 1)' + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..831ae2e2 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,18 @@ +#### db_type: mongodb #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..614a5c98 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,18 @@ +#### db_type: mongodb #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..3b88637e --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,18 @@ +#### db_type: mongodb #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..114d105e --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,27 @@ +#### db_type: mongodb #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + (1) expected_result: + + (2) expected_result: + + + T2 start transaction success + T2 execute stmt: 't1.put(601, 2)' + T2 execute stmt: 't1.put(0, 1)' +T1 execute stmt: 't1.put(601, 1)' +[ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..ade253f4 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,27 @@ +#### db_type: mongodb #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 start transaction success +T1 execute stmt: 't1.get(0)' + current_result: + (0,0) + (1) expected_result: + + (2) expected_result: + + + T2 start transaction success + T2 execute stmt: 't1.put(601, 2)' + T2 execute stmt: 't1.put(0, 1)' +T1 execute stmt: 't1.put(601, 1)' +[ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..b5f52901 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,26 @@ +#### db_type: mongodb #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.get(601)' + current_result: + (601,0) + (1) expected_result: + (601,1) + *(2) expected_result: + (601,0) + + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..e8d20930 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,26 @@ +#### db_type: mongodb #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.get(601)' + current_result: + (601,0) + (1) expected_result: + (601,1) + *(2) expected_result: + (601,0) + + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..84673a0d --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,26 @@ +#### db_type: mongodb #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.get(601)' + current_result: + (601,0) + (1) expected_result: + (601,1) + *(2) expected_result: + (601,0) + + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/wat_mda_step_wat_c1.txt b/test_result/distributed_result/mongodb_dist/snapshot/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..990d2c1b --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/wat_mda_step_wat_c1.txt @@ -0,0 +1,20 @@ +#### db_type: mongodb #### +#### test_type: mda_step_wat_c1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 execute stmt: 't1.put(602, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(601, 2)' + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/wat_mda_step_wat_c2.txt b/test_result/distributed_result/mongodb_dist/snapshot/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..a55c79bf --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/wat_mda_step_wat_c2.txt @@ -0,0 +1,20 @@ +#### db_type: mongodb #### +#### test_type: mda_step_wat_c2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 execute stmt: 't1.put(601, 0)' +T1 execute stmt: 't1.put(602, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(601, 2)' + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/mongodb_dist/snapshot/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..1cc1018d --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,17 @@ +#### db_type: mongodb #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/mongodb_dist/snapshot/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..66d36468 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,17 @@ +#### db_type: mongodb #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/wat_sda_full_write.txt b/test_result/distributed_result/mongodb_dist/snapshot/wat_sda_full_write.txt new file mode 100644 index 00000000..e057f4c9 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/wat_sda_full_write.txt @@ -0,0 +1,17 @@ +#### db_type: mongodb #### +#### test_type: sda_full_write #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/wat_sda_full_write_committed.txt b/test_result/distributed_result/mongodb_dist/snapshot/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..65581c56 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/wat_sda_full_write_committed.txt @@ -0,0 +1,17 @@ +#### db_type: mongodb #### +#### test_type: sda_full_write_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/mongodb_dist/snapshot/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..cc27e358 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,17 @@ +#### db_type: mongodb #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/wat_sda_lost_update_c1.txt b/test_result/distributed_result/mongodb_dist/snapshot/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..f67f3686 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/wat_sda_lost_update_c1.txt @@ -0,0 +1,17 @@ +#### db_type: mongodb #### +#### test_type: sda_lost_update_c1 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/mongodb_dist/snapshot/wat_sda_lost_update_c2.txt b/test_result/distributed_result/mongodb_dist/snapshot/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..910560b5 --- /dev/null +++ b/test_result/distributed_result/mongodb_dist/snapshot/wat_sda_lost_update_c2.txt @@ -0,0 +1,17 @@ +#### db_type: mongodb #### +#### test_type: sda_lost_update_c2 #### +#### isolation: snapshot #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +T1 execute stmt: 't1.put(0, 0)' +T1 start transaction success +T1 execute stmt: 't1.put(0, 1)' + T2 start transaction success + T2 execute stmt: 't1.put(0, 2)' + [ERROR] in MongoConnector::ExecUpdatekV ->WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + +Test Result: Rollback +Reason: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.: generic server error + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_dda_read_skew_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..2b6655c2 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:31:47:433:445 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 11:31:47:438:508 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 11:31:48:433:385 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 11:31:48:441:7 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 11:31:48:443:298 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 11:31:48:460:637 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-14 11:31:49:435:418 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 11:31:49:435:957 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 11:31:59:436:456 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 11:31:59:437:147 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..15734546 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:32:3:805:249 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 11:32:3:810:485 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 11:32:4:805:270 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 11:32:4:812:64 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 11:32:4:814:635 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 11:32:4:825:446 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-14 11:32:5:807:945 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 11:32:5:814:403 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 11:32:15:808:443 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 11:32:15:809:30 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_dda_write_skew.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..c9d92ed3 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:33:8:974:835 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 11:33:8:981:12 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 11:33:9:974:877 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 11:33:9:980:75 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 11:33:9:983:616 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-14 11:33:10:979:99 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 11:33:10:988:215 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 11:33:11:982:866 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 11:33:21:978:719 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 11:33:21:979:262 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_dda_write_skew_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..5cf44b50 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:32:20:98:502 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 11:32:20:104:732 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 11:32:21:98:420 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 11:32:21:103:922 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 11:32:21:108:170 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 11:32:21:124:759 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-14 11:32:22:102:631 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 11:32:22:113:373 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 11:32:32:101:674 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 11:32:32:102:274 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..144a6b0a --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,71 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:32:36:435:46 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-14 11:32:36:437:527 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-14 11:32:36:438:412 + Q4-T2 execute sql: 'BEGIN;' + Q4 finished at: 2022-4-14 11:32:37:435:9 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-14 11:32:37:436:215 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-14 11:32:37:436:995 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 11:32:37:448:442 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 11:32:38:439:48 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-14 11:32:48:436:622 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-14 11:32:48:437:548 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 11:32:48:438:61 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..1ade2c38 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:32:52:687:707 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-14 11:32:52:690:69 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 11:32:53:687:690 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-14 11:32:53:689:271 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-14 11:32:53:691:413 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 11:32:53:694:784 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-14 11:32:54:688:714 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 11:32:54:693:154 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-14 11:33:4:689:368 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 11:33:4:690:60 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_mda_step_iat.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..d5bf4142 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:34:5:743:455 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-14 11:34:5:749:937 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 11:34:6:743:428 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-14 11:34:6:746:258 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-14 11:34:7:743:432 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-14 11:34:7:749:245 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-14 11:34:8:747:976 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-14 11:34:9:746:714 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-14 11:34:10:747:671 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-14 11:34:11:753:28 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 11:34:12:754:384 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 11:34:13:752:649 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-14 11:34:23:747:387 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 11:34:23:748:106 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..283ad294 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:43:6:125:278 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 10:43:6:131:496 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:43:7:125:252 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-14 10:43:7:131:692 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 10:43:7:139:350 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-14 10:43:8:125:253 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-14 10:43:8:129:748 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-14 10:43:8:131:909 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:43:8:138:892 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2022-4-14 10:43:9:128:71 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-14 10:43:9:128:757 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-14 10:43:19:130:549 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-14 10:43:19:131:270 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..cfe0d396 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,206 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:42:46:815:938 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 10:42:46:820:984 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:42:47:815:896 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 10:42:47:818:860 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-14 10:42:48:815:987 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-14 10:42:48:822:396 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 10:42:48:837:395 + Q8-T4 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-14 10:42:49:816:4 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-14 10:42:49:820:70 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:42:49:829:555 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-4-14 10:42:50:818:666 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 10:42:50:819:559 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-14 10:42:51:818:714 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-14 10:42:51:819:523 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-14 10:43:1:821:12 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-14 10:43:1:821:678 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..dd7bb1e4 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:33:26:179:424 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-14 11:33:26:186:72 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 11:33:27:179:468 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-14 11:33:27:185:548 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-14 11:33:28:179:503 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-14 11:33:28:182:775 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-14 11:33:29:183:18 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-14 11:33:30:182:596 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-14 11:33:31:181:649 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-14 11:33:32:186:415 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 11:33:33:187:7 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 11:33:34:188:378 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-14 11:33:44:182:764 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 11:33:44:183:349 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..382d3225 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:42:7:201:691 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-14 10:42:7:207:368 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:42:8:201:724 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-14 10:42:8:204:609 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-14 10:42:9:201:819 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-14 10:42:9:210:42 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-14 10:42:10:208:231 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-14 10:42:11:202:749 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-14 10:42:12:204:316 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-14 10:42:13:205:613 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 10:42:14:205:768 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 10:42:15:205:876 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-14 10:42:25:207:228 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 10:42:25:207:874 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..44398432 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,139 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(100));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:33:48:430:472 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-14 11:33:48:437:725 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-14 11:33:48:440:461 + Q4-T2 execute sql: 'BEGIN;' + Q4 finished at: 2022-4-14 11:33:49:430:440 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-14 11:33:49:433:828 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-14 11:33:49:438:581 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 11:33:49:547:64 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-14 11:33:50:430:442 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-14 11:33:50:434:892 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-14 11:33:50:437:274 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 11:33:50:437:916 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-14 11:33:51:433:649 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-14 11:33:51:443:572 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-14 11:34:1:434:541 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-14 11:34:1:435:118 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..55515336 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,161 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:42:29:508:291 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-14 10:42:29:515:260 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:42:30:508:323 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-14 10:42:30:513:102 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 10:42:30:517:596 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-14 10:42:30:520:579 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-14 10:42:30:523:696 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 10:42:30:533:741 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-4-14 10:42:31:508:391 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-14 10:42:31:511:353 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-14 10:42:31:515:708 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-14 10:42:31:517:939 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-14 10:42:31:520:524 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 10:42:31:531:458 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2022-4-14 10:42:32:510:521 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-14 10:42:32:511:165 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-14 10:42:42:511:738 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-14 10:42:42:512:527 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_sda_lost_update_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..d5e4b1d7 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,50 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:34:27:899:295 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-14 11:34:27:905:350 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 11:34:28:899:337 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-14 11:34:28:905:362 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 11:34:28:924:12 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-14 11:34:29:903:681 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 11:34:29:911:73 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-14 11:34:39:902:893 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 11:34:39:903:445 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..da1237da --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,59 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:34:44:63:38 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 11:34:44:68:794 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 11:34:45:62:862 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-14 11:34:45:68:182 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 11:34:45:173:576 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-14 11:34:46:65:528 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 11:34:46:66:29 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-14 11:34:56:68:44 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 11:34:56:68:613 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 11:34:56:68:995 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_double_write_skew1.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..778acbbb --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,55 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:30:14:58:413 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:30:14:64:898 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:30:15:58:315 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:30:15:62:311 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-14 10:30:15:66:192 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 10:30:17:165:556 +Q6 finished at: 2022-4-14 10:30:17:171:703 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:30:18:72:703 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-14 10:30:28:62:279 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:30:28:62:889 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..fe38664d --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,55 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:30:32:249:961 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:30:32:255:987 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:30:33:250:1 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:30:33:253:280 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-14 10:30:33:256:928 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:30:33:364:393 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-14 10:30:34:253:871 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:30:34:267:390 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-14 10:30:44:253:830 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:30:44:254:380 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_double_write_skew2.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..1cf48ed0 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,55 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:30:48:485:632 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:30:48:491:904 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:30:49:485:628 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:30:49:489:56 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-14 10:30:50:489:181 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:30:50:593:385 + Q5 finished at: 2022-4-14 10:30:50:598:999 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 10:30:51:499:830 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:31:1:489:296 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:31:1:489:819 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_read_skew.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..5679f94b --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:31:5:705:711 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 10:31:5:711:195 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:31:6:705:718 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:31:6:710:760 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 10:31:6:713:476 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-14 10:31:7:708:460 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 10:31:8:813:930 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:31:9:706:28 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:31:19:709:462 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:31:19:710:28 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_read_skew2.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..6271e266 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:31:56:400:427 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:31:56:407:37 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:31:57:400:395 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 10:31:57:405:797 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-14 10:31:57:407:801 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-14 10:31:58:403:400 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:31:58:510:832 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 10:31:59:401:9 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:32:9:405:886 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:32:9:406:388 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..7caf8379 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:32:13:671:50 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:32:13:677:928 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:32:14:670:992 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 10:32:14:676:727 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-14 10:32:14:678:453 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:32:14:679:17 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-14 10:32:15:674:579 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:32:15:683:976 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:32:25:674:30 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:32:25:674:588 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..f16fca14 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:31:23:869:524 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-14 10:31:23:874:152 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:31:24:869:596 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:31:24:875:153 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-14 10:31:24:877:57 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:31:24:891:509 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-14 10:31:25:871:493 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:31:25:872:81 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-14 10:31:35:872:645 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:31:35:873:266 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..93e441e7 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,58 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:31:40:16:741 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-14 10:31:40:23:203 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:31:41:16:736 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-14 10:31:41:26:104 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-14 10:31:41:27:722 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:31:41:32:57 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (1,0) (0,0) + (1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-14 10:31:42:17:980 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:31:42:18:537 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-14 10:31:52:20:661 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:31:52:21:354 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_write_read_skew.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..f398b05b --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:29:39:337:758 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:29:39:344:367 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:29:40:337:732 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:29:40:342:79 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-14 10:29:40:344:976 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-14 10:29:41:340:281 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 10:29:42:351:582 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:29:43:352:363 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:29:53:340:909 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:29:53:341:466 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..301d4227 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:29:57:695:947 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:29:57:702:138 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:29:58:695:872 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:29:58:703:800 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-14 10:29:58:707:946 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:29:58:745:399 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-14 10:29:59:699:257 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:29:59:710:920 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:30:9:700:368 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:30:9:701:100 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_mda_step_rat.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..7bcff099 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:32:29:948:789 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:32:29:956:314 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:32:30:948:763 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:32:30:952:368 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-14 10:32:30:955:823 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-14 10:32:31:948:779 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-14 10:32:31:952:576 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-14 10:32:31:955:75 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-14 10:32:32:951:717 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-14 10:32:32:961:281 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 10:32:33:969:470 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 10:32:34:963:903 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-14 10:32:44:954:10 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 10:32:44:954:575 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..8ff58f97 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,208 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN;' + Q1 finished at: 2022-4-14 10:32:49:157:555 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-14 10:32:49:163:846 +Q3-T1 execute sql: 'BEGIN;' +Q3 finished at: 2022-4-14 10:32:50:156:620 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-14 10:32:50:161:127 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-14 10:32:51:156:659 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-14 10:32:51:160:51 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-14 10:32:51:162:672 + Q8-T2 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-14 10:32:52:156:668 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-14 10:32:52:160:415 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-14 10:32:53:159:861 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-14 10:32:54:264:959 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 10:32:55:170:339 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-14 10:32:56:157:148 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 10:33:6:157:166 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-14 10:33:6:161:398 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-14 10:33:6:161:965 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..884c44ae --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:33:10:370:114 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:33:10:377:571 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:33:11:369:971 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:33:11:373:617 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-14 10:33:11:377:477 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-14 10:33:12:369:961 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-14 10:33:12:373:615 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-14 10:33:12:376:528 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-14 10:33:13:372:948 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-14 10:33:13:391:301 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 10:33:14:391:829 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 10:33:15:379:82 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-14 10:33:25:373:716 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 10:33:25:374:277 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..e9ce273f --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:33:29:535:210 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-14 10:33:29:548:528 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:33:30:535:196 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-14 10:33:30:538:190 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-14 10:33:30:543:890 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-14 10:33:31:535:230 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-14 10:33:31:538:57 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-14 10:33:31:541:233 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-14 10:33:32:538:289 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-14 10:33:32:542:83 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 10:33:33:544:959 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 10:33:34:539:742 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-14 10:33:44:539:471 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 10:33:44:540:50 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_sda_dirty_read.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..c8afeadb --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,46 @@ +#### db_type: ob #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:27:39:17:980 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:27:39:28:610 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:27:40:17:984 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-14 10:27:40:23:64 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-14 10:27:41:18:397 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:27:42:18:200 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-14 10:27:52:21:597 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 10:27:52:22:150 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_sda_intermediate_read.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..51e24525 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:28:14:540:5 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:28:14:554:921 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:28:15:540:25 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-14 10:28:15:545:832 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-14 10:28:16:546:659 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:28:17:540:656 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:28:18:550:393 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-14 10:28:28:545:918 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:28:28:546:489 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..9d2ff7de --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:28:32:797:913 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:28:32:823:784 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:28:33:797:872 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-14 10:28:33:803:413 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 10:28:33:804:1 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-14 10:28:34:800:745 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:28:34:907:723 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-14 10:28:44:801:129 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:28:44:806:264 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_sda_lost_self_update.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..bf8c5194 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:29:21:931:897 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:29:21:937:351 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:29:22:931:873 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-14 10:29:23:934:940 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-14 10:29:23:943:428 + Q4 finished at: 2022-4-14 10:29:24:31:657 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 10:29:24:940:146 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-14 10:29:34:936:176 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:29:34:936:735 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..30d03184 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,59 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:27:56:255:321 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 10:27:56:261:238 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:27:57:255:385 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-14 10:27:57:285:670 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-14 10:27:58:258:173 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:27:59:270:489 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:28:0:255:646 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-14 10:28:10:260:422 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:28:10:260:968 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..29be8a09 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,57 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:28:49:181:838 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-14 10:28:49:187:659 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:28:50:181:802 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-14 10:28:50:200:173 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 10:28:50:315:301 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-14 10:28:51:183:520 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:28:51:184:85 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-14 10:29:1:186:297 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:29:1:186:846 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..c2891f6c --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,56 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:29:5:550:946 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-14 10:29:5:554:874 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:29:6:550:877 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-14 10:29:6:560:979 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 10:29:6:564:843 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-14 10:29:7:551:689 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:29:7:552:259 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-14 10:29:17:557:357 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:29:17:558:37 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..d161c2b9 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,55 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:35:48:778:325 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:35:48:784:999 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:35:49:778:292 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:35:49:782:67 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-14 10:35:50:782:164 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:35:50:890:41 + Q5 finished at: 2022-4-14 10:35:50:895:895 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:35:50:904:574 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:36:0:783:676 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:36:0:784:293 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..8e3c54ff --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:36:4:986:402 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:36:4:993:480 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:36:5:986:393 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 10:36:5:992:192 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-14 10:36:16:436:930 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-14 10:36:17:575:666 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..8bbcb798 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:36:22:181:562 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:36:22:188:418 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:36:23:193:858 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 10:36:23:198:152 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-14 10:36:33:661:896 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-14 10:36:34:695:977 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..d84fc7e4 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:36:40:502:201 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:36:40:507:211 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:36:41:514:635 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 10:36:41:520:752 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-14 10:36:51:943:81 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-14 10:36:53:111:702 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..3e6bd249 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:36:57:485:6 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 10:36:57:490:337 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:36:58:494:772 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 10:36:58:501:668 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 10:36:58:504:766 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 10:37:0:498:165 +Q6 finished at: 2022-4-14 10:37:0:532:784 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:37:0:543:309 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:37:10:490:979 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:37:10:491:750 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..82f268b8 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:37:14:812:389 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 10:37:14:818:720 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:37:15:812:481 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 10:37:15:817:29 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 10:37:15:819:824 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 10:37:17:819:414 +Q6 finished at: 2022-4-14 10:37:17:839:770 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:37:18:830:626 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:37:28:817:940 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:37:28:818:619 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..5cfff1b1 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:37:33:117:66 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:37:33:123:489 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:37:34:117:27 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 10:37:34:122:248 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-14 10:37:35:120:143 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:37:35:128:950 + Q5 finished at: 2022-4-14 10:37:35:134:861 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 10:37:36:127:23 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:37:46:119:981 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:37:46:120:674 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..5dde713d --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:37:50:278:179 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:37:50:285:409 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:37:51:278:91 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 10:37:51:283:427 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-14 10:37:52:282:688 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:37:54:387:944 + Q5 finished at: 2022-4-14 10:37:54:397:423 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 10:37:54:408:434 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:38:4:282:866 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:38:4:283:639 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..c039a1a3 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:38:8:550:709 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:38:8:556:648 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:38:9:550:739 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 10:38:9:557:355 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-14 10:38:10:553:638 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:38:10:572:808 + Q5 finished at: 2022-4-14 10:38:10:588:233 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:38:10:597:313 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:38:20:553:704 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:38:20:554:389 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_mda_step_wat_c1.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..ebb440a2 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:38:24:854:516 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:38:24:859:676 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:38:25:854:476 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 10:38:25:862:202 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-14 10:38:26:854:552 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-14 10:38:26:858:658 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-14 10:38:36:335:324 + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q8 failed at: 2022-4-14 10:38:37:639:543 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-14 10:38:38:667:912 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_mda_step_wat_c2.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..88d22fa4 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:38:44:148:906 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:38:44:155:253 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:38:45:157:537 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 10:38:45:161:271 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-14 10:38:46:156:761 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-14 10:38:48:152:647 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q6 failed at: 2022-4-14 10:38:57:654:743 + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q8 failed at: 2022-4-14 10:38:58:861:706 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-14 10:38:59:961:54 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..4690d0ab --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:33:48:694:580 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:33:48:701:99 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:33:49:694:571 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-14 10:33:50:695:175 + Q4 finished at: 2022-4-14 10:33:50:698:616 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:33:51:797:481 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-14 10:34:1:699:529 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-14 10:34:1:741:151 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:34:1:741:797 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..65c656d5 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:34:5:911:701 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:34:5:920:37 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:34:6:911:587 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-14 10:34:7:919:481 + Q4 finished at: 2022-4-14 10:34:7:925:303 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:34:8:925:269 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-14 10:34:18:917:268 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-14 10:34:18:953:336 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:34:18:954:11 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_sda_full_write.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..734dcf42 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_sda_full_write.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:34:23:91:262 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:34:23:98:222 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:34:24:91:150 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-14 10:34:25:94:108 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-14 10:34:25:199:546 + Q4 finished at: 2022-4-14 10:34:25:206:736 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 10:34:26:104:148 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-14 10:34:36:95:857 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:34:36:96:559 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_sda_full_write_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..a16f6880 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:34:40:379:962 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:34:40:385:72 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:34:41:379:986 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-14 10:34:42:382:955 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:34:42:398:546 + Q4 finished at: 2022-4-14 10:34:42:419:650 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 10:34:42:428:212 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-14 10:34:52:383:660 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:34:52:384:295 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..3d6a4c60 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:35:32:477:454 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:35:32:482:938 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:35:33:477:410 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-14 10:35:34:480:682 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:35:34:489:392 + Q4 finished at: 2022-4-14 10:35:34:495:767 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 10:35:34:504:748 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-14 10:35:44:482:732 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:35:44:483:398 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_sda_lost_update_c1.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..d6dbcf9c --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,50 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:34:56:746:434 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-14 10:34:56:751:811 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:34:57:746:592 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-14 10:34:57:755:781 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 10:34:59:763:658 +Q5 finished at: 2022-4-14 10:34:59:775:632 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-14 10:34:59:785:773 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-14 10:35:9:751:56 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:35:9:751:897 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_sda_lost_update_c2.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..436de6a9 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,50 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:35:14:92:706 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-14 10:35:14:98:359 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:35:15:92:637 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-14 10:35:15:100:881 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:35:17:101:488 +Q5 finished at: 2022-4-14 10:35:17:107:537 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:35:18:103:442 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-14 10:35:28:97:490 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:35:28:98:207 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_dda_read_skew_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..7c6649c1 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_dda_read_skew_committed.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:24:35:355:273 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 11:24:35:363:570 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 11:24:36:355:301 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 11:24:36:360:227 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 11:24:36:362:782 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 11:24:36:376:355 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-14 11:24:37:357:503 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 11:24:37:358:342 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 11:24:47:360:11 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 11:24:47:360:514 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..505f20c7 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:24:51:565:493 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 11:24:51:572:432 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 11:24:52:565:492 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 11:24:52:571:850 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 11:24:52:574:84 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 11:24:52:582:485 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 +Q7 failed at: 2022-4-14 11:24:54:269:526 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_dda_write_skew.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_dda_write_skew.txt new file mode 100644 index 00000000..91ea3dd8 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_dda_write_skew.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:25:56:571:614 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 11:25:56:576:333 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 11:25:57:571:542 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 11:25:57:577:331 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 11:25:57:581:485 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-14 11:25:58:574:848 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 11:25:58:587:698 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 11:25:59:579:565 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 11:26:9:574:743 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 11:26:9:575:285 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_dda_write_skew_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..694f9afa --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_dda_write_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:25:7:746:308 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 11:25:7:753:182 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 11:25:8:746:305 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 11:25:8:754:609 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 11:25:8:758:7 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 11:25:8:765:772 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-14 11:25:9:750:286 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 11:25:9:763:150 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 11:25:19:751:760 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 11:25:19:752:287 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..a4bc5976 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,71 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:25:23:949:761 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-14 11:25:23:952:530 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-14 11:25:23:953:421 + Q4-T2 execute sql: 'BEGIN;' + Q4 finished at: 2022-4-14 11:25:24:949:742 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-14 11:25:24:951:555 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-14 11:25:24:952:354 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 11:25:24:955:839 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 11:25:25:953:460 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-14 11:25:35:951:86 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-14 11:25:35:952:387 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 11:25:35:952:828 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..6c25f37a --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:25:40:207:250 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-14 11:25:40:209:831 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 11:25:41:207:243 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-14 11:25:41:208:623 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-14 11:25:41:210:656 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 11:25:41:213:863 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-14 11:25:42:208:332 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 11:25:42:211:976 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-14 11:25:52:208:986 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 11:25:52:209:593 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_mda_step_iat.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_mda_step_iat.txt new file mode 100644 index 00000000..19023c36 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_mda_step_iat.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_iat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:26:53:540:288 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-14 11:26:53:546:378 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 11:26:54:540:217 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-14 11:26:54:547:436 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-14 11:26:55:540:240 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-14 11:26:55:544:280 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-14 11:26:56:544:71 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-14 11:26:57:544:841 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-14 11:26:58:543:357 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-14 11:26:59:551:707 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 11:27:0:549:797 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 11:27:1:550:654 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-14 11:27:11:545:464 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 11:27:11:546:192 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..c596073d --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,107 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:1:13:670:433 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 11:1:13:676:857 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 11:1:14:670:375 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-14 11:1:14:676:328 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 11:1:14:685:772 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-14 11:1:15:670:376 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-14 11:1:15:673:995 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-14 11:1:15:676:4 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 11:1:15:687:17 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-14 11:1:16:672:372 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-14 11:1:16:673:61 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-14 11:1:26:675:383 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-14 11:1:26:676:68 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..6b9e7ffd --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,208 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:0:54:398:39 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 11:0:54:405:587 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 11:0:55:398:16 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 11:0:55:403:306 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-14 11:0:56:398:26 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-14 11:0:56:402:280 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 11:0:56:426:87 + Q8-T4 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-14 11:0:57:398:99 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-14 11:0:57:401:424 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 11:0:57:419:108 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-14 11:0:58:400:766 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 11:0:58:401:533 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-14 11:0:59:400:577 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-14 11:0:59:401:272 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-14 11:1:9:402:27 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-14 11:1:9:402:698 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..d0b7fe87 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:26:13:938:803 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-14 11:26:13:945:415 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 11:26:14:938:802 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-14 11:26:14:943:119 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-14 11:26:15:938:899 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-14 11:26:15:942:287 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-14 11:26:16:942:475 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-14 11:26:17:942:538 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-14 11:26:18:941:299 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-14 11:26:19:948:4 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 11:26:20:947:941 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 11:26:21:948:872 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-14 11:26:31:942:914 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 11:26:31:943:571 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..99f7d779 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:0:14:797:828 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-14 11:0:14:804:876 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 11:0:15:797:809 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-14 11:0:15:802:903 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-14 11:0:16:797:813 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-14 11:0:16:803:715 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-14 11:0:17:805:452 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-14 11:0:18:799:342 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-14 11:0:19:799:581 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-14 11:0:20:801:485 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 11:0:21:802:645 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 11:0:22:802:840 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-14 11:0:32:803:901 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 11:0:32:804:701 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..75d2d317 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,139 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(100));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:26:36:258:202 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-14 11:26:36:264:40 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-14 11:26:36:266:421 + Q4-T2 execute sql: 'BEGIN;' + Q4 finished at: 2022-4-14 11:26:37:258:212 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-14 11:26:37:261:254 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-14 11:26:37:266:156 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 11:26:37:374:305 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-14 11:26:38:258:208 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-14 11:26:38:262:978 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-14 11:26:38:265:536 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 11:26:38:266:73 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-14 11:26:39:260:927 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-14 11:26:39:269:313 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-14 11:26:49:261:464 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-14 11:26:49:262:770 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..790ce5ad --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,163 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:0:37:90:650 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-14 11:0:37:97:759 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 11:0:38:90:667 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-14 11:0:38:96:924 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 11:0:38:101:140 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-14 11:0:38:103:316 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-14 11:0:38:105:992 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 11:0:38:121:361 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-4-14 11:0:39:90:660 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-14 11:0:39:95:501 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-14 11:0:39:99:610 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-14 11:0:39:101:895 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-14 11:0:39:104:686 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 11:0:39:115:914 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-14 11:0:40:92:940 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-14 11:0:40:93:662 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-14 11:0:50:96:0 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-14 11:0:50:96:685 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_sda_lost_update_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..d82031b8 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_sda_lost_update_committed.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:27:15:895:82 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-14 11:27:15:900:618 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 11:27:16:895:149 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-14 11:27:16:902:239 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 11:27:16:912:936 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 +Q6 failed at: 2022-4-14 11:27:18:500:404 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..98a31923 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,61 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 11:27:32:154:719 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 11:27:32:160:549 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 11:27:33:154:646 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-14 11:27:33:162:479 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 11:27:33:175:1 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-14 11:27:34:156:909 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 11:27:34:157:632 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-14 11:27:44:158:954 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 11:27:44:159:565 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 11:27:44:160:39 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_double_write_skew1.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..0742d82c --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_double_write_skew1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:48:22:76:678 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:48:22:82:753 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:48:23:76:673 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:48:23:80:1 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-14 10:48:23:82:812 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 10:48:25:184:14 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 +Q6 failed at: 2022-4-14 10:48:25:791:635 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..14f31f58 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:48:40:274:13 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:48:40:280:482 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:48:41:273:860 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:48:41:277:482 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-14 10:48:41:280:733 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:48:41:387:512 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 +Q7 failed at: 2022-4-14 10:48:42:977:756 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_double_write_skew2.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..13a37e8d --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_double_write_skew2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:48:56:510:874 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:48:56:517:143 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:48:57:510:856 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:48:57:514:437 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-14 10:48:58:514:289 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:48:58:620:64 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-14 10:48:59:130:492 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_read_skew.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_read_skew.txt new file mode 100644 index 00000000..a4d6ac13 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_read_skew.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:49:13:705:619 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 10:49:13:712:447 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:49:14:716:872 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:49:14:720:580 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 10:49:14:724:277 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-14 10:49:15:707:556 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 10:49:16:813:270 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:49:17:706:161 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:49:27:710:978 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:49:27:711:582 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_read_skew2.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_read_skew2.txt new file mode 100644 index 00000000..ac3e1bfa --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_read_skew2.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:50:4:645:678 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:50:4:651:73 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:50:5:645:624 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 10:50:5:651:724 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-14 10:50:5:653:663 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-14 10:50:6:648:641 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:50:6:659:351 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 10:50:7:646:276 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:50:17:648:837 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:50:17:649:459 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..20e8af10 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_read_skew2_committed.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:50:21:947:6 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:50:21:955:97 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:50:22:946:976 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 10:50:22:951:389 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-14 10:50:22:953:395 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:50:22:953:920 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-14 10:50:23:949:614 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:50:23:959:902 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:50:33:953:225 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:50:33:953:990 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..a74c00b7 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:49:31:898:685 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-14 10:49:31:903:154 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:49:32:898:679 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:49:32:905:192 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-14 10:49:32:907:250 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:49:33:16:844 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-14 10:49:33:899:672 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:49:33:900:211 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-14 10:49:43:901:702 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:49:43:902:307 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..00685dcd --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:49:48:243:717 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-14 10:49:48:247:65 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:49:49:243:708 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-14 10:49:49:250:372 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-14 10:49:49:251:537 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:49:49:259:277 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-14 10:49:50:244:555 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:49:50:245:129 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-14 10:50:0:249:965 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:50:0:250:540 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_write_read_skew.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..6f9916cd --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_write_read_skew.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:47:47:498:17 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:47:47:504:870 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:47:48:499:83 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:47:48:501:766 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-14 10:47:48:505:464 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-14 10:47:49:500:163 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 10:47:50:507:506 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:47:51:512:78 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:48:1:504:241 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:48:1:504:844 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..c0a8a75f --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:48:5:783:982 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:48:5:789:470 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:48:6:784:32 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:48:6:791:569 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-14 10:48:6:794:598 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:48:6:806:956 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-14 10:48:7:787:336 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:48:7:794:778 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:48:17:787:820 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:48:17:788:326 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_mda_step_rat.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_mda_step_rat.txt new file mode 100644 index 00000000..480a7305 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_mda_step_rat.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_rat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:50:38:111:991 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:50:38:118:806 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:50:39:112:14 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:50:39:115:191 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-14 10:50:39:118:75 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-14 10:50:40:112:39 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-14 10:50:40:115:485 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-14 10:50:40:117:607 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-14 10:50:41:114:672 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-14 10:50:41:124:301 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 10:50:42:123:451 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 10:50:43:127:533 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-14 10:50:53:118:454 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 10:50:53:119:28 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..23a7b400 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,208 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN;' + Q1 finished at: 2022-4-14 10:50:57:461:490 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-14 10:50:57:468:994 +Q3-T1 execute sql: 'BEGIN;' +Q3 finished at: 2022-4-14 10:50:58:461:377 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-14 10:50:58:465:704 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-14 10:50:59:461:459 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-14 10:50:59:468:267 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-14 10:50:59:470:550 + Q8-T2 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-14 10:51:0:461:581 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-14 10:51:0:464:947 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-14 10:51:1:464:350 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-14 10:51:2:473:316 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 10:51:3:468:315 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-14 10:51:4:461:924 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 10:51:14:462:288 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-14 10:51:14:465:938 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-14 10:51:14:466:556 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..592f8625 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:51:18:819:408 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:51:18:826:69 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:51:19:819:431 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:51:19:825:4 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-14 10:51:19:827:874 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-14 10:51:20:819:435 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-14 10:51:20:823:205 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-14 10:51:20:825:451 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-14 10:51:21:823:472 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-14 10:51:21:833:236 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 10:51:22:832:87 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 10:51:23:827:342 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-14 10:51:33:823:492 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 10:51:33:824:120 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..9299cd15 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:51:38:160:3 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-14 10:51:38:171:128 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:51:39:160:25 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-14 10:51:39:161:912 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-14 10:51:39:167:128 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-14 10:51:40:160:33 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-14 10:51:40:161:923 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-14 10:51:40:164:620 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-14 10:51:41:162:545 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-14 10:51:41:167:526 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 10:51:42:164:713 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 10:51:43:163:354 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-14 10:51:53:164:347 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 10:51:53:164:964 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_sda_dirty_read.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_sda_dirty_read.txt new file mode 100644 index 00000000..73dbf961 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_sda_dirty_read.txt @@ -0,0 +1,46 @@ +#### db_type: ob #### +#### test_type: sda_dirty_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:45:47:879:468 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:45:47:885:500 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:45:48:879:482 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-14 10:45:48:885:346 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-14 10:45:49:879:957 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:45:50:879:943 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-14 10:46:0:884:588 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 10:46:0:885:242 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_sda_intermediate_read.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..7253e628 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_sda_intermediate_read.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:46:23:365:427 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:46:23:370:831 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:46:24:365:432 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-14 10:46:24:369:466 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-14 10:46:25:368:757 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:46:26:365:942 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:46:27:473:380 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-14 10:46:37:370:459 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:46:37:370:963 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..e6a8eed6 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:46:41:681:918 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:46:41:688:96 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:46:42:681:882 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-14 10:46:42:686:521 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 10:46:42:687:263 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-14 10:46:43:685:155 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:46:43:794:409 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-14 10:46:53:685:415 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:46:53:685:911 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_sda_lost_self_update.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..4664cd50 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_sda_lost_self_update.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:47:30:311:800 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:47:30:319:787 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:47:31:311:705 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-14 10:47:32:314:926 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-14 10:47:32:325:752 + Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-14 10:47:32:755:334 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..a7aa92a1 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_sda_non_repeatable_read.txt @@ -0,0 +1,59 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:46:5:72:341 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 10:46:5:79:204 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:46:6:72:275 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-14 10:46:6:80:290 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-14 10:46:7:74:572 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:46:8:83:324 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:46:9:72:666 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-14 10:46:19:77:308 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:46:19:77:777 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..5357f45e --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,59 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:46:57:912:682 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-14 10:46:57:915:664 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:46:58:912:641 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-14 10:46:58:919:94 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 10:46:59:23:910 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-14 10:46:59:913:544 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:46:59:914:83 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-14 10:47:9:917:535 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:47:9:918:128 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..e8fe235a --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,58 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:47:14:96:284 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-14 10:47:14:101:156 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:47:15:96:231 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-14 10:47:15:105:864 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 10:47:15:111:147 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-14 10:47:16:97:525 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:47:16:98:13 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-14 10:47:26:102:131 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:47:26:102:720 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..cd04ad50 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:53:56:650:574 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:53:56:657:301 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:53:57:651:492 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:53:57:654:397 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-14 10:53:58:654:186 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:53:58:662:704 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-14 10:53:59:172:403 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..f7b14559 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:54:12:993:382 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:54:12:999:90 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:54:14:3:426 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 10:54:14:6:956 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-14 10:54:24:417:399 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-14 10:54:25:505:956 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..219b1596 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:54:30:469:829 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:54:30:474:557 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:54:31:480:926 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 10:54:31:484:310 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-14 10:54:41:896:316 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-14 10:54:42:975:719 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..45ad4d0f --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:54:48:944:60 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:54:48:949:358 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:54:49:954:53 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 10:54:49:957:344 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-14 10:55:0:442:210 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-14 10:55:1:551:833 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..07b57935 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:55:5:926:404 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 10:55:5:933:316 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:55:6:937:377 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 10:55:6:942:383 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 10:55:6:946:393 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 10:55:8:945:752 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 +Q6 failed at: 2022-4-14 10:55:9:663:460 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..dca4efcc --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:55:23:156:738 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 10:55:23:162:534 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:55:24:156:650 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 10:55:24:161:308 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 10:55:24:163:851 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 10:55:26:264:445 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 +Q6 failed at: 2022-4-14 10:55:26:976:616 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..7fe83bbf --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:55:41:512:617 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:55:41:519:899 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:55:42:512:734 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 10:55:42:520:762 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-14 10:55:43:515:445 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:55:43:526:727 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-14 10:55:44:40:667 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..be57183c --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:55:58:769:708 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:55:58:775:842 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:55:59:771:26 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 10:55:59:774:492 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-14 10:56:0:772:138 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:56:2:876:195 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-14 10:56:3:384:335 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..c83ca4b6 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:56:17:38:304 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:56:17:44:407 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:56:18:39:508 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 10:56:18:42:940 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-14 10:56:19:40:898 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:56:19:148:6 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-14 10:56:19:654:139 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_mda_step_wat_c1.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..96c65511 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_mda_step_wat_c1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:56:33:281:33 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:56:33:287:945 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:56:34:284:419 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 10:56:34:287:835 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-14 10:56:35:280:914 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-14 10:56:35:286:961 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-14 10:56:44:697:216 + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q8 failed at: 2022-4-14 10:56:45:994:228 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-14 10:56:47:91:842 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_mda_step_wat_c2.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..a354afbd --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_mda_step_wat_c2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:56:52:558:533 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:56:52:565:686 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:56:53:566:806 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 10:56:53:570:81 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-14 10:56:54:574:146 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-14 10:56:56:561:369 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q6 failed at: 2022-4-14 10:57:6:113:89 + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q8 failed at: 2022-4-14 10:57:7:341:110 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-14 10:57:8:371:128 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..e3d9479a --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:51:57:384:215 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:51:57:391:542 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:51:58:384:95 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-14 10:51:59:384:644 + Q4 finished at: 2022-4-14 10:51:59:387:111 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:52:0:398:563 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-14 10:52:10:389:229 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-14 10:52:10:443:370 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:52:10:443:986 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..fe007af6 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,29 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:52:14:601:731 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:52:14:609:732 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:52:15:601:702 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-14 10:52:16:610:272 + Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-14 10:52:17:67:479 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_sda_full_write.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_sda_full_write.txt new file mode 100644 index 00000000..7fac5a6c --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_sda_full_write.txt @@ -0,0 +1,31 @@ +#### db_type: ob #### +#### test_type: sda_full_write #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:52:31:789:392 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:52:31:797:713 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:52:32:790:374 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-14 10:52:33:791:918 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-14 10:52:33:811:285 + Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-14 10:52:34:216:520 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_sda_full_write_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..34417e34 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_sda_full_write_committed.txt @@ -0,0 +1,31 @@ +#### db_type: ob #### +#### test_type: sda_full_write_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:52:48:943:853 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:52:48:951:538 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:52:49:944:672 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-14 10:52:50:946:968 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:52:50:995:798 + Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-14 10:52:51:414:694 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..2065638d --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:53:40:488:464 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:53:40:495:892 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:53:41:488:543 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-14 10:53:42:491:853 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:53:42:502:222 + Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-14 10:53:42:916:568 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_sda_lost_update_c1.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..03c7ff8f --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_sda_lost_update_c1.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:53:5:142:955 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-14 10:53:5:149:893 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:53:6:143:626 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-14 10:53:6:148:504 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 10:53:8:161:803 +Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 +Q5 failed at: 2022-4-14 10:53:8:677:869 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_sda_lost_update_c2.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..49bbdbf5 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/repeatable-read/wat_sda_lost_update_c2.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:53:22:328:502 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-14 10:53:22:335:881 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:53:23:328:472 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-14 10:53:23:335:106 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:53:25:335:826 +Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 +Q5 failed at: 2022-4-14 10:53:25:843:800 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/result_summary/read-committed_total-result.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..a5e025b4 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Timeout + +wat_dda_full_write_skew_c2: Timeout + +wat_dda_full_write_skew_committed: Timeout + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Timeout + +wat_mda_step_wat_c2: Timeout + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/ob_mysql_test/ob_dist/result_summary/repeatable-read_total-result.txt b/test_result/distributed_result/ob_mysql_test/ob_dist/result_summary/repeatable-read_total-result.txt new file mode 100644 index 00000000..4139416e --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_dist/result_summary/repeatable-read_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Rollback + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Rollback + +wat_sda_full_write: Rollback + +wat_sda_full_write_committed: Rollback + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Rollback + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Timeout + +wat_dda_full_write_skew_c2: Timeout + +wat_dda_full_write_skew_committed: Timeout + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Timeout + +wat_mda_step_wat_c2: Timeout + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_dda_read_skew_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..b499ad8b --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:0:45:818:968 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 12:0:45:821:136 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:0:46:818:997 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 12:0:46:821:290 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 12:0:46:822:27 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 12:0:46:827:980 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-14 12:0:47:819:534 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 12:0:47:819:958 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 12:0:57:820:432 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 12:0:57:820:878 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..58c661af --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:1:2:47:849 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 12:1:2:50:541 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:1:3:47:913 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 12:1:3:50:881 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 12:1:3:51:848 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 12:1:3:54:975 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-14 12:1:4:48:928 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 12:1:4:52:311 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 12:1:14:49:645 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 12:1:14:50:205 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_dda_write_skew.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..2833dc4e --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:1:18:383:332 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 12:1:18:385:686 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:1:19:383:115 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 12:1:19:384:258 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 12:1:19:386:145 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-14 12:1:20:383:758 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 12:1:20:387:827 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 12:1:21:386:613 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 12:1:31:384:532 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 12:1:31:385:110 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_dda_write_skew_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..fcf0c407 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:2:8:77:812 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 12:2:8:80:597 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:2:9:77:736 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 12:2:9:79:90 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 12:2:9:80:990 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 12:2:9:88:334 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-14 12:2:10:78:665 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 12:2:10:81:562 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 12:2:20:79:379 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 12:2:20:79:922 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..1ca25a5f --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,71 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:1:35:584:279 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-14 12:1:35:586:898 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-14 12:1:35:587:876 + Q4-T2 execute sql: 'BEGIN;' + Q4 finished at: 2022-4-14 12:1:36:584:183 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-14 12:1:36:585:703 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-14 12:1:36:586:576 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 12:1:36:595:624 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 12:1:37:588:511 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-14 12:1:47:585:94 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-14 12:1:47:585:889 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 12:1:47:586:450 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..7ccbf800 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:1:51:915:197 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-14 12:1:51:917:632 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:1:52:915:285 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-14 12:1:52:916:720 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-14 12:1:52:919:47 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 12:1:52:923:13 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-14 12:1:53:916:240 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 12:1:53:925:849 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-14 12:2:3:916:984 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 12:2:3:917:561 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_mda_step_iat.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..e65dede1 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:2:24:402:635 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-14 12:2:24:405:25 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:2:25:402:601 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-14 12:2:25:404:556 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-14 12:2:26:402:630 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-14 12:2:26:403:740 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-14 12:2:27:404:425 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-14 12:2:28:403:448 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-14 12:2:29:403:488 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-14 12:2:30:411:831 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 12:2:31:411:913 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 12:2:32:412:168 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-14 12:2:42:404:771 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 12:2:42:405:328 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..48a74437 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:4:7:523:824 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 12:4:7:526:396 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:4:8:523:748 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-14 12:4:8:526:68 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 12:4:8:529:279 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-14 12:4:9:524:4 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-14 12:4:9:525:577 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-14 12:4:9:526:417 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 12:4:9:529:69 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2022-4-14 12:4:10:524:788 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-14 12:4:10:525:471 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-14 12:4:20:525:485 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-14 12:4:20:526:109 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..c85582c1 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,206 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:3:48:379:707 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 12:3:48:382:263 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:3:49:379:709 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 12:3:49:381:121 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-14 12:3:50:379:736 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-14 12:3:50:382:61 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 12:3:50:386:762 + Q8-T4 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-14 12:3:51:379:823 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-14 12:3:51:381:257 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 12:3:51:384:788 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-4-14 12:3:52:380:707 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 12:3:52:381:295 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-14 12:3:53:380:728 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-14 12:3:53:381:222 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-14 12:4:3:382:705 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-14 12:4:3:383:255 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..f8fe2cdf --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:2:46:566:707 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-14 12:2:46:569:96 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:2:47:566:687 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-14 12:2:47:568:340 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-14 12:2:48:566:727 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-14 12:2:48:568:456 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-14 12:2:49:568:573 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-14 12:2:50:567:697 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-14 12:2:51:567:650 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-14 12:2:52:569:933 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 12:2:53:569:939 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 12:2:54:570:3 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-14 12:3:4:570:531 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 12:3:4:571:167 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..91eb9732 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:3:8:804:622 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-14 12:3:8:810:675 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:3:9:804:512 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-14 12:3:9:806:972 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-14 12:3:10:804:534 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-14 12:3:10:805:689 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-14 12:3:11:807:321 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-14 12:3:12:806:257 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-14 12:3:13:805:473 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-14 12:3:14:808:882 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 12:3:15:809:862 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 12:3:16:819:686 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-14 12:3:26:806:341 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 12:3:26:806:862 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..dbc1d04c --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,139 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:4:24:878:994 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-14 12:4:24:881:389 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-14 12:4:24:883:307 + Q4-T2 execute sql: 'BEGIN;' + Q4 finished at: 2022-4-14 12:4:25:878:914 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-14 12:4:25:880:337 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-14 12:4:25:882:153 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 12:4:25:886:766 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-14 12:4:26:878:917 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-14 12:4:26:880:212 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-14 12:4:26:880:967 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 12:4:26:881:495 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-14 12:4:27:879:644 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-14 12:4:27:886:689 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-14 12:4:37:880:489 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-14 12:4:37:881:76 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..6e462aa6 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,161 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:3:31:58:664 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-14 12:3:31:61:53 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:3:32:58:674 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-14 12:3:32:60:221 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 12:3:32:62:28 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-14 12:3:32:63:138 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-14 12:3:32:64:132 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 12:3:32:67:124 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-4-14 12:3:33:58:772 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-14 12:3:33:60:531 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-14 12:3:33:61:600 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-14 12:3:33:62:480 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-14 12:3:33:63:230 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 12:3:33:77:843 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2022-4-14 12:3:34:59:742 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-14 12:3:34:60:341 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-14 12:3:44:60:628 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-14 12:3:44:61:245 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_sda_lost_update_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..ae1be79b --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,50 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:0:29:567:143 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-14 12:0:29:571:861 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:0:30:567:126 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-14 12:0:30:569:976 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 12:0:30:573:260 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-14 12:0:31:570:61 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 12:0:31:576:836 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-14 12:0:41:568:733 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 12:0:41:569:292 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..7a79c139 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,59 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:0:13:442:806 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 12:0:13:445:167 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:0:14:442:708 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-14 12:0:14:445:733 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 12:0:14:449:506 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-14 12:0:15:443:359 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 12:0:15:443:793 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-14 12:0:25:448:233 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 12:0:25:448:818 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 12:0:25:449:346 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_double_write_skew1.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..ea0c05c7 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,55 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:9:53:952:670 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:9:53:955:330 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:9:54:952:660 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:9:54:954:76 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-14 10:9:54:955:995 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 10:9:56:960:488 +Q6 finished at: 2022-4-14 10:9:56:960:792 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:9:57:956:494 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-14 10:10:7:954:61 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:10:7:954:538 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..23c4a84f --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,55 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:10:12:103:666 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:10:12:106:459 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:10:13:103:665 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:10:13:106:122 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-14 10:10:13:107:863 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:10:13:113:9 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-14 10:10:14:104:939 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:10:14:113:453 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-14 10:10:24:105:730 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:10:24:106:339 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_double_write_skew2.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..92917f1c --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,55 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:10:28:417:896 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:10:28:420:490 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:10:29:417:807 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:10:29:419:187 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-14 10:10:30:419:424 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:10:30:427:120 + Q5 finished at: 2022-4-14 10:10:30:427:452 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 10:10:31:423:928 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:10:41:419:223 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:10:41:419:678 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_read_skew.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..905c4a5a --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:10:45:547:624 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 10:10:45:550:439 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:10:46:547:561 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:10:46:550:232 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 10:10:46:551:79 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-14 10:10:47:548:626 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 10:10:48:553:989 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:10:49:548:26 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:10:59:549:313 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:10:59:549:868 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_read_skew2.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..2ffcf684 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:11:36:253:604 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:11:36:255:846 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:11:37:253:545 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 10:11:37:255:782 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-14 10:11:37:256:548 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-14 10:11:38:254:316 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:11:38:259:412 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 10:11:39:253:890 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:11:49:255:153 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:11:49:255:711 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..5bbaf0fe --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:11:53:410:752 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:11:53:413:592 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:11:54:410:768 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 10:11:54:413:239 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-14 10:11:54:414:94 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:11:54:414:652 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-14 10:11:55:411:662 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:11:55:414:977 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:12:5:412:598 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:12:5:413:229 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..1e5dc081 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:11:3:905:828 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-14 10:11:3:908:319 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:11:4:905:752 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:11:4:907:877 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-14 10:11:4:908:663 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:11:4:912:279 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-14 10:11:5:906:375 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:11:5:906:850 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-14 10:11:15:907:288 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:11:15:907:799 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..0df868fc --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,58 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:11:20:27:827 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-14 10:11:20:34:790 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:11:21:27:810 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-14 10:11:21:31:762 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-14 10:11:21:33:423 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:11:21:38:270 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-14 10:11:22:37:502 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:11:22:39:314 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-14 10:11:32:29:645 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:11:32:30:466 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_write_read_skew.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..269ae57c --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:9:19:396:903 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:9:19:399:361 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:9:20:396:853 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:9:20:398:115 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-14 10:9:20:399:828 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-14 10:9:21:397:646 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 10:9:22:403:177 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:9:23:404:126 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:9:33:398:760 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:9:33:399:408 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..53bd3fa5 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:9:37:598:976 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:9:37:602:69 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:9:38:598:913 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:9:38:600:818 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-14 10:9:38:602:579 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:9:38:608:905 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-14 10:9:39:599:861 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:9:39:603:214 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:9:49:600:678 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:9:49:601:184 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_mda_step_rat.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..ecca012a --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:12:9:737:701 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:12:9:740:150 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:12:10:737:682 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:12:10:739:259 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-14 10:12:10:741:492 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-14 10:12:11:737:665 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-14 10:12:11:739:23 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-14 10:12:11:739:945 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-14 10:12:12:738:706 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-14 10:12:12:741:932 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 10:12:13:740:227 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 10:12:14:743:88 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-14 10:12:24:739:734 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 10:12:24:740:447 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..70970148 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,208 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN;' + Q1 finished at: 2022-4-14 10:12:29:51:440 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-14 10:12:29:54:759 +Q3-T1 execute sql: 'BEGIN;' +Q3 finished at: 2022-4-14 10:12:30:51:377 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-14 10:12:30:53:893 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-14 10:12:31:51:466 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-14 10:12:31:52:981 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-14 10:12:31:53:828 + Q8-T2 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-14 10:12:32:51:434 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-14 10:12:32:52:748 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-14 10:12:33:52:441 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-14 10:12:34:55:150 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 10:12:35:55:135 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-14 10:12:36:51:785 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 10:12:46:51:920 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-14 10:12:46:53:917 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-14 10:12:46:54:424 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..14a4ab80 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:12:50:182:876 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:12:50:185:254 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:12:51:182:903 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:12:51:184:457 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-14 10:12:51:186:552 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-14 10:12:52:182:898 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-14 10:12:52:184:417 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-14 10:12:52:185:406 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-14 10:12:53:183:758 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-14 10:12:53:192:831 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 10:12:54:187:594 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 10:12:55:185:956 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-14 10:13:5:184:856 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 10:13:5:185:589 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..5f5ea642 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:13:9:506:514 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-14 10:13:9:512:281 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:13:10:506:555 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-14 10:13:10:508:704 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-14 10:13:10:512:508 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-14 10:13:11:506:535 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-14 10:13:11:507:744 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-14 10:13:11:508:638 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-14 10:13:12:508:333 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-14 10:13:12:516:31 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 10:13:13:510:911 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 10:13:14:510:459 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-14 10:13:24:508:255 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 10:13:24:508:864 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_sda_dirty_read.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..8ab47568 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,46 @@ +#### db_type: ob #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:7:19:703:736 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:7:19:706:389 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:7:20:703:580 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-14 10:7:20:707:753 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-14 10:7:21:704:115 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:7:22:704:127 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-14 10:7:32:705:314 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 10:7:32:705:896 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_sda_intermediate_read.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..4fb9bca2 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:7:55:277:319 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:7:55:282:697 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:7:56:277:307 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-14 10:7:56:279:734 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-14 10:7:57:279:662 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:7:58:277:786 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:7:59:281:423 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-14 10:8:9:278:690 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:8:9:279:260 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..6fd0012e --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:8:13:516:43 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:8:13:520:780 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:8:14:516:59 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-14 10:8:14:518:421 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 10:8:14:518:937 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-14 10:8:15:517:623 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:8:15:522:9 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-14 10:8:25:517:538 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:8:25:517:990 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_sda_lost_self_update.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..b6525bb3 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:9:2:135:424 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:9:2:140:234 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:9:3:135:574 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-14 10:9:4:139:706 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-14 10:9:4:144:618 + Q4 finished at: 2022-4-14 10:9:4:147:626 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 10:9:5:138:655 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-14 10:9:15:137:645 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:9:15:138:358 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..9a1b60fe --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,59 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:7:37:36:823 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 10:7:37:40:869 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:7:38:36:807 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-14 10:7:38:39:160 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-14 10:7:39:38:185 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:7:40:44:618 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:7:41:37:283 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-14 10:7:51:39:473 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:7:51:39:979 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..aceae760 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,57 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:8:29:795:219 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-14 10:8:29:800:39 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:8:30:795:159 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-14 10:8:30:797:795 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 10:8:30:803:286 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-14 10:8:31:802:31 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:8:31:802:638 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-14 10:8:41:796:868 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:8:41:797:465 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..2f8c2821 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,56 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:8:45:898:5 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-14 10:8:45:905:452 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:8:46:897:945 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-14 10:8:46:901:794 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 10:8:46:906:162 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-14 10:8:47:899:582 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:8:47:900:241 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-14 10:8:57:899:391 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:8:57:899:869 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..e48ca825 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,55 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:15:28:452:50 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:15:28:454:378 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:15:29:452:63 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 10:15:29:453:323 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-14 10:15:30:453:704 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:15:30:457:826 + Q5 finished at: 2022-4-14 10:15:30:458:113 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:15:30:461:317 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:15:40:453:571 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:15:40:454:145 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..6ab8f703 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:15:44:597:575 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:15:44:600:559 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:15:45:597:560 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 10:15:45:599:225 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-14 10:15:56:4:804 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-14 10:15:57:101:529 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..716a64ba --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:16:1:933:979 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:16:1:936:454 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:16:2:936:688 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 10:16:2:939:218 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-14 10:16:13:410:796 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-14 10:16:14:444:91 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..24160c50 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:16:20:58:626 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:16:20:61:312 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:16:21:63:164 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 10:16:21:64:258 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-14 10:16:31:467:726 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-14 10:16:32:664:829 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..09425f00 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:16:37:15:0 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 10:16:37:17:452 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:16:38:17:885 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 10:16:38:21:835 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 10:16:38:23:590 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 10:16:40:19:897 +Q6 finished at: 2022-4-14 10:16:40:23:628 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:16:40:27:789 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:16:50:16:490 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:16:50:17:45 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..c1e1e7a9 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:16:54:158:939 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 10:16:54:161:755 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:16:55:158:906 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 10:16:55:161:412 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 10:16:55:162:283 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 10:16:57:162:46 +Q6 finished at: 2022-4-14 10:16:57:162:410 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:16:58:176:252 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:17:8:160:627 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:17:8:161:376 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..0140c1b9 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:17:12:504:32 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:17:12:506:595 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:17:13:503:984 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 10:17:13:506:43 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-14 10:17:14:504:788 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:17:14:514:878 + Q5 finished at: 2022-4-14 10:17:14:515:112 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 10:17:15:508:69 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:17:25:505:749 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:17:25:506:321 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..ebfed6c7 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:17:29:674:914 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:17:29:677:684 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:17:30:674:942 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 10:17:30:677:383 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-14 10:17:31:675:648 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:17:33:679:148 + Q5 finished at: 2022-4-14 10:17:33:679:462 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 10:17:33:682:49 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:17:43:676:555 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:17:43:677:189 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..0983dce7 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:17:48:16:132 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:17:48:18:603 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:17:49:16:145 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 10:17:49:18:267 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-14 10:17:50:17:16 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 10:17:50:22:490 + Q5 finished at: 2022-4-14 10:17:50:22:758 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:17:50:33:219 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 10:18:0:17:787 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 10:18:0:18:474 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_mda_step_wat_c1.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..afa406cb --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:18:4:213:61 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:18:4:215:483 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:18:5:213:103 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 10:18:5:214:494 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-14 10:18:6:213:125 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-14 10:18:6:214:829 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-14 10:18:15:619:842 + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q8 failed at: 2022-4-14 10:18:16:920:867 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-14 10:18:18:20:416 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_mda_step_wat_c2.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..d00c82d6 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:18:23:545:147 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:18:23:547:509 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:18:24:557:647 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 10:18:24:562:599 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-14 10:18:25:564:123 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-14 10:18:27:547:2 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q6 failed at: 2022-4-14 10:18:37:49:857 + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q8 failed at: 2022-4-14 10:18:38:294:503 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-14 10:18:39:346:741 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..e64ae3a0 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:13:28:736:745 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:13:28:741:802 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:13:29:736:665 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-14 10:13:30:737:190 + Q4 finished at: 2022-4-14 10:13:30:737:907 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:13:31:739:877 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-14 10:13:41:738:513 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-14 10:13:41:768:14 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:13:41:869:56 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..a379737d --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:13:46:54:415 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:13:46:58:848 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:13:47:54:340 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-14 10:13:48:58:738 + Q4 finished at: 2022-4-14 10:13:48:61:750 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:13:49:58:753 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-14 10:13:59:56:90 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-14 10:13:59:95:322 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:13:59:95:954 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_sda_full_write.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..a7e5c558 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_sda_full_write.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:14:3:277:292 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:14:3:282:633 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:14:4:277:340 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-14 10:14:5:279:694 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-14 10:14:5:284:167 + Q4 finished at: 2022-4-14 10:14:5:287:335 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 10:14:6:281:55 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-14 10:14:16:279:446 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:14:16:280:172 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_sda_full_write_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..6912bb32 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:14:20:517:834 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:14:20:522:209 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:14:21:517:822 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-14 10:14:22:519:327 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:14:22:530:583 + Q4 finished at: 2022-4-14 10:14:22:536:99 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 10:14:22:546:739 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-14 10:14:32:519:259 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:14:32:519:844 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..3d3c4c52 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:15:12:216:23 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-14 10:15:12:220:987 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:15:13:216:77 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-14 10:15:14:219:978 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:15:14:223:920 + Q4 finished at: 2022-4-14 10:15:14:225:965 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 10:15:14:228:442 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-14 10:15:24:217:755 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:15:24:218:396 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_sda_lost_update_c1.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..828f2e63 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,50 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:14:36:748:857 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-14 10:14:36:753:730 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:14:37:748:977 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-14 10:14:37:751:787 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 10:14:39:753:48 +Q5 finished at: 2022-4-14 10:14:39:817:85 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-14 10:14:39:820:945 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-14 10:14:49:750:811 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:14:49:751:445 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_sda_lost_update_c2.txt b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..5dfa7034 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,50 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 10:14:53:980:8 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-14 10:14:53:984:249 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 10:14:54:980:22 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-14 10:14:54:982:782 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 10:14:56:984:626 +Q5 finished at: 2022-4-14 10:14:57:57:467 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 10:14:57:988:210 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-14 10:15:7:981:564 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 10:15:7:982:124 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_dda_read_skew_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..e78d00e0 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_dda_read_skew_committed.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:50:31:782:889 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 12:50:31:785:404 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:50:32:782:904 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-14 12:50:32:785:655 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 12:50:32:786:594 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 12:50:32:789:888 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-14 12:50:33:783:735 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 12:50:33:784:258 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 12:50:43:784:465 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 12:50:43:785:42 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..d6cfa159 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:50:48:79:476 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 12:50:48:82:485 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:50:49:79:449 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-14 12:50:49:82:334 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 12:50:49:83:164 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 12:50:49:89:237 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 +Q7 failed at: 2022-4-14 12:50:50:780:659 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_dda_write_skew.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_dda_write_skew.txt new file mode 100644 index 00000000..f05c386d --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_dda_write_skew.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:51:4:219:633 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 12:51:4:222:260 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:51:5:219:578 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 12:51:5:221:12 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 12:51:5:222:959 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-14 12:51:6:220:571 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 12:51:6:223:693 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 12:51:7:225:214 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 12:51:17:221:223 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 12:51:17:221:763 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_dda_write_skew_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..6349bf11 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_dda_write_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:51:54:108:208 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 12:51:54:111:12 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:51:55:108:224 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 12:51:55:109:975 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 12:51:55:111:826 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 12:51:55:115:674 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-14 12:51:56:109:18 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 12:51:56:113:34 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-14 12:52:6:110:245 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 12:52:6:110:840 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..d855eb0a --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,71 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:51:21:601:166 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-14 12:51:21:604:18 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-14 12:51:21:604:837 + Q4-T2 execute sql: 'BEGIN;' + Q4 finished at: 2022-4-14 12:51:22:601:77 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-14 12:51:22:602:935 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-14 12:51:22:603:796 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 12:51:22:608:760 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 12:51:23:605:502 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-14 12:51:33:603:271 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-14 12:51:33:604:902 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 12:51:33:605:389 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..a7df94e2 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:51:37:765:292 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-14 12:51:37:767:935 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:51:38:765:303 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-14 12:51:38:766:844 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-14 12:51:38:768:929 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-14 12:51:38:772:255 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-14 12:51:39:766:377 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-14 12:51:39:769:320 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-14 12:51:49:766:832 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 12:51:49:767:393 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_mda_step_iat.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_mda_step_iat.txt new file mode 100644 index 00000000..e54f105c --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_mda_step_iat.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_iat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:52:10:264:316 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-14 12:52:10:266:563 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:52:11:264:305 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-14 12:52:11:265:855 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-14 12:52:12:264:359 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-14 12:52:12:265:787 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-14 12:52:13:266:253 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-14 12:52:14:265:371 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-14 12:52:15:265:476 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-14 12:52:16:271:9 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 12:52:17:267:619 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 12:52:18:269:303 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-14 12:52:28:266:410 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 12:52:28:267:109 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..42ac2cad --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,107 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:53:53:442:707 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 12:53:53:445:546 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:53:54:442:681 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-14 12:53:54:445:441 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 12:53:54:450:720 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-14 12:53:55:442:721 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-14 12:53:55:444:515 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-14 12:53:55:445:375 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 12:53:55:453:721 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-14 12:53:56:443:504 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-14 12:53:56:443:980 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-14 12:54:6:445:10 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-14 12:54:6:445:546 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..d4130e38 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,208 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:53:34:105:103 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 12:53:34:108:400 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:53:35:104:995 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-14 12:53:35:106:767 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-14 12:53:36:105:14 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-14 12:53:36:107:496 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 12:53:36:111:262 + Q8-T4 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-14 12:53:37:105:4 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-14 12:53:37:106:521 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 12:53:37:109:636 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-14 12:53:38:105:941 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 12:53:38:106:516 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-14 12:53:39:106:172 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-14 12:53:39:106:748 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-14 12:53:49:108:579 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-14 12:53:49:109:210 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..55acd404 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:52:32:587:897 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-14 12:52:32:590:926 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:52:33:587:809 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-14 12:52:33:589:614 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-14 12:52:34:587:926 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-14 12:52:34:591:513 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-14 12:52:35:589:620 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-14 12:52:36:588:465 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-14 12:52:37:588:542 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-14 12:52:38:591:548 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 12:52:39:591:689 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 12:52:40:591:497 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-14 12:52:50:590:826 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 12:52:50:591:344 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..6bcacca5 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:52:54:711:136 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-14 12:52:54:717:557 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:52:55:711:157 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-14 12:52:55:713:785 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-14 12:52:56:711:189 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-14 12:52:56:712:711 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-14 12:52:57:714:158 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-14 12:52:58:712:550 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-14 12:52:59:712:231 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-14 12:53:0:716:813 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 12:53:1:717:69 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-14 12:53:2:714:941 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-14 12:53:12:713:418 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 12:53:12:714:127 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..ff9a25fa --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,139 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:54:10:654:276 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-14 12:54:10:656:768 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-14 12:54:10:657:677 + Q4-T2 execute sql: 'BEGIN;' + Q4 finished at: 2022-4-14 12:54:11:654:407 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-14 12:54:11:656:107 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-14 12:54:11:658:114 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-14 12:54:11:661:216 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-14 12:54:12:654:395 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-14 12:54:12:656:78 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-14 12:54:12:656:972 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-14 12:54:12:657:605 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-14 12:54:13:655:336 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-14 12:54:13:660:443 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-14 12:54:23:656:154 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-14 12:54:23:656:872 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..7381bf31 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,163 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:53:16:950:831 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-14 12:53:16:953:649 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:53:17:950:910 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-14 12:53:17:952:976 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-14 12:53:17:955:73 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-14 12:53:17:956:25 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-14 12:53:17:956:832 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-14 12:53:17:960:482 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-4-14 12:53:18:950:884 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-14 12:53:18:952:736 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-14 12:53:18:953:470 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-14 12:53:18:954:288 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-14 12:53:18:954:981 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-14 12:53:18:958:603 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-14 12:53:19:951:582 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-14 12:53:19:952:44 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-14 12:53:29:953:187 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-14 12:53:29:953:760 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_sda_lost_update_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..377ffc78 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_sda_lost_update_committed.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:50:15:551:928 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-14 12:50:15:555:931 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:50:16:551:848 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-14 12:50:16:555:392 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 12:50:16:558:949 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 +Q6 failed at: 2022-4-14 12:50:18:155:381 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..75e80e1e --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,61 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-14 12:49:59:312:183 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-14 12:49:59:317:23 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-14 12:50:0:312:223 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-14 12:50:0:314:818 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-14 12:50:0:318:28 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-14 12:50:1:314:150 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-14 12:50:1:314:586 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-14 12:50:11:314:59 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-14 12:50:11:314:641 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-14 12:50:11:315:163 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_double_write_skew1.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..7a95bf0e --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_double_write_skew1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 20:58:25:937:783 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 20:58:25:941:166 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 20:58:26:937:780 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-13 20:58:26:939:637 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-13 20:58:26:941:399 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-13 20:58:28:941:254 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 +Q6 failed at: 2022-4-13 20:58:29:542:129 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..cc709fdc --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 20:58:44:86:991 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 20:58:44:89:751 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 20:58:45:87:15 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-13 20:58:45:88:668 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-13 20:58:45:90:498 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-13 20:58:45:98:318 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 +Q7 failed at: 2022-4-13 20:58:46:788:324 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_double_write_skew2.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..0599aac4 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_double_write_skew2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 20:59:0:423:83 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 20:59:0:426:148 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 20:59:1:423:78 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-13 20:59:1:424:917 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-13 20:59:2:424:898 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-13 20:59:2:430:407 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-13 20:59:2:931:274 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_read_skew.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_read_skew.txt new file mode 100644 index 00000000..bc6dc8b6 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_read_skew.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 20:59:17:609:776 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-13 20:59:17:612:591 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 20:59:18:626:864 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-13 20:59:18:630:795 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-13 20:59:18:631:949 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-13 20:59:19:610:682 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-13 20:59:20:613:442 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-13 20:59:21:610:268 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-13 20:59:31:611:503 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-13 20:59:31:612:85 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_read_skew2.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_read_skew2.txt new file mode 100644 index 00000000..df6f7cc1 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_read_skew2.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 21:0:8:364:222 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 21:0:8:367:187 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 21:0:9:364:257 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-13 21:0:9:367:79 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-13 21:0:9:367:807 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-13 21:0:10:365:23 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-13 21:0:10:372:22 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-13 21:0:11:364:602 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-13 21:0:21:366:386 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-13 21:0:21:367:66 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..1a320679 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_read_skew2_committed.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 21:0:25:517:922 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 21:0:25:520:715 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 21:0:26:517:842 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-13 21:0:26:520:77 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-13 21:0:26:520:805 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-13 21:0:26:521:298 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-13 21:0:27:518:939 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-13 21:0:27:521:884 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-13 21:0:37:519:678 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-13 21:0:37:520:435 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..c04c03bc --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 20:59:35:934:937 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-13 20:59:35:937:845 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 20:59:36:934:954 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-13 20:59:36:937:766 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-13 20:59:36:938:471 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-13 20:59:36:942:309 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-13 20:59:37:935:650 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-13 20:59:37:936:136 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-13 20:59:47:937:112 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-13 20:59:47:937:704 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..78cfb2a5 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 20:59:52:54:981 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-13 20:59:52:61:331 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 20:59:53:55:20 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-13 20:59:53:60:369 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-13 20:59:53:61:600 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-13 20:59:53:65:615 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-13 20:59:54:56:377 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-13 20:59:54:56:921 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-13 21:0:4:56:797 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-13 21:0:4:57:430 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_write_read_skew.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..26623b6d --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_write_read_skew.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 20:57:51:451:226 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 20:57:51:454:228 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 20:57:52:451:970 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-13 20:57:52:454:698 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-13 20:57:52:457:592 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-13 20:57:53:451:859 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-13 20:57:54:459:760 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-13 20:57:55:456:621 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-13 20:58:5:453:420 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-13 20:58:5:454:99 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..8bf3b6f8 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 20:58:9:605:698 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 20:58:9:608:687 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 20:58:10:605:653 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-13 20:58:10:607:276 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-13 20:58:10:609:136 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-13 20:58:10:615:272 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-13 20:58:11:606:551 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-13 20:58:11:610:179 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-13 20:58:21:607:154 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-13 20:58:21:607:688 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_mda_step_rat.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_mda_step_rat.txt new file mode 100644 index 00000000..7516f5e8 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_mda_step_rat.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_rat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 21:0:41:850:886 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 21:0:41:853:751 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 21:0:42:850:817 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-13 21:0:42:852:714 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-13 21:0:42:854:514 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-13 21:0:43:850:822 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-13 21:0:43:852:625 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-13 21:0:43:853:464 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-13 21:0:44:851:541 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-13 21:0:44:855:139 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-13 21:0:45:854:918 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-13 21:0:46:855:395 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-13 21:0:56:852:954 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-13 21:0:56:853:606 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..e6413a0e --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,208 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN;' + Q1 finished at: 2022-4-13 21:1:1:37:84 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-13 21:1:1:41:861 +Q3-T1 execute sql: 'BEGIN;' +Q3 finished at: 2022-4-13 21:1:2:37:29 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-13 21:1:2:39:882 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-13 21:1:3:37:65 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-13 21:1:3:38:843 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-13 21:1:3:39:790 + Q8-T2 execute sql: 'BEGIN;' + Q8 finished at: 2022-4-13 21:1:4:37:118 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-13 21:1:4:38:717 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-13 21:1:5:38:228 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-13 21:1:6:40:946 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-13 21:1:7:44:847 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-13 21:1:8:37:662 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-13 21:1:18:37:794 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-13 21:1:18:39:711 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-13 21:1:18:40:241 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..c92fbb2c --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 21:1:22:376:782 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-13 21:1:22:379:455 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 21:1:23:376:769 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-13 21:1:23:378:535 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-13 21:1:23:380:370 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-13 21:1:24:376:780 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-13 21:1:24:378:540 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-13 21:1:24:379:406 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-13 21:1:25:377:541 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-13 21:1:25:382:438 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-13 21:1:26:383:653 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-13 21:1:27:380:260 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-13 21:1:37:379:160 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-13 21:1:37:379:793 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..c9b47ceb --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 21:1:41:522:45 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-13 21:1:41:528:565 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 21:1:42:522:95 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-13 21:1:42:524:815 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-13 21:1:42:528:82 + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-13 21:1:43:522:31 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-13 21:1:43:523:536 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-13 21:1:43:524:563 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-13 21:1:44:523:941 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-13 21:1:44:532:14 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-13 21:1:45:528:919 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-13 21:1:46:525:700 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-13 21:1:56:523:898 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-13 21:1:56:524:474 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_sda_dirty_read.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_sda_dirty_read.txt new file mode 100644 index 00000000..a38d9968 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_sda_dirty_read.txt @@ -0,0 +1,46 @@ +#### db_type: ob #### +#### test_type: sda_dirty_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 20:55:51:810:653 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 20:55:51:813:180 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 20:55:52:810:620 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-13 20:55:52:813:171 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-13 20:55:53:811:192 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-13 20:55:54:811:331 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-13 20:56:4:812:545 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-13 20:56:4:813:152 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_sda_intermediate_read.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..5bbfc43d --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_sda_intermediate_read.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 20:56:27:431:375 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 20:56:27:436:347 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 20:56:28:431:399 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-13 20:56:28:433:751 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-13 20:56:29:433:206 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-13 20:56:30:431:831 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-13 20:56:31:436:357 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-13 20:56:41:433:58 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-13 20:56:41:433:597 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..79f8174a --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 20:56:45:641:748 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 20:56:45:645:982 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 20:56:46:641:705 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-13 20:56:46:644:251 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-13 20:56:46:644:774 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-13 20:56:47:643:276 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-13 20:56:47:650:779 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-13 20:56:57:643:724 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-13 20:56:57:644:262 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_sda_lost_self_update.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..b6d5848b --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_sda_lost_self_update.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 20:57:34:211:552 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 20:57:34:216:918 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 20:57:35:211:543 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-13 20:57:36:214:875 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-13 20:57:36:222:73 + Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-13 20:57:36:631:668 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..7cc2b19d --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_sda_non_repeatable_read.txt @@ -0,0 +1,59 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 20:56:9:127:817 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-13 20:56:9:131:915 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 20:56:10:127:808 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-13 20:56:10:131:501 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-13 20:56:11:129:656 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-13 20:56:12:136:631 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-13 20:56:13:128:403 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-13 20:56:23:130:666 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-13 20:56:23:131:160 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..ad196ef8 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,59 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 20:57:1:857:888 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-13 20:57:1:862:497 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 20:57:2:857:936 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-13 20:57:2:860:285 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-13 20:57:2:863:782 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-13 20:57:3:859:498 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-13 20:57:3:859:987 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-13 20:57:13:859:377 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-13 20:57:13:859:909 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..cef7e6c6 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,58 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 20:57:17:969:13 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-13 20:57:17:975:122 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 20:57:18:969:44 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-13 20:57:18:972:673 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-13 20:57:18:976:900 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-13 20:57:19:970:525 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-13 20:57:19:971:140 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-13 20:57:29:971:237 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-13 20:57:29:971:734 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..c286fa11 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 21:4:0:303:273 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 21:4:0:305:938 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 21:4:1:304:306 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-13 21:4:1:307:218 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-13 21:4:2:304:974 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-13 21:4:2:313:67 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-13 21:4:2:908:635 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..64fffefd --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 21:4:16:617:583 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 21:4:16:620:808 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 21:4:17:626:843 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-13 21:4:17:627:917 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-13 21:4:28:32:210 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-13 21:4:29:129:371 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..a61d60d7 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 21:4:33:766:855 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 21:4:33:769:772 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 21:4:34:771:561 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-13 21:4:34:774:753 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-13 21:4:45:256:739 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-13 21:4:46:269:137 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..7625f1b6 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 21:4:52:106:696 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 21:4:52:109:713 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 21:4:53:110:936 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-13 21:4:53:111:865 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-13 21:5:3:516:595 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-13 21:5:4:713:916 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..d5e1fc66 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 21:5:8:853:689 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-13 21:5:8:856:275 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 21:5:9:858:651 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-13 21:5:9:862:507 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-13 21:5:9:863:802 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-13 21:5:11:858:865 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 +Q6 failed at: 2022-4-13 21:5:12:462:402 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..46e4eb48 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 21:5:26:196:213 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-13 21:5:26:198:990 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 21:5:27:196:222 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-13 21:5:27:199:7 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-13 21:5:27:199:815 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-13 21:5:29:202:782 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 +Q6 failed at: 2022-4-13 21:5:29:803:538 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..ab511767 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 21:5:44:381:806 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 21:5:44:384:656 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 21:5:45:381:790 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-13 21:5:45:384:158 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-13 21:5:46:382:711 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-13 21:5:46:385:900 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-13 21:5:46:886:841 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..14b171e8 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 21:6:1:711:505 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 21:6:1:714:632 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 21:6:2:712:348 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-13 21:6:2:715:953 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-13 21:6:3:712:69 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-13 21:6:5:716:516 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-13 21:6:6:240:784 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..d3c7e5af --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 21:6:19:847:731 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 21:6:19:850:477 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 21:6:20:848:443 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-13 21:6:20:850:375 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-13 21:6:21:848:612 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-13 21:6:21:853:121 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 + Q5 failed at: 2022-4-13 21:6:22:353:894 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_mda_step_wat_c1.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..8b74d7f8 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_mda_step_wat_c1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 21:6:36:180:235 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 21:6:36:183:202 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 21:6:37:181:89 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-13 21:6:37:183:714 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute sql: 'BEGIN;' + Q6 finished at: 2022-4-13 21:6:38:180:261 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-13 21:6:38:181:958 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q5 failed at: 2022-4-13 21:6:47:616:276 + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q8 failed at: 2022-4-13 21:6:48:893:498 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-13 21:6:49:991:34 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_mda_step_wat_c2.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..3130346e --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_mda_step_wat_c2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 21:6:55:382:139 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 21:6:55:384:655 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 21:6:56:388:698 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-13 21:6:56:389:848 + Q5-T3 execute sql: 'BEGIN;' + Q5 finished at: 2022-4-13 21:6:57:386:292 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-13 21:6:59:385:104 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q6 failed at: 2022-4-13 21:7:8:890:174 + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q8 failed at: 2022-4-13 21:7:10:89:876 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-13 21:7:11:185:123 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..abb97f92 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 21:2:0:746:474 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 21:2:0:751:292 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 21:2:1:746:500 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-13 21:2:2:747:191 + Q4 finished at: 2022-4-13 21:2:2:747:872 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-13 21:2:3:760:363 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-13 21:2:13:748:968 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-13 21:2:13:777:878 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-13 21:2:13:778:569 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..f334319f --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,29 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 21:2:17:883:649 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 21:2:17:888:427 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 21:2:18:883:626 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-13 21:2:19:888:2 + Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-13 21:2:20:292:99 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_sda_full_write.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_sda_full_write.txt new file mode 100644 index 00000000..8b31a1a9 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_sda_full_write.txt @@ -0,0 +1,31 @@ +#### db_type: ob #### +#### test_type: sda_full_write #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 21:2:35:107:500 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 21:2:35:112:30 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 21:2:36:108:531 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-13 21:2:37:108:892 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-13 21:2:37:117:609 + Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-13 21:2:37:606:744 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_sda_full_write_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..35cb65d6 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_sda_full_write_committed.txt @@ -0,0 +1,31 @@ +#### db_type: ob #### +#### test_type: sda_full_write_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 21:2:52:328:581 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 21:2:52:333:703 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 21:2:53:329:213 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-13 21:2:54:330:220 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-13 21:2:54:334:230 + Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-13 21:2:54:745:862 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..e1366688 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 21:3:44:68:665 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-13 21:3:44:72:845 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 21:3:45:68:643 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-13 21:3:46:72:143 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-13 21:3:46:76:561 + Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 + Q4 failed at: 2022-4-13 21:3:46:479:573 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_sda_lost_update_c1.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..2fa46f09 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_sda_lost_update_c1.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 21:3:8:559:948 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-13 21:3:8:563:916 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 21:3:9:560:607 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-13 21:3:9:564:179 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-13 21:3:11:564:96 +Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 +Q5 failed at: 2022-4-13 21:3:12:162:410 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_sda_lost_update_c2.txt b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..86fce082 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/repeatable-read/wat_sda_lost_update_c2.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-4-13 21:3:25:822:305 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-13 21:3:25:827:79 + Q3-T2 execute sql: 'BEGIN;' + Q3 finished at: 2022-4-13 21:3:26:822:330 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-13 21:3:26:824:777 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-13 21:3:28:826:178 +Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction errcode: HY000 +Q5 failed at: 2022-4-13 21:3:29:424:653 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.25]can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/result_summary/read-committed_total-result.txt b/test_result/distributed_result/ob_mysql_test/ob_single/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..a5e025b4 --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Timeout + +wat_dda_full_write_skew_c2: Timeout + +wat_dda_full_write_skew_committed: Timeout + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Timeout + +wat_mda_step_wat_c2: Timeout + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/ob_mysql_test/ob_single/result_summary/repeatable-read_total-result.txt b/test_result/distributed_result/ob_mysql_test/ob_single/result_summary/repeatable-read_total-result.txt new file mode 100644 index 00000000..4139416e --- /dev/null +++ b/test_result/distributed_result/ob_mysql_test/ob_single/result_summary/repeatable-read_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Rollback + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Rollback + +wat_sda_full_write: Rollback + +wat_sda_full_write_committed: Rollback + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Rollback + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Timeout + +wat_dda_full_write_skew_c2: Timeout + +wat_dda_full_write_skew_committed: Timeout + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Timeout + +wat_mda_step_wat_c2: Timeout + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_dda_read_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..f407cc73 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,72 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 16:9:16:692:937 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 16:9:17:693:497 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q3 finished at: 2022-3-30 16:9:18:742:65 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 16:9:19:720:608 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-3-30 16:9:19:783:540 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 16:9:19:947:110 +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,1) + (1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,1) + +Q7 finished at: 2022-3-30 16:9:20:739:339 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 16:9:20:780:294 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 16:9:30:695:541 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 16:9:30:784:688 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 16:9:30:874:945 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 16:9:30:917:680 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..e2edfe83 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,65 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 16:11:18:112:744 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 16:11:19:110:84 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q3 finished at: 2022-3-30 16:11:20:163:124 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-3-30 16:11:21:114:585 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-3-30 16:11:21:157:801 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 16:11:21:200:380 +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-3-30 16:11:22:114:528 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 16:11:22:160:241 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 16:11:32:110:97 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 16:11:32:197:70 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + (1) expected_result: + (1,3,1,2) + (2) expected_result: + (1,3,1,2) + + Q11 finished at: 2022-3-30 16:11:32:282:303 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 16:11:32:322:857 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_dda_write_skew.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..cf1472c9 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,72 @@ +#### db_type: ob #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 16:11:47:897:436 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 16:11:48:895:736 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q3 finished at: 2022-3-30 16:11:49:941:431 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-3-30 16:11:50:965:288 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-3-30 16:11:51:24:789 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-3-30 16:11:51:901:768 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 16:11:51:942:149 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 16:11:52:905:874 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 16:12:2:900:621 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 16:12:2:987:844 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 16:12:3:75:121 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 16:12:3:117:102 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_dda_write_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..a0849f55 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,72 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 16:14:20:404:160 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 16:14:21:405:265 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q3 finished at: 2022-3-30 16:14:22:450:319 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-3-30 16:14:23:468:686 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-3-30 16:14:23:527:581 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 16:14:23:574:228 +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-3-30 16:14:24:409:52 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 16:14:24:452:18 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 16:14:34:401:315 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 16:14:34:480:502 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 16:14:34:558:881 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 16:14:34:596:446 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..29975a26 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,74 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 16:12:18:322:417 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 16:12:19:320:407 +Q3-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q3 finished at: 2022-3-30 16:12:20:368:270 +Q4-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q4 finished at: 2022-3-30 16:12:20:410:766 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-3-30 16:12:21:366:318 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-3-30 16:12:21:408:66 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 16:12:21:451:403 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 16:12:22:323:521 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 16:12:32:316:328 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-3-30 16:12:32:393:238 + Q11-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q11 finished at: 2022-3-30 16:12:32:468:683 + Q12-T3 execute sql: 'DROP TABLE mytab;' + Q12 finished at: 2022-3-30 16:12:32:523:609 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-3-30 16:12:32:560:888 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..d7f378ea --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 16:13:51:941:987 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 16:13:52:947:608 +Q3-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q3 finished at: 2022-3-30 16:13:53:984:216 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-3-30 16:13:54:983:928 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-3-30 16:13:55:25:518 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 16:13:55:66:349 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-3-30 16:13:55:944:38 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 16:13:55:984:202 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 16:14:5:940:438 + Q10-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q10 finished at: 2022-3-30 16:14:6:16:65 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 16:14:6:51:933 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_mda_step_iat.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..a556cd05 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,128 @@ +#### db_type: ob #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 16:14:48:605:574 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 16:14:49:611:924 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 16:14:50:607:844 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + (2,0,2,1) + (5) expected_result: + (2,0,2,1) + (6) expected_result: + (2,0,2,1) + +Q4 finished at: 2022-3-30 16:14:51:650:713 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,,3) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 16:14:52:663:85 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-3-30 16:14:53:673:364 +Q7-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q7 finished at: 2022-3-30 16:14:54:608:538 + Q8-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q8 finished at: 2022-3-30 16:14:55:616:828 + Q9-T3 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q9 finished at: 2022-3-30 16:14:56:627:223 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 16:14:57:608:339 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 16:14:58:614:447 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 16:14:59:613:914 + Q13-T4 execute sql: 'BEGIN;' + Q13 finished at: 2022-3-30 16:15:9:610:307 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) (2,0,2,1) + *(1) expected_result: + (0,1,0,3) (2,0,2,1) + *(2) expected_result: + (0,1,0,3) (2,0,2,1) + *(3) expected_result: + (0,1,0,3) (2,0,2,1) + *(4) expected_result: + (0,1,0,3) (2,0,2,1) + *(5) expected_result: + (0,1,0,3) (2,0,2,1) + *(6) expected_result: + (0,1,0,3) (2,0,2,1) + + Q14 finished at: 2022-3-30 16:15:9:702:157 + Q15-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q15 finished at: 2022-3-30 16:15:9:792:490 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-3-30 16:15:9:836:327 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..273102ca --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,125 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 16:17:43:219:846 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 16:17:44:220:15 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 16:17:45:219:65 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + (3) expected_result: + (0,1,0,3) + (4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,3) + +Q4 finished at: 2022-3-30 16:17:46:266:153 + Q4-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q4 finished at: 2022-3-30 16:17:47:223:86 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 16:17:47:265:923 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,0) + + Q7 finished at: 2022-3-30 16:17:48:262:190 + Q8-T3 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q8 finished at: 2022-3-30 16:17:48:307:349 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 16:17:48:348:819 +Q10-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,1) + (1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + +Q10 finished at: 2022-3-30 16:17:49:264:114 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-3-30 16:17:49:304:225 + Q12-T4 execute sql: 'BEGIN;' + Q12 finished at: 2022-3-30 16:17:59:219:931 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,3) + + Q13 finished at: 2022-3-30 16:17:59:314:403 + Q14-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q14 finished at: 2022-3-30 16:17:59:407:834 + Q15-T4 execute opt: 'COMMIT'; + Q15 finished at: 2022-3-30 16:17:59:452:404 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..86fb5c9d --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,242 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 16:17:9:444:365 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 16:17:10:442:898 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 16:17:11:446:772 + Q4-T4 execute sql: 'BEGIN;' + Q4 finished at: 2022-3-30 16:17:12:444:810 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + *(5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,3) + (7) expected_result: + (0,1,0,3) + *(8) expected_result: + (0,1,0,0) + (9) expected_result: + (0,1,0,3) + (10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,0) + (12) expected_result: + (0,1,0,3) + (13) expected_result: + (0,1,0,3) + (14) expected_result: + (0,1,0,3) + +Q5 finished at: 2022-3-30 16:17:13:493:8 + Q6-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + *(7) expected_result: + (1,3,1,0) + (8) expected_result: + (1,3,1,1) + *(9) expected_result: + (1,3,1,0) + (10) expected_result: + (1,3,1,1) + (11) expected_result: + (1,3,1,1) + (12) expected_result: + (1,3,1,1) + (13) expected_result: + (1,3,1,1) + *(14) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-3-30 16:17:14:487:34 + Q7-T3 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q7 finished at: 2022-3-30 16:17:15:451:136 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 16:17:15:495:729 + Q9-T4 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q9 finished at: 2022-3-30 16:17:16:469:799 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 16:17:16:515:34 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,3) + (1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,0) + (7) expected_result: + (0,1,0,0) + (8) expected_result: + (0,1,0,0) + *(9) expected_result: + (0,1,0,3) + *(10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,3) + (12) expected_result: + (0,1,0,0) + *(13) expected_result: + (0,1,0,3) + *(14) expected_result: + (0,1,0,3) + + Q11 finished at: 2022-3-30 16:17:17:485:771 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 16:17:17:523:932 +Q13-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,1) + (1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,1) + (6) expected_result: + (1,3,1,0) + *(7) expected_result: + (1,3,1,1) + *(8) expected_result: + (1,3,1,1) + (9) expected_result: + (1,3,1,0) + *(10) expected_result: + (1,3,1,1) + *(11) expected_result: + (1,3,1,1) + *(12) expected_result: + (1,3,1,1) + (13) expected_result: + (1,3,1,0) + *(14) expected_result: + (1,3,1,1) + +Q13 finished at: 2022-3-30 16:17:18:487:11 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-3-30 16:17:18:526:736 + Q15-T5 execute sql: 'BEGIN;' + Q15 finished at: 2022-3-30 16:17:28:448:146 + Q16-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,3) + *(7) expected_result: + (0,1,0,3) + *(8) expected_result: + (0,1,0,3) + *(9) expected_result: + (0,1,0,3) + *(10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,3) + *(12) expected_result: + (0,1,0,3) + *(13) expected_result: + (0,1,0,3) + *(14) expected_result: + (0,1,0,3) + + Q16 finished at: 2022-3-30 16:17:28:538:762 + Q17-T5 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + *(7) expected_result: + (1,3,1,1) + *(8) expected_result: + (1,3,1,1) + *(9) expected_result: + (1,3,1,1) + *(10) expected_result: + (1,3,1,1) + *(11) expected_result: + (1,3,1,1) + *(12) expected_result: + (1,3,1,1) + *(13) expected_result: + (1,3,1,1) + *(14) expected_result: + (1,3,1,1) + + Q17 finished at: 2022-3-30 16:17:28:631:77 + Q18-T5 execute opt: 'COMMIT'; + Q18 finished at: 2022-3-30 16:17:28:673:812 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..0346b73d --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,128 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 16:15:27:46:208 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 16:15:28:41:804 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 16:15:29:46:938 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q4 finished at: 2022-3-30 16:15:30:98:705 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + null + *(6) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 16:15:31:90:253 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + null + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + null + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-3-30 16:15:32:97:405 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE value1=0;' +Q7 finished at: 2022-3-30 16:15:33:48:261 + Q8-T2 execute sql: 'DELETE FROM t2 WHERE value1=1;' + Q8 finished at: 2022-3-30 16:15:34:44:814 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE value1=2;' + Q9 finished at: 2022-3-30 16:15:35:48:537 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 16:15:36:48:297 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 16:15:37:45:438 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 16:15:38:49:281 + Q13-T4 execute sql: 'BEGIN;' + Q13 finished at: 2022-3-30 16:15:48:44:304 + Q14-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q14 finished at: 2022-3-30 16:15:48:131:977 + Q15-T4 execute sql: 'SELECT * FROM t2;' + current_result: + null + (1) expected_result: + + (2) expected_result: + + (3) expected_result: + + (4) expected_result: + + (5) expected_result: + + (6) expected_result: + + + Q15 finished at: 2022-3-30 16:15:48:219:363 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-3-30 16:15:48:260:983 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..49e2f59e --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,125 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 16:16:1:951:797 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 16:16:2:950:476 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 16:16:3:950:558 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,0,2,0) + (5) expected_result: + (2,0,2,0) + (6) expected_result: + (2,0,2,0) + +Q4 finished at: 2022-3-30 16:16:5:1:2 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + null + (1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,0) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1,0,0) + *(6) expected_result: + null + + Q5 finished at: 2022-3-30 16:16:5:997:71 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + null + (1) expected_result: + (1,3,1,0) + *(2) expected_result: + null + (3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,0) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-3-30 16:16:7:22:160 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q7 finished at: 2022-3-30 16:16:7:952:638 + Q8-T2 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + Q8 finished at: 2022-3-30 16:16:8:952:646 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + Q9 finished at: 2022-3-30 16:16:9:959:721 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 16:16:10:953:691 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 16:16:11:952:761 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 16:16:12:956:576 + Q13-T4 execute sql: 'BEGIN;' + Q13 finished at: 2022-3-30 16:16:22:948:949 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,0) (2,0,2,0) + *(1) expected_result: + (0,1,0,0) (2,0,2,0) + *(2) expected_result: + (0,1,0,0) (2,0,2,0) + *(3) expected_result: + (0,1,0,0) (2,0,2,0) + *(4) expected_result: + (0,1,0,0) (2,0,2,0) + *(5) expected_result: + (0,1,0,0) (2,0,2,0) + *(6) expected_result: + (0,1,0,0) (2,0,2,0) + + Q14 finished at: 2022-3-30 16:16:23:30:825 + Q15-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,0) + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q15 finished at: 2022-3-30 16:16:23:114:595 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-3-30 16:16:23:152:919 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..1e3bd60e --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,159 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 16:18:12:606:377 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 16:18:13:607:715 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 16:18:14:607:46 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + *(5) expected_result: + (0,1,0,0) + *(6) expected_result: + (0,1,0,0) + +Q4 finished at: 2022-3-30 16:18:15:653:141 +Q5-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + +Q5 finished at: 2022-3-30 16:18:15:739:19 + Q6-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,0) + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-3-30 16:18:16:677:110 + Q6-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q6 finished at: 2022-3-30 16:18:16:730:628 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 16:18:16:778:258 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + (4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,0) + *(6) expected_result: + (0,1,0,0) + + Q9 finished at: 2022-3-30 16:18:17:652:39 + Q10-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + (2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + (5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,0) + + Q10 finished at: 2022-3-30 16:18:17:736:679 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 16:18:17:777:439 +Q12-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q12 finished at: 2022-3-30 16:18:18:609:526 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-3-30 16:18:18:651:929 + Q14-T4 execute sql: 'BEGIN;' + Q14 finished at: 2022-3-30 16:18:28:607:917 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,3) + + Q15 finished at: 2022-3-30 16:18:28:696:638 + Q16-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q16 finished at: 2022-3-30 16:18:28:783:646 + Q17-T4 execute opt: 'COMMIT'; + Q17 finished at: 2022-3-30 16:18:28:825:209 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..921a70c1 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,181 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 16:16:39:754:190 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 16:16:40:749:405 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 16:16:41:757:586 +Q4-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,2) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + +Q4 finished at: 2022-3-30 16:16:42:802:768 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,2) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + (0,1,0,2) + (6) expected_result: + (0,1,0,2) + + Q5 finished at: 2022-3-30 16:16:43:794:542 + Q6-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q6 finished at: 2022-3-30 16:16:43:834:835 + Q7-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,0) + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q7 finished at: 2022-3-30 16:16:43:911:765 + Q8-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q8 finished at: 2022-3-30 16:16:43:951:567 + Q9-T2 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 16:16:43:991:206 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + *(4) expected_result: + (2,0,2,0) + *(5) expected_result: + (2,0,2,0) + *(6) expected_result: + (2,0,2,0) + + Q10 finished at: 2022-3-30 16:16:44:808:214 + Q11-T3 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q11 finished at: 2022-3-30 16:16:44:854:378 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,0) + + Q12 finished at: 2022-3-30 16:16:44:947:428 + Q13-T3 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q13 finished at: 2022-3-30 16:16:44:993:840 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 16:16:45:41:615 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,1) + (1) expected_result: + (2,0,2,0) + (2) expected_result: + (2,0,2,0) + (3) expected_result: + (2,0,2,0) + (4) expected_result: + (2,0,2,2) + *(5) expected_result: + (2,0,2,1) + *(6) expected_result: + (2,0,2,1) + +Q15 finished at: 2022-3-30 16:16:45:799:323 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-3-30 16:16:45:841:181 + Q17-T4 execute sql: 'BEGIN;' + Q17 finished at: 2022-3-30 16:16:55:753:292 + Q18-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,2) (2,0,2,1) + *(1) expected_result: + (0,1,0,2) (2,0,2,1) + *(2) expected_result: + (0,1,0,2) (2,0,2,1) + *(3) expected_result: + (0,1,0,2) (2,0,2,1) + *(4) expected_result: + (0,1,0,2) (2,0,2,1) + *(5) expected_result: + (0,1,0,2) (2,0,2,1) + *(6) expected_result: + (0,1,0,2) (2,0,2,1) + + Q18 finished at: 2022-3-30 16:16:55:841:687 + Q19-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q19 finished at: 2022-3-30 16:16:55:927:385 + Q20-T4 execute opt: 'COMMIT'; + Q20 finished at: 2022-3-30 16:16:55:968:587 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_sda_lost_update_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..45001b8c --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 16:8:49:545:750 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 16:8:50:542:281 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q3 finished at: 2022-3-30 16:8:51:587:702 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-3-30 16:8:52:545:367 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 16:8:52:584:265 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-3-30 16:8:53:544:251 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 16:8:53:584:617 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 16:9:3:548:203 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-3-30 16:9:3:636:649 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 16:9:3:679:339 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..c24ccb2c --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,58 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 16:8:22:869:209 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 16:8:23:867:631 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 16:8:24:914:750 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-3-30 16:8:25:870:291 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 16:8:25:911:548 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-3-30 16:8:26:911:728 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 16:8:26:952:596 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 16:8:36:869:644 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-3-30 16:8:36:955:231 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 16:8:36:996:401 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_double_write_skew1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..c06edbad --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,67 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:44:10:564:476 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:44:11:559:958 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 15:44:12:569:423 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 15:44:13:584:50 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 15:44:13:688:42 +Q6-T1 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 15:44:15:565:724 +Q6 finished at: 2022-3-30 15:44:15:587:477 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 15:44:16:567:57 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 15:44:26:558:110 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 15:44:26:637:164 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,2) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,2) + + Q11 finished at: 2022-3-30 15:44:26:714:65 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:44:26:751:30 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..ba205c35 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,67 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:45:7:231:863 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:45:8:229:321 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 15:45:9:236:564 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 15:45:10:249:858 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 15:45:10:348:241 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 15:45:10:494:622 +Q7-T1 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' +Q7 finished at: 2022-3-30 15:45:11:236:121 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 15:45:11:279:998 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 15:45:21:230:14 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 15:45:21:314:329 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,2) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,2) + + Q11 finished at: 2022-3-30 15:45:21:396:772 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:45:21:436:258 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_double_write_skew2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..d40c9dbd --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,67 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:46:17:223:238 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:46:18:226:848 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 15:46:19:231:480 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 15:46:20:255:904 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q6 finished at: 2022-3-30 15:46:21:277:43 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 15:46:21:318:971 + Q5 finished at: 2022-3-30 15:46:21:436:763 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 15:46:22:233:338 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 15:46:32:232:372 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,2) + *(1) expected_result: + (0,1,0,2) + *(2) expected_result: + (0,1,0,2) + + Q10 finished at: 2022-3-30 15:46:32:319:652 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 15:46:32:404:988 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:46:32:445:976 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_read_skew.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..d7e51f18 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,74 @@ +#### db_type: ob #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:47:12:51:846 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:47:13:52:221 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q3 finished at: 2022-3-30 15:47:14:97:119 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 15:47:15:75:258 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-3-30 15:47:15:133:595 +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q6 finished at: 2022-3-30 15:47:16:96:338 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 15:47:17:57:856 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 15:47:18:55:416 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 15:47:28:55:216 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 15:47:28:143:46 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 15:47:28:231:649 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:47:28:272:971 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_read_skew2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..baa2fb2d --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,74 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:49:26:304:996 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:49:27:301:676 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 15:49:28:309:780 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-3-30 15:49:29:362:346 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 15:49:29:458:773 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-3-30 15:49:30:309:723 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 15:49:30:352:200 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 15:49:31:303:351 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 15:49:41:303:166 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 15:49:41:382:672 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 15:49:41:461:925 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:49:41:499:838 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..bc9553fe --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,74 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:50:1:701:637 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:50:2:699:508 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 15:50:3:703:888 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-3-30 15:50:4:770:172 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 15:50:4:876:621 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 15:50:4:919:839 +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-3-30 15:50:5:703:699 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 15:50:5:746:790 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 15:50:15:697:616 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 15:50:15:778:871 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 15:50:15:860:187 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:50:15:899:72 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..40616e55 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,72 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:47:56:205:332 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:47:57:203:150 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE value2=0;' + current_result: + (0,1,0,0) + (1) expected_result: + null + *(2) expected_result: + (0,1,0,0) + +Q3 finished at: 2022-3-30 15:47:58:256:923 + Q4-T2 execute sql: 'DELETE FROM t2 WHERE value1=1;' + Q4 finished at: 2022-3-30 15:47:59:208:347 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE value1=0;' + Q5 finished at: 2022-3-30 15:47:59:251:784 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 15:47:59:295:614 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE value2=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,1,0,0) + +Q7 finished at: 2022-3-30 15:48:0:252:289 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 15:48:0:295:573 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 15:48:10:202:541 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q10 finished at: 2022-3-30 15:48:10:286:260 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q11 finished at: 2022-3-30 15:48:10:370:214 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:48:10:410:795 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..05f4f0d4 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,59 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:48:27:285:105 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:48:28:290:706 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q3 finished at: 2022-3-30 15:48:29:329:396 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-3-30 15:48:30:292:135 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-3-30 15:48:30:335:862 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 15:48:30:381:210 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-3-30 15:48:31:325:395 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 15:48:31:363:376 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 15:48:41:288:299 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q10 finished at: 2022-3-30 15:48:41:377:285 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 15:48:41:418:92 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_write_read_skew.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..7dc8a45e --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,72 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:42:2:702:658 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:42:3:705:932 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 15:42:4:707:690 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 15:42:5:734:650 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 15:42:5:841:365 +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1; ' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q6 finished at: 2022-3-30 15:42:6:745:895 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 15:42:7:712:132 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 15:42:8:705:144 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 15:42:18:707:816 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 15:42:18:796:713 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 15:42:18:884:699 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:42:18:927:477 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..a1456cdb --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,74 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:43:10:166:553 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:43:11:171:320 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 15:43:12:171:357 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 15:43:13:177:176 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 15:43:13:260:442 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 15:43:13:302:452 +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,1) + (1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,1) + +Q7 finished at: 2022-3-30 15:43:14:207:372 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 15:43:14:244:519 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 15:43:24:171:983 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 15:43:24:256:628 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 15:43:24:341:286 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:43:24:381:855 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_mda_step_rat.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..d8defc3f --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,128 @@ +#### db_type: ob #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:50:34:446:44 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:50:35:445:315 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 15:50:36:438:973 +Q4-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q4 finished at: 2022-3-30 15:50:37:450:933 + Q5-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q5 finished at: 2022-3-30 15:50:38:469:611 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + + Q6 finished at: 2022-3-30 15:50:38:578:456 + Q7-T3 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q7 finished at: 2022-3-30 15:50:39:442:110 + Q8-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q8 finished at: 2022-3-30 15:50:39:522:184 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + (2,0,2,1) + (5) expected_result: + (2,0,2,1) + (6) expected_result: + (2,0,2,1) + +Q9 finished at: 2022-3-30 15:50:40:494:74 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 15:50:40:540:435 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 15:50:41:451:574 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:50:42:441:757 + Q13-T4 execute sql: 'BEGIN;' + Q13 finished at: 2022-3-30 15:50:52:442:367 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) (2,0,2,1) + *(1) expected_result: + (0,1,0,3) (2,0,2,1) + *(2) expected_result: + (0,1,0,3) (2,0,2,1) + *(3) expected_result: + (0,1,0,3) (2,0,2,1) + *(4) expected_result: + (0,1,0,3) (2,0,2,1) + *(5) expected_result: + (0,1,0,3) (2,0,2,1) + *(6) expected_result: + (0,1,0,3) (2,0,2,1) + + Q14 finished at: 2022-3-30 15:50:52:527:460 + Q15-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q15 finished at: 2022-3-30 15:50:52:611:774 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-3-30 15:50:52:652:169 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..3cab05cd --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,244 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN;' + Q1 finished at: 2022-3-30 15:51:8:192:839 +Q2-T1 execute sql: 'BEGIN;' +Q2 finished at: 2022-3-30 15:51:9:191:531 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 15:51:10:191:997 + Q4-T2 execute sql: 'BEGIN;' + Q4 finished at: 2022-3-30 15:51:11:193:21 + Q5-T4 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + (4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + (7) expected_result: + (0,1,0,3) + (8) expected_result: + (0,1,0,3) + *(9) expected_result: + (0,1,0,0) + (10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,0) + (12) expected_result: + (0,1,0,3) + *(13) expected_result: + (0,1,0,0) + *(14) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 15:51:12:245:2 +Q6-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q6 finished at: 2022-3-30 15:51:13:194:801 + Q7-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + (7) expected_result: + (1,3,1,1) + *(8) expected_result: + (1,3,1,0) + (9) expected_result: + (1,3,1,1) + (10) expected_result: + (1,3,1,1) + *(11) expected_result: + (1,3,1,0) + *(12) expected_result: + (1,3,1,0) + *(13) expected_result: + (1,3,1,0) + (14) expected_result: + (1,3,1,1) + + Q7 finished at: 2022-3-30 15:51:14:242:885 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + (3) expected_result: + (0,1,0,3) + (4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + (7) expected_result: + (0,1,0,3) + (8) expected_result: + (0,1,0,3) + (9) expected_result: + (0,1,0,3) + *(10) expected_result: + (0,1,0,0) + *(11) expected_result: + (0,1,0,0) + *(12) expected_result: + (0,1,0,0) + (13) expected_result: + (0,1,0,3) + (14) expected_result: + (0,1,0,3) + + Q8 finished at: 2022-3-30 15:51:14:336:974 + Q9-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q9 finished at: 2022-3-30 15:51:15:213:415 + Q10-T4 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + *(7) expected_result: + (1,3,1,0) + (8) expected_result: + (1,3,1,1) + (9) expected_result: + (1,3,1,1) + (10) expected_result: + (1,3,1,1) + (11) expected_result: + (1,3,1,1) + *(12) expected_result: + (1,3,1,0) + *(13) expected_result: + (1,3,1,0) + *(14) expected_result: + (1,3,1,0) + + Q10 finished at: 2022-3-30 15:51:16:241:127 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-3-30 15:51:17:194:61 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:51:18:198:733 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-3-30 15:51:19:192:557 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 15:51:20:193:193 + Q15-T5 execute sql: 'BEGIN;' + Q15 finished at: 2022-3-30 15:51:30:190:554 + Q16-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,3) + *(7) expected_result: + (0,1,0,3) + *(8) expected_result: + (0,1,0,3) + *(9) expected_result: + (0,1,0,3) + *(10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,3) + *(12) expected_result: + (0,1,0,3) + *(13) expected_result: + (0,1,0,3) + *(14) expected_result: + (0,1,0,3) + + Q16 finished at: 2022-3-30 15:51:30:281:837 + Q17-T5 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + *(7) expected_result: + (1,3,1,1) + *(8) expected_result: + (1,3,1,1) + *(9) expected_result: + (1,3,1,1) + *(10) expected_result: + (1,3,1,1) + *(11) expected_result: + (1,3,1,1) + *(12) expected_result: + (1,3,1,1) + *(13) expected_result: + (1,3,1,1) + *(14) expected_result: + (1,3,1,1) + + Q17 finished at: 2022-3-30 15:51:30:371:382 + Q18-T5 execute opt: 'COMMIT'; + Q18 finished at: 2022-3-30 15:51:30:414:316 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..1b5253a3 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:51:56:896:209 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:51:57:899:963 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 15:51:58:899:153 +Q4-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q4 finished at: 2022-3-30 15:51:59:899:72 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q5 finished at: 2022-3-30 15:52:0:901:652 + Q6-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q6 finished at: 2022-3-30 15:52:0:984:610 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-3-30 15:52:1:901:314 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-3-30 15:52:1:983:859 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-3-30 15:52:2:936:190 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 15:52:2:974:942 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 15:52:3:902:95 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:52:4:901:451 + Q13-T4 execute sql: 'BEGIN;' + Q13 finished at: 2022-3-30 15:52:14:901:705 + Q14-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q14 finished at: 2022-3-30 15:52:14:989:882 + Q15-T4 execute opt: 'COMMIT'; + Q15 finished at: 2022-3-30 15:52:15:30:892 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..e4557486 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:52:34:712:698 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:52:35:711:106 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 15:52:36:711:405 +Q4-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q4 finished at: 2022-3-30 15:52:37:716:152 + Q5-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q5 finished at: 2022-3-30 15:52:38:713:203 + Q6-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q6 finished at: 2022-3-30 15:52:38:793:992 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-3-30 15:52:39:713:528 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-3-30 15:52:39:800:122 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-3-30 15:52:40:756:106 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 15:52:40:798:864 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 15:52:41:711:178 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:52:42:715:727 + Q13-T4 execute sql: 'BEGIN;' + Q13 finished at: 2022-3-30 15:52:52:710:986 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q14 finished at: 2022-3-30 15:52:52:789:908 + Q15-T4 execute opt: 'COMMIT'; + Q15 finished at: 2022-3-30 15:52:52:827:249 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_sda_dirty_read.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..1707a2d8 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: ob #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_dirty_read test run---------- + Q1-T2 execute sql: 'BEGIN;' + Q1 finished at: 2022-3-30 15:36:36:53:792 +Q2-T1 execute sql: 'BEGIN;' +Q2 finished at: 2022-3-30 15:36:37:61:545 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 15:36:37:109:540 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-3-30 15:36:38:95:156 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-3-30 15:36:39:62:183 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 15:36:40:53:797 + Q7-T3 execute sql: 'BEGIN;' + Q7 finished at: 2022-3-30 15:36:50:55:47 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q8 finished at: 2022-3-30 15:36:50:135:237 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 15:36:50:173:786 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_sda_intermediate_read.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..163be83e --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:37:56:361:58 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:37:57:353:119 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 15:37:58:365:251 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-3-30 15:37:59:390:564 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-3-30 15:38:0:362:267 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 15:38:1:353:438 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 15:38:2:364:221 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 15:38:12:358:708 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q9 finished at: 2022-3-30 15:38:12:440:430 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 15:38:12:479:37 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..9d9d8f56 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:38:59:679:483 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:39:0:686:872 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 15:39:1:682:722 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-3-30 15:39:2:733:496 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 15:39:2:776:390 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-3-30 15:39:3:707:140 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 15:39:3:744:127 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 15:39:13:682:451 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q9 finished at: 2022-3-30 15:39:13:758:55 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 15:39:13:793:876 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_sda_lost_self_update.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..2fc3f4ad --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:41:22:264:297 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:41:23:266:234 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 15:41:24:267:306 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-3-30 15:41:26:305:200 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-3-30 15:41:26:345:386 + Q4 finished at: 2022-3-30 15:41:26:347:283 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 15:41:27:268:95 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 15:41:37:267:55 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q9 finished at: 2022-3-30 15:41:37:352:896 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 15:41:37:393:661 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..9fd16699 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:37:7:898:530 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:37:8:899:584 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 15:37:9:942:669 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-3-30 15:37:10:902:595 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-3-30 15:37:11:940:26 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 15:37:12:902:92 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 15:37:13:899:364 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 15:37:23:897:264 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-3-30 15:37:23:977:732 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 15:37:24:15:789 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..2382db62 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,58 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:40:8:893:838 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:40:9:896:985 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q3 finished at: 2022-3-30 15:40:10:930:120 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-3-30 15:40:11:901:803 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 15:40:11:945:596 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-3-30 15:40:12:928:159 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 15:40:12:963:498 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 15:40:22:899:864 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q9 finished at: 2022-3-30 15:40:22:990:697 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 15:40:23:34:81 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..1f0b8a18 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,57 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:40:44:409:678 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:40:45:415:342 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q3 finished at: 2022-3-30 15:40:46:453:574 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-3-30 15:40:47:418:397 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 15:40:47:465:230 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-3-30 15:40:48:450:742 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 15:40:48:489:186 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 15:40:58:408:184 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q9 finished at: 2022-3-30 15:40:58:486:34 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 15:40:58:523:249 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..8a30430f --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,67 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:58:13:818:908 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:58:14:815:798 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 15:58:15:822:898 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 15:58:16:821:658 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q7 finished at: 2022-3-30 15:58:17:863:334 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 15:58:17:907:374 + Q5 finished at: 2022-3-30 15:58:17:918:687 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 15:58:17:961:228 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 15:58:27:818:388 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,2) + *(1) expected_result: + (0,1,0,2) + (2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 15:58:27:908:498 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 15:58:28:2:213 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:58:28:44:834 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..6b311eb6 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,34 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:59:21:769:17 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:59:22:766:259 +Q3-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q3 finished at: 2022-3-30 15:59:23:773:821 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-3-30 15:59:24:789:954 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-3-30 15:59:35:282:159 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q6 failed at: 2022-3-30 15:59:36:356:204 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..149ed2f7 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,34 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:59:55:73:884 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:59:56:73:882 +Q3-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q3 finished at: 2022-3-30 15:59:57:79:126 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-3-30 15:59:58:79:139 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-3-30 16:0:8:533:43 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q6 failed at: 2022-3-30 16:0:9:642:105 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..9772a885 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,34 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 16:0:28:365:48 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 16:0:29:362:850 +Q3-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q3 finished at: 2022-3-30 16:0:30:371:655 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-3-30 16:0:31:367:608 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-3-30 16:0:41:874:921 +Q7 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q7 failed at: 2022-3-30 16:0:43:86:358 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..4d54dc99 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,65 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 16:2:16:537:990 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 16:2:17:536:804 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q3 finished at: 2022-3-30 16:2:18:582:171 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-3-30 16:2:19:559:317 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-3-30 16:2:19:615:65 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 16:2:21:542:498 +Q6 finished at: 2022-3-30 16:2:21:595:645 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 16:2:21:636:834 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 16:2:31:543:321 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 16:2:31:636:147 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + (1) expected_result: + (1,3,1,2) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 16:2:31:727:379 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 16:2:31:772:453 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..5ff3f8ac --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,65 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 16:3:48:194:298 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 16:3:49:198:685 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q3 finished at: 2022-3-30 16:3:50:236:318 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-3-30 16:3:51:224:11 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-3-30 16:3:51:286:197 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 16:3:53:205:182 +Q6 finished at: 2022-3-30 16:3:53:256:206 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 16:3:54:197:119 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 16:4:4:200:883 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 16:4:4:289:187 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + (1) expected_result: + (1,3,1,2) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 16:4:4:377:141 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 16:4:4:419:507 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..942f04d0 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,65 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 16:4:21:990:750 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 16:4:22:984:650 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 16:4:23:996:621 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-3-30 16:4:25:47:174 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-3-30 16:4:25:996:83 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 16:4:26:40:668 + Q5 finished at: 2022-3-30 16:4:26:59:19 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 16:4:26:990:346 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 16:4:36:990:817 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,2) + *(1) expected_result: + (0,1,0,2) + (2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 16:4:37:80:449 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 16:4:37:168:488 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 16:4:37:210:732 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..3e4a259d --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,65 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 16:4:52:327:215 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 16:4:53:329:188 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 16:4:54:331:883 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-3-30 16:4:55:395:926 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-3-30 16:4:56:331:691 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 16:4:58:331:129 + Q5 finished at: 2022-3-30 16:4:58:388:952 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 16:4:58:434:735 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 16:5:8:327:789 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,2) + *(1) expected_result: + (0,1,0,2) + (2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 16:5:8:410:753 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 16:5:8:494:930 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 16:5:8:533:914 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..e36d1b7d --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,65 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 16:5:22:30:915 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 16:5:23:30:219 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 16:5:24:36:53 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-3-30 16:5:25:77:286 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-3-30 16:5:26:34:141 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 16:5:26:78:291 + Q5 finished at: 2022-3-30 16:5:26:149:340 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 16:5:26:193:704 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 16:5:36:27:470 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,2) + *(1) expected_result: + (0,1,0,2) + (2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 16:5:36:108:854 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 16:5:36:188:557 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 16:5:36:227:483 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_mda_step_wat_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..1d6bc2fe --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 16:5:53:993:813 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 16:5:54:993:589 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 16:5:55:988:569 +Q4-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q4 finished at: 2022-3-30 16:5:56:998:841 + Q5-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q5 finished at: 2022-3-30 16:5:57:998:186 + Q6-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q7-T3 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=2;' + Q7 finished at: 2022-3-30 16:5:58:990:610 + Q8-T3 execute sql: 'UPDATE t2 SET value2=3 WHERE value1=1;' +Q9-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q6 failed at: 2022-3-30 16:6:8:620:384 + Q8 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q8 failed at: 2022-3-30 16:6:9:798:247 +Q9 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q9 failed at: 2022-3-30 16:6:10:849:363 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_mda_step_wat_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..0bca5131 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 16:6:27:96:275 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 16:6:28:103:952 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 16:6:29:100:526 +Q4-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q4 finished at: 2022-3-30 16:6:30:105:564 + Q5-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q5 finished at: 2022-3-30 16:6:31:109:488 + Q6-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q7-T3 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=2;' + Q7 finished at: 2022-3-30 16:6:32:101:186 + Q8-T3 execute sql: 'UPDATE t2 SET value2=3 WHERE value1=1;' +Q9-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q6 failed at: 2022-3-30 16:6:41:740:504 + Q8 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q8 failed at: 2022-3-30 16:6:42:927:177 +Q9 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q9 failed at: 2022-3-30 16:6:43:945:721 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..d909584e --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,44 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:53:10:861:687 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:53:11:861:364 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 15:53:12:864:300 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-3-30 15:53:14:861:541 + Q4 finished at: 2022-3-30 15:53:14:863:217 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 15:53:15:863:631 + Q7-T3 execute sql: 'BEGIN;' + Q7 finished at: 2022-3-30 15:53:25:859:908 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-3-30 15:53:25:939:968 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 15:53:25:978:965 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..4827414a --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,44 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:53:47:841:423 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:53:48:836:487 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 15:53:49:838:275 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-3-30 15:53:51:837:780 + Q4 finished at: 2022-3-30 15:53:51:837:799 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 15:53:52:838:360 + Q7-T3 execute sql: 'BEGIN;' + Q7 finished at: 2022-3-30 15:54:2:837:896 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-3-30 15:54:2:916:757 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 15:54:2:954:856 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_sda_full_write.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..8a745daf --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: ob #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:54:23:424:505 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:54:24:422:588 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 15:54:25:426:556 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-3-30 15:54:27:425:226 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-3-30 15:54:27:469:433 + Q4 finished at: 2022-3-30 15:54:27:469:493 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 15:54:28:424:755 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 15:54:38:423:298 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q9 finished at: 2022-3-30 15:54:38:511:538 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 15:54:38:553:81 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_sda_full_write_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..67935e0e --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: ob #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:54:57:177:260 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:54:58:180:49 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 15:54:59:180:327 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-3-30 15:55:1:177:908 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 15:55:1:219:231 + Q4 finished at: 2022-3-30 15:55:1:219:466 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 15:55:1:263:742 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 15:55:11:175:235 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q9 finished at: 2022-3-30 15:55:11:253:529 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 15:55:11:291:117 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..a6a6a8f8 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:57:34:660:276 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:57:35:659:370 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 15:57:36:662:728 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-3-30 15:57:38:701:973 +Q7-T1 execute opt: 'COMMIT'; + Q4 finished at: 2022-3-30 15:57:38:742:395 + Q5-T2 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 15:57:38:743:801 + Q5 finished at: 2022-3-30 15:57:38:783:950 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 15:57:48:662:492 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q9 finished at: 2022-3-30 15:57:48:751:496 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 15:57:48:794:135 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_sda_lost_update_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..9cbb99ea --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:56:3:444:45 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:56:4:444:853 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q3 finished at: 2022-3-30 15:56:5:488:962 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-3-30 15:56:6:447:120 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 15:56:8:446:765 +Q5 finished at: 2022-3-30 15:56:8:447:546 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-3-30 15:56:8:491:54 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 15:56:18:448:313 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-3-30 15:56:18:540:167 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 15:56:18:584:276 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_sda_lost_update_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..9b510ade --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:56:33:970:636 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:56:34:971:487 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q3 finished at: 2022-3-30 15:56:36:17:819 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-3-30 15:56:36:975:90 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 15:56:38:973:321 +Q5 finished at: 2022-3-30 15:56:38:974:329 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 15:56:39:973:20 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 15:56:49:973:77 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-3-30 15:56:50:65:357 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 15:56:50:108:817 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_dda_read_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..e74ac78d --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_dda_read_skew_committed.txt @@ -0,0 +1,74 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:20:54:231:591 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:20:55:232:441 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q3 finished at: 2022-3-30 15:20:56:275:762 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 15:20:57:255:673 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-3-30 15:20:57:313:733 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 15:20:57:466:70 +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q7 finished at: 2022-3-30 15:20:58:274:897 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 15:20:58:314:854 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 15:21:8:231:852 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 15:21:8:321:115 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 15:21:8:409:45 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:21:8:451:20 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..dc967511 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:21:26:777:11 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:21:27:780:569 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q3 finished at: 2022-3-30 15:21:28:822:68 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-3-30 15:21:29:786:462 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-3-30 15:21:29:832:357 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 15:21:29:877:727 +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q7 failed at: 2022-3-30 15:21:31:479:131 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_dda_write_skew.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_dda_write_skew.txt new file mode 100644 index 00000000..dc206392 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_dda_write_skew.txt @@ -0,0 +1,72 @@ +#### db_type: ob #### +#### test_type: dda_write_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:22:7:597:419 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:22:8:591:589 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q3 finished at: 2022-3-30 15:22:9:647:499 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-3-30 15:22:10:656:40 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-3-30 15:22:10:712:53 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-3-30 15:22:11:602:796 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 15:22:11:648:982 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 15:22:12:597:633 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 15:22:22:599:346 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 15:22:22:727:665 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 15:22:22:816:154 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:22:22:858:961 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_dda_write_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..56032616 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_dda_write_skew_committed.txt @@ -0,0 +1,72 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:24:20:342:293 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:24:21:339:296 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q3 finished at: 2022-3-30 15:24:22:390:831 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-3-30 15:24:23:384:940 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-3-30 15:24:23:427:386 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 15:24:23:468:676 +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-3-30 15:24:24:345:30 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 15:24:24:390:5 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 15:24:34:343:877 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 15:24:34:437:2 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 15:24:34:528:863 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:24:34:572:982 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..4e05f590 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,74 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:22:50:965:242 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:22:51:962:158 +Q3-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q3 finished at: 2022-3-30 15:22:53:5:658 +Q4-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q4 finished at: 2022-3-30 15:22:53:48:108 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-3-30 15:22:54:14:421 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-3-30 15:22:54:51:924 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 15:22:54:91:362 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 15:22:54:965:523 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 15:23:4:970:690 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-3-30 15:23:5:65:281 + Q11-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q11 finished at: 2022-3-30 15:23:5:158:334 + Q12-T3 execute sql: 'DROP TABLE mytab;' + Q12 finished at: 2022-3-30 15:23:5:221:453 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-3-30 15:23:5:269:408 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..b3052b1f --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:23:41:420:855 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:23:42:422:34 +Q3-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q3 finished at: 2022-3-30 15:23:43:465:546 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-3-30 15:23:44:465:188 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-3-30 15:23:44:507:615 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 15:23:44:550:296 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-3-30 15:23:45:421:836 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 15:23:45:463:932 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 15:23:55:421:342 + Q10-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q10 finished at: 2022-3-30 15:23:55:505:727 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 15:23:55:545:792 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_mda_step_iat.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_mda_step_iat.txt new file mode 100644 index 00000000..0c2f6c0b --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_mda_step_iat.txt @@ -0,0 +1,128 @@ +#### db_type: ob #### +#### test_type: mda_step_iat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:24:52:576:329 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:24:53:573:305 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 15:24:54:574:684 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + (2,0,2,1) + (5) expected_result: + (2,0,2,1) + (6) expected_result: + (2,0,2,1) + +Q4 finished at: 2022-3-30 15:24:55:626:134 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,,3) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 15:24:56:617:783 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-3-30 15:24:57:637:420 +Q7-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q7 finished at: 2022-3-30 15:24:58:602:540 + Q8-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q8 finished at: 2022-3-30 15:24:59:577:862 + Q9-T3 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q9 finished at: 2022-3-30 15:25:0:591:378 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 15:25:1:578:981 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 15:25:2:575:777 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:25:3:580:404 + Q13-T4 execute sql: 'BEGIN;' + Q13 finished at: 2022-3-30 15:25:13:573:762 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) (2,0,2,1) + *(1) expected_result: + (0,1,0,3) (2,0,2,1) + *(2) expected_result: + (0,1,0,3) (2,0,2,1) + *(3) expected_result: + (0,1,0,3) (2,0,2,1) + *(4) expected_result: + (0,1,0,3) (2,0,2,1) + *(5) expected_result: + (0,1,0,3) (2,0,2,1) + *(6) expected_result: + (0,1,0,3) (2,0,2,1) + + Q14 finished at: 2022-3-30 15:25:13:655:6 + Q15-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q15 finished at: 2022-3-30 15:25:13:736:366 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-3-30 15:25:13:775:124 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..387e1683 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,127 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:28:48:591:353 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:28:49:596:123 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 15:28:50:600:984 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + (3) expected_result: + (0,1,0,3) + (4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,3) + +Q4 finished at: 2022-3-30 15:28:51:635:366 + Q4-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q4 finished at: 2022-3-30 15:28:52:598:596 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 15:28:52:642:795 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,0) + + Q7 finished at: 2022-3-30 15:28:53:636:21 + Q8-T3 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q8 finished at: 2022-3-30 15:28:53:680:43 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 15:28:53:721:790 +Q10-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,0) + (5) expected_result: + (1,3,1,1) + (6) expected_result: + (1,3,1,1) + +Q10 finished at: 2022-3-30 15:28:54:635:476 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-3-30 15:28:54:673:421 + Q12-T4 execute sql: 'BEGIN;' + Q12 finished at: 2022-3-30 15:29:4:594:100 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,3) + + Q13 finished at: 2022-3-30 15:29:4:679:912 + Q14-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q14 finished at: 2022-3-30 15:29:4:764:666 + Q15-T4 execute opt: 'COMMIT'; + Q15 finished at: 2022-3-30 15:29:4:804:995 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..e846c473 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,244 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:28:10:846:678 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:28:11:846:175 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 15:28:12:845:232 + Q4-T4 execute sql: 'BEGIN;' + Q4 finished at: 2022-3-30 15:28:13:851:48 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + *(5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,3) + (7) expected_result: + (0,1,0,3) + *(8) expected_result: + (0,1,0,0) + (9) expected_result: + (0,1,0,3) + (10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,0) + (12) expected_result: + (0,1,0,3) + (13) expected_result: + (0,1,0,3) + (14) expected_result: + (0,1,0,3) + +Q5 finished at: 2022-3-30 15:28:14:893:40 + Q6-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + *(7) expected_result: + (1,3,1,0) + (8) expected_result: + (1,3,1,1) + *(9) expected_result: + (1,3,1,0) + (10) expected_result: + (1,3,1,1) + (11) expected_result: + (1,3,1,1) + (12) expected_result: + (1,3,1,1) + (13) expected_result: + (1,3,1,1) + *(14) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-3-30 15:28:15:914:982 + Q7-T3 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q7 finished at: 2022-3-30 15:28:16:849:274 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 15:28:16:890:89 + Q9-T4 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q9 finished at: 2022-3-30 15:28:17:855:968 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 15:28:17:901:887 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + (3) expected_result: + (0,1,0,3) + (4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,0) + *(6) expected_result: + (0,1,0,0) + *(7) expected_result: + (0,1,0,0) + *(8) expected_result: + (0,1,0,0) + (9) expected_result: + (0,1,0,3) + (10) expected_result: + (0,1,0,3) + (11) expected_result: + (0,1,0,3) + *(12) expected_result: + (0,1,0,0) + (13) expected_result: + (0,1,0,3) + (14) expected_result: + (0,1,0,3) + + Q11 finished at: 2022-3-30 15:28:18:907:169 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:28:18:947:399 +Q13-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,0) + *(4) expected_result: + (1,3,1,0) + (5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,0) + (7) expected_result: + (1,3,1,1) + (8) expected_result: + (1,3,1,1) + *(9) expected_result: + (1,3,1,0) + (10) expected_result: + (1,3,1,1) + (11) expected_result: + (1,3,1,1) + (12) expected_result: + (1,3,1,1) + *(13) expected_result: + (1,3,1,0) + (14) expected_result: + (1,3,1,1) + +Q13 finished at: 2022-3-30 15:28:19:890:870 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-3-30 15:28:19:930:692 + Q15-T5 execute sql: 'BEGIN;' + Q15 finished at: 2022-3-30 15:28:29:848:807 + Q16-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,3) + *(7) expected_result: + (0,1,0,3) + *(8) expected_result: + (0,1,0,3) + *(9) expected_result: + (0,1,0,3) + *(10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,3) + *(12) expected_result: + (0,1,0,3) + *(13) expected_result: + (0,1,0,3) + *(14) expected_result: + (0,1,0,3) + + Q16 finished at: 2022-3-30 15:28:29:936:480 + Q17-T5 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + *(7) expected_result: + (1,3,1,1) + *(8) expected_result: + (1,3,1,1) + *(9) expected_result: + (1,3,1,1) + *(10) expected_result: + (1,3,1,1) + *(11) expected_result: + (1,3,1,1) + *(12) expected_result: + (1,3,1,1) + *(13) expected_result: + (1,3,1,1) + *(14) expected_result: + (1,3,1,1) + + Q17 finished at: 2022-3-30 15:28:30:23:546 + Q18-T5 execute opt: 'COMMIT'; + Q18 finished at: 2022-3-30 15:28:30:65:594 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..0c4eee09 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,128 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:25:36:967:112 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:25:37:971:771 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 15:25:38:965:20 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q4 finished at: 2022-3-30 15:25:40:11:646 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + null + *(6) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 15:25:41:20:624 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + null + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + null + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-3-30 15:25:42:25:163 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE value1=0;' +Q7 finished at: 2022-3-30 15:25:42:969:621 + Q8-T2 execute sql: 'DELETE FROM t2 WHERE value1=1;' + Q8 finished at: 2022-3-30 15:25:43:976:704 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE value1=2;' + Q9 finished at: 2022-3-30 15:25:44:986:148 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 15:25:45:969:154 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 15:25:46:974:221 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:25:47:970:814 + Q13-T4 execute sql: 'BEGIN;' + Q13 finished at: 2022-3-30 15:25:57:970:65 + Q14-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q14 finished at: 2022-3-30 15:25:58:59:70 + Q15-T4 execute sql: 'SELECT * FROM t2;' + current_result: + null + (1) expected_result: + + (2) expected_result: + + (3) expected_result: + + (4) expected_result: + + (5) expected_result: + + (6) expected_result: + + + Q15 finished at: 2022-3-30 15:25:58:146:751 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-3-30 15:25:58:188:726 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..ac8d286f --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,125 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:26:24:602:338 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:26:25:612:802 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 15:26:26:609:152 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,0,2,0) + (5) expected_result: + (2,0,2,0) + (6) expected_result: + (2,0,2,0) + +Q4 finished at: 2022-3-30 15:26:27:646:893 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + null + (1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,0) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1,0,0) + *(6) expected_result: + null + + Q5 finished at: 2022-3-30 15:26:28:663:595 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + null + (1) expected_result: + (1,3,1,0) + *(2) expected_result: + null + (3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,0) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-3-30 15:26:29:677:424 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q7 finished at: 2022-3-30 15:26:30:604:51 + Q8-T2 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + Q8 finished at: 2022-3-30 15:26:31:615:229 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + Q9 finished at: 2022-3-30 15:26:32:617:888 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 15:26:33:605:196 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 15:26:34:615:249 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:26:35:615:576 + Q13-T4 execute sql: 'BEGIN;' + Q13 finished at: 2022-3-30 15:26:45:603:528 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,0) (2,0,2,0) + *(1) expected_result: + (0,1,0,0) (2,0,2,0) + *(2) expected_result: + (0,1,0,0) (2,0,2,0) + *(3) expected_result: + (0,1,0,0) (2,0,2,0) + *(4) expected_result: + (0,1,0,0) (2,0,2,0) + *(5) expected_result: + (0,1,0,0) (2,0,2,0) + *(6) expected_result: + (0,1,0,0) (2,0,2,0) + + Q14 finished at: 2022-3-30 15:26:45:684:305 + Q15-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,0) + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q15 finished at: 2022-3-30 15:26:45:762:98 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-3-30 15:26:45:797:679 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..7240f9e4 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,159 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:29:24:869:272 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:29:25:876:595 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 15:29:26:871:948 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + *(5) expected_result: + (0,1,0,0) + *(6) expected_result: + (0,1,0,0) + +Q4 finished at: 2022-3-30 15:29:27:912:883 +Q5-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + +Q5 finished at: 2022-3-30 15:29:27:997:126 + Q6-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,0) + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-3-30 15:29:28:952:879 + Q6-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q6 finished at: 2022-3-30 15:29:29:6:1 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 15:29:29:57:461 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + (4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,0) + *(6) expected_result: + (0,1,0,0) + + Q9 finished at: 2022-3-30 15:29:29:917:539 + Q10-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + (2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + (5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,0) + + Q10 finished at: 2022-3-30 15:29:30:1:949 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 15:29:30:42:935 +Q12-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q12 finished at: 2022-3-30 15:29:31:2:349 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-3-30 15:29:31:44:635 + Q14-T4 execute sql: 'BEGIN;' + Q14 finished at: 2022-3-30 15:29:40:874:912 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,3) + + Q15 finished at: 2022-3-30 15:29:40:967:136 + Q16-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q16 finished at: 2022-3-30 15:29:41:58:118 + Q17-T4 execute opt: 'COMMIT'; + Q17 finished at: 2022-3-30 15:29:41:102:34 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..1b13c86a --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,183 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:27:28:270:45 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:27:29:271:986 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 15:27:30:279:140 +Q4-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,2) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + +Q4 finished at: 2022-3-30 15:27:31:315:605 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,2) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + (0,1,0,2) + (6) expected_result: + (0,1,0,2) + + Q5 finished at: 2022-3-30 15:27:32:317:917 + Q6-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q6 finished at: 2022-3-30 15:27:32:361:202 + Q7-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,0) + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q7 finished at: 2022-3-30 15:27:32:445:236 + Q8-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q8 finished at: 2022-3-30 15:27:32:488:636 + Q9-T2 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 15:27:32:531:888 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + *(4) expected_result: + (2,0,2,0) + *(5) expected_result: + (2,0,2,0) + *(6) expected_result: + (2,0,2,0) + + Q10 finished at: 2022-3-30 15:27:33:318:26 + Q11-T3 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q11 finished at: 2022-3-30 15:27:33:363:572 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,0) + + Q12 finished at: 2022-3-30 15:27:33:450:647 + Q13-T3 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q13 finished at: 2022-3-30 15:27:33:494:189 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 15:27:33:538:77 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + (2,0,2,2) + (5) expected_result: + (2,0,2,1) + (6) expected_result: + (2,0,2,1) + +Q15 finished at: 2022-3-30 15:27:34:311:876 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-3-30 15:27:34:351:331 + Q17-T4 execute sql: 'BEGIN;' + Q17 finished at: 2022-3-30 15:27:44:267:423 + Q18-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,2) (2,0,2,1) + *(1) expected_result: + (0,1,0,2) (2,0,2,1) + *(2) expected_result: + (0,1,0,2) (2,0,2,1) + *(3) expected_result: + (0,1,0,2) (2,0,2,1) + *(4) expected_result: + (0,1,0,2) (2,0,2,1) + *(5) expected_result: + (0,1,0,2) (2,0,2,1) + *(6) expected_result: + (0,1,0,2) (2,0,2,1) + + Q18 finished at: 2022-3-30 15:27:44:345:874 + Q19-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q19 finished at: 2022-3-30 15:27:44:424:324 + Q20-T4 execute opt: 'COMMIT'; + Q20 finished at: 2022-3-30 15:27:44:465:636 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_sda_lost_update_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..c12f8064 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_sda_lost_update_committed.txt @@ -0,0 +1,37 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:20:3:17:385 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:20:4:13:740 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q3 finished at: 2022-3-30 15:20:5:64:272 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-3-30 15:20:6:16:509 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 15:20:6:64:880 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q6 failed at: 2022-3-30 15:20:7:618:793 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..e917b7d5 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:19:27:572:344 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:19:28:568:329 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 15:19:29:621:282 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-3-30 15:19:30:570:993 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 15:19:30:612:871 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-3-30 15:19:31:618:862 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 15:19:31:663:990 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 15:19:41:573:23 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-3-30 15:19:41:665:188 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 15:19:41:709:194 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_double_write_skew1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..955d7410 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_double_write_skew1.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 14:47:58:191:908 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 14:47:59:184:758 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 14:48:0:185:85 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 14:48:1:190:406 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 14:48:1:286:39 +Q6-T1 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 14:48:3:187:519 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q6 failed at: 2022-3-30 14:48:3:813:682 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..3c21b685 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 14:49:26:589:729 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 14:49:27:593:47 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 14:49:28:594:603 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 14:49:29:621:849 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 14:49:29:736:238 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 14:49:29:895:502 +Q7-T1 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' +Q7 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q7 failed at: 2022-3-30 14:49:31:295:851 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_double_write_skew2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..08b15007 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_double_write_skew2.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 14:49:58:266:750 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 14:49:59:267:407 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 14:50:0:271:719 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 14:50:1:292:276 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q6 finished at: 2022-3-30 14:50:2:311:261 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 14:50:2:352:268 + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q5 failed at: 2022-3-30 14:50:2:955:192 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_read_skew.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_read_skew.txt new file mode 100644 index 00000000..60d3456b --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_read_skew.txt @@ -0,0 +1,74 @@ +#### db_type: ob #### +#### test_type: dda_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 14:51:51:404:586 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 14:51:52:406:525 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q3 finished at: 2022-3-30 14:51:53:450:456 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 14:51:54:426:111 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-3-30 14:51:54:482:438 +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q6 finished at: 2022-3-30 14:51:55:449:283 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 14:51:56:412:438 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 14:51:57:405:250 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 14:52:7:404:555 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 14:52:7:490:371 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 14:52:7:571:322 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 14:52:7:610:358 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_read_skew2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_read_skew2.txt new file mode 100644 index 00000000..105c0990 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_read_skew2.txt @@ -0,0 +1,74 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 14:59:8:418:956 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 14:59:9:421:625 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 14:59:10:424:284 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-3-30 14:59:11:490:270 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 14:59:11:592:104 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-3-30 14:59:12:424:275 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 14:59:12:465:587 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 14:59:13:423:598 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 14:59:23:417:631 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 14:59:23:497:316 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 14:59:23:575:352 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 14:59:23:612:735 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..6636f032 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_read_skew2_committed.txt @@ -0,0 +1,74 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 14:59:51:34:749 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 14:59:52:32:959 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 14:59:53:39:593 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-3-30 14:59:54:94:959 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 14:59:54:196:504 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 14:59:54:238:138 +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-3-30 14:59:55:39:358 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 14:59:55:83:478 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 15:0:5:31:679 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 15:0:5:115:340 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 15:0:5:197:457 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:0:5:237:350 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..2267f783 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,74 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 14:54:39:22:980 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 14:54:40:22:275 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE value2=0;' + current_result: + (0,1,0,0) + (1) expected_result: + null + *(2) expected_result: + (0,1,0,0) + +Q3 finished at: 2022-3-30 14:54:41:69:906 + Q4-T2 execute sql: 'DELETE FROM t2 WHERE value1=1;' + Q4 finished at: 2022-3-30 14:54:42:41:889 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE value1=0;' + Q5 finished at: 2022-3-30 14:54:42:100:120 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 14:54:42:255:541 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE value2=0;' + current_result: + (0,1,0,0) + (1) expected_result: + null + *(2) expected_result: + (0,1,0,0) + +Q7 finished at: 2022-3-30 14:54:43:75:510 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 14:54:43:118:168 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 14:54:53:19:902 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q10 finished at: 2022-3-30 14:54:53:100:356 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q11 finished at: 2022-3-30 14:54:53:180:829 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 14:54:53:218:620 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..b5facd5c --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 14:57:58:425:863 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 14:57:59:427:969 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q3 finished at: 2022-3-30 14:58:0:468:192 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-3-30 14:58:1:430:556 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-3-30 14:58:1:472:893 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 14:58:1:516:116 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-3-30 14:58:2:464:187 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 14:58:2:501:661 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 14:58:12:424:546 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q10 finished at: 2022-3-30 14:58:12:505:482 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 14:58:12:542:557 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_write_read_skew.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..a8ae030e --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_write_read_skew.txt @@ -0,0 +1,72 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 14:46:13:336:260 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 14:46:14:337:742 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 14:46:15:342:241 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 14:46:16:350:39 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 14:46:16:449:473 +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1; ' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q6 finished at: 2022-3-30 14:46:17:384:431 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 14:46:18:339:213 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 14:46:19:339:647 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 14:46:29:334:453 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 14:46:29:419:442 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 14:46:29:502:895 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 14:46:29:543:94 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..2f6ee54f --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,72 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 14:47:16:465:537 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 14:47:17:469:562 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 14:47:18:470:517 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 14:47:19:493:596 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 14:47:19:596:606 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 14:47:19:750:240 +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q7 finished at: 2022-3-30 14:47:20:508:138 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 14:47:20:547:992 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 14:47:30:469:763 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 14:47:30:556:490 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 14:47:30:642:29 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 14:47:30:683:188 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_mda_step_rat.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_mda_step_rat.txt new file mode 100644 index 00000000..b585b868 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_mda_step_rat.txt @@ -0,0 +1,128 @@ +#### db_type: ob #### +#### test_type: mda_step_rat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:2:4:243:509 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:2:5:249:2 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 15:2:6:242:915 +Q4-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q4 finished at: 2022-3-30 15:2:7:248:597 + Q5-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q5 finished at: 2022-3-30 15:2:8:272:612 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + + Q6 finished at: 2022-3-30 15:2:8:379:268 + Q7-T3 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q7 finished at: 2022-3-30 15:2:9:246:221 + Q8-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q8 finished at: 2022-3-30 15:2:9:329:2 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + (2,0,2,1) + (5) expected_result: + (2,0,2,1) + (6) expected_result: + (2,0,2,1) + +Q9 finished at: 2022-3-30 15:2:10:286:331 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 15:2:10:327:592 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 15:2:11:253:12 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:2:12:245:591 + Q13-T4 execute sql: 'BEGIN;' + Q13 finished at: 2022-3-30 15:2:22:248:594 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) (2,0,2,1) + *(1) expected_result: + (0,1,0,3) (2,0,2,1) + *(2) expected_result: + (0,1,0,3) (2,0,2,1) + *(3) expected_result: + (0,1,0,3) (2,0,2,1) + *(4) expected_result: + (0,1,0,3) (2,0,2,1) + *(5) expected_result: + (0,1,0,3) (2,0,2,1) + *(6) expected_result: + (0,1,0,3) (2,0,2,1) + + Q14 finished at: 2022-3-30 15:2:22:340:461 + Q15-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q15 finished at: 2022-3-30 15:2:22:430:252 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-3-30 15:2:22:473:301 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..e5f71707 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,244 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN;' + Q1 finished at: 2022-3-30 15:2:39:138:888 +Q2-T1 execute sql: 'BEGIN;' +Q2 finished at: 2022-3-30 15:2:40:144:36 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 15:2:41:136:830 + Q4-T2 execute sql: 'BEGIN;' + Q4 finished at: 2022-3-30 15:2:42:139:327 + Q5-T4 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + (4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + (7) expected_result: + (0,1,0,3) + (8) expected_result: + (0,1,0,3) + *(9) expected_result: + (0,1,0,0) + (10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,0) + (12) expected_result: + (0,1,0,3) + *(13) expected_result: + (0,1,0,0) + *(14) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 15:2:43:184:748 +Q6-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q6 finished at: 2022-3-30 15:2:44:147:300 + Q7-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + (7) expected_result: + (1,3,1,1) + *(8) expected_result: + (1,3,1,0) + (9) expected_result: + (1,3,1,1) + (10) expected_result: + (1,3,1,1) + *(11) expected_result: + (1,3,1,0) + *(12) expected_result: + (1,3,1,0) + *(13) expected_result: + (1,3,1,0) + (14) expected_result: + (1,3,1,1) + + Q7 finished at: 2022-3-30 15:2:45:202:949 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + (3) expected_result: + (0,1,0,3) + (4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + (7) expected_result: + (0,1,0,3) + (8) expected_result: + (0,1,0,3) + (9) expected_result: + (0,1,0,3) + *(10) expected_result: + (0,1,0,0) + *(11) expected_result: + (0,1,0,0) + *(12) expected_result: + (0,1,0,0) + (13) expected_result: + (0,1,0,3) + (14) expected_result: + (0,1,0,3) + + Q8 finished at: 2022-3-30 15:2:45:298:826 + Q9-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q9 finished at: 2022-3-30 15:2:46:144:316 + Q10-T4 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + *(7) expected_result: + (1,3,1,0) + (8) expected_result: + (1,3,1,1) + (9) expected_result: + (1,3,1,1) + (10) expected_result: + (1,3,1,1) + (11) expected_result: + (1,3,1,1) + *(12) expected_result: + (1,3,1,0) + *(13) expected_result: + (1,3,1,0) + *(14) expected_result: + (1,3,1,0) + + Q10 finished at: 2022-3-30 15:2:47:182:190 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-3-30 15:2:48:146:955 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:2:49:141:445 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-3-30 15:2:50:138:675 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 15:2:51:139:37 + Q15-T5 execute sql: 'BEGIN;' + Q15 finished at: 2022-3-30 15:3:1:139:423 + Q16-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,3) + *(7) expected_result: + (0,1,0,3) + *(8) expected_result: + (0,1,0,3) + *(9) expected_result: + (0,1,0,3) + *(10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,3) + *(12) expected_result: + (0,1,0,3) + *(13) expected_result: + (0,1,0,3) + *(14) expected_result: + (0,1,0,3) + + Q16 finished at: 2022-3-30 15:3:1:227:443 + Q17-T5 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + *(7) expected_result: + (1,3,1,1) + *(8) expected_result: + (1,3,1,1) + *(9) expected_result: + (1,3,1,1) + *(10) expected_result: + (1,3,1,1) + *(11) expected_result: + (1,3,1,1) + *(12) expected_result: + (1,3,1,1) + *(13) expected_result: + (1,3,1,1) + *(14) expected_result: + (1,3,1,1) + + Q17 finished at: 2022-3-30 15:3:1:309:839 + Q18-T5 execute opt: 'COMMIT'; + Q18 finished at: 2022-3-30 15:3:1:349:56 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..093dca34 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:3:21:159:16 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:3:22:165:53 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 15:3:23:164:741 +Q4-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q4 finished at: 2022-3-30 15:3:24:161:753 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q5 finished at: 2022-3-30 15:3:25:167:11 + Q6-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q6 finished at: 2022-3-30 15:3:25:256:422 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-3-30 15:3:26:165:733 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-3-30 15:3:26:254:460 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-3-30 15:3:27:199:356 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 15:3:27:238:886 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 15:3:28:168:278 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:3:29:167:938 + Q13-T4 execute sql: 'BEGIN;' + Q13 finished at: 2022-3-30 15:3:39:160:41 + Q14-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q14 finished at: 2022-3-30 15:3:39:238:156 + Q15-T4 execute opt: 'COMMIT'; + Q15 finished at: 2022-3-30 15:3:39:276:72 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..951b62ae --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:3:55:855:779 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:3:56:860:838 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 15:3:57:861:930 +Q4-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q4 finished at: 2022-3-30 15:3:58:858:15 + Q5-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q5 finished at: 2022-3-30 15:3:59:861:858 + Q6-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q6 finished at: 2022-3-30 15:3:59:947:685 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-3-30 15:4:0:863:454 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-3-30 15:4:0:951:179 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-3-30 15:4:1:895:74 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 15:4:1:933:543 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 15:4:2:862:319 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 15:4:3:863:905 + Q13-T4 execute sql: 'BEGIN;' + Q13 finished at: 2022-3-30 15:4:13:864:424 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q14 finished at: 2022-3-30 15:4:13:957:743 + Q15-T4 execute opt: 'COMMIT'; + Q15 finished at: 2022-3-30 15:4:14:2:132 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_sda_dirty_read.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_sda_dirty_read.txt new file mode 100644 index 00000000..a9df6d10 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: ob #### +#### test_type: sda_dirty_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_dirty_read test run---------- + Q1-T2 execute sql: 'BEGIN;' + Q1 finished at: 2022-3-30 14:38:14:32:354 +Q2-T1 execute sql: 'BEGIN;' +Q2 finished at: 2022-3-30 14:38:15:26:249 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 14:38:15:67:426 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-3-30 14:38:16:77:853 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-3-30 14:38:17:27:177 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 14:38:18:31:46 + Q7-T3 execute sql: 'BEGIN;' + Q7 finished at: 2022-3-30 14:38:28:32:285 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q8 finished at: 2022-3-30 14:38:28:124:809 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 14:38:28:169:358 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_sda_intermediate_read.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..ba4ef89e --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 14:39:56:876:782 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 14:39:57:878:492 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 14:39:58:879:819 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-3-30 14:39:59:924:270 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-3-30 14:40:0:876:987 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 14:40:1:878:936 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 14:40:2:886:160 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 14:40:12:882:176 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q9 finished at: 2022-3-30 14:40:12:973:817 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 14:40:13:17:883 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..2f13f031 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 14:40:35:636:43 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 14:40:36:641:329 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 14:40:37:638:650 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-3-30 14:40:38:686:935 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 14:40:38:728:533 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-3-30 14:40:39:638:110 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 14:40:39:676:437 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 14:40:49:641:319 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q9 finished at: 2022-3-30 14:40:49:727:704 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 14:40:49:769:12 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_sda_lost_self_update.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..96a1e5b3 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_sda_lost_self_update.txt @@ -0,0 +1,37 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 14:45:44:541:273 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 14:45:45:547:400 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 14:45:46:544:413 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-3-30 14:45:48:581:927 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-3-30 14:45:48:621:931 + Q4 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q4 failed at: 2022-3-30 14:45:49:23:807 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..96298f0c --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 14:38:42:498:735 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 14:38:43:497:894 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 14:38:44:548:216 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-3-30 14:38:45:499:614 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-3-30 14:38:46:558:96 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 14:38:47:500:468 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 14:38:48:499:427 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 14:38:58:499:533 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-3-30 14:38:58:593:148 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 14:38:58:637:991 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..dde15411 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 14:41:5:225:258 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 14:41:6:224:905 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q3 finished at: 2022-3-30 14:41:7:270:642 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-3-30 14:41:8:226:667 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 14:41:8:269:835 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-3-30 14:41:9:268:101 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 14:41:9:309:458 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 14:41:19:226:190 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q9 finished at: 2022-3-30 14:41:19:313:537 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 14:41:19:355:628 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..ec5a1fb0 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 14:41:31:846:14 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 14:41:32:845:475 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q3 finished at: 2022-3-30 14:41:33:892:60 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-3-30 14:41:34:848:599 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 14:41:34:892:862 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-3-30 14:41:35:888:893 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 14:41:35:930:905 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 14:41:45:844:324 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q9 finished at: 2022-3-30 14:41:45:929:306 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 14:41:45:970:589 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..e36fb5ae --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:8:27:135:951 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:8:28:136:492 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 15:8:29:140:346 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 15:8:30:160:310 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q7 finished at: 2022-3-30 15:8:31:182:721 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 15:8:31:225:192 + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q5 failed at: 2022-3-30 15:8:31:738:807 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..420b9bd4 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,34 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:10:46:202:534 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:10:47:200:141 +Q3-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q3 finished at: 2022-3-30 15:10:48:207:579 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-3-30 15:10:49:227:41 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-3-30 15:10:59:690:21 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q6 failed at: 2022-3-30 15:11:0:712:428 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..cb06de20 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,34 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:11:24:21:284 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:11:25:18:193 +Q3-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q3 finished at: 2022-3-30 15:11:26:26:182 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-3-30 15:11:27:39:910 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-3-30 15:11:37:564:461 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q6 failed at: 2022-3-30 15:11:38:625:910 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..48a3c04b --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,34 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:12:46:987:70 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:12:47:985:510 +Q3-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q3 finished at: 2022-3-30 15:12:48:992:132 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-3-30 15:12:50:12:529 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-3-30 15:13:0:485:639 +Q7 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q7 failed at: 2022-3-30 15:13:1:657:222 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..db3c36a9 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:13:22:792:401 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:13:23:794:121 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q3 finished at: 2022-3-30 15:13:24:835:651 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-3-30 15:13:25:840:760 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-3-30 15:13:25:932:99 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 15:13:27:800:838 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q6 failed at: 2022-3-30 15:13:28:449:387 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..d8a72116 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:14:31:647:494 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:14:32:653:242 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q3 finished at: 2022-3-30 15:14:33:693:89 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-3-30 15:14:34:677:644 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-3-30 15:14:34:740:867 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 15:14:36:659:905 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q6 failed at: 2022-3-30 15:14:37:315:467 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..c3a589e2 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:15:34:273:576 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:15:35:275:9 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 15:15:36:278:624 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-3-30 15:15:37:338:816 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-3-30 15:15:38:278:234 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 15:15:38:318:891 + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q5 failed at: 2022-3-30 15:15:38:894:604 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..a421da98 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:16:54:376:682 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:16:55:378:143 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 15:16:56:446:454 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-3-30 15:16:57:425:591 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-3-30 15:16:58:379:578 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 15:17:0:379:573 + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q5 failed at: 2022-3-30 15:17:0:889:549 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..34b64868 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:17:28:269:655 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:17:29:265:316 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 15:17:30:273:947 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-3-30 15:17:31:329:804 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-3-30 15:17:32:273:827 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 15:17:32:319:296 + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q5 failed at: 2022-3-30 15:17:32:889:515 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_mda_step_wat_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..f6eab4c6 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_mda_step_wat_c1.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:18:3:15:538 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:18:4:20:657 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 15:18:5:18:298 +Q4-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q4 finished at: 2022-3-30 15:18:6:20:477 + Q5-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q5 finished at: 2022-3-30 15:18:7:46:471 + Q6-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q7-T3 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=2;' + Q7 finished at: 2022-3-30 15:18:8:20:418 + Q8-T3 execute sql: 'UPDATE t2 SET value2=3 WHERE value1=1;' +Q9-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q6 failed at: 2022-3-30 15:18:17:625:107 + Q8 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q8 failed at: 2022-3-30 15:18:18:764:435 +Q9 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q9 failed at: 2022-3-30 15:18:19:910:780 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_mda_step_wat_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..98b2136d --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_mda_step_wat_c2.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:18:41:763:703 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:18:42:759:476 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 15:18:43:762:408 +Q4-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q4 finished at: 2022-3-30 15:18:44:768:459 + Q5-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q5 finished at: 2022-3-30 15:18:45:783:978 + Q6-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q7-T3 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=2;' + Q7 finished at: 2022-3-30 15:18:46:766:70 + Q8-T3 execute sql: 'UPDATE t2 SET value2=3 WHERE value1=1;' +Q9-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q6 failed at: 2022-3-30 15:18:56:404:194 + Q8 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q8 failed at: 2022-3-30 15:18:57:606:584 +Q9 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q9 failed at: 2022-3-30 15:18:58:623:232 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..977d3dc5 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,44 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:4:32:192:287 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:4:33:190:58 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 15:4:34:195:303 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; + Q4 finished at: 2022-3-30 15:4:36:191:869 +Q5 finished at: 2022-3-30 15:4:36:193:179 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 15:4:37:193:357 + Q7-T3 execute sql: 'BEGIN;' + Q7 finished at: 2022-3-30 15:4:47:191:229 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-3-30 15:4:47:279:641 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 15:4:47:321:946 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..928a7963 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,28 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:5:4:14:690 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:5:5:15:919 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 15:5:6:17:667 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-3-30 15:5:8:17:421 + Q4 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q4 failed at: 2022-3-30 15:5:8:418:664 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_sda_full_write.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_sda_full_write.txt new file mode 100644 index 00000000..b4562a26 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_sda_full_write.txt @@ -0,0 +1,30 @@ +#### db_type: ob #### +#### test_type: sda_full_write #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:5:31:492:901 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:5:32:490:384 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 15:5:33:495:564 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-3-30 15:5:35:494:497 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-3-30 15:5:35:538:509 + Q4 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q4 failed at: 2022-3-30 15:5:35:939:561 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_sda_full_write_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..271b913c --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_sda_full_write_committed.txt @@ -0,0 +1,30 @@ +#### db_type: ob #### +#### test_type: sda_full_write_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:6:5:655:867 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:6:6:654:657 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 15:6:7:658:646 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-3-30 15:6:9:656:322 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 15:6:9:697:428 + Q4 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q4 failed at: 2022-3-30 15:6:10:99:441 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..768e4c1a --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,37 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:7:55:234:612 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:7:56:219:945 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 15:7:57:227:269 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-3-30 15:7:59:271:717 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 15:7:59:318:480 + Q4 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q4 failed at: 2022-3-30 15:7:59:719:147 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_sda_lost_update_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..e0d640e3 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_sda_lost_update_c1.txt @@ -0,0 +1,37 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:6:41:312:897 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:6:42:311:938 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q3 finished at: 2022-3-30 15:6:43:359:601 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-3-30 15:6:44:315:4 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 15:6:46:318:701 +Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q5 failed at: 2022-3-30 15:6:46:819:579 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_sda_lost_update_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..38474274 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/repeatable-read/wat_sda_lost_update_c2.txt @@ -0,0 +1,37 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 15:7:16:979:650 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 15:7:17:983:96 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q3 finished at: 2022-3-30 15:7:19:35:218 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-3-30 15:7:19:985:703 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 15:7:21:985:363 +Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q5 failed at: 2022-3-30 15:7:22:486:113 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/result_summary/read-committed_total-result.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..a5e025b4 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Timeout + +wat_dda_full_write_skew_c2: Timeout + +wat_dda_full_write_skew_committed: Timeout + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Timeout + +wat_mda_step_wat_c2: Timeout + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/result_summary/repeatable-read_total-result.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/result_summary/repeatable-read_total-result.txt new file mode 100644 index 00000000..4139416e --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/result_summary/repeatable-read_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Rollback + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Rollback + +wat_sda_full_write: Rollback + +wat_sda_full_write_committed: Rollback + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Rollback + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Timeout + +wat_dda_full_write_skew_c2: Timeout + +wat_dda_full_write_skew_committed: Timeout + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Timeout + +wat_mda_step_wat_c2: Timeout + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/result_summary/serializable_total-result.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/result_summary/serializable_total-result.txt new file mode 100644 index 00000000..4139416e --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/result_summary/serializable_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Rollback + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Rollback + +wat_sda_full_write: Rollback + +wat_sda_full_write_committed: Rollback + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Rollback + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Timeout + +wat_dda_full_write_skew_c2: Timeout + +wat_dda_full_write_skew_committed: Timeout + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Timeout + +wat_mda_step_wat_c2: Timeout + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_dda_read_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..7ba63bfe --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_dda_read_skew_committed.txt @@ -0,0 +1,74 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:25:15:782:299 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:25:16:783:556 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q3 finished at: 2022-3-30 19:25:17:800:113 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 19:25:18:788:8 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-3-30 19:25:18:806:64 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 19:25:18:823:797 +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q7 finished at: 2022-3-30 19:25:19:798:70 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 19:25:19:811:186 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 19:25:29:782:548 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 19:25:29:816:702 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 19:25:29:847:847 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 19:25:29:860:781 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..0b696aea --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:26:22:912:757 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:26:23:925:3 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q3 finished at: 2022-3-30 19:26:24:933:243 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-3-30 19:26:25:939:534 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-3-30 19:26:25:972:52 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 19:26:26:96:642 +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q7 failed at: 2022-3-30 19:26:27:617:622 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_dda_write_skew.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_dda_write_skew.txt new file mode 100644 index 00000000..8952c524 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_dda_write_skew.txt @@ -0,0 +1,72 @@ +#### db_type: ob #### +#### test_type: dda_write_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:27:22:611:401 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:27:23:617:615 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q3 finished at: 2022-3-30 19:27:24:632:247 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-3-30 19:27:25:651:812 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-3-30 19:27:25:685:606 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-3-30 19:27:26:615:903 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 19:27:26:633:385 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 19:27:27:615:955 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 19:27:37:609:43 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 19:27:37:639:903 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 19:27:37:669:367 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 19:27:37:682:851 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_dda_write_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..49591aa0 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_dda_write_skew_committed.txt @@ -0,0 +1,72 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:29:51:473:956 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:29:52:474:83 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q3 finished at: 2022-3-30 19:29:53:496:342 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-3-30 19:29:54:496:425 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-3-30 19:29:54:515:605 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 19:29:54:534:286 +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-3-30 19:29:55:477:11 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 19:29:55:495:612 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 19:30:5:473:97 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 19:30:5:507:957 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 19:30:5:541:432 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 19:30:5:556:466 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..0286065a --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,74 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:28:0:759:266 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:28:1:759:549 +Q3-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q3 finished at: 2022-3-30 19:28:2:777:65 +Q4-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q4 finished at: 2022-3-30 19:28:2:791:612 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-3-30 19:28:3:783:30 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-3-30 19:28:3:799:18 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 19:28:3:815:686 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 19:28:4:761:245 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 19:28:14:760:339 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-3-30 19:28:14:794:515 + Q11-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q11 finished at: 2022-3-30 19:28:14:827:437 + Q12-T3 execute sql: 'DROP TABLE mytab;' + Q12 finished at: 2022-3-30 19:28:14:862:85 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-3-30 19:28:14:877:731 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..fc6e043c --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:28:45:175:734 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:28:46:175:393 +Q3-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q3 finished at: 2022-3-30 19:28:47:195:818 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-3-30 19:28:48:193:78 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-3-30 19:28:48:209:598 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 19:28:48:226:796 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-3-30 19:28:49:176:417 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 19:28:49:194:757 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 19:28:59:176:404 + Q10-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q10 finished at: 2022-3-30 19:28:59:212:539 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 19:28:59:228:707 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_mda_step_iat.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_mda_step_iat.txt new file mode 100644 index 00000000..e41616e9 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_mda_step_iat.txt @@ -0,0 +1,128 @@ +#### db_type: ob #### +#### test_type: mda_step_iat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:30:22:275:731 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:30:23:274:768 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 19:30:24:272:840 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + (2,0,2,1) + (5) expected_result: + (2,0,2,1) + (6) expected_result: + (2,0,2,1) + +Q4 finished at: 2022-3-30 19:30:25:296:868 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,,3) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 19:30:26:293:381 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-3-30 19:30:27:316:965 +Q7-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q7 finished at: 2022-3-30 19:30:28:278:729 + Q8-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q8 finished at: 2022-3-30 19:30:29:280:990 + Q9-T3 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q9 finished at: 2022-3-30 19:30:30:291:389 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 19:30:31:278:45 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 19:30:32:277:713 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 19:30:33:279:437 + Q13-T4 execute sql: 'BEGIN;' + Q13 finished at: 2022-3-30 19:30:43:276:423 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) (2,0,2,1) + *(1) expected_result: + (0,1,0,3) (2,0,2,1) + *(2) expected_result: + (0,1,0,3) (2,0,2,1) + *(3) expected_result: + (0,1,0,3) (2,0,2,1) + *(4) expected_result: + (0,1,0,3) (2,0,2,1) + *(5) expected_result: + (0,1,0,3) (2,0,2,1) + *(6) expected_result: + (0,1,0,3) (2,0,2,1) + + Q14 finished at: 2022-3-30 19:30:43:312:748 + Q15-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q15 finished at: 2022-3-30 19:30:43:348:615 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-3-30 19:30:43:364:863 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..875ee1d8 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,127 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:34:1:521:280 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:34:2:520:15 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 19:34:3:519:773 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + (3) expected_result: + (0,1,0,3) + (4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,3) + +Q4 finished at: 2022-3-30 19:34:4:556:482 + Q4-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q4 finished at: 2022-3-30 19:34:5:523:178 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 19:34:5:541:799 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,0) + + Q7 finished at: 2022-3-30 19:34:6:539:627 + Q8-T3 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q8 finished at: 2022-3-30 19:34:6:559:264 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 19:34:6:576:535 +Q10-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,0) + (5) expected_result: + (1,3,1,1) + (6) expected_result: + (1,3,1,1) + +Q10 finished at: 2022-3-30 19:34:7:542:530 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-3-30 19:34:7:559:4 + Q12-T4 execute sql: 'BEGIN;' + Q12 finished at: 2022-3-30 19:34:17:519:578 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,3) + + Q13 finished at: 2022-3-30 19:34:17:553:899 + Q14-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q14 finished at: 2022-3-30 19:34:17:586:802 + Q15-T4 execute opt: 'COMMIT'; + Q15 finished at: 2022-3-30 19:34:17:601:548 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..c0997a1a --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,244 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:33:20:851:641 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:33:21:853:811 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 19:33:22:854:429 + Q4-T4 execute sql: 'BEGIN;' + Q4 finished at: 2022-3-30 19:33:23:853:671 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + *(5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,3) + (7) expected_result: + (0,1,0,3) + *(8) expected_result: + (0,1,0,0) + (9) expected_result: + (0,1,0,3) + (10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,0) + (12) expected_result: + (0,1,0,3) + (13) expected_result: + (0,1,0,3) + (14) expected_result: + (0,1,0,3) + +Q5 finished at: 2022-3-30 19:33:24:870:284 + Q6-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + *(7) expected_result: + (1,3,1,0) + (8) expected_result: + (1,3,1,1) + *(9) expected_result: + (1,3,1,0) + (10) expected_result: + (1,3,1,1) + (11) expected_result: + (1,3,1,1) + (12) expected_result: + (1,3,1,1) + (13) expected_result: + (1,3,1,1) + *(14) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-3-30 19:33:25:874:981 + Q7-T3 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q7 finished at: 2022-3-30 19:33:26:857:427 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 19:33:26:875:361 + Q9-T4 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q9 finished at: 2022-3-30 19:33:27:874:270 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 19:33:27:894:323 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + (3) expected_result: + (0,1,0,3) + (4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,0) + *(6) expected_result: + (0,1,0,0) + *(7) expected_result: + (0,1,0,0) + *(8) expected_result: + (0,1,0,0) + (9) expected_result: + (0,1,0,3) + (10) expected_result: + (0,1,0,3) + (11) expected_result: + (0,1,0,3) + *(12) expected_result: + (0,1,0,0) + (13) expected_result: + (0,1,0,3) + (14) expected_result: + (0,1,0,3) + + Q11 finished at: 2022-3-30 19:33:28:871:754 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 19:33:28:887:377 +Q13-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,0) + *(4) expected_result: + (1,3,1,0) + (5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,0) + (7) expected_result: + (1,3,1,1) + (8) expected_result: + (1,3,1,1) + *(9) expected_result: + (1,3,1,0) + (10) expected_result: + (1,3,1,1) + (11) expected_result: + (1,3,1,1) + (12) expected_result: + (1,3,1,1) + *(13) expected_result: + (1,3,1,0) + (14) expected_result: + (1,3,1,1) + +Q13 finished at: 2022-3-30 19:33:29:867:546 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-3-30 19:33:29:880:503 + Q15-T5 execute sql: 'BEGIN;' + Q15 finished at: 2022-3-30 19:33:39:852:591 + Q16-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,3) + *(7) expected_result: + (0,1,0,3) + *(8) expected_result: + (0,1,0,3) + *(9) expected_result: + (0,1,0,3) + *(10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,3) + *(12) expected_result: + (0,1,0,3) + *(13) expected_result: + (0,1,0,3) + *(14) expected_result: + (0,1,0,3) + + Q16 finished at: 2022-3-30 19:33:39:884:689 + Q17-T5 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + *(7) expected_result: + (1,3,1,1) + *(8) expected_result: + (1,3,1,1) + *(9) expected_result: + (1,3,1,1) + *(10) expected_result: + (1,3,1,1) + *(11) expected_result: + (1,3,1,1) + *(12) expected_result: + (1,3,1,1) + *(13) expected_result: + (1,3,1,1) + *(14) expected_result: + (1,3,1,1) + + Q17 finished at: 2022-3-30 19:33:39:915:381 + Q18-T5 execute opt: 'COMMIT'; + Q18 finished at: 2022-3-30 19:33:39:929:62 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..31bb18ef --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,128 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:30:59:687:393 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:31:0:691:611 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 19:31:1:696:534 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q4 finished at: 2022-3-30 19:31:2:708:642 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + null + *(6) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 19:31:3:713:976 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + null + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + null + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-3-30 19:31:4:733:478 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE value1=0;' +Q7 finished at: 2022-3-30 19:31:5:690:289 + Q8-T2 execute sql: 'DELETE FROM t2 WHERE value1=1;' + Q8 finished at: 2022-3-30 19:31:6:696:596 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE value1=2;' + Q9 finished at: 2022-3-30 19:31:7:707:349 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 19:31:8:689:839 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 19:31:9:694:783 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 19:31:10:696:785 + Q13-T4 execute sql: 'BEGIN;' + Q13 finished at: 2022-3-30 19:31:20:690:514 + Q14-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q14 finished at: 2022-3-30 19:31:20:724:815 + Q15-T4 execute sql: 'SELECT * FROM t2;' + current_result: + null + (1) expected_result: + + (2) expected_result: + + (3) expected_result: + + (4) expected_result: + + (5) expected_result: + + (6) expected_result: + + + Q15 finished at: 2022-3-30 19:31:20:758:767 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-3-30 19:31:20:774:28 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..7d8dee93 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,125 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:31:49:640:166 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:31:50:637:902 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 19:31:51:638:427 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,0,2,0) + (5) expected_result: + (2,0,2,0) + (6) expected_result: + (2,0,2,0) + +Q4 finished at: 2022-3-30 19:31:52:664:269 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + null + (1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,0) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1,0,0) + *(6) expected_result: + null + + Q5 finished at: 2022-3-30 19:31:53:657:384 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + null + (1) expected_result: + (1,3,1,0) + *(2) expected_result: + null + (3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,0) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-3-30 19:31:54:660:294 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q7 finished at: 2022-3-30 19:31:55:641:541 + Q8-T2 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + Q8 finished at: 2022-3-30 19:31:56:639:201 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + Q9 finished at: 2022-3-30 19:31:57:639:200 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 19:31:58:643:404 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 19:31:59:640:647 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 19:32:0:641:676 + Q13-T4 execute sql: 'BEGIN;' + Q13 finished at: 2022-3-30 19:32:10:639:961 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,0) (2,0,2,0) + *(1) expected_result: + (0,1,0,0) (2,0,2,0) + *(2) expected_result: + (0,1,0,0) (2,0,2,0) + *(3) expected_result: + (0,1,0,0) (2,0,2,0) + *(4) expected_result: + (0,1,0,0) (2,0,2,0) + *(5) expected_result: + (0,1,0,0) (2,0,2,0) + *(6) expected_result: + (0,1,0,0) (2,0,2,0) + + Q14 finished at: 2022-3-30 19:32:10:676:212 + Q15-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,0) + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q15 finished at: 2022-3-30 19:32:10:710:962 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-3-30 19:32:10:726:766 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..0d6439f4 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,159 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:35:8:961:622 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:35:9:963:322 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 19:35:10:960:634 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + *(5) expected_result: + (0,1,0,0) + *(6) expected_result: + (0,1,0,0) + +Q4 finished at: 2022-3-30 19:35:11:982:693 +Q5-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + +Q5 finished at: 2022-3-30 19:35:12:19:258 + Q6-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,0) + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-3-30 19:35:13:8:111 + Q6-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q6 finished at: 2022-3-30 19:35:13:32:499 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 19:35:13:55:596 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + (4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,0) + *(6) expected_result: + (0,1,0,0) + + Q9 finished at: 2022-3-30 19:35:13:979:240 + Q10-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + (2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + (5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,0) + + Q10 finished at: 2022-3-30 19:35:14:9:469 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 19:35:14:24:34 +Q12-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q12 finished at: 2022-3-30 19:35:14:964:470 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-3-30 19:35:14:981:795 + Q14-T4 execute sql: 'BEGIN;' + Q14 finished at: 2022-3-30 19:35:24:961:686 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,3) + + Q15 finished at: 2022-3-30 19:35:24:996:697 + Q16-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q16 finished at: 2022-3-30 19:35:25:30:147 + Q17-T4 execute opt: 'COMMIT'; + Q17 finished at: 2022-3-30 19:35:25:44:967 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..fafbe4a1 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,183 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:32:49:521:848 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:32:50:520:955 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 19:32:51:520:643 +Q4-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,2) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + +Q4 finished at: 2022-3-30 19:32:52:545:204 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,2) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + (0,1,0,2) + (6) expected_result: + (0,1,0,2) + + Q5 finished at: 2022-3-30 19:32:53:544:435 + Q6-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q6 finished at: 2022-3-30 19:32:53:563:404 + Q7-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,0) + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q7 finished at: 2022-3-30 19:32:53:598:711 + Q8-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q8 finished at: 2022-3-30 19:32:53:618:959 + Q9-T2 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 19:32:53:637:851 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + *(4) expected_result: + (2,0,2,0) + *(5) expected_result: + (2,0,2,0) + *(6) expected_result: + (2,0,2,0) + + Q10 finished at: 2022-3-30 19:32:54:540:0 + Q11-T3 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q11 finished at: 2022-3-30 19:32:54:557:75 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,0) + + Q12 finished at: 2022-3-30 19:32:54:590:768 + Q13-T3 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q13 finished at: 2022-3-30 19:32:54:607:723 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 19:32:54:625:805 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + (2,0,2,2) + (5) expected_result: + (2,0,2,1) + (6) expected_result: + (2,0,2,1) + +Q15 finished at: 2022-3-30 19:32:55:541:895 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-3-30 19:32:55:561:338 + Q17-T4 execute sql: 'BEGIN;' + Q17 finished at: 2022-3-30 19:33:5:520:244 + Q18-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,2) (2,0,2,1) + *(1) expected_result: + (0,1,0,2) (2,0,2,1) + *(2) expected_result: + (0,1,0,2) (2,0,2,1) + *(3) expected_result: + (0,1,0,2) (2,0,2,1) + *(4) expected_result: + (0,1,0,2) (2,0,2,1) + *(5) expected_result: + (0,1,0,2) (2,0,2,1) + *(6) expected_result: + (0,1,0,2) (2,0,2,1) + + Q18 finished at: 2022-3-30 19:33:5:556:135 + Q19-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q19 finished at: 2022-3-30 19:33:5:590:786 + Q20-T4 execute opt: 'COMMIT'; + Q20 finished at: 2022-3-30 19:33:5:606:230 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_sda_lost_update_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..12fae00c --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_sda_lost_update_committed.txt @@ -0,0 +1,37 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:24:35:408:267 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:24:36:411:943 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q3 finished at: 2022-3-30 19:24:37:425:513 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-3-30 19:24:38:413:977 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 19:24:38:432:919 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q6 failed at: 2022-3-30 19:24:40:9:225 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..37552168 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:24:2:317:953 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:24:3:315:998 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 19:24:4:338:713 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-3-30 19:24:5:318:660 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 19:24:5:335:276 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-3-30 19:24:6:335:200 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 19:24:6:351:637 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 19:24:16:315:79 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-3-30 19:24:16:346:869 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 19:24:16:362:62 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_double_write_skew1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..f14c3d0b --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_double_write_skew1.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 18:55:52:117:213 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 18:55:53:120:678 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 18:55:54:121:869 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 18:55:55:148:550 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 18:55:55:207:199 +Q6-T1 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 18:55:57:132:405 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q6 failed at: 2022-3-30 18:55:57:761:140 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..8af03b98 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 18:56:12:393:498 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 18:56:13:396:829 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 18:56:14:398:334 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 18:56:15:431:534 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 18:56:15:490:209 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 18:56:15:620:266 +Q7-T1 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' +Q7 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q7 failed at: 2022-3-30 18:56:17:98:306 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_double_write_skew2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..6c45c55d --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_double_write_skew2.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 18:56:30:671:768 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 18:56:31:675:584 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 18:56:32:676:946 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 18:56:33:709:718 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q6 finished at: 2022-3-30 18:56:34:692:857 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 18:56:34:710:435 + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q5 failed at: 2022-3-30 18:56:35:225:231 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_read_skew.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_read_skew.txt new file mode 100644 index 00000000..b9a98f28 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_read_skew.txt @@ -0,0 +1,74 @@ +#### db_type: ob #### +#### test_type: dda_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 18:56:49:935:443 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 18:56:50:948:171 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q3 finished at: 2022-3-30 18:56:51:956:255 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 18:56:52:954:149 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-3-30 18:56:52:994:305 +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q6 finished at: 2022-3-30 18:56:53:956:428 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 18:56:54:945:2 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 18:56:55:935:585 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 18:57:5:944:234 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 18:57:5:981:210 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 18:57:6:17:852 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 18:57:6:34:629 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_read_skew2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_read_skew2.txt new file mode 100644 index 00000000..be9485aa --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_read_skew2.txt @@ -0,0 +1,74 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:1:1:942:575 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:1:2:943:945 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 19:1:3:948:544 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-3-30 19:1:4:982:201 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 19:1:5:32:762 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-3-30 19:1:5:947:443 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 19:1:5:965:93 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 19:1:6:945:353 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 19:1:16:945:816 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 19:1:16:977:682 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 19:1:17:9:334 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 19:1:17:23:607 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..42b149a3 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_read_skew2_committed.txt @@ -0,0 +1,74 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:1:21:279:226 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:1:22:280:808 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 19:1:23:284:671 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-3-30 19:1:24:319:234 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 19:1:24:368:421 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 19:1:24:385:857 +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-3-30 19:1:25:284:192 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 19:1:25:300:990 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 19:1:35:278:838 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 19:1:35:310:830 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 19:1:35:344:129 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 19:1:35:358:157 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..0a7c36f2 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,74 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 18:57:10:320:954 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 18:57:11:324:376 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE value2=0;' + current_result: + (0,1,0,0) + (1) expected_result: + null + *(2) expected_result: + (0,1,0,0) + +Q3 finished at: 2022-3-30 18:57:12:341:886 + Q4-T2 execute sql: 'DELETE FROM t2 WHERE value1=1;' + Q4 finished at: 2022-3-30 18:57:13:342:548 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE value1=0;' + Q5 finished at: 2022-3-30 18:57:13:379:20 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 18:57:13:509:430 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE value2=0;' + current_result: + (0,1,0,0) + (1) expected_result: + null + *(2) expected_result: + (0,1,0,0) + +Q7 finished at: 2022-3-30 18:57:14:338:885 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 18:57:14:354:370 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 18:57:24:322:355 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q10 finished at: 2022-3-30 18:57:24:359:960 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q11 finished at: 2022-3-30 18:57:24:398:456 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 18:57:24:415:408 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..4ccf0fcb --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 18:59:14:729:66 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 18:59:15:729:970 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q3 finished at: 2022-3-30 18:59:16:762:682 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-3-30 18:59:17:732:541 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-3-30 18:59:17:748:801 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 18:59:17:766:941 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-3-30 18:59:18:746:510 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 18:59:18:761:847 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 18:59:28:729:812 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q10 finished at: 2022-3-30 18:59:28:788:873 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 18:59:28:805:869 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_write_read_skew.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..788228b4 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_write_read_skew.txt @@ -0,0 +1,72 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 18:55:13:310:286 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 18:55:14:313:769 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 18:55:15:315:314 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 18:55:16:343:447 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 18:55:16:401:68 +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1; ' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q6 finished at: 2022-3-30 18:55:17:331:585 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 18:55:18:319:962 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 18:55:19:312:954 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 18:55:29:311:906 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 18:55:29:349:299 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 18:55:29:385:857 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 18:55:29:402:408 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..2b7d50a0 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,72 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 18:55:33:745:773 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 18:55:34:748:981 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 18:55:35:750:582 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 18:55:36:776:940 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 18:55:36:837:452 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 18:55:36:964:639 +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q7 finished at: 2022-3-30 18:55:37:765:819 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 18:55:37:783:619 + Q9-T3 execute sql: 'BEGIN;' + Q9 finished at: 2022-3-30 18:55:47:746:910 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-3-30 18:55:47:784:179 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-3-30 18:55:47:820:952 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 18:55:47:837:686 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_mda_step_rat.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_mda_step_rat.txt new file mode 100644 index 00000000..8145c31a --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_mda_step_rat.txt @@ -0,0 +1,128 @@ +#### db_type: ob #### +#### test_type: mda_step_rat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:1:39:631:184 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:1:40:632:492 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 19:1:41:630:720 +Q4-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q4 finished at: 2022-3-30 19:1:42:636:162 + Q5-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q5 finished at: 2022-3-30 19:1:43:651:760 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + + Q6 finished at: 2022-3-30 19:1:43:702:323 + Q7-T3 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q7 finished at: 2022-3-30 19:1:44:632:484 + Q8-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q8 finished at: 2022-3-30 19:1:44:665:980 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + (2,0,2,1) + (5) expected_result: + (2,0,2,1) + (6) expected_result: + (2,0,2,1) + +Q9 finished at: 2022-3-30 19:1:45:649:811 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 19:1:45:666:658 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 19:1:46:637:924 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 19:1:47:633:318 + Q13-T4 execute sql: 'BEGIN;' + Q13 finished at: 2022-3-30 19:1:57:634:290 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) (2,0,2,1) + *(1) expected_result: + (0,1,0,3) (2,0,2,1) + *(2) expected_result: + (0,1,0,3) (2,0,2,1) + *(3) expected_result: + (0,1,0,3) (2,0,2,1) + *(4) expected_result: + (0,1,0,3) (2,0,2,1) + *(5) expected_result: + (0,1,0,3) (2,0,2,1) + *(6) expected_result: + (0,1,0,3) (2,0,2,1) + + Q14 finished at: 2022-3-30 19:1:57:682:483 + Q15-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q15 finished at: 2022-3-30 19:1:57:726:972 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-3-30 19:1:57:745:900 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..ba7d77af --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,244 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN;' + Q1 finished at: 2022-3-30 19:2:2:10:590 +Q2-T1 execute sql: 'BEGIN;' +Q2 finished at: 2022-3-30 19:2:3:10:380 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 19:2:4:8:36 + Q4-T2 execute sql: 'BEGIN;' + Q4 finished at: 2022-3-30 19:2:5:8:777 + Q5-T4 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + (4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + (7) expected_result: + (0,1,0,3) + (8) expected_result: + (0,1,0,3) + *(9) expected_result: + (0,1,0,0) + (10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,0) + (12) expected_result: + (0,1,0,3) + *(13) expected_result: + (0,1,0,0) + *(14) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-3-30 19:2:6:58:388 +Q6-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q6 finished at: 2022-3-30 19:2:7:12:617 + Q7-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + (7) expected_result: + (1,3,1,1) + *(8) expected_result: + (1,3,1,0) + (9) expected_result: + (1,3,1,1) + (10) expected_result: + (1,3,1,1) + *(11) expected_result: + (1,3,1,0) + *(12) expected_result: + (1,3,1,0) + *(13) expected_result: + (1,3,1,0) + (14) expected_result: + (1,3,1,1) + + Q7 finished at: 2022-3-30 19:2:8:27:368 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + (3) expected_result: + (0,1,0,3) + (4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + (7) expected_result: + (0,1,0,3) + (8) expected_result: + (0,1,0,3) + (9) expected_result: + (0,1,0,3) + *(10) expected_result: + (0,1,0,0) + *(11) expected_result: + (0,1,0,0) + *(12) expected_result: + (0,1,0,0) + (13) expected_result: + (0,1,0,3) + (14) expected_result: + (0,1,0,3) + + Q8 finished at: 2022-3-30 19:2:8:60:275 + Q9-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q9 finished at: 2022-3-30 19:2:9:32:75 + Q10-T4 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + *(7) expected_result: + (1,3,1,0) + (8) expected_result: + (1,3,1,1) + (9) expected_result: + (1,3,1,1) + (10) expected_result: + (1,3,1,1) + (11) expected_result: + (1,3,1,1) + *(12) expected_result: + (1,3,1,0) + *(13) expected_result: + (1,3,1,0) + *(14) expected_result: + (1,3,1,0) + + Q10 finished at: 2022-3-30 19:2:10:40:972 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-3-30 19:2:11:10:980 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 19:2:12:14:532 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-3-30 19:2:13:8:101 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 19:2:14:12:489 + Q15-T5 execute sql: 'BEGIN;' + Q15 finished at: 2022-3-30 19:2:24:8:471 + Q16-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,3) + *(7) expected_result: + (0,1,0,3) + *(8) expected_result: + (0,1,0,3) + *(9) expected_result: + (0,1,0,3) + *(10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,3) + *(12) expected_result: + (0,1,0,3) + *(13) expected_result: + (0,1,0,3) + *(14) expected_result: + (0,1,0,3) + + Q16 finished at: 2022-3-30 19:2:24:43:87 + Q17-T5 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + *(7) expected_result: + (1,3,1,1) + *(8) expected_result: + (1,3,1,1) + *(9) expected_result: + (1,3,1,1) + *(10) expected_result: + (1,3,1,1) + *(11) expected_result: + (1,3,1,1) + *(12) expected_result: + (1,3,1,1) + *(13) expected_result: + (1,3,1,1) + *(14) expected_result: + (1,3,1,1) + + Q17 finished at: 2022-3-30 19:2:24:76:567 + Q18-T5 execute opt: 'COMMIT'; + Q18 finished at: 2022-3-30 19:2:24:91:459 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..da3bd17d --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:2:28:254:32 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:2:29:255:415 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 19:2:30:253:831 +Q4-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q4 finished at: 2022-3-30 19:2:31:257:380 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q5 finished at: 2022-3-30 19:2:32:273:355 + Q6-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q6 finished at: 2022-3-30 19:2:32:312:793 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-3-30 19:2:33:254:352 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-3-30 19:2:33:284:917 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-3-30 19:2:34:271:628 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 19:2:34:288:492 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 19:2:35:260:547 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 19:2:36:255:806 + Q13-T4 execute sql: 'BEGIN;' + Q13 finished at: 2022-3-30 19:2:46:259:33 + Q14-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q14 finished at: 2022-3-30 19:2:46:307:548 + Q15-T4 execute opt: 'COMMIT'; + Q15 finished at: 2022-3-30 19:2:46:326:551 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..1efe3d06 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:5:24:348:559 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:5:25:350:35 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 19:5:26:351:330 +Q4-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q4 finished at: 2022-3-30 19:5:27:358:508 + Q5-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q5 finished at: 2022-3-30 19:5:28:351:60 + Q6-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q6 finished at: 2022-3-30 19:5:28:384:981 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-3-30 19:5:29:351:783 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-3-30 19:5:29:386:443 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-3-30 19:5:30:365:114 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 19:5:30:381:262 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 19:5:31:353:436 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 19:5:32:353:549 + Q13-T4 execute sql: 'BEGIN;' + Q13 finished at: 2022-3-30 19:5:42:351:60 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q14 finished at: 2022-3-30 19:5:42:386:154 + Q15-T4 execute opt: 'COMMIT'; + Q15 finished at: 2022-3-30 19:5:42:401:889 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_sda_dirty_read.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_sda_dirty_read.txt new file mode 100644 index 00000000..2775eee1 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: ob #### +#### test_type: sda_dirty_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_dirty_read test run---------- + Q1-T2 execute sql: 'BEGIN;' + Q1 finished at: 2022-3-30 18:51:54:338:188 +Q2-T1 execute sql: 'BEGIN;' +Q2 finished at: 2022-3-30 18:51:55:336:25 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 18:51:55:354:223 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-3-30 18:51:56:359:471 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-3-30 18:51:57:336:428 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 18:51:58:338:218 + Q7-T3 execute sql: 'BEGIN;' + Q7 finished at: 2022-3-30 18:52:8:338:106 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q8 finished at: 2022-3-30 18:52:8:385:488 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 18:52:8:402:451 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_sda_intermediate_read.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..73ef7038 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 18:52:32:717:958 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 18:52:33:719:863 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 18:52:34:722:599 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-3-30 18:52:35:739:776 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-3-30 18:52:36:719:167 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 18:52:37:720:63 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 18:52:38:720:437 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 18:52:48:720:119 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q9 finished at: 2022-3-30 18:52:48:757:155 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 18:52:48:774:225 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..5c395c72 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 18:52:52:907:418 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 18:52:53:909:176 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 18:52:54:910:73 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-3-30 18:52:55:929:308 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 18:52:55:946:640 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-3-30 18:52:56:908:241 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 18:52:56:925:843 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 18:53:6:908:903 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q9 finished at: 2022-3-30 18:53:6:945:445 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 18:53:6:962:777 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_sda_lost_self_update.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..d1165657 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_sda_lost_self_update.txt @@ -0,0 +1,37 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 18:53:47:449:867 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 18:53:48:451:749 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 18:53:49:452:819 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-3-30 18:53:51:468:758 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-3-30 18:53:51:486:465 + Q4 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q4 failed at: 2022-3-30 18:53:51:888:530 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..cd8190cf --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 18:52:12:534:486 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 18:52:13:536:204 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 18:52:14:553:836 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-3-30 18:52:15:537:812 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-3-30 18:52:16:551:426 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 18:52:17:538:452 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 18:52:18:534:793 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 18:52:28:535:996 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-3-30 18:52:28:572:760 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 18:52:28:589:684 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..2c0e748d --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 18:53:11:97:69 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 18:53:12:98:954 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q3 finished at: 2022-3-30 18:53:13:116:514 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-3-30 18:53:14:100:962 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 18:53:14:120:450 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-3-30 18:53:15:114:343 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 18:53:15:130:86 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 18:53:25:98:594 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q9 finished at: 2022-3-30 18:53:25:135:91 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 18:53:25:152:184 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..e83ffaaa --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 18:53:29:267:895 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 18:53:30:267:129 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q3 finished at: 2022-3-30 18:53:31:285:742 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-3-30 18:53:32:268:544 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 18:53:32:287:823 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-3-30 18:53:33:282:594 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 18:53:33:298:172 + Q8-T3 execute sql: 'BEGIN;' + Q8 finished at: 2022-3-30 18:53:43:266:896 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q9 finished at: 2022-3-30 18:53:43:303:403 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 18:53:43:320:409 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..452ca731 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:10:13:689:631 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:10:14:687:502 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 19:10:15:690:771 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-3-30 19:10:16:691:944 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q7 finished at: 2022-3-30 19:10:17:703:995 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 19:10:17:720:319 + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q5 failed at: 2022-3-30 19:10:18:247:198 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..b4c98724 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,34 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:10:31:948:413 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:10:32:952:539 +Q3-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q3 finished at: 2022-3-30 19:10:33:954:36 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-3-30 19:10:34:954:115 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-3-30 19:10:45:466:77 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q6 failed at: 2022-3-30 19:10:46:534:244 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..cc41df0d --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,34 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:10:51:212:955 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:10:52:216:898 +Q3-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q3 finished at: 2022-3-30 19:10:53:217:435 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-3-30 19:10:54:218:780 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-3-30 19:11:4:709:566 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q6 failed at: 2022-3-30 19:11:5:819:419 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..a887993f --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,25 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:11:11:473:920 + Q2-T2 execute sql: 'BEGIN;' + Q2 failed reason: [ma-2.0.3][5.6.25]ORA-00600: internal error code, arguments: -6210, Transaction is timeout errcode: 25000 + Q2 failed at: 2022-3-30 19:11:12:675:612 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..2618e765 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:11:29:753:111 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:11:30:753:987 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q3 finished at: 2022-3-30 19:11:31:774:500 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-3-30 19:11:32:759:158 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-3-30 19:11:32:777:140 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 19:11:34:756:645 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q6 failed at: 2022-3-30 19:11:35:377:374 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..f7e38b32 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:11:49:17:734 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:11:50:18:464 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q3 finished at: 2022-3-30 19:11:51:37:469 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-3-30 19:11:52:33:910 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-3-30 19:11:52:51:507 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 19:11:54:21:245 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q6 failed at: 2022-3-30 19:11:54:649:133 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..5b8ba19c --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:12:9:270:628 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:12:10:292:467 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 19:12:11:274:185 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-3-30 19:12:12:304:22 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-3-30 19:12:13:272:765 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 19:12:13:289:433 + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q5 failed at: 2022-3-30 19:12:13:858:194 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..601b5a6b --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:12:28:525:866 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:12:29:529:161 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 19:12:30:530:708 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-3-30 19:12:31:547:933 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-3-30 19:12:32:528:478 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 19:12:34:528:432 + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q5 failed at: 2022-3-30 19:12:35:61:811 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..3e03195a --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:20:18:717:613 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:20:19:718:641 +Q3-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q3 finished at: 2022-3-30 19:20:20:720:722 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-3-30 19:20:21:741:412 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-3-30 19:20:22:719:52 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 19:20:22:736:402 + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q5 failed at: 2022-3-30 19:20:23:279:50 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_mda_step_wat_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..2d192d83 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_mda_step_wat_c1.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:13:7:49:522 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:13:8:50:446 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 19:13:9:50:274 +Q4-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q4 finished at: 2022-3-30 19:13:10:54:226 + Q5-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q5 finished at: 2022-3-30 19:13:11:55:80 + Q6-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q7-T3 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=2;' + Q7 finished at: 2022-3-30 19:13:12:51:571 + Q8-T3 execute sql: 'UPDATE t2 SET value2=3 WHERE value1=1;' +Q9-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q6 failed at: 2022-3-30 19:13:21:600:538 + Q8 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q8 failed at: 2022-3-30 19:13:22:838:498 +Q9 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q9 failed at: 2022-3-30 19:13:23:916:600 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_mda_step_wat_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..3080ae23 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_mda_step_wat_c2.txt @@ -0,0 +1,42 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'DROP TABLE t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:13:29:302:362 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:13:30:305:861 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 19:13:31:305:688 +Q4-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q4 finished at: 2022-3-30 19:13:32:307:395 + Q5-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q5 finished at: 2022-3-30 19:13:33:308:38 + Q6-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q7-T3 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=2;' + Q7 finished at: 2022-3-30 19:13:34:304:700 + Q8-T3 execute sql: 'UPDATE t2 SET value2=3 WHERE value1=1;' +Q9-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q6 failed at: 2022-3-30 19:13:43:913:998 + Q8 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q8 failed at: 2022-3-30 19:13:45:113:180 +Q9 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q9 failed at: 2022-3-30 19:13:46:161:32 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..f7802c7b --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,44 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:19:39:294:429 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:19:40:295:331 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 19:19:41:297:579 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-3-30 19:19:43:294:195 + Q4 finished at: 2022-3-30 19:19:43:295:340 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 19:19:44:297:884 + Q7-T3 execute sql: 'BEGIN;' + Q7 finished at: 2022-3-30 19:19:54:293:349 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-3-30 19:19:54:327:721 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 19:19:54:342:878 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..e9a6db8f --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,28 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:8:19:845:726 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:8:20:847:931 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 19:8:21:848:446 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-3-30 19:8:23:847:912 + Q4 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q4 failed at: 2022-3-30 19:8:24:251:873 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_sda_full_write.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_sda_full_write.txt new file mode 100644 index 00000000..1eb310be --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_sda_full_write.txt @@ -0,0 +1,30 @@ +#### db_type: ob #### +#### test_type: sda_full_write #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:8:38:959:76 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:8:39:960:239 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 19:8:40:961:958 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-3-30 19:8:42:959:653 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-3-30 19:8:42:975:667 + Q4 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q4 failed at: 2022-3-30 19:8:43:376:969 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_sda_full_write_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..70914099 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_sda_full_write_committed.txt @@ -0,0 +1,30 @@ +#### db_type: ob #### +#### test_type: sda_full_write_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:8:58:74:230 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:8:59:75:242 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 19:9:0:77:144 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-3-30 19:9:2:74:609 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 19:9:2:90:828 + Q4 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q4 failed at: 2022-3-30 19:9:2:491:621 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..85bfb232 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,37 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:9:55:421:580 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:9:56:422:16 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 19:9:57:425:892 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-3-30 19:9:59:437:802 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 19:9:59:453:708 + Q4 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q4 failed at: 2022-3-30 19:9:59:854:330 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_sda_lost_update_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..6da3c51a --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_sda_lost_update_c1.txt @@ -0,0 +1,37 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:9:16:189:125 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:9:17:189:824 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q3 finished at: 2022-3-30 19:9:18:206:921 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-3-30 19:9:19:191:508 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 19:9:21:192:331 +Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q5 failed at: 2022-3-30 19:9:21:693:51 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_sda_lost_update_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..9b4c3934 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_dis/serializable/wat_sda_lost_update_c2.txt @@ -0,0 +1,37 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 19:9:35:309:198 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 19:9:36:310:130 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q3 finished at: 2022-3-30 19:9:37:327:82 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-3-30 19:9:38:312:114 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 19:9:40:312:608 +Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q5 failed at: 2022-3-30 19:9:40:813:361 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_dda_read_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..0f0afd1f --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:49:44:519:835 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:49:45:523:589 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 11:49:46:574:282 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 11:49:47:526:908 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 11:49:47:545:311 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 11:49:47:565:725 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-3-30 11:49:48:536:400 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 11:49:48:550:257 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 11:49:58:541:272 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 11:49:58:557:144 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..68dac16b --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:50:22:114:453 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:50:23:115:164 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 11:50:24:133:406 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-3-30 11:50:25:118:103 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 11:50:25:134:59 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 11:50:25:152:16 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-3-30 11:50:26:114:731 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 11:50:26:132:724 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 11:50:36:136:995 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 11:50:36:153:857 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_dda_write_skew.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..78afc0a7 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:50:52:561:80 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:50:53:566:394 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 11:50:54:580:597 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-3-30 11:50:55:579:652 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 11:50:55:595:672 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-3-30 11:50:56:561:627 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 11:50:56:579:192 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 11:50:57:563:174 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 11:51:7:579:780 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 11:51:7:594:758 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_dda_write_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..e721e520 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:52:11:923:264 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:52:12:919:738 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 11:52:13:939:151 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-3-30 11:52:14:939:993 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 11:52:14:956:899 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 11:52:14:974:707 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-3-30 11:52:15:920:312 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 11:52:15:937:527 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 11:52:25:939:296 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 11:52:25:955:464 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..753c1df6 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,73 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:51:20:923:108 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:51:21:924:509 +Q3-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q3 finished at: 2022-3-30 11:51:22:940:363 +Q4-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q4 finished at: 2022-3-30 11:51:22:953:758 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-3-30 11:51:23:944:399 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-3-30 11:51:23:959:174 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 11:51:23:975:576 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 11:51:24:925:239 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-3-30 11:51:34:945:895 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-3-30 11:51:34:980:449 + Q11-T3 execute sql: 'DROP TABLE mytab;' + Q11 finished at: 2022-3-30 11:51:35:15:127 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 11:51:35:31:559 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..80f3c80a --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:51:46:587:226 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:51:47:585:970 +Q3-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q3 finished at: 2022-3-30 11:51:48:608:793 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-3-30 11:51:49:603:315 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-3-30 11:51:49:618:758 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 11:51:49:634:259 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-3-30 11:51:50:587:981 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 11:51:50:604:740 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-3-30 11:52:0:601:536 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 11:52:0:614:847 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_mda_step_iat.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..f4d8f7ad --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:52:41:196:837 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:52:42:197:225 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 11:52:43:195:979 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q4 finished at: 2022-3-30 11:52:44:216:324 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 11:52:45:217:777 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-3-30 11:52:46:215:931 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-3-30 11:52:47:197:144 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-3-30 11:52:48:198:401 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-3-30 11:52:49:196:926 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 11:52:50:197:856 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 11:52:51:199:740 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 11:52:52:203:257 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-3-30 11:53:2:209:365 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 11:53:2:222:535 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..eceb51d2 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:55:31:339:67 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:55:32:339:712 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 11:55:33:340:787 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q4 finished at: 2022-3-30 11:55:34:357:595 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 11:55:35:341:508 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 11:55:35:358:247 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-3-30 11:55:36:359:444 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-3-30 11:55:36:375:603 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 11:55:36:393:323 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2022-3-30 11:55:37:355:799 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-3-30 11:55:37:369:777 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-3-30 11:55:47:358:717 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-3-30 11:55:47:373:361 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..b6217c5d --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,206 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:54:56:97:919 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:54:57:100:616 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 11:54:58:102:92 + Q4-T4 execute sql: 'BEGIN;' + Q4 finished at: 2022-3-30 11:54:59:101:830 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q5 finished at: 2022-3-30 11:55:0:116:160 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q6 finished at: 2022-3-30 11:55:1:122:136 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7 finished at: 2022-3-30 11:55:2:104:912 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 11:55:2:124:401 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-3-30 11:55:3:103:496 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 11:55:3:122:43 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-3-30 11:55:4:118:697 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 11:55:4:134:721 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-3-30 11:55:5:113:384 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-3-30 11:55:5:126:706 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-3-30 11:55:15:118:283 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-3-30 11:55:15:133:144 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..20babe59 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:53:18:552:217 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:53:19:560:655 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 11:53:20:552:811 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q4 finished at: 2022-3-30 11:53:21:572:819 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 11:53:22:575:87 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-3-30 11:53:23:572:392 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-3-30 11:53:24:553:945 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-3-30 11:53:25:560:648 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-3-30 11:53:26:553:469 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 11:53:27:554:748 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 11:53:28:562:703 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 11:53:29:555:319 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-3-30 11:53:39:584:650 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 11:53:39:603:122 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..fca08cca --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:53:51:20:106 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:53:52:18:266 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 11:53:53:21:34 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,0) + (5) expected_result: + (2,0) + (6) expected_result: + (2,0) + +Q4 finished at: 2022-3-30 11:53:54:42:85 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,0) + *(6) expected_result: + null + + Q5 finished at: 2022-3-30 11:53:55:36:568 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,0) + *(2) expected_result: + null + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-3-30 11:53:56:36:404 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-3-30 11:53:57:21:390 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-3-30 11:53:58:18:218 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-3-30 11:53:59:19:260 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 11:54:0:22:563 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 11:54:1:21:914 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 11:54:2:21:145 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + *(1) expected_result: + (0,0) (1,0) (2,0) + *(2) expected_result: + (0,0) (1,0) (2,0) + *(3) expected_result: + (0,0) (1,0) (2,0) + *(4) expected_result: + (0,0) (1,0) (2,0) + *(5) expected_result: + (0,0) (1,0) (2,0) + *(6) expected_result: + (0,0) (1,0) (2,0) + + Q13 finished at: 2022-3-30 11:54:12:38:131 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 11:54:12:53:237 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..a391a55e --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,139 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:56:3:630:410 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:56:4:630:440 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 11:56:5:627:985 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q4 finished at: 2022-3-30 11:56:6:650:201 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q5 finished at: 2022-3-30 11:56:6:684:474 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-3-30 11:56:7:652:682 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-3-30 11:56:7:672:359 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 11:56:7:690:855 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-3-30 11:56:8:643:940 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-3-30 11:56:8:672:6 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 11:56:8:685:625 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-3-30 11:56:9:630:718 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-3-30 11:56:9:649:334 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-3-30 11:56:19:644:140 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-3-30 11:56:19:657:629 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..40c6050f --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,161 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:54:24:100:355 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:54:25:100:370 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 11:54:26:102:402 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q4 finished at: 2022-3-30 11:54:27:119:727 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q5 finished at: 2022-3-30 11:54:28:119:491 + Q6-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-3-30 11:54:28:136:859 + Q7-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q7 finished at: 2022-3-30 11:54:28:167:827 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-3-30 11:54:28:182:972 + Q9-T2 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 11:54:28:200:7 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-3-30 11:54:29:128:303 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-3-30 11:54:29:145:696 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-3-30 11:54:29:181:238 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-3-30 11:54:29:198:398 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 11:54:29:217:194 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2022-3-30 11:54:30:121:118 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-3-30 11:54:30:136:331 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-3-30 11:54:40:123:619 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-3-30 11:54:40:141:194 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_sda_lost_update_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..1aff7300 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,50 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:49:9:548:88 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:49:10:548:68 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q3 finished at: 2022-3-30 11:49:11:567:813 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-3-30 11:49:12:551:43 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 11:49:12:570:104 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-3-30 11:49:13:548:308 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 11:49:13:566:163 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-3-30 11:49:23:566:323 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 11:49:23:582:159 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..ad2eb5ba --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,57 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:48:25:500:617 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:48:26:501:348 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 11:48:27:520:303 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-3-30 11:48:28:502:880 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 11:48:28:521:866 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-3-30 11:48:29:517:333 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 11:48:29:532:728 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-3-30 11:48:39:515:488 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 11:48:39:528:477 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_double_write_skew1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..44cb7b95 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,55 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 1:53:11:605:963 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 1:53:12:605:5 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 1:53:13:609:603 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 1:53:14:605:846 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 1:53:14:694:258 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-3-30 1:53:16:606:337 + Q7 finished at: 2022-3-30 1:53:16:607:117 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 1:53:17:608:114 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-3-30 1:54:48:647:929 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 1:54:48:688:116 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..359947e6 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,55 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 1:55:2:11:283 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 1:55:3:10:471 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 1:55:4:13:942 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 1:55:5:11:357 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 1:55:5:145:658 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 1:55:5:188:459 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-3-30 1:55:6:12:86 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 1:55:6:55:187 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-3-30 1:56:37:52:756 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 1:56:37:92:805 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_double_write_skew2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..3046922a --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,55 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 1:56:50:415:527 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 1:56:51:415:457 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 1:56:52:418:636 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 1:56:53:415:489 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-3-30 1:56:54:459:498 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 1:56:54:502:905 + Q5 finished at: 2022-3-30 1:56:54:504:167 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 1:56:55:416:822 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 1:58:26:457:419 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 1:58:26:497:597 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_read_skew.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..9a064703 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 1:58:39:815:661 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 1:58:40:815:238 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 1:58:41:861:418 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 1:58:42:817:211 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 1:58:42:857:878 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-3-30 1:58:43:859:163 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 1:58:44:817:40 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 1:58:45:815:780 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 2:0:16:857:266 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 2:0:16:897:529 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_read_skew2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..ee14140d --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 2:4:6:984:399 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 2:4:7:984:519 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 2:4:8:987:202 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-3-30 2:4:10:26:879 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 2:4:10:112:220 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-3-30 2:4:10:984:834 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 2:4:11:28:657 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 2:4:11:984:154 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 2:5:43:26:387 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 2:5:43:66:955 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..5b1d2a55 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 2:5:56:383:930 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 2:5:57:382:987 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 2:5:58:387:110 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-3-30 2:5:59:426:226 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 2:5:59:509:616 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 2:5:59:550:986 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-3-30 2:6:0:385:334 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 2:6:0:428:313 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 2:7:31:426:410 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 2:7:31:466:633 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..7484b7f9 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 2:0:30:222:883 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 2:0:31:222:117 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q3 finished at: 2022-3-30 2:0:32:267:944 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-3-30 2:0:33:223:796 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-3-30 2:0:33:264:632 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 2:0:33:306:881 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-3-30 2:0:34:264:966 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 2:0:34:306:143 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-3-30 2:2:5:267:128 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 2:2:5:307:421 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..7bed423e --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,58 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 2:2:18:578:182 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 2:2:19:577:485 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q3 finished at: 2022-3-30 2:2:20:628:439 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-3-30 2:2:21:578:770 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-3-30 2:2:21:619:296 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 2:2:21:665:383 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-3-30 2:2:22:620:414 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 2:2:22:661:517 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-3-30 2:3:53:619:889 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 2:3:53:660:350 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_write_read_skew.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..526b871a --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 1:49:32:801:693 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 1:49:33:800:961 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 1:49:34:804:370 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 1:49:35:805:875 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 1:49:35:889:70 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-3-30 1:49:36:845:696 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 1:49:37:803:19 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 1:49:38:803:713 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 1:51:9:843:945 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 1:51:9:884:130 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..ece0f0fa --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 1:51:23:206:323 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 1:51:24:205:467 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 1:51:25:209:146 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 1:51:26:206:439 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 1:51:26:289:373 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 1:51:26:331:968 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-3-30 1:51:27:250:373 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 1:51:27:293:461 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 1:52:58:248:885 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 1:52:58:289:110 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_mda_step_rat.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..0c21125c --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:58:38:289:252 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:58:39:288:797 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 11:58:40:286:159 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-3-30 11:58:41:292:576 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-3-30 11:58:42:290:326 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q6 finished at: 2022-3-30 11:58:42:325:524 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-3-30 11:58:43:288:27 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-3-30 11:58:43:320:262 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-3-30 11:58:44:309:545 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 11:58:44:329:210 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 11:58:45:291:253 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 11:58:46:288:968 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-3-30 11:58:56:307:48 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 11:58:56:322:710 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..1f621fc0 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,208 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN;' + Q1 finished at: 2022-3-30 11:57:5:201:63 +Q2-T1 execute sql: 'BEGIN;' +Q2 finished at: 2022-3-30 11:57:6:201:321 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 11:57:7:204:376 + Q4-T2 execute sql: 'BEGIN;' + Q4 finished at: 2022-3-30 11:57:8:201:234 + Q5-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 11:57:9:221:677 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-3-30 11:57:10:202:659 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q7 finished at: 2022-3-30 11:57:11:224:211 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q8 finished at: 2022-3-30 11:57:11:259:540 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-3-30 11:57:12:203:651 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-3-30 11:57:13:220:852 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-3-30 11:57:14:204:519 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 11:57:15:203:798 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-3-30 11:57:16:203:153 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 11:57:26:201:304 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-3-30 11:57:26:233:938 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-3-30 11:57:26:248:927 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..c2fcbdc3 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:57:37:538:47 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:57:38:537:353 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 11:57:39:536:840 +Q4-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q4 finished at: 2022-3-30 11:57:40:540:815 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q5 finished at: 2022-3-30 11:57:41:538:908 + Q6-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q6 finished at: 2022-3-30 11:57:41:587:695 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-3-30 11:57:42:537:946 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-3-30 11:57:42:570:377 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-3-30 11:57:43:556:966 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 11:57:43:574:483 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 11:57:44:539:821 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 11:57:45:538:891 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-3-30 11:57:55:565:367 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 11:57:55:580:327 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..484a457d --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:58:6:522:638 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:58:7:523:414 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 11:58:8:523:612 +Q4-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q4 finished at: 2022-3-30 11:58:9:525:886 + Q5-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q5 finished at: 2022-3-30 11:58:10:525:303 + Q6-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q6 finished at: 2022-3-30 11:58:10:559:740 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-3-30 11:58:11:524:83 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-3-30 11:58:11:575:369 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-3-30 11:58:12:540:706 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 11:58:12:557:902 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 11:58:13:532:173 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 11:58:14:525:941 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-3-30 11:58:24:541:898 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 11:58:24:557:272 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_sda_dirty_read.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..4d3579ce --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_dirty_read test run---------- + Q1-T2 execute sql: 'BEGIN;' + Q1 finished at: 2022-3-30 1:36:49:476:448 +Q2-T1 execute sql: 'BEGIN;' +Q2 finished at: 2022-3-30 1:36:50:477:25 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 1:36:50:520:535 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-3-30 1:36:51:520:431 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-3-30 1:36:52:477:240 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 1:36:53:476:414 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-3-30 1:38:24:519:850 + Q8-T3 execute sql: 'DROP TABLE t1;' + Q8 finished at: 2022-3-30 1:38:24:577:362 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_sda_intermediate_read.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..f2602568 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 1:40:28:109:912 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 1:40:29:109:793 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 1:40:30:112:531 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-3-30 1:40:31:234:768 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-3-30 1:40:32:227:612 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 1:40:33:113:870 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 1:40:34:112:443 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-3-30 1:42:5:151:706 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 1:42:5:191:835 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..81c2cd61 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 1:42:18:465:184 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 1:42:19:463:645 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 1:42:20:467:383 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-3-30 1:42:21:507:283 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 1:42:21:547:573 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-3-30 1:42:22:465:9 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 1:42:22:507:842 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-3-30 1:43:53:506:240 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 1:43:53:546:264 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_sda_lost_self_update.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..0aaf36c7 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 1:47:43:403:135 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 1:47:44:402:616 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 1:47:45:405:904 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-3-30 1:47:47:446:683 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-3-30 1:47:47:490:116 + Q4 finished at: 2022-3-30 1:47:47:491:218 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 1:47:48:404:564 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-3-30 1:49:19:446:181 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 1:49:19:486:432 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..bd025b07 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,56 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 1:38:37:796:410 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 1:38:38:793:285 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 1:38:39:839:955 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-3-30 1:38:40:796:182 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-3-30 1:38:41:838:81 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 1:38:42:798:286 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 1:38:43:794:523 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-3-30 1:40:14:835:580 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..25dca004 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,54 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 1:44:6:777:293 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 1:44:7:777:881 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q3 finished at: 2022-3-30 1:44:8:821:872 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-3-30 1:44:9:777:870 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 1:44:9:820:5 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-3-30 1:44:10:822:820 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 1:44:10:864:405 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-3-30 1:45:41:818:902 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..7b26d283 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,56 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 1:45:55:46:744 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 1:45:56:46:53 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q3 finished at: 2022-3-30 1:45:57:92:211 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-3-30 1:45:58:47:470 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 1:45:58:89:556 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-3-30 1:45:59:90:208 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 1:45:59:131:383 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-3-30 1:47:30:88:608 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 1:47:30:129:586 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..0980ec2b --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,55 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 2:28:6:763:856 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 2:28:7:762:625 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 2:28:8:766:71 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 2:28:9:763:374 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-3-30 2:28:10:810:561 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 2:28:10:853:542 + Q5 finished at: 2022-3-30 2:28:10:854:960 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 2:28:10:897:52 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 2:29:41:805:465 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 2:29:41:845:860 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..15192306 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 2:29:55:164:733 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 2:29:56:163:81 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 2:29:57:166:866 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-3-30 2:29:58:163:864 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-3-30 2:30:8:610:322 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q6 failed at: 2022-3-30 2:30:9:670:156 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..061be1aa --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:59:36:935:94 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:59:37:932:988 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 11:59:38:937:98 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-3-30 11:59:39:933:250 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-3-30 11:59:50:351:535 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q6 failed at: 2022-3-30 11:59:51:443:488 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..7aeaf3fd --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 12:0:24:31:802 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 12:0:25:29:339 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 12:0:26:39:822 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-3-30 12:0:27:30:267 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-3-30 12:0:37:455:637 +Q7 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q7 failed at: 2022-3-30 12:0:38:637:937 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..af80e8af --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 2:35:22:761:24 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 2:35:23:761:116 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 2:35:24:806:287 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-3-30 2:35:25:762:326 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 2:35:25:802:850 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-3-30 2:35:27:762:101 +Q7-T1 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 2:35:27:762:677 +Q7 finished at: 2022-3-30 2:35:27:804:719 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 2:36:58:802:810 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 2:36:58:852:136 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..99e9014a --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 2:37:12:167:418 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 2:37:13:166:453 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 2:37:14:212:446 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-3-30 2:37:15:168:376 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 2:37:15:209:159 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-3-30 2:37:17:168:94 + Q7 finished at: 2022-3-30 2:37:17:169:21 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 2:37:18:169:823 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 2:38:49:209:99 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 2:38:49:249:93 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..9cd1d678 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 2:39:2:564:132 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 2:39:3:563:221 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 2:39:4:567:349 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-3-30 2:39:5:606:430 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-3-30 2:39:6:564:753 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 2:39:6:607:860 + Q5 finished at: 2022-3-30 2:39:6:609:176 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 2:39:7:565:629 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 2:40:38:605:930 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 2:40:38:646:968 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..66176ef3 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 2:40:51:968:680 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 2:40:52:967:849 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 2:40:53:971:577 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-3-30 2:40:55:11:119 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-3-30 2:40:55:969:95 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 2:40:57:971:102 + Q5 finished at: 2022-3-30 2:40:57:972:269 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 2:40:58:14:484 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 2:42:29:10:712 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 2:42:29:50:954 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..ec06ee6e --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,53 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 2:42:42:372:612 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 2:42:43:367:404 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 2:42:44:370:218 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-3-30 2:42:45:409:682 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-3-30 2:42:46:367:882 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 2:42:46:411:70 + Q5 finished at: 2022-3-30 2:42:46:412:548 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 2:42:46:454:947 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 2:44:17:409:256 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 2:44:17:449:567 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_mda_step_wat_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..1b80c968 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 2:44:30:815:144 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 2:44:31:814:490 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 2:44:32:814:166 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-3-30 2:44:33:817:990 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q5 finished at: 2022-3-30 2:44:34:815:226 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-3-30 2:44:35:815:42 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q6 failed at: 2022-3-30 2:44:45:358:947 + Q8 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q8 failed at: 2022-3-30 2:44:46:559:178 +Q9 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q9 failed at: 2022-3-30 2:44:47:617:854 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_mda_step_wat_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..cba51a83 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 12:1:15:194:239 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 12:1:16:195:330 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 12:1:17:194:338 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-3-30 12:1:18:197:446 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q5 finished at: 2022-3-30 12:1:19:196:276 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-3-30 12:1:20:196:669 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q6 failed at: 2022-3-30 12:1:29:718:51 + Q8 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q8 failed at: 2022-3-30 12:1:30:919:688 +Q9 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q9 failed at: 2022-3-30 12:1:32:2:779 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..248350cd --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,43 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 2:15:22:153:754 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 2:15:23:152:931 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 2:15:24:156:454 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-3-30 2:15:26:154:776 + Q4 finished at: 2022-3-30 2:15:26:155:920 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 2:15:27:155:404 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-3-30 2:16:58:195:543 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 2:16:58:236:408 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..d4c5a3ff --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 2:17:11:508:50 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 2:17:12:507:159 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 2:17:13:510:818 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-3-30 2:17:15:510:384 + Q4 finished at: 2022-3-30 2:17:15:511:830 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 2:17:16:510:855 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-3-30 2:18:47:550:330 + Q8-T3 execute sql: 'DROP TABLE t1;' + Q8 finished at: 2022-3-30 2:18:47:608:431 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 2:18:47:649:430 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_sda_full_write.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..77e7f922 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_sda_full_write.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 2:19:0:921:57 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 2:19:1:920:171 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 2:19:2:923:559 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-3-30 2:19:4:922:99 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-3-30 2:19:4:965:77 + Q4 finished at: 2022-3-30 2:19:4:966:427 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 2:19:5:922:393 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-3-30 2:20:36:962:722 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 2:20:37:2:925 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_sda_full_write_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..534802cd --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 2:20:50:282:532 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 2:20:51:280:610 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 2:20:52:284:16 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-3-30 2:20:54:282:86 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 2:20:54:325:231 + Q4 finished at: 2022-3-30 2:20:54:326:648 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 2:20:54:368:937 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-3-30 2:22:25:323:80 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 2:22:25:363:872 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..5104474a --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 2:26:18:359:498 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 2:26:19:358:523 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 2:26:20:362:493 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-3-30 2:26:22:402:989 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 2:26:22:446:30 + Q4 finished at: 2022-3-30 2:26:22:447:308 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 2:26:22:489:761 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-3-30 2:27:53:400:846 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 2:27:53:441:16 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_sda_lost_update_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..764602f6 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,50 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 2:22:38:636:664 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 2:22:39:635:640 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q3 finished at: 2022-3-30 2:22:40:681:719 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-3-30 2:22:41:637:526 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; +Q5 finished at: 2022-3-30 2:22:43:637:393 +Q6-T1 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 2:22:43:638:115 +Q6 finished at: 2022-3-30 2:22:43:680:466 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-3-30 2:24:14:678:261 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 2:24:14:718:736 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_sda_lost_update_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..516c449b --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,50 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 2:24:28:4:455 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 2:24:28:998:695 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q3 finished at: 2022-3-30 2:24:30:44:269 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-3-30 2:24:31:0:376 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; +Q5 finished at: 2022-3-30 2:24:33:0:145 + Q6 finished at: 2022-3-30 2:24:33:0:983 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 2:24:34:1:698 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-3-30 2:26:5:41:136 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 2:26:5:81:445 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_dda_read_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..8891d0f3 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_dda_read_skew_committed.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 10:38:21:527:981 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 10:38:22:524:492 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 10:38:23:548:301 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 10:38:24:526:402 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 10:38:24:539:605 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 10:38:24:554:758 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-3-30 10:38:25:547:832 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 10:38:25:564:792 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 10:39:56:548:96 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 10:39:56:564:200 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..4022b671 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 1:9:7:283:344 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 1:9:8:286:676 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 1:9:9:325:743 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-3-30 1:9:10:288:460 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 1:9:10:330:744 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 1:9:10:374:812 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q7 failed at: 2022-3-30 1:9:11:984:610 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_dda_write_skew.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_dda_write_skew.txt new file mode 100644 index 00000000..88f8bc67 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_dda_write_skew.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 10:47:56:929:266 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 10:47:57:927:215 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 10:47:58:949:950 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-3-30 10:47:59:945:642 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 10:47:59:961:999 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-3-30 10:48:0:930:449 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 10:48:0:948:958 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 10:48:1:929:505 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 10:48:42:947:33 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 10:48:42:962:174 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_dda_write_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..d51bbafe --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_dda_write_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 10:40:59:522:135 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 10:41:0:522:664 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 10:41:1:542:564 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-3-30 10:41:2:555:889 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 10:41:2:571:910 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 10:41:2:587:979 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-3-30 10:41:3:522:746 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 10:41:3:538:923 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 10:41:44:540:396 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 10:41:44:554:754 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..6fb7b741 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,73 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 10:42:25:600:868 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 10:42:26:601:46 +Q3-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q3 finished at: 2022-3-30 10:42:27:620:902 +Q4-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q4 finished at: 2022-3-30 10:42:27:636:527 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-3-30 10:42:28:621:311 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-3-30 10:42:28:637:212 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 10:42:28:654:908 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 10:42:29:603:216 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-3-30 10:43:10:622:401 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-3-30 10:43:10:658:771 + Q11-T3 execute sql: 'DROP TABLE mytab;' + Q11 finished at: 2022-3-30 10:43:10:694:695 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 10:43:10:712:19 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..026092d0 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 10:46:46:243:39 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 10:46:47:244:507 +Q3-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q3 finished at: 2022-3-30 10:46:48:262:85 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-3-30 10:46:49:267:689 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-3-30 10:46:49:285:664 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 10:46:49:306:904 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-3-30 10:46:50:243:722 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 10:46:50:260:260 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-3-30 10:47:31:259:847 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 10:47:31:274:504 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_mda_step_iat.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_mda_step_iat.txt new file mode 100644 index 00000000..5463ddbf --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_mda_step_iat.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_iat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:1:21:958:17 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:1:22:957:349 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 11:1:23:956:901 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q4 finished at: 2022-3-30 11:1:24:978:239 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 11:1:25:977:149 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-3-30 11:1:26:975:920 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-3-30 11:1:27:959:194 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-3-30 11:1:28:957:806 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-3-30 11:1:29:957:432 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 11:1:30:961:0 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 11:1:31:964:391 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 11:1:32:959:559 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-3-30 11:2:13:979:567 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 11:2:13:996:599 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..bbdea31f --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,107 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 10:50:20:529:345 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 10:50:21:539:380 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 10:50:22:528:354 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q4 finished at: 2022-3-30 10:50:23:549:30 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 10:50:24:532:386 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 10:50:24:550:90 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-3-30 10:50:25:545:915 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-3-30 10:50:25:567:844 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 10:50:25:585:680 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-3-30 10:50:26:548:721 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-3-30 10:50:26:564:153 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-3-30 10:51:7:550:907 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-3-30 10:51:7:567:289 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..bbfcb606 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,208 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 10:51:46:91:440 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 10:51:47:92:478 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 10:51:48:90:375 + Q4-T4 execute sql: 'BEGIN;' + Q4 finished at: 2022-3-30 10:51:49:91:302 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q5 finished at: 2022-3-30 10:51:50:109:915 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q6 finished at: 2022-3-30 10:51:51:112:551 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7 finished at: 2022-3-30 10:51:52:93:499 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 10:51:52:108:964 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-3-30 10:51:53:92:155 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 10:51:53:108:406 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-3-30 10:51:54:111:43 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 10:51:54:126:812 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-3-30 10:51:55:114:167 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-3-30 10:51:55:128:370 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-3-30 10:52:36:113:268 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-3-30 10:52:36:129:404 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..cb759377 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 10:53:8:529:675 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 10:53:9:525:840 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 10:53:10:531:659 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q4 finished at: 2022-3-30 10:53:11:549:104 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 10:53:12:543:328 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-3-30 10:53:13:550:950 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-3-30 10:53:14:530:912 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-3-30 10:53:15:526:857 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-3-30 10:53:16:531:483 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 10:53:17:532:67 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 10:53:18:540:572 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 10:53:19:533:371 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-3-30 10:54:0:551:993 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 10:54:0:568:626 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..ab140a73 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 10:55:16:115:883 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 10:55:17:114:310 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 10:55:18:114:850 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,0) + (5) expected_result: + (2,0) + (6) expected_result: + (2,0) + +Q4 finished at: 2022-3-30 10:55:19:137:90 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,0) + *(6) expected_result: + null + + Q5 finished at: 2022-3-30 10:55:20:133:277 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,0) + *(2) expected_result: + null + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-3-30 10:55:21:134:397 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-3-30 10:55:22:117:124 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-3-30 10:55:23:115:194 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-3-30 10:55:24:115:370 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 10:55:25:118:383 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 10:55:26:116:658 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 10:55:27:116:983 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + *(1) expected_result: + (0,0) (1,0) (2,0) + *(2) expected_result: + (0,0) (1,0) (2,0) + *(3) expected_result: + (0,0) (1,0) (2,0) + *(4) expected_result: + (0,0) (1,0) (2,0) + *(5) expected_result: + (0,0) (1,0) (2,0) + *(6) expected_result: + (0,0) (1,0) (2,0) + + Q13 finished at: 2022-3-30 10:56:8:130:94 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 10:56:8:143:776 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..3b45690d --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,139 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 10:57:43:540:556 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 10:57:44:538:222 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 10:57:45:537:209 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q4 finished at: 2022-3-30 10:57:46:562:581 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q5 finished at: 2022-3-30 10:57:46:600:881 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-3-30 10:57:47:555:801 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-3-30 10:57:47:572:309 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 10:57:47:590:25 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-3-30 10:57:48:554:520 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-3-30 10:57:48:584:92 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 10:57:48:598:857 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-3-30 10:57:49:541:515 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-3-30 10:57:49:561:309 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-3-30 10:58:30:559:961 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-3-30 10:58:30:574:291 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..a24bdfaf --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,163 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:0:4:85:415 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:0:5:87:449 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 11:0:6:84:246 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q4 finished at: 2022-3-30 11:0:7:104:343 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q5 finished at: 2022-3-30 11:0:8:107:511 + Q6-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-3-30 11:0:8:124:950 + Q7-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q7 finished at: 2022-3-30 11:0:8:160:121 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-3-30 11:0:8:177:44 + Q9-T2 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 11:0:8:195:944 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-3-30 11:0:9:100:539 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-3-30 11:0:9:113:981 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-3-30 11:0:9:142:96 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-3-30 11:0:9:155:717 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 11:0:9:171:177 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-3-30 11:0:10:104:439 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-3-30 11:0:10:118:946 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-3-30 11:0:51:105:780 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-3-30 11:0:51:121:343 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_sda_lost_update_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..d684b5af --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_sda_lost_update_committed.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 1:5:30:978:497 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 1:5:31:982:46 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q3 finished at: 2022-3-30 1:5:33:21:375 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-3-30 1:5:33:983:780 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 1:5:34:27:696 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q6 failed at: 2022-3-30 1:5:35:579:675 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..a1340414 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,59 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:2:41:50:598 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:2:42:52:118 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 11:2:43:68:83 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-3-30 11:2:44:55:69 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 11:2:44:72:865 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-3-30 11:2:45:66:317 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 11:2:45:80:191 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-3-30 11:3:26:68:244 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 11:3:26:82:454 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_double_write_skew1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..0232ca96 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_double_write_skew1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 0:8:43:40:383 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 0:8:44:38:992 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 0:8:45:42:904 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 0:8:46:39:869 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 0:8:46:71:737 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 0:8:48:41:423 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q6 failed at: 2022-3-30 0:8:48:643:104 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..24a0b934 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:3:53:445:5 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:3:54:442:807 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 11:3:55:447:680 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 11:3:56:443:638 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 11:3:56:475:429 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 11:3:56:492:91 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q7 failed at: 2022-3-30 11:3:58:145:911 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_double_write_skew2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..1f00f317 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_double_write_skew2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 0:12:21:216:310 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 0:12:22:214:759 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 0:12:23:219:105 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 0:12:24:215:614 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-3-30 0:12:25:234:915 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 0:12:25:255:227 + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q5 failed at: 2022-3-30 0:12:25:752:887 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_read_skew.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_read_skew.txt new file mode 100644 index 00000000..25c322c0 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_read_skew.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:5:12:679:679 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:5:13:682:639 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 11:5:14:716:855 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 11:5:15:683:875 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 11:5:15:700:925 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-3-30 11:5:16:696:877 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 11:5:17:683:181 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 11:5:18:679:968 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 11:5:59:705:914 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 11:5:59:720:914 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_read_skew2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_read_skew2.txt new file mode 100644 index 00000000..93573a57 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_read_skew2.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 0:19:36:897:790 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 0:19:37:895:943 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 0:19:38:900:128 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-3-30 0:19:39:913:670 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 0:19:39:945:626 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-3-30 0:19:40:897:856 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 0:19:40:915:982 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 0:19:41:896:350 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 0:21:12:916:797 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 0:21:12:933:443 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..9e04073f --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_read_skew2_committed.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 0:21:26:105:741 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 0:21:27:104:547 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 0:21:28:108:650 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-3-30 0:21:29:122:261 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 0:21:29:155:83 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 0:21:29:169:870 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-3-30 0:21:30:106:238 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 0:21:30:124:128 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 0:23:1:125:733 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 0:23:1:143:258 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..87096e7b --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 0:16:0:522:206 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 0:16:1:521:81 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q3 finished at: 2022-3-30 0:16:2:542:860 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-3-30 0:16:3:522:780 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-3-30 0:16:3:538:775 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 0:16:3:555:641 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-3-30 0:16:4:539:690 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 0:16:4:555:911 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-3-30 0:17:35:541:639 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 0:17:35:558:206 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..3c43d21c --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 0:17:48:688:247 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 0:17:49:686:698 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q3 finished at: 2022-3-30 0:17:50:708:663 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-3-30 0:17:51:688:289 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-3-30 0:17:51:703:230 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 0:17:51:721:287 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-3-30 0:17:52:705:580 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 0:17:52:721:783 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-3-30 0:19:23:707:325 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 0:19:23:723:631 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_write_read_skew.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..3dd93911 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_write_read_skew.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:6:42:551:676 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:6:43:548:620 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 11:6:44:553:68 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 11:6:45:550:619 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 11:6:45:579:668 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-3-30 11:6:46:571:634 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 11:6:47:550:721 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 11:6:48:552:866 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 11:7:29:570:599 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 11:7:29:586:464 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..e2f0b73d --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 0:6:54:834:997 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 0:6:55:834:118 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 0:6:56:838:250 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 0:6:57:834:808 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 0:6:57:866:745 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 0:6:57:885:642 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-3-30 0:6:58:853:868 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 0:6:58:872:92 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 0:8:29:854:391 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 0:8:29:870:817 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_mda_step_rat.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_mda_step_rat.txt new file mode 100644 index 00000000..e8aaab13 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_mda_step_rat.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_rat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:11:56:146:229 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:11:57:145:798 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 11:11:58:143:970 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-3-30 11:11:59:151:101 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-3-30 11:12:0:146:861 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q6 finished at: 2022-3-30 11:12:0:183:372 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-3-30 11:12:1:146:581 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-3-30 11:12:1:177:765 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-3-30 11:12:2:164:150 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 11:12:2:181:259 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 11:12:3:149:903 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 11:12:4:146:776 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-3-30 11:12:14:165:850 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 11:12:14:181:461 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..db3d0a5f --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,208 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN;' + Q1 finished at: 2022-3-30 11:9:44:7:297 +Q2-T1 execute sql: 'BEGIN;' +Q2 finished at: 2022-3-30 11:9:45:6:730 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 11:9:46:6:596 + Q4-T2 execute sql: 'BEGIN;' + Q4 finished at: 2022-3-30 11:9:47:8:469 + Q5-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 11:9:48:30:195 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-3-30 11:9:49:9:142 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q7 finished at: 2022-3-30 11:9:50:24:791 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q8 finished at: 2022-3-30 11:9:50:59:790 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-3-30 11:9:51:9:19 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-3-30 11:9:52:25:160 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-3-30 11:9:53:8:964 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 11:9:54:10:566 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-3-30 11:9:55:6:324 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 11:10:5:7:476 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-3-30 11:10:5:41:396 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-3-30 11:10:5:57:186 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..476748d0 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:10:25:914:509 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:10:26:909:845 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 11:10:27:910:52 +Q4-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q4 finished at: 2022-3-30 11:10:28:912:343 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q5 finished at: 2022-3-30 11:10:29:912:346 + Q6-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q6 finished at: 2022-3-30 11:10:29:989:44 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-3-30 11:10:30:912:215 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-3-30 11:10:30:948:353 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-3-30 11:10:31:927:714 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 11:10:31:945:678 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 11:10:32:912:322 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 11:10:33:913:81 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-3-30 11:10:43:929:192 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 11:10:43:945:308 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..bd0e9d2d --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:11:11:390:150 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:11:12:389:354 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 11:11:13:389:549 +Q4-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q4 finished at: 2022-3-30 11:11:14:391:944 + Q5-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q5 finished at: 2022-3-30 11:11:15:391:500 + Q6-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q6 finished at: 2022-3-30 11:11:15:435:70 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-3-30 11:11:16:392:364 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-3-30 11:11:16:434:84 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-3-30 11:11:17:407:579 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 11:11:17:425:743 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 11:11:18:391:479 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 11:11:19:391:150 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-3-30 11:11:29:407:564 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 11:11:29:423:34 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_sda_dirty_read.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_sda_dirty_read.txt new file mode 100644 index 00000000..caf4d1f7 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_sda_dirty_read.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_dirty_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_dirty_read test run---------- + Q1-T2 execute sql: 'BEGIN;' + Q1 finished at: 2022-3-29 23:52:22:458:226 +Q2-T1 execute sql: 'BEGIN;' +Q2 finished at: 2022-3-29 23:52:23:459:409 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-29 23:52:23:479:289 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-3-29 23:52:24:475:931 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-3-29 23:52:25:459:686 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-29 23:52:26:458:409 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-3-29 23:53:57:478:828 + Q8-T3 execute sql: 'DROP TABLE t1;' + Q8 finished at: 2022-3-29 23:53:57:513:143 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_sda_intermediate_read.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..8444dd50 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_sda_intermediate_read.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-29 23:56:0:801:298 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-29 23:56:1:799:916 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-29 23:56:2:804:31 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-3-29 23:56:3:818:355 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-3-29 23:56:4:801:783 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-29 23:56:5:800:340 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-29 23:56:6:803:508 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-3-29 23:57:37:821:289 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-29 23:57:37:837:815 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..a41aed78 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-29 23:57:50:990:244 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-29 23:57:51:988:872 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-29 23:57:52:992:730 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-3-29 23:57:54:7:15 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-29 23:57:54:22:543 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-3-29 23:57:54:990:575 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-29 23:57:55:8:486 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-3-29 23:59:26:34:501 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-29 23:59:26:51:416 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_sda_lost_self_update.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..4bf09357 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_sda_lost_self_update.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 0:3:15:527:364 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 0:3:16:526:153 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 0:3:17:530:398 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-3-30 0:3:19:546:443 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-3-30 0:3:19:564:446 + Q4 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q4 failed at: 2022-3-30 0:3:19:964:449 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..7523331a --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_sda_non_repeatable_read.txt @@ -0,0 +1,56 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-29 23:54:10:630:679 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-29 23:54:11:630:669 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-29 23:54:12:650:385 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-3-29 23:54:13:630:945 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-3-29 23:54:14:648:468 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-29 23:54:15:631:330 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-29 23:54:16:630:963 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-3-29 23:55:47:649:750 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..6b4f92fb --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,56 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-29 23:59:39:184:813 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-29 23:59:40:183:354 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q3 finished at: 2022-3-29 23:59:41:205:128 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-3-29 23:59:42:184:755 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-29 23:59:42:201:389 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-3-29 23:59:43:202:123 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-29 23:59:43:218:327 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-3-30 0:1:14:204:232 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..2add5c74 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,58 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 0:1:27:334:874 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 0:1:28:333:304 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q3 finished at: 2022-3-30 0:1:29:355:723 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-3-30 0:1:30:340:174 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 0:1:30:357:772 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-3-30 0:1:31:352:35 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 0:1:31:368:250 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-3-30 0:3:2:354:53 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 0:3:2:370:531 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..582297b2 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 0:43:34:163:576 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 0:43:35:162:744 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 0:43:36:166:297 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 0:43:37:163:725 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-3-30 0:43:38:181:979 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 0:43:38:199:629 + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q5 failed at: 2022-3-30 0:43:38:699:570 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..02c56956 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:13:5:704:623 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:13:6:704:184 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 11:13:7:707:499 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-3-30 11:13:8:705:193 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-3-30 11:13:19:128:218 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q6 failed at: 2022-3-30 11:13:20:209:842 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..3eeaa006 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:13:34:881:442 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:13:35:881:822 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 11:13:36:885:428 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-3-30 11:13:37:882:61 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-3-30 11:13:48:305:126 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q6 failed at: 2022-3-30 11:13:49:386:796 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..972bfec3 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:14:6:591:210 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:14:7:590:432 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 11:14:8:594:354 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-3-30 11:14:9:592:297 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-3-30 11:14:20:12:853 +Q7 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q7 failed at: 2022-3-30 11:14:21:192:978 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..1266c54d --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:14:38:518:92 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:14:39:512:586 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 11:14:40:536:662 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-3-30 11:14:41:514:475 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 11:14:41:531:537 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 11:14:43:515:104 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q6 failed at: 2022-3-30 11:14:44:116:641 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..29b8f1b7 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 0:52:39:342:173 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 0:52:40:345:559 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 0:52:41:384:496 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-3-30 0:52:42:347:188 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 0:52:42:389:408 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 0:52:44:348:273 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q6 failed at: 2022-3-30 0:52:44:948:967 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..5f97a67b --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:15:12:828:221 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:15:13:830:597 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 11:15:14:831:219 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-3-30 11:15:15:845:880 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-3-30 11:15:16:828:231 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 11:15:16:845:664 + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q5 failed at: 2022-3-30 11:15:17:346:449 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..289ca181 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 0:56:18:655:861 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 0:56:19:659:575 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 0:56:20:659:62 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-3-30 0:56:21:705:341 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-3-30 0:56:22:656:727 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 0:56:24:658:541 + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q5 failed at: 2022-3-30 0:56:25:159:25 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..fa99a756 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:15:39:68:57 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:15:40:66:306 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 11:15:41:70:275 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-3-30 11:15:42:85:258 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-3-30 11:15:43:67:965 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 11:15:43:85:191 + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q5 failed at: 2022-3-30 11:15:43:585:673 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_mda_step_wat_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..b875d1a4 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_mda_step_wat_c1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:16:52:699:360 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:16:53:696:667 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 11:16:54:699:602 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-3-30 11:16:55:703:24 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q5 finished at: 2022-3-30 11:16:56:699:149 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-3-30 11:16:57:701:133 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q6 failed at: 2022-3-30 11:17:7:218:242 + Q8 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q8 failed at: 2022-3-30 11:17:8:420:290 +Q9 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q9 failed at: 2022-3-30 11:17:9:500:939 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_mda_step_wat_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..ef8172c2 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_mda_step_wat_c2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:18:12:810:897 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:18:13:807:884 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 11:18:14:808:934 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-3-30 11:18:15:810:698 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q5 finished at: 2022-3-30 11:18:16:808:861 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-3-30 11:18:17:811:98 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q6 failed at: 2022-3-30 11:18:27:326:356 + Q8 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q8 failed at: 2022-3-30 11:18:28:529:609 +Q9 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q9 failed at: 2022-3-30 11:18:29:609:100 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..095c211b --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,43 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:18:45:773:291 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:18:46:773:746 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 11:18:47:775:459 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-3-30 11:18:49:773:473 + Q4 finished at: 2022-3-30 11:18:49:775:57 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 11:18:50:775:833 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-3-30 11:19:0:790:313 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 11:19:0:805:123 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..a9597cb9 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,29 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 0:32:40:453:128 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 0:32:41:451:968 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 0:32:42:456:94 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-3-30 0:32:44:455:106 + Q4 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q4 failed at: 2022-3-30 0:32:44:854:998 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_sda_full_write.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_sda_full_write.txt new file mode 100644 index 00000000..a0da25f8 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_sda_full_write.txt @@ -0,0 +1,31 @@ +#### db_type: ob #### +#### test_type: sda_full_write #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:19:30:198:19 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:19:31:196:274 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 11:19:32:198:117 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-3-30 11:19:34:195:436 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-3-30 11:19:34:212:24 + Q4 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q4 failed at: 2022-3-30 11:19:34:614:101 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_sda_full_write_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..c725e4c6 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_sda_full_write_committed.txt @@ -0,0 +1,31 @@ +#### db_type: ob #### +#### test_type: sda_full_write_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 0:36:18:723:28 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 0:36:19:721:737 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 0:36:20:726:57 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-3-30 0:36:22:723:678 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 0:36:22:741:759 + Q4 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q4 failed at: 2022-3-30 0:36:23:141:663 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..4117d4d7 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:20:19:766:653 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:20:20:767:415 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 11:20:21:769:612 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-3-30 11:20:23:783:771 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 11:20:23:801:128 + Q4 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q4 failed at: 2022-3-30 11:20:24:202:901 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_sda_lost_update_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..2fce26a0 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_sda_lost_update_c1.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 11:21:11:470:244 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 11:21:12:471:700 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q3 finished at: 2022-3-30 11:21:13:487:967 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-3-30 11:21:14:474:65 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 11:21:16:474:820 +Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q5 failed at: 2022-3-30 11:21:16:975:645 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_sda_lost_update_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..82ac4dc9 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/repeatable-read/wat_sda_lost_update_c2.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 0:39:55:991:362 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 0:39:56:990:82 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q3 finished at: 2022-3-30 0:39:58:11:427 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-3-30 0:39:58:991:855 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 0:40:0:992:646 +Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q5 failed at: 2022-3-30 0:40:1:494:60 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/result_summary/read-committed_total-result.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..a5e025b4 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Timeout + +wat_dda_full_write_skew_c2: Timeout + +wat_dda_full_write_skew_committed: Timeout + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Timeout + +wat_mda_step_wat_c2: Timeout + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/result_summary/repeatable-read_total-result.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/result_summary/repeatable-read_total-result.txt new file mode 100644 index 00000000..4139416e --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/result_summary/repeatable-read_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Rollback + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Rollback + +wat_sda_full_write: Rollback + +wat_sda_full_write_committed: Rollback + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Rollback + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Timeout + +wat_dda_full_write_skew_c2: Timeout + +wat_dda_full_write_skew_committed: Timeout + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Timeout + +wat_mda_step_wat_c2: Timeout + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/result_summary/serializable_total-result.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/result_summary/serializable_total-result.txt new file mode 100644 index 00000000..4139416e --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/result_summary/serializable_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Rollback + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Rollback + +wat_sda_full_write: Rollback + +wat_sda_full_write_committed: Rollback + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Rollback + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Timeout + +wat_dda_full_write_skew_c2: Timeout + +wat_dda_full_write_skew_committed: Timeout + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Timeout + +wat_mda_step_wat_c2: Timeout + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_dda_read_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..204724fe --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_dda_read_skew_committed.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:51:4:827:349 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:51:5:826:672 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 21:51:6:847:499 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 21:51:7:829:310 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 21:51:7:844:657 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 21:51:7:861:384 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-3-30 21:51:8:845:962 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 21:51:8:862:460 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 21:51:18:909:858 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 21:51:18:923:378 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..705a7fab --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:51:42:373:770 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:51:43:372:521 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 21:51:44:392:119 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-3-30 21:51:45:376:15 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 21:51:45:388:875 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 21:51:45:404:120 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q7 failed at: 2022-3-30 21:51:47:75:482 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_dda_write_skew.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_dda_write_skew.txt new file mode 100644 index 00000000..6f9c0436 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_dda_write_skew.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:52:8:29:236 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:52:9:30:452 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 21:52:10:46:240 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-3-30 21:52:11:47:67 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 21:52:11:63:488 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-3-30 21:52:12:28:524 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 21:52:12:44:861 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 21:52:13:30:531 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 21:52:23:41:9 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 21:52:23:53:49 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_dda_write_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..3b4ab581 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_dda_write_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:53:30:864:359 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:53:31:865:477 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 21:53:32:883:185 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-3-30 21:53:33:884:47 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 21:53:33:904:475 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 21:53:33:921:743 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-3-30 21:53:34:865:329 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 21:53:34:881:536 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 21:53:44:883:418 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 21:53:44:898:149 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..66a6884d --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,73 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:52:35:313:361 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:52:36:316:62 +Q3-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q3 finished at: 2022-3-30 21:52:37:332:843 +Q4-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q4 finished at: 2022-3-30 21:52:37:347:322 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-3-30 21:52:38:337:437 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-3-30 21:52:38:354:941 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 21:52:38:374:258 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 21:52:39:315:318 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-3-30 21:52:49:328:992 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-3-30 21:52:49:359:44 + Q11-T3 execute sql: 'DROP TABLE mytab;' + Q11 finished at: 2022-3-30 21:52:49:390:186 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 21:52:49:404:449 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..86dad322 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:53:1:830:45 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:53:2:827:725 +Q3-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q3 finished at: 2022-3-30 21:53:3:851:121 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-3-30 21:53:4:845:543 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-3-30 21:53:4:861:722 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 21:53:4:878:59 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-3-30 21:53:5:830:688 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 21:53:5:850:293 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-3-30 21:53:15:847:916 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 21:53:15:863:371 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_mda_step_iat.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_mda_step_iat.txt new file mode 100644 index 00000000..a56adf4a --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_mda_step_iat.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_iat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:54:1:993:807 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:54:2:992:78 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 21:54:3:991:210 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q4 finished at: 2022-3-30 21:54:5:11:546 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 21:54:6:12:141 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-3-30 21:54:7:9:41 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-3-30 21:54:8:60:976 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-3-30 21:54:8:992:626 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-3-30 21:54:9:991:861 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 21:54:10:994:210 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 21:54:11:994:751 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 21:54:12:993:234 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-3-30 21:54:23:13:131 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 21:54:23:29:605 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..15bba300 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,107 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:58:7:877:770 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:58:8:879:98 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 21:58:9:879:508 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q4 finished at: 2022-3-30 21:58:10:896:67 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 21:58:11:882:11 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 21:58:11:899:641 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-3-30 21:58:12:897:18 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-3-30 21:58:12:912:783 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 21:58:12:930:167 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-3-30 21:58:13:894:669 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-3-30 21:58:13:908:721 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-3-30 21:58:23:893:198 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-3-30 21:58:23:906:628 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..9172e92d --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,208 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:56:20:115:620 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:56:21:118:547 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 21:56:22:118:962 + Q4-T4 execute sql: 'BEGIN;' + Q4 finished at: 2022-3-30 21:56:23:116:80 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q5 finished at: 2022-3-30 21:56:24:134:167 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q6 finished at: 2022-3-30 21:56:25:140:214 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7 finished at: 2022-3-30 21:56:26:123:311 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 21:56:26:142:437 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-3-30 21:56:27:116:954 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 21:56:27:133:9 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-3-30 21:56:28:137:625 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 21:56:28:154:227 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-3-30 21:56:29:131:245 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-3-30 21:56:29:144:739 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-3-30 21:56:39:136:314 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-3-30 21:56:39:151:817 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..07e27489 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:54:35:993:653 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:54:36:993:252 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 21:54:37:996:226 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q4 finished at: 2022-3-30 21:54:39:22:148 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 21:54:40:12:535 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-3-30 21:54:41:17:188 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-3-30 21:54:41:995:233 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-3-30 21:54:42:994:195 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-3-30 21:54:43:996:948 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 21:54:44:996:0 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 21:54:45:995:519 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 21:54:46:998:854 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-3-30 21:54:57:7:973 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 21:54:57:20:775 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..9d606181 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:55:11:263:422 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:55:12:262:919 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 21:55:13:261:956 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,0) + (5) expected_result: + (2,0) + (6) expected_result: + (2,0) + +Q4 finished at: 2022-3-30 21:55:14:284:484 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,0) + *(6) expected_result: + null + + Q5 finished at: 2022-3-30 21:55:15:282:787 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,0) + *(2) expected_result: + null + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-3-30 21:55:16:280:557 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-3-30 21:55:17:265:14 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-3-30 21:55:18:263:717 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-3-30 21:55:19:262:912 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 21:55:20:266:134 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 21:55:21:265:646 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 21:55:22:264:247 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + *(1) expected_result: + (0,0) (1,0) (2,0) + *(2) expected_result: + (0,0) (1,0) (2,0) + *(3) expected_result: + (0,0) (1,0) (2,0) + *(4) expected_result: + (0,0) (1,0) (2,0) + *(5) expected_result: + (0,0) (1,0) (2,0) + *(6) expected_result: + (0,0) (1,0) (2,0) + + Q13 finished at: 2022-3-30 21:55:32:279:643 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 21:55:32:293:512 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..56f1320d --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,139 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:59:3:201:955 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:59:4:200:71 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 21:59:5:201:126 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q4 finished at: 2022-3-30 21:59:6:222:526 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q5 finished at: 2022-3-30 21:59:6:257:424 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-3-30 21:59:7:219:880 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-3-30 21:59:7:235:416 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 21:59:7:251:724 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-3-30 21:59:8:220:239 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-3-30 21:59:8:251:295 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 21:59:8:266:620 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-3-30 21:59:9:202:957 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-3-30 21:59:9:220:863 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-3-30 21:59:19:219:125 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-3-30 21:59:19:234:222 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..b138bf84 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,163 @@ +#### db_type: ob #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:55:48:244:662 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:55:49:238:447 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 21:55:50:240:570 +Q4-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q4 finished at: 2022-3-30 21:55:51:258:761 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q5 finished at: 2022-3-30 21:55:52:256:706 + Q6-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-3-30 21:55:52:271:653 + Q7-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q7 finished at: 2022-3-30 21:55:52:300:642 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-3-30 21:55:52:314:773 + Q9-T2 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 21:55:52:330:656 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-3-30 21:55:53:265:364 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-3-30 21:55:53:281:256 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-3-30 21:55:53:313:864 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-3-30 21:55:53:329:613 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 21:55:53:347:104 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-3-30 21:55:54:256:662 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-3-30 21:55:54:271:468 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-3-30 21:56:4:258:292 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-3-30 21:56:4:273:442 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_sda_lost_update_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..0c8c95a3 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_sda_lost_update_committed.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:50:39:167:709 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:50:40:168:966 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q3 finished at: 2022-3-30 21:50:41:183:891 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-3-30 21:50:42:170:958 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 21:50:42:186:612 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q6 failed at: 2022-3-30 21:50:43:768:225 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..f45bf00c --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,59 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:50:14:286:484 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:50:15:288:510 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 21:50:16:305:268 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-3-30 21:50:17:291:968 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 21:50:17:309:23 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-3-30 21:50:18:302:672 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 21:50:18:316:230 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-3-30 21:50:28:346:409 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 21:50:28:402:12 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_double_write_skew1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..61b1beb9 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_double_write_skew1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:29:55:344:402 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:29:56:344:722 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 21:29:57:347:492 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 21:29:58:345:911 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 21:29:58:377:246 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 21:30:0:347:73 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q6 failed at: 2022-3-30 21:30:0:947:757 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..c3f45324 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:30:35:754:772 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:30:36:757:609 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 21:30:37:757:640 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 21:30:38:758:450 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 21:30:38:791:465 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 21:30:38:808:713 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q7 failed at: 2022-3-30 21:30:40:457:675 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_double_write_skew2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..b0c2b398 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_double_write_skew2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:31:8:324:255 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:31:9:325:111 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 21:31:10:327:761 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 21:31:11:326:792 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-3-30 21:31:12:340:232 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 21:31:12:355:106 + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q5 failed at: 2022-3-30 21:31:12:855:81 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_read_skew.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_read_skew.txt new file mode 100644 index 00000000..9c3e0e65 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_read_skew.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:31:39:836:108 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:31:40:838:555 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 21:31:41:856:771 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 21:31:42:836:700 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 21:31:42:852:546 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-3-30 21:31:43:855:156 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 21:31:44:837:201 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 21:31:45:836:241 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 21:31:55:855:334 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 21:31:55:871:302 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_read_skew2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_read_skew2.txt new file mode 100644 index 00000000..cbd71093 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_read_skew2.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:33:17:605:391 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:33:18:605:432 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 21:33:19:608:492 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-3-30 21:33:20:622:527 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 21:33:20:651:557 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-3-30 21:33:21:605:829 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 21:33:21:620:926 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 21:33:22:605:974 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 21:33:32:625:509 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 21:33:32:641:33 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..65207f8e --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_read_skew2_committed.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:33:55:489:529 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:33:56:488:655 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 21:33:57:490:998 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-3-30 21:33:58:507:255 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 21:33:58:539:33 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 21:33:58:553:584 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-3-30 21:33:59:488:596 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 21:33:59:504:27 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 21:34:9:511:325 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 21:34:9:527:590 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..2be6d448 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,62 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:32:11:105:306 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:32:12:104:343 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q3 finished at: 2022-3-30 21:32:13:125:498 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-3-30 21:32:14:106:26 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-3-30 21:32:14:123:12 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 21:32:14:141:638 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-3-30 21:32:15:122:723 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 21:32:15:139:450 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-3-30 21:32:25:121:524 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 21:32:25:137:282 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..e143335e --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:32:50:69:28 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:32:51:70:757 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q3 finished at: 2022-3-30 21:32:52:89:265 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-3-30 21:32:53:75:385 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-3-30 21:32:53:91:848 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 21:32:53:109:967 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-3-30 21:32:54:84:904 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 21:32:54:99:198 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-3-30 21:33:4:88:630 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 21:33:4:103:993 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_write_read_skew.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..a36a90ec --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_write_read_skew.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:28:24:902:362 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:28:25:902:434 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 21:28:26:905:469 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 21:28:27:904:171 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 21:28:27:936:556 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-3-30 21:28:28:920:537 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 21:28:29:904:633 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 21:28:30:904:868 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 21:28:40:919:786 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 21:28:40:935:375 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..c76cea69 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,60 @@ +#### db_type: ob #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:29:6:764:540 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:29:7:764:117 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 21:29:8:769:403 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 21:29:9:773:13 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 21:29:9:806:179 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 21:29:9:822:353 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-3-30 21:29:10:782:389 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 21:29:10:799:155 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-3-30 21:29:20:780:521 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-3-30 21:29:20:794:287 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_mda_step_rat.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_mda_step_rat.txt new file mode 100644 index 00000000..0a56bf75 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_mda_step_rat.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_rat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:34:55:425:811 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:34:56:427:987 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 21:34:57:426:371 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-3-30 21:34:58:428:444 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-3-30 21:34:59:428:742 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q6 finished at: 2022-3-30 21:34:59:466:571 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-3-30 21:35:0:427:149 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-3-30 21:35:0:458:588 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-3-30 21:35:1:441:320 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 21:35:1:457:408 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 21:35:2:430:467 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 21:35:3:428:717 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-3-30 21:35:13:447:363 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 21:35:13:462:302 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..65510760 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,208 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN;' + Q1 finished at: 2022-3-30 21:35:29:335:592 +Q2-T1 execute sql: 'BEGIN;' +Q2 finished at: 2022-3-30 21:35:30:329:633 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 21:35:31:330:934 + Q4-T2 execute sql: 'BEGIN;' + Q4 finished at: 2022-3-30 21:35:32:330:954 + Q5-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q5 finished at: 2022-3-30 21:35:33:350:436 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-3-30 21:35:34:331:606 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q7 finished at: 2022-3-30 21:35:35:348:843 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q8 finished at: 2022-3-30 21:35:35:377:878 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-3-30 21:35:36:333:157 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-3-30 21:35:37:347:951 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-3-30 21:35:38:332:365 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 21:35:39:333:813 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-3-30 21:35:40:331:164 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 21:35:50:331:994 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-3-30 21:35:50:363:933 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-3-30 21:35:50:378:455 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..01d60eaa --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,108 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:36:14:985:144 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:36:15:982:248 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 21:36:16:982:344 +Q4-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q4 finished at: 2022-3-30 21:36:17:985:666 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q5 finished at: 2022-3-30 21:36:18:984:560 + Q6-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q6 finished at: 2022-3-30 21:36:19:17:478 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-3-30 21:36:19:983:778 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-3-30 21:36:20:17:364 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-3-30 21:36:21:1:425 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 21:36:21:19:132 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 21:36:21:985:121 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 21:36:22:990:221 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-3-30 21:36:33:1:273 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 21:36:33:16:480 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..38fbbd23 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,105 @@ +#### db_type: ob #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:36:49:204:240 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:36:50:205:387 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 21:36:51:204:310 +Q4-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q4 finished at: 2022-3-30 21:36:52:206:275 + Q5-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q5 finished at: 2022-3-30 21:36:53:207:576 + Q6-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q6 finished at: 2022-3-30 21:36:53:244:255 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-3-30 21:36:54:206:164 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-3-30 21:36:54:239:84 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-3-30 21:36:55:221:967 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-3-30 21:36:55:238:750 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-3-30 21:36:56:207:630 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-3-30 21:36:57:206:615 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-3-30 21:37:7:220:575 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-3-30 21:37:7:234:147 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_sda_dirty_read.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_sda_dirty_read.txt new file mode 100644 index 00000000..d7cb261b --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_sda_dirty_read.txt @@ -0,0 +1,45 @@ +#### db_type: ob #### +#### test_type: sda_dirty_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_dirty_read test run---------- + Q1-T2 execute sql: 'BEGIN;' + Q1 finished at: 2022-3-30 21:25:23:926:179 +Q2-T1 execute sql: 'BEGIN;' +Q2 finished at: 2022-3-30 21:25:24:925:271 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 21:25:24:941:995 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-3-30 21:25:25:945:381 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-3-30 21:25:26:925:854 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 21:25:27:926:477 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-3-30 21:25:37:942:44 + Q8-T3 execute sql: 'DROP TABLE t1;' + Q8 finished at: 2022-3-30 21:25:37:973:912 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_sda_intermediate_read.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..dad62d72 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_sda_intermediate_read.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:26:27:770:639 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:26:28:770:843 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 21:26:29:773:714 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-3-30 21:26:30:788:991 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-3-30 21:26:31:770:894 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 21:26:32:771:167 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 21:26:33:772:911 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-3-30 21:26:43:792:935 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 21:26:43:809:616 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..290f4fe4 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,52 @@ +#### db_type: ob #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:26:59:419:986 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:27:0:422:489 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 21:27:1:423:961 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-3-30 21:27:2:440:404 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 21:27:2:455:908 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-3-30 21:27:3:420:630 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 21:27:3:436:665 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-3-30 21:27:13:439:775 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 21:27:13:454:440 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..df4dbad5 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_sda_non_repeatable_read.txt @@ -0,0 +1,56 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:25:58:504:858 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:25:59:504:573 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 21:26:0:523:522 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-3-30 21:26:1:507:392 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-3-30 21:26:2:520:517 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 21:26:3:507:24 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 21:26:4:505:241 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-3-30 21:26:14:522:816 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..903a0e81 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,56 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:27:25:365:372 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:27:26:363:367 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q3 finished at: 2022-3-30 21:27:27:390:185 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-3-30 21:27:28:366:163 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 21:27:28:381:333 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-3-30 21:27:29:382:504 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 21:27:29:397:467 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-3-30 21:27:39:384:433 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..8486d10b --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,58 @@ +#### db_type: ob #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:27:49:951:473 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:27:50:951:261 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q3 finished at: 2022-3-30 21:27:51:972:856 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-3-30 21:27:52:953:984 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-3-30 21:27:52:971:498 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-3-30 21:27:53:968:414 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 21:27:53:983:584 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-3-30 21:28:3:970:856 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-3-30 21:28:3:986:31 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..6594e95d --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:42:41:561:249 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:42:42:563:529 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 21:42:43:564:856 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-3-30 21:42:44:565:588 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-3-30 21:42:45:577:599 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 21:42:45:593:318 + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q5 failed at: 2022-3-30 21:42:46:95:559 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..a0bce9a5 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:43:9:821:357 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:43:10:824:242 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 21:43:11:824:717 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-3-30 21:43:12:826:172 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-3-30 21:43:23:256:783 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q6 failed at: 2022-3-30 21:43:24:323:606 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..4d0a8bf2 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:43:38:252:72 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:43:39:252:71 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 21:43:40:253:536 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-3-30 21:43:41:253:750 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-3-30 21:43:51:679:167 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q6 failed at: 2022-3-30 21:43:52:759:667 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..c94c5313 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,33 @@ +#### db_type: ob #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:44:4:675:265 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:44:5:675:718 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 21:44:6:678:241 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-3-30 21:44:7:677:529 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q5 failed at: 2022-3-30 21:44:18:96:42 +Q7 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q7 failed at: 2022-3-30 21:44:19:276:733 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..30b92a15 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:46:5:230:649 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:46:6:226:528 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 21:46:7:250:678 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-3-30 21:46:8:230:251 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 21:46:8:243:333 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 21:46:10:229:236 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q6 failed at: 2022-3-30 21:46:10:831:614 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..7fc958f9 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:46:54:306:785 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:46:55:305:469 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q3 finished at: 2022-3-30 21:46:56:324:403 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-3-30 21:46:57:309:688 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-3-30 21:46:57:326:894 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 21:46:59:308:101 +Q6 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q6 failed at: 2022-3-30 21:46:59:909:25 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..9b2c3940 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:47:26:270:928 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:47:27:268:177 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 21:47:28:273:963 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-3-30 21:47:29:285:702 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-3-30 21:47:30:271:404 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 21:47:30:289:591 + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q5 failed at: 2022-3-30 21:47:30:788:577 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..3cf6a8fe --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:47:57:255:998 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:47:58:256:851 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 21:47:59:257:16 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-3-30 21:48:0:274:456 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-3-30 21:48:1:254:833 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 21:48:3:256:438 + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q5 failed at: 2022-3-30 21:48:3:758:291 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..241c21d2 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:48:23:576:583 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:48:24:577:426 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 21:48:25:579:259 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-3-30 21:48:26:599:303 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-3-30 21:48:27:577:138 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-3-30 21:48:27:592:673 + Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q5 failed at: 2022-3-30 21:48:28:94:924 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_mda_step_wat_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..d993c679 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_mda_step_wat_c1.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:48:49:665:885 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:48:50:666:38 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 21:48:51:666:630 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-3-30 21:48:52:669:140 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q5 finished at: 2022-3-30 21:48:53:666:935 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-3-30 21:48:54:668:916 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q6 failed at: 2022-3-30 21:49:4:191:381 + Q8 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q8 failed at: 2022-3-30 21:49:5:392:130 +Q9 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q9 failed at: 2022-3-30 21:49:6:472:577 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_mda_step_wat_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..ef055556 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_mda_step_wat_c2.txt @@ -0,0 +1,41 @@ +#### db_type: ob #### +#### test_type: mda_step_wat_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:49:19:67:710 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:49:20:71:194 + Q3-T3 execute sql: 'BEGIN;' + Q3 finished at: 2022-3-30 21:49:21:69:855 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-3-30 21:49:22:70:386 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q5 finished at: 2022-3-30 21:49:23:73:163 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-3-30 21:49:24:72:586 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q6 failed at: 2022-3-30 21:49:33:597:910 + Q8 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 + Q8 failed at: 2022-3-30 21:49:34:797:675 +Q9 failed reason: [ma-2.0.3][5.6.25]ORA-30006: resource busy; acquire with WAIT timeout expired errcode: HY000 +Q9 failed at: 2022-3-30 21:49:35:879:744 + +Test Result: Timeout +Reason: Transaction execution timeout + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..e7d202d2 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,43 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:37:22:83:278 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:37:23:85:400 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 21:37:24:86:555 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-3-30 21:37:26:83:672 + Q4 finished at: 2022-3-30 21:37:26:85:518 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 21:37:27:87:589 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-3-30 21:37:37:106:34 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-3-30 21:37:37:123:347 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..2009a5e9 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,29 @@ +#### db_type: ob #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:37:51:712:884 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:37:52:712:593 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 21:37:53:715:788 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-3-30 21:37:55:714:857 + Q4 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q4 failed at: 2022-3-30 21:37:56:115:344 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_sda_full_write.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_sda_full_write.txt new file mode 100644 index 00000000..03ab38cd --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_sda_full_write.txt @@ -0,0 +1,31 @@ +#### db_type: ob #### +#### test_type: sda_full_write #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:38:54:267:720 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:38:55:269:968 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 21:38:56:270:504 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-3-30 21:38:58:268:336 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-3-30 21:38:58:284:133 + Q4 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q4 failed at: 2022-3-30 21:38:58:687:33 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_sda_full_write_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..4cc674fa --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_sda_full_write_committed.txt @@ -0,0 +1,31 @@ +#### db_type: ob #### +#### test_type: sda_full_write_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:39:33:626:200 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:39:34:622:53 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 21:39:35:625:690 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-3-30 21:39:37:623:109 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 21:39:37:639:257 + Q4 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q4 failed at: 2022-3-30 21:39:38:40:681 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..3a955931 --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:41:35:538:731 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:41:36:539:743 +Q3-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q3 finished at: 2022-3-30 21:41:37:541:759 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-3-30 21:41:39:559:409 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-3-30 21:41:39:578:779 + Q4 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 + Q4 failed at: 2022-3-30 21:41:39:979:744 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_sda_lost_update_c1.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..179f308e --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_sda_lost_update_c1.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:40:7:744:814 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:40:8:743:374 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q3 finished at: 2022-3-30 21:40:9:765:153 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-3-30 21:40:10:745:992 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-3-30 21:40:12:745:775 +Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q5 failed at: 2022-3-30 21:40:13:247:486 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_sda_lost_update_c2.txt b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..ca66513b --- /dev/null +++ b/test_result/distributed_result/ob_oracle_test/ob_oracle_single/serializable/wat_sda_lost_update_c2.txt @@ -0,0 +1,38 @@ +#### db_type: ob #### +#### test_type: sda_lost_update_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN;' +Q1 finished at: 2022-3-30 21:40:41:85:411 + Q2-T2 execute sql: 'BEGIN;' + Q2 finished at: 2022-3-30 21:40:42:84:862 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q3 finished at: 2022-3-30 21:40:43:103:208 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-3-30 21:40:44:87:565 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-3-30 21:40:46:87:401 +Q5 failed reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction errcode: 25000 +Q5 failed at: 2022-3-30 21:40:46:588:83 + +Test Result: Rollback +Reason: [ma-2.0.3][5.6.25]ORA-08177: can't serialize access for this transaction + diff --git a/test_result/distributed_result/readme.txt b/test_result/distributed_result/readme.txt new file mode 100644 index 00000000..2be4d524 --- /dev/null +++ b/test_result/distributed_result/readme.txt @@ -0,0 +1,6 @@ +ob: Oceanbase +crdb: CockroachDB +gp: greenplum + +single: centrailized test +dist: distributed test \ No newline at end of file diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_dda_read_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..7f3a83c6 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,73 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:26:20:661:649 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-23 22:26:20:700:288 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:26:21:696:330 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-23 22:26:21:732:617 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-23 22:26:21:767:754 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 22:26:21:802:615 +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q7 finished at: 2022-4-23 22:26:22:699:857 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 22:26:22:738:400 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-23 22:26:42:699:695 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-23 22:26:42:738:554 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + (2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-23 22:26:42:777:367 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 22:26:42:815:901 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..2b5c0f97 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,66 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:26:47:110:74 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-23 22:26:47:148:851 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:26:48:144:683 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-23 22:26:48:180:697 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-23 22:26:48:215:759 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 22:26:48:250:615 +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-4-23 22:26:49:148:548 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 22:26:49:187:266 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-23 22:27:9:148:90 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-23 22:27:9:186:942 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + (1) expected_result: + (1,3,1,2) + (2) expected_result: + (1,3,1,2) + + Q11 finished at: 2022-4-23 22:27:9:225:595 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 22:27:9:263:892 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_dda_write_skew.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..cd1b51b7 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,73 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:27:13:559:594 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-23 22:27:13:598:216 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:27:14:594:245 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,3,1,1) + (2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-23 22:27:14:632:336 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-23 22:27:14:667:554 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-4-23 22:27:15:597:836 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 22:27:15:636:489 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-23 22:27:16:594:506 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-23 22:27:36:597:627 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-23 22:27:36:636:508 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-23 22:27:36:675:181 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 22:27:36:713:621 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_dda_write_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..531db3ef --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,73 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:28:33:757:520 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-23 22:28:33:796:503 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:28:34:792:261 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,3,1,1) + (2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-23 22:28:34:827:583 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-23 22:28:34:862:868 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 22:28:34:897:732 +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-4-23 22:28:35:795:771 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 22:28:35:834:260 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-23 22:28:55:795:465 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-23 22:28:55:834:321 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-23 22:28:55:873:197 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 22:28:55:911:586 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..1bccf08e --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,75 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL PRIMARY KEY);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:27:40:974:420 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-23 22:27:41:13:174 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-23 22:27:41:51:272 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-23 22:27:42:8:988 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (,) + (1) expected_result: + (330,) + (2) expected_result: + (300,) + + Q5 finished at: 2022-4-23 22:27:42:44:354 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-23 22:27:42:79:474 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 22:27:42:114:828 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 22:27:43:13:142 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-23 22:28:3:12:548 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-23 22:28:3:51:453 + Q11-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q11 finished at: 2022-4-23 22:28:3:90:80 + Q12-T3 execute sql: 'DROP TABLE mytab;' + Q12 finished at: 2022-4-23 22:28:3:146:870 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-23 22:28:3:184:928 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..ca9201b4 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,62 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:28:7:381:599 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-23 22:28:7:420:237 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:28:8:419:874 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + null + (1) expected_result: + (checking,500,) (saving,1400,) + (2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-23 22:28:8:457:723 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-23 22:28:9:420:594 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 22:28:9:458:996 + Q5 finished at: 2022-4-23 22:28:9:459:555 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 22:28:9:494:759 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-23 22:28:29:381:624 + Q10-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q10 finished at: 2022-4-23 22:28:29:420:781 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-23 22:28:29:459:120 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_mda_step_iat.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..612576f6 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,129 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:29:0:246:448 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + (2,0,2,1) + (5) expected_result: + (2,0,2,1) + (6) expected_result: + (2,0,2,1) + +Q2 finished at: 2022-4-23 22:29:0:285:134 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:29:1:280:993 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + null + (1) expected_result: + (0,1,0,,3) + (2) expected_result: + (0,1,0,3) + (3) expected_result: + (0,1,0,0) + (4) expected_result: + (0,1,0,0) + (5) expected_result: + (0,1,0,3) + (6) expected_result: + (0,1,0,0) + + Q4 finished at: 2022-4-23 22:29:1:317:705 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-23 22:29:2:284:455 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + null + (1) expected_result: + (1,3,1,1) + (2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + (5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-4-23 22:29:2:323:516 +Q7-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q7 finished at: 2022-4-23 22:29:3:284:602 + Q8-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q8 finished at: 2022-4-23 22:29:4:281:510 + Q9-T3 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q9 finished at: 2022-4-23 22:29:5:285:159 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-23 22:29:6:285:15 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-23 22:29:7:281:251 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 22:29:8:284:667 + Q13-T4 execute opt: 'BEGIN' + Q13 finished at: 2022-4-23 22:29:28:282:103 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) (2,0,2,0) + (1) expected_result: + (0,1,0,3) (2,0,2,1) + (2) expected_result: + (0,1,0,3) (2,0,2,1) + (3) expected_result: + (0,1,0,3) (2,0,2,1) + (4) expected_result: + (0,1,0,3) (2,0,2,1) + (5) expected_result: + (0,1,0,3) (2,0,2,1) + (6) expected_result: + (0,1,0,3) (2,0,2,1) + + Q14 finished at: 2022-4-23 22:29:28:318:330 + Q15-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + (2) expected_result: + (1,3,1,1) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + (5) expected_result: + (1,3,1,1) + (6) expected_result: + (1,3,1,1) + + Q15 finished at: 2022-4-23 22:29:28:354:530 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-23 22:29:28:390:300 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..f44e1d07 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,126 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:31:34:464:623 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + (3) expected_result: + (0,1,0,3) + (4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-23 22:31:34:503:772 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:31:35:499:309 + Q4-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q4 finished at: 2022-4-23 22:31:35:536:172 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-23 22:31:35:571:68 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-23 22:31:36:502:715 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,0) + (3) expected_result: + (0,1,0,3) + (4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,0) + + Q7 finished at: 2022-4-23 22:31:36:541:884 + Q8-T3 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q8 finished at: 2022-4-23 22:31:36:580:613 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 22:31:36:619:89 +Q10-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,0) + (5) expected_result: + (1,3,1,1) + (6) expected_result: + (1,3,1,1) + +Q10 finished at: 2022-4-23 22:31:37:503:161 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-23 22:31:37:541:716 + Q12-T4 execute opt: 'BEGIN' + Q12 finished at: 2022-4-23 22:31:57:500:294 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,3) + (3) expected_result: + (0,1,0,3) + (4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,3) + (6) expected_result: + (0,1,0,3) + + Q13 finished at: 2022-4-23 22:31:57:536:531 + Q14-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + (2) expected_result: + (1,3,1,1) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + (5) expected_result: + (1,3,1,1) + (6) expected_result: + (1,3,1,1) + + Q14 finished at: 2022-4-23 22:31:57:573:321 + Q15-T4 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-23 22:31:57:609:82 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..585de452 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,243 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:31:5:16:876 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + *(5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,3) + (7) expected_result: + (0,1,0,3) + *(8) expected_result: + (0,1,0,0) + (9) expected_result: + (0,1,0,3) + (10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,0) + (12) expected_result: + (0,1,0,3) + (13) expected_result: + (0,1,0,3) + (14) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-23 22:31:5:55:824 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:31:6:51:291 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + (3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,1) + (5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,0) + (7) expected_result: + (1,3,1,0) + (8) expected_result: + (1,3,1,1) + (9) expected_result: + (1,3,1,0) + (10) expected_result: + (1,3,1,1) + (11) expected_result: + (1,3,1,1) + (12) expected_result: + (1,3,1,1) + (13) expected_result: + (1,3,1,1) + (14) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-23 22:31:6:88:145 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-23 22:31:7:54:985 + Q6-T3 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q6 finished at: 2022-4-23 22:31:7:93:895 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 22:31:7:133:509 + Q8-T4 execute opt: 'BEGIN' + Q8 finished at: 2022-4-23 22:31:8:52:338 + Q9-T4 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q9 finished at: 2022-4-23 22:31:8:88:672 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 22:31:8:124:529 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,0) + (3) expected_result: + (0,1,0,3) + (4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,0) + (7) expected_result: + (0,1,0,0) + (8) expected_result: + (0,1,0,0) + (9) expected_result: + (0,1,0,3) + (10) expected_result: + (0,1,0,3) + (11) expected_result: + (0,1,0,3) + (12) expected_result: + (0,1,0,0) + (13) expected_result: + (0,1,0,3) + (14) expected_result: + (0,1,0,3) + + Q11 finished at: 2022-4-23 22:31:9:52:566 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 22:31:9:87:799 +Q13-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,0) + *(4) expected_result: + (1,3,1,0) + (5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,0) + (7) expected_result: + (1,3,1,1) + (8) expected_result: + (1,3,1,1) + *(9) expected_result: + (1,3,1,0) + (10) expected_result: + (1,3,1,1) + (11) expected_result: + (1,3,1,1) + (12) expected_result: + (1,3,1,1) + *(13) expected_result: + (1,3,1,0) + (14) expected_result: + (1,3,1,1) + +Q13 finished at: 2022-4-23 22:31:10:55:560 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-23 22:31:10:94:278 + Q15-T5 execute opt: 'BEGIN' + Q15 finished at: 2022-4-23 22:31:30:53:524 + Q16-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,3) + (3) expected_result: + (0,1,0,3) + (4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,3) + (6) expected_result: + (0,1,0,3) + (7) expected_result: + (0,1,0,3) + (8) expected_result: + (0,1,0,3) + (9) expected_result: + (0,1,0,3) + (10) expected_result: + (0,1,0,3) + (11) expected_result: + (0,1,0,3) + (12) expected_result: + (0,1,0,3) + (13) expected_result: + (0,1,0,3) + (14) expected_result: + (0,1,0,3) + + Q16 finished at: 2022-4-23 22:31:30:92:278 + Q17-T5 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + (2) expected_result: + (1,3,1,1) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + (5) expected_result: + (1,3,1,1) + (6) expected_result: + (1,3,1,1) + (7) expected_result: + (1,3,1,1) + (8) expected_result: + (1,3,1,1) + (9) expected_result: + (1,3,1,1) + (10) expected_result: + (1,3,1,1) + (11) expected_result: + (1,3,1,1) + (12) expected_result: + (1,3,1,1) + (13) expected_result: + (1,3,1,1) + (14) expected_result: + (1,3,1,1) + + Q17 finished at: 2022-4-23 22:31:30:129:832 + Q18-T5 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-23 22:31:30:166:867 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..91930b7d --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,129 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:18:49:141:253 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-24 15:18:49:178:489 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:18:50:140:342 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + null + *(6) expected_result: + (0,1,0,0) + + Q4 finished at: 2022-4-24 15:18:50:214:345 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-24 15:18:51:136:791 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + null + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + null + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-4-24 15:18:51:203:759 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE value1=0;' +Q7 finished at: 2022-4-24 15:18:52:140:939 + Q8-T2 execute sql: 'DELETE FROM t2 WHERE value1=1;' + Q8 finished at: 2022-4-24 15:18:53:141:261 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE value1=2;' +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 15:18:55:141:228 + Q9 finished at: 2022-4-24 15:18:55:141:981 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 15:18:56:141:472 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 15:18:57:137:643 + Q13-T4 execute opt: 'BEGIN' + Q13 finished at: 2022-4-24 15:19:7:146:824 + Q14-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q14 finished at: 2022-4-24 15:19:7:215:130 + Q15-T4 execute sql: 'SELECT * FROM t2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q15 finished at: 2022-4-24 15:19:7:249:376 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-24 15:19:7:283:373 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..3731074d --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,126 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:30:5:99:806 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,0,2,0) + (5) expected_result: + (2,0,2,0) + (6) expected_result: + (2,0,2,0) + +Q2 finished at: 2022-4-23 22:30:5:139:674 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:30:6:134:429 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + null + (1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,0) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1,0,0) + *(6) expected_result: + null + + Q4 finished at: 2022-4-23 22:30:6:169:841 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-23 22:30:7:137:679 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + null + (1) expected_result: + (1,3,1,0) + *(2) expected_result: + null + (3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,0) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-23 22:30:7:178:371 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q7 finished at: 2022-4-23 22:30:8:137:804 + Q8-T2 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + Q8 finished at: 2022-4-23 22:30:9:137:519 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + Q9 finished at: 2022-4-23 22:30:10:138:418 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-23 22:30:11:138:457 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-23 22:30:12:135:265 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 22:30:13:139:73 + Q13-T4 execute opt: 'BEGIN' + Q13 finished at: 2022-4-23 22:30:33:135:484 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,0) (2,0,2,0) + *(1) expected_result: + (0,1,0,0) (2,0,2,0) + *(2) expected_result: + (0,1,0,0) (2,0,2,0) + *(3) expected_result: + (0,1,0,0) (2,0,2,0) + *(4) expected_result: + (0,1,0,0) (2,0,2,0) + *(5) expected_result: + (0,1,0,0) (2,0,2,0) + *(6) expected_result: + (0,1,0,0) (2,0,2,0) + + Q14 finished at: 2022-4-23 22:30:33:171:970 + Q15-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,0) + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q15 finished at: 2022-4-23 22:30:33:208:152 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-23 22:30:33:244:718 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..f7f56eb2 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,160 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:32:1:916:887 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + *(5) expected_result: + (0,1,0,0) + *(6) expected_result: + (0,1,0,0) + +Q2 finished at: 2022-4-23 22:32:1:955:583 +Q3-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + +Q3 finished at: 2022-4-23 22:32:1:994:125 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-23 22:32:2:951:435 + Q5-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + null + (1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,0) + (5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,0) + + Q5 finished at: 2022-4-23 22:32:2:986:887 + Q6-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q6 finished at: 2022-4-23 22:32:3:22:264 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 22:32:3:57:522 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-23 22:32:3:954:748 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + null + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,3) + (3) expected_result: + (0,1,0,0) + (4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,0) + + Q9 finished at: 2022-4-23 22:32:3:993:777 + Q10-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + null + (1) expected_result: + (1,3,1,1) + (2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + (5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,0) + + Q10 finished at: 2022-4-23 22:32:4:32:804 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-23 22:32:4:71:175 +Q12-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q12 finished at: 2022-4-23 22:32:4:955:963 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-23 22:32:4:994:672 + Q14-T4 execute opt: 'BEGIN' + Q14 finished at: 2022-4-23 22:32:24:952:550 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,3) + + Q15 finished at: 2022-4-23 22:32:24:989:86 + Q16-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + (2) expected_result: + (1,3,1,1) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + (5) expected_result: + (1,3,1,1) + (6) expected_result: + (1,3,1,1) + + Q16 finished at: 2022-4-23 22:32:25:25:347 + Q17-T4 execute opt: 'COMMIT'; + Q17 finished at: 2022-4-23 22:32:25:61:221 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..74dc87fb --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,182 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:30:37:577:986 +Q2-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,2) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + +Q2 finished at: 2022-4-23 22:30:37:616:743 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:30:38:612:649 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + null + (1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,2) + (3) expected_result: + (0,1,0,0) + (4) expected_result: + (0,1,0,0) + (5) expected_result: + (0,1,0,2) + (6) expected_result: + (0,1,0,2) + + Q4 finished at: 2022-4-23 22:30:38:649:316 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-23 22:30:38:684:513 + Q6-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + null + (1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,0) + (5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-4-23 22:30:38:719:906 + Q7-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q7 finished at: 2022-4-23 22:30:38:755:71 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-23 22:30:38:789:851 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-23 22:30:39:615:921 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + null + (1) expected_result: + (2,0,2,0) + (2) expected_result: + (2,0,2,0) + (3) expected_result: + (2,0,2,0) + (4) expected_result: + (2,0,2,0) + (5) expected_result: + (2,0,2,0) + (6) expected_result: + (2,0,2,0) + + Q10 finished at: 2022-4-23 22:30:39:654:833 + Q11-T3 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q11 finished at: 2022-4-23 22:30:39:693:333 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + null + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,0) + (3) expected_result: + (0,1,0,3) + (4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,0) + + Q12 finished at: 2022-4-23 22:30:39:731:977 + Q13-T3 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q13 finished at: 2022-4-23 22:30:39:770:415 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-23 22:30:39:808:899 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + (2,0,2,2) + (5) expected_result: + (2,0,2,1) + (6) expected_result: + (2,0,2,1) + +Q15 finished at: 2022-4-23 22:30:40:616:376 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-23 22:30:40:654:850 + Q17-T4 execute opt: 'BEGIN' + Q17 finished at: 2022-4-23 22:31:0:613:509 + Q18-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,0) (2,0,2,0) + (1) expected_result: + (0,1,0,2) (2,0,2,1) + (2) expected_result: + (0,1,0,2) (2,0,2,1) + (3) expected_result: + (0,1,0,2) (2,0,2,1) + (4) expected_result: + (0,1,0,2) (2,0,2,1) + (5) expected_result: + (0,1,0,2) (2,0,2,1) + (6) expected_result: + (0,1,0,2) (2,0,2,1) + + Q18 finished at: 2022-4-23 22:31:0:649:932 + Q19-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + (2) expected_result: + (1,3,1,1) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + (5) expected_result: + (1,3,1,1) + (6) expected_result: + (1,3,1,1) + + Q19 finished at: 2022-4-23 22:31:0:686:193 + Q20-T4 execute opt: 'COMMIT'; + Q20 finished at: 2022-4-23 22:31:0:722:175 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_sda_lost_update_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..af0d0c10 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,52 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:17:30:198:67 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 15:17:30:238:631 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:17:31:215:989 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 15:17:31:302:868 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 15:17:31:345:211 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-24 15:17:32:198:652 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 15:17:32:238:912 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 15:17:42:198:410 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-24 15:17:42:278:909 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 15:17:42:318:907 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..371cdb27 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,59 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:17:5:96:342 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 15:17:5:134:260 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:17:6:100:650 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 15:17:6:176:758 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 15:17:6:214:796 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-24 15:17:7:98:49 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 15:17:7:131:798 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 15:17:17:101:273 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-24 15:17:17:179:147 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 15:17:17:218:350 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_double_write_skew1.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..866248bd --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,68 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:7:22:57:978 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 15:7:22:99:908 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:7:23:49:28 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-24 15:7:23:114:724 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-4-24 15:7:23:147:805 +Q6-T1 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 15:7:25:50:42 +Q6 finished at: 2022-4-24 15:7:25:54:225 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 15:7:26:60:163 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 15:7:36:52:196 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 15:7:36:124:110 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,2) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,2) + + Q11 finished at: 2022-4-24 15:7:36:159:866 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 15:7:36:195:407 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..6f73312f --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,68 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:7:49:266:311 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 15:7:49:303:13 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:7:50:271:56 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-24 15:7:50:352:257 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-4-24 15:7:50:393:86 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 15:7:50:433:686 +Q7-T1 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' +Q7 finished at: 2022-4-24 15:7:51:266:540 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 15:7:51:303:131 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 15:8:1:269:794 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 15:8:1:350:197 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,2) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,2) + + Q11 finished at: 2022-4-24 15:8:1:391:595 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 15:8:1:431:683 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_double_write_skew2.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..9e951e51 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,68 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:8:15:23:370 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 15:8:15:60:89 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:8:16:28:1 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-24 15:8:16:110:922 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q6 finished at: 2022-4-24 15:8:17:26:952 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 15:8:17:63:315 + Q5 finished at: 2022-4-24 15:8:17:63:574 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 15:8:18:28:644 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 15:8:28:28:270 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,2) + *(1) expected_result: + (0,1,0,2) + *(2) expected_result: + (0,1,0,2) + + Q10 finished at: 2022-4-24 15:8:28:108:39 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-24 15:8:28:149:109 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 15:8:28:188:873 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_read_skew.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..f91bbc18 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,75 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:8:48:623:258 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-24 15:8:48:663:271 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:8:49:623:155 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-24 15:8:49:702:677 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-24 15:8:49:742:463 +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q6 finished at: 2022-4-24 15:8:50:623:627 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 15:8:51:623:657 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 15:8:52:623:258 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 15:9:2:615:989 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 15:9:2:682:20 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-24 15:9:2:714:878 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 15:9:2:747:475 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_read_skew2.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..0650df7f --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,75 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:9:52:359:528 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 15:9:52:394:245 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:9:53:365:113 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-24 15:9:53:443:316 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-4-24 15:9:53:481:996 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-4-24 15:9:54:360:147 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 15:9:54:395:113 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 15:9:55:363:721 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 15:10:5:368:892 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 15:10:5:445:862 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-24 15:10:5:484:205 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 15:10:5:522:23 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..28fbe0bb --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,75 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:10:30:31:411 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 15:10:30:71:81 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:10:31:33:455 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-24 15:10:31:114:521 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-4-24 15:10:31:159:430 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 15:10:31:199:696 +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-4-24 15:10:32:32:37 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 15:10:32:71:615 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 15:10:42:28:565 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 15:10:42:101:528 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-24 15:10:42:138:184 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 15:10:42:174:181 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..a1b4d79f --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,73 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:9:17:740:209 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value2=0;' + current_result: + (0,1,0,0) + (1) expected_result: + null + *(2) expected_result: + (0,1,0,0) + +Q2 finished at: 2022-4-24 15:9:17:774:130 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:9:18:743:675 + Q4-T2 execute sql: 'DELETE FROM t2 WHERE value1=1;' + Q4 finished at: 2022-4-24 15:9:18:817:392 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE value1=0;' + Q5 finished at: 2022-4-24 15:9:18:854:326 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 15:9:18:891:483 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE value2=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,1,0,0) + +Q7 finished at: 2022-4-24 15:9:19:740:715 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 15:9:19:774:32 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 15:9:29:744:153 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q10 finished at: 2022-4-24 15:9:29:817:129 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q11 finished at: 2022-4-24 15:9:29:853:510 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 15:9:29:889:760 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..0c379942 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,60 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:24:35:16:356 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-24 12:24:35:51:215 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:24:36:24:441 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-24 12:24:36:105:481 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-24 12:24:36:145:870 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 12:24:36:189:68 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-24 12:24:37:17:422 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 12:24:37:49:904 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 12:24:47:20:659 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q10 finished at: 2022-4-24 12:24:47:94:268 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 12:24:47:130:789 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_write_read_skew.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..ee080714 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,73 @@ +#### db_type: tdsql #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:10:38:304:959 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-23 22:10:38:343:838 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:10:39:339:504 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-23 22:10:39:376:9 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + null + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-4-23 22:10:39:411:203 +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1; ' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q6 finished at: 2022-4-23 22:10:40:343:488 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 22:10:41:339:901 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 22:10:42:345:703 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-23 22:11:2:343:25 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-23 22:11:2:381:941 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + (2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-23 22:11:2:420:852 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 22:11:2:458:918 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..4c0e9673 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,75 @@ +#### db_type: tdsql #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:6:41:961:776 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 15:6:42:0:486 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:6:42:959:310 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-24 15:6:43:32:423 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-4-24 15:6:43:69:168 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 15:6:43:105:637 +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,1) + (1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,1) + +Q7 finished at: 2022-4-24 15:6:43:961:774 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 15:6:44:0:23 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 15:6:53:963:931 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 15:6:54:47:859 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-24 15:6:54:88:927 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 15:6:54:129:245 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_mda_step_rat.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..80b220b0 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,129 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:15:10:757:471 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-23 22:15:10:796:246 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:15:11:792:145 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-23 22:15:11:827:321 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + null + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,3) + (3) expected_result: + (0,1,0,0) + (4) expected_result: + (0,1,0,0) + (5) expected_result: + (0,1,0,3) + (6) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-4-23 22:15:11:862:761 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-23 22:15:12:795:491 + Q7-T3 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q7 finished at: 2022-4-23 22:15:12:834:337 + Q8-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + null + (1) expected_result: + (1,3,1,1) + (2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + (5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,0) + + Q8 finished at: 2022-4-23 22:15:12:873:46 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + (2,0,2,1) + (5) expected_result: + (2,0,2,1) + (6) expected_result: + (2,0,2,1) + +Q9 finished at: 2022-4-23 22:15:13:796:31 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-23 22:15:13:834:597 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-23 22:15:14:792:527 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 22:15:15:795:669 + Q13-T4 execute opt: 'BEGIN' + Q13 finished at: 2022-4-23 22:15:35:792:916 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) (2,0,2,0) + (1) expected_result: + (0,1,0,3) (2,0,2,1) + (2) expected_result: + (0,1,0,3) (2,0,2,1) + (3) expected_result: + (0,1,0,3) (2,0,2,1) + (4) expected_result: + (0,1,0,3) (2,0,2,1) + (5) expected_result: + (0,1,0,3) (2,0,2,1) + (6) expected_result: + (0,1,0,3) (2,0,2,1) + + Q14 finished at: 2022-4-23 22:15:35:865:417 + Q15-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + (2) expected_result: + (1,3,1,1) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + (5) expected_result: + (1,3,1,1) + (6) expected_result: + (1,3,1,1) + + Q15 finished at: 2022-4-23 22:15:35:901:892 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-23 22:15:35:937:756 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..e69e61f0 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,245 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN' + Q1 finished at: 2022-4-24 15:10:53:701:471 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + (4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + (7) expected_result: + (0,1,0,3) + (8) expected_result: + (0,1,0,3) + *(9) expected_result: + (0,1,0,0) + (10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,0) + (12) expected_result: + (0,1,0,3) + *(13) expected_result: + (0,1,0,0) + *(14) expected_result: + (0,1,0,0) + + Q2 finished at: 2022-4-24 15:10:53:774:481 +Q3-T1 execute opt: 'BEGIN' +Q3 finished at: 2022-4-24 15:10:54:698:322 +Q4-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q4 finished at: 2022-4-24 15:10:54:731:728 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-24 15:10:55:701:311 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + (7) expected_result: + (1,3,1,1) + *(8) expected_result: + (1,3,1,0) + (9) expected_result: + (1,3,1,1) + (10) expected_result: + (1,3,1,1) + *(11) expected_result: + (1,3,1,0) + *(12) expected_result: + (1,3,1,0) + *(13) expected_result: + (1,3,1,0) + (14) expected_result: + (1,3,1,1) + + Q6 finished at: 2022-4-24 15:10:55:773:983 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + (3) expected_result: + (0,1,0,3) + (4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + (7) expected_result: + (0,1,0,3) + (8) expected_result: + (0,1,0,3) + (9) expected_result: + (0,1,0,3) + *(10) expected_result: + (0,1,0,0) + *(11) expected_result: + (0,1,0,0) + *(12) expected_result: + (0,1,0,0) + (13) expected_result: + (0,1,0,3) + (14) expected_result: + (0,1,0,3) + + Q7 finished at: 2022-4-24 15:10:55:810:609 + Q8-T2 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 15:10:56:705:993 + Q9-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q9 finished at: 2022-4-24 15:10:56:786:800 + Q10-T4 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + *(7) expected_result: + (1,3,1,0) + (8) expected_result: + (1,3,1,1) + (9) expected_result: + (1,3,1,1) + (10) expected_result: + (1,3,1,1) + (11) expected_result: + (1,3,1,1) + *(12) expected_result: + (1,3,1,0) + *(13) expected_result: + (1,3,1,0) + *(14) expected_result: + (1,3,1,0) + + Q10 finished at: 2022-4-24 15:10:57:702:472 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-24 15:10:58:698:721 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 15:10:59:706:124 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-24 15:11:0:701:690 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 15:11:1:702:44 + Q15-T5 execute opt: 'BEGIN' + Q15 finished at: 2022-4-24 15:11:11:699:476 + Q16-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,3) + *(7) expected_result: + (0,1,0,3) + *(8) expected_result: + (0,1,0,3) + *(9) expected_result: + (0,1,0,3) + *(10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,3) + *(12) expected_result: + (0,1,0,3) + *(13) expected_result: + (0,1,0,3) + *(14) expected_result: + (0,1,0,3) + + Q16 finished at: 2022-4-24 15:11:11:765:149 + Q17-T5 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + *(7) expected_result: + (1,3,1,1) + *(8) expected_result: + (1,3,1,1) + *(9) expected_result: + (1,3,1,1) + *(10) expected_result: + (1,3,1,1) + *(11) expected_result: + (1,3,1,1) + *(12) expected_result: + (1,3,1,1) + *(13) expected_result: + (1,3,1,1) + *(14) expected_result: + (1,3,1,1) + + Q17 finished at: 2022-4-24 15:11:11:798:182 + Q18-T5 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-24 15:11:11:830:461 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..850734f7 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,110 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:11:30:538:980 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-24 15:11:30:575:993 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:11:31:541:652 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-24 15:11:31:621:297 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-24 15:11:31:661:15 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-24 15:11:32:546:138 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-24 15:11:32:620:216 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-24 15:11:32:657:607 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-24 15:11:33:539:747 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 15:11:33:576:706 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 15:11:34:542:511 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 15:11:35:548:747 + Q13-T4 execute opt: 'BEGIN' + Q13 finished at: 2022-4-24 15:11:45:538:639 + Q14-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q14 finished at: 2022-4-24 15:11:45:611:412 + Q15-T4 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-24 15:11:45:647:414 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..add1e7a4 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,107 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:16:41:864:115 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-23 22:16:41:903:640 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:16:42:898:590 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-23 22:16:42:935:164 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-23 22:16:42:970:471 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-23 22:16:43:902:209 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-23 22:16:43:940:850 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-23 22:16:43:979:396 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-23 22:16:44:902:418 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-23 22:16:44:940:870 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-23 22:16:45:899:568 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 22:16:46:902:878 + Q13-T4 execute opt: 'BEGIN' + Q13 finished at: 2022-4-23 22:17:6:900:825 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q14 finished at: 2022-4-23 22:17:6:937:262 + Q15-T4 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-23 22:17:6:973:41 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_sda_dirty_read.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..3f9f872e --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,48 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:7:28:341:530 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 22:7:28:380:244 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:7:29:342:406 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-23 22:7:29:412:670 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-23 22:7:30:341:939 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 22:7:31:338:595 + Q7-T3 execute opt: 'BEGIN' + Q7 finished at: 2022-4-23 22:7:51:341:768 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q8 finished at: 2022-4-23 22:7:51:418:891 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 22:7:51:457:625 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_sda_intermediate_read.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..de62ac21 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:5:18:425:554 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 15:5:18:459:527 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:5:19:432:250 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 15:5:19:513:530 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-24 15:5:20:430:404 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 15:5:21:432:547 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 15:5:22:426:137 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 15:5:32:424:815 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q9 finished at: 2022-4-24 15:5:32:495:778 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 15:5:32:528:360 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..d70b1b5e --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:5:47:661:407 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 15:5:47:700:906 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:5:48:658:827 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 15:5:48:732:868 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 15:5:48:769:812 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-24 15:5:49:661:926 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 15:5:49:701:686 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 15:5:59:655:4 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q9 finished at: 2022-4-24 15:5:59:733:506 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 15:5:59:766:619 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_sda_lost_self_update.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..90a4c759 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:10:10:885:420 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 22:10:10:924:70 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:10:11:919:766 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-23 22:10:12:923:801 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-23 22:10:12:962:634 + Q4 finished at: 2022-4-23 22:10:12:962:867 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 22:10:13:920:840 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-23 22:10:33:923:368 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q9 finished at: 2022-4-23 22:10:33:962:200 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 22:10:34:0:387 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..0085289e --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:24:51:263:342 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 12:24:51:296:409 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:24:52:303:553 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-24 12:24:53:296:323 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 12:24:55:296:512 + Q4 finished at: 2022-4-24 12:24:55:301:78 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 12:24:55:342:229 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 12:25:5:299:971 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-24 12:25:5:336:620 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 12:25:5:373:94 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..677fb69b --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,59 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:6:11:761:833 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 15:6:11:799:0 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:6:12:763:298 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-24 15:6:12:837:393 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 15:6:12:874:99 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-24 15:6:13:762:561 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 15:6:13:799:88 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 15:6:23:760:779 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q9 finished at: 2022-4-24 15:6:23:832:548 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 15:6:23:867:775 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..e45de0eb --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,58 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:9:44:621:313 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-23 22:9:44:662:352 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:9:45:656:177 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-23 22:9:45:692:733 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-23 22:9:45:728:503 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-23 22:9:46:659:697 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 22:9:46:697:639 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-23 22:10:6:659:343 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q9 finished at: 2022-4-23 22:10:6:699:417 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 22:10:6:737:753 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..c9be9d91 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,68 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:13:54:855:664 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 15:13:54:889:619 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:13:55:859:459 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-24 15:13:55:933:664 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q7 finished at: 2022-4-24 15:13:56:856:466 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 15:13:56:890:94 + Q5 finished at: 2022-4-24 15:13:56:894:814 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 15:13:56:931:816 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 15:14:6:859:127 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,2) + *(1) expected_result: + (0,1,0,2) + (2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 15:14:6:933:530 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-24 15:14:6:970:517 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 15:14:7:6:987 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..a0b41ef2 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,34 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:14:19:729:624 +Q2-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q2 finished at: 2022-4-24 15:14:19:766:408 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:14:20:727:58 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-24 15:14:20:795:870 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q5 finished at: 2022-4-24 15:14:21:728:522 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-276-6264f8cb-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-24 15:14:22:332:582 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-276-6264f8cb-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..2280c974 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,34 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:14:44:391:610 +Q2-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q2 finished at: 2022-4-24 15:14:44:433:768 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:14:45:384:161 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-24 15:14:45:456:713 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q5 finished at: 2022-4-24 15:14:46:394:300 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='1-cf-261-6264f8e4-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-24 15:14:46:999:497 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='1-cf-261-6264f8e4-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..1d60ce07 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,36 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:15:15:200:53 +Q2-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q2 finished at: 2022-4-24 15:15:15:237:288 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:15:16:203:128 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-24 15:15:16:283:135 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q5 finished at: 2022-4-24 15:15:17:205:293 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 15:15:17:245:687 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-245-6264f903-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-24 15:15:17:901:911 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-245-6264f903-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..28b7c680 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,66 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:22:9:908:239 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-23 22:22:9:946:846 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:22:10:942:837 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-23 22:22:10:978:235 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-23 22:22:11:13:461 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-4-23 22:22:11:946:553 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 22:22:11:985:261 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-23 22:22:12:943:68 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-23 22:22:32:946:251 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-23 22:22:32:985:305 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + (1) expected_result: + (1,3,1,2) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-23 22:22:33:24:99 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 22:22:33:62:442 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..e7be4821 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,66 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:22:37:360:497 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-23 22:22:37:398:990 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:22:38:395:30 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-23 22:22:38:437:453 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-23 22:22:38:472:614 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-4-23 22:22:39:398:802 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 22:22:40:395:365 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 22:22:41:398:993 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-23 22:23:1:398:580 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-23 22:23:1:437:499 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + (1) expected_result: + (1,3,1,2) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-23 22:23:1:476:113 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 22:23:1:514:422 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..6aee81ed --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,66 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:23:5:811:363 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-23 22:23:5:854:288 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:23:6:846:20 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + null + (1) expected_result: + (1,3,1,1) + (2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-23 22:23:6:881:385 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q5 finished at: 2022-4-23 22:23:6:916:415 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-4-23 22:23:7:849:642 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 22:23:7:888:205 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-23 22:23:8:846:100 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-23 22:23:28:849:334 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + (1) expected_result: + (0,1,0,2) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-23 22:23:28:888:310 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-23 22:23:28:926:925 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 22:23:28:965:223 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..0bbf00e4 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,66 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:23:33:264:956 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-23 22:23:33:304:90 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:23:34:299:487 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + null + (1) expected_result: + (1,3,1,1) + (2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-23 22:23:34:336:45 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q5 finished at: 2022-4-23 22:23:34:371:740 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-4-23 22:23:35:303:543 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 22:23:36:299:824 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 22:23:37:303:184 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-23 22:23:57:302:917 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + (1) expected_result: + (0,1,0,2) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-23 22:23:57:341:982 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-23 22:23:57:380:829 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 22:23:57:419:249 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..b6a7b755 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,66 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:24:1:715:433 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-23 22:24:1:754:120 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:24:2:750:169 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + null + (1) expected_result: + (1,3,1,1) + (2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-23 22:24:2:785:584 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q5 finished at: 2022-4-23 22:24:2:820:913 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 22:24:2:856:423 +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-4-23 22:24:3:754:39 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 22:24:3:792:609 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-23 22:24:23:753:436 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + (1) expected_result: + (0,1,0,2) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-23 22:24:23:792:653 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-23 22:24:23:831:489 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 22:24:23:869:939 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_mda_step_wat_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..e167e534 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,41 @@ +#### db_type: tdsql #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:16:7:959:917 +Q2-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q2 finished at: 2022-4-24 15:16:7:996:396 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:16:8:960:115 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-24 15:16:9:32:236 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-24 15:16:9:961:97 + Q7-T3 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=2;' + Q7 finished at: 2022-4-24 15:16:10:35:832 + Q8-T3 execute sql: 'UPDATE t2 SET value2=3 WHERE value1=1;' +Q9-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q5 finished at: 2022-4-24 15:16:10:980:500 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-248-6264f937-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-24 15:16:11:880:837 + Q8 finished at: 2022-4-24 15:16:11:958:906 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-248-6264f937-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_mda_step_wat_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..85d480ec --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,41 @@ +#### db_type: tdsql #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:16:37:924:255 +Q2-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q2 finished at: 2022-4-24 15:16:37:964:885 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:16:39:42:171 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-24 15:16:39:123:465 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-24 15:16:39:920:506 + Q7-T3 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=2;' + Q7 finished at: 2022-4-24 15:16:40:82:412 + Q8-T3 execute sql: 'UPDATE t2 SET value2=3 WHERE value1=1;' +Q9-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q5 finished at: 2022-4-24 15:16:40:926:163 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-27e-6264f955-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-24 15:16:41:827:176 + Q8 finished at: 2022-4-24 15:16:41:964:596 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-27e-6264f955-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..f44ccb58 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,45 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:12:15:964:820 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 15:12:15:997:540 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:12:16:969:734 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-24 15:12:17:965:281 + Q4 finished at: 2022-4-24 15:12:17:969:344 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 15:12:18:970:555 + Q7-T3 execute opt: 'BEGIN' + Q7 finished at: 2022-4-24 15:12:28:968:357 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-24 15:12:29:41:443 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 15:12:29:77:402 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..8311c270 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,45 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:17:38:379:121 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 22:17:38:417:563 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:17:39:413:695 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-23 22:17:40:417:632 + Q4 finished at: 2022-4-23 22:17:40:417:895 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 22:17:41:414:502 + Q7-T3 execute opt: 'BEGIN' + Q7 finished at: 2022-4-23 22:18:1:417:66 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-23 22:18:1:455:924 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 22:18:1:494:109 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_sda_full_write.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..a062d3e2 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_sda_full_write.txt @@ -0,0 +1,47 @@ +#### db_type: tdsql #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:18:5:646:975 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 22:18:5:685:554 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:18:6:681:666 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-23 22:18:7:685:228 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-23 22:18:7:723:805 + Q4 finished at: 2022-4-23 22:18:7:724:209 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 22:18:8:682:160 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-23 22:18:28:685:59 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q9 finished at: 2022-4-23 22:18:28:723:817 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 22:18:28:761:974 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_sda_full_write_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..ac3fd5ff --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,47 @@ +#### db_type: tdsql #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:18:32:905:436 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 22:18:32:943:826 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:18:33:940:130 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-23 22:18:34:943:731 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 22:18:34:982:293 + Q4 finished at: 2022-4-23 22:18:34:982:496 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-23 22:18:35:18:168 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-23 22:18:54:943:462 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q9 finished at: 2022-4-23 22:18:54:982:535 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 22:18:55:20:970 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..faad89ea --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 22:19:54:682:507 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 22:19:54:720:955 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 22:19:55:717:151 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-23 22:19:56:720:902 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 22:19:56:759:454 + Q4 finished at: 2022-4-23 22:19:56:759:841 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-23 22:19:56:795:357 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-23 22:20:16:720:662 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q9 finished at: 2022-4-23 22:20:16:761:459 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 22:20:16:799:982 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_sda_lost_update_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..39ef234c --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,52 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:12:40:897:144 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 15:12:40:938:406 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:12:41:889:750 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 15:12:41:955:788 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 15:12:43:890:638 +Q5 finished at: 2022-4-24 15:12:43:894:77 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 15:12:43:935:368 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 15:12:53:893:640 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-24 15:12:53:966:856 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 15:12:54:3:40 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_sda_lost_update_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..5eb5860c --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,52 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:13:7:598:850 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 15:13:7:639:350 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:13:8:595:514 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 15:13:8:668:708 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 15:13:10:597:472 +Q5 finished at: 2022-4-24 15:13:10:600:579 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 15:13:11:599:867 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 15:13:21:596:438 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-24 15:13:21:671:228 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 15:13:21:708:311 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_dda_read_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..70176c57 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_dda_read_skew_committed.txt @@ -0,0 +1,75 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:13:57:772:839 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-24 13:13:57:808:366 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:13:58:771:322 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-24 13:13:58:836:383 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-24 13:13:58:868:991 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 13:13:58:901:885 +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q7 finished at: 2022-4-24 13:13:59:773:84 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 13:13:59:806:771 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 13:14:9:778:601 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 13:14:9:858:647 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-24 13:14:9:898:601 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 13:14:9:939:376 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..bd2f223f --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,66 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:14:30:927:364 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-24 13:14:30:962:840 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:14:31:931:127 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-24 13:14:32:8:393 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-24 13:14:32:47:185 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 13:14:32:85:987 +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-4-24 13:14:32:927:859 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 13:14:32:963:191 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 13:14:42:928:230 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 13:14:42:999:581 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + (1) expected_result: + (1,3,1,2) + (2) expected_result: + (1,3,1,2) + + Q11 finished at: 2022-4-24 13:14:43:35:692 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 13:14:43:71:214 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_dda_write_skew.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_dda_write_skew.txt new file mode 100644 index 00000000..c75ea75e --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_dda_write_skew.txt @@ -0,0 +1,73 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:14:54:643:966 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-24 13:14:54:676:738 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:14:55:644:920 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-24 13:14:55:713:234 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-24 13:14:55:747:346 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-4-24 13:14:56:644:230 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 13:14:56:676:900 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 13:14:57:645:284 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 13:15:7:651:486 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 13:15:7:731:897 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-24 13:15:7:772:169 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 13:15:7:811:864 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_dda_write_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..b5bc5c19 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_dda_write_skew_committed.txt @@ -0,0 +1,73 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:17:12:707:711 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-24 13:17:12:741:626 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:17:13:713:629 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-24 13:17:13:792:864 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-24 13:17:13:832:901 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 13:17:13:873:287 +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-4-24 13:17:14:707:901 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 13:17:14:741:460 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 13:17:24:713:472 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 13:17:24:792:881 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-24 13:17:24:832:431 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 13:17:24:871:492 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..0d26f4ea --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,75 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL PRIMARY KEY);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:15:23:236:463 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-24 13:15:23:270:53 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-24 13:15:23:303:79 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-24 13:15:24:239:373 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-24 13:15:24:311:452 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-24 13:15:24:347:308 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 13:15:24:383:276 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 13:15:25:237:466 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 13:15:35:240:320 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-24 13:15:35:314:116 + Q11-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q11 finished at: 2022-4-24 13:15:35:351:411 + Q12-T3 execute sql: 'DROP TABLE mytab;' + Q12 finished at: 2022-4-24 13:15:35:408:972 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-24 13:15:35:445:611 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..69ce4596 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,62 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:16:43:642:169 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-24 13:16:43:679:369 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:16:44:642:483 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-24 13:16:44:715:616 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-24 13:16:44:754:97 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 13:16:44:790:850 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-24 13:16:45:643:79 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 13:16:45:679:698 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 13:16:55:642:831 + Q10-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q10 finished at: 2022-4-24 13:16:55:715:736 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 13:16:55:752:30 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_mda_step_iat.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_mda_step_iat.txt new file mode 100644 index 00000000..49ffa74d --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_mda_step_iat.txt @@ -0,0 +1,129 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:26:58:969:662 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + (2,0,2,1) + (5) expected_result: + (2,0,2,1) + (6) expected_result: + (2,0,2,1) + +Q2 finished at: 2022-4-24 13:26:59:6:270 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:26:59:970:601 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,,3) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + + Q4 finished at: 2022-4-24 13:27:0:45:181 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-24 13:27:0:966:724 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-4-24 13:27:1:32:396 +Q7-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q7 finished at: 2022-4-24 13:27:1:970:194 + Q8-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q8 finished at: 2022-4-24 13:27:2:971:665 + Q9-T3 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 13:27:4:970:363 + Q9 finished at: 2022-4-24 13:27:4:970:479 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 13:27:5:971:417 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 13:27:6:966:840 + Q13-T4 execute opt: 'BEGIN' + Q13 finished at: 2022-4-24 13:27:16:970:143 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) (2,0,2,1) + *(1) expected_result: + (0,1,0,3) (2,0,2,1) + *(2) expected_result: + (0,1,0,3) (2,0,2,1) + *(3) expected_result: + (0,1,0,3) (2,0,2,1) + *(4) expected_result: + (0,1,0,3) (2,0,2,1) + *(5) expected_result: + (0,1,0,3) (2,0,2,1) + *(6) expected_result: + (0,1,0,3) (2,0,2,1) + + Q14 finished at: 2022-4-24 13:27:17:44:669 + Q15-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q15 finished at: 2022-4-24 13:27:17:81:602 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-24 13:27:17:117:897 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..a8ebbf38 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,128 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:36:13:20:314 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + (3) expected_result: + (0,1,0,3) + (4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-24 13:36:13:60:238 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:36:14:13:983 + Q4-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q4 finished at: 2022-4-24 13:36:14:151:292 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 13:36:14:185:659 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-24 13:36:15:18:113 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,0) + + Q7 finished at: 2022-4-24 13:36:15:93:185 + Q8-T3 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q8 finished at: 2022-4-24 13:36:15:130:455 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 13:36:15:174:960 +Q10-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,0) + (5) expected_result: + (1,3,1,1) + (6) expected_result: + (1,3,1,1) + +Q10 finished at: 2022-4-24 13:36:16:21:69 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-24 13:36:16:60:205 + Q12-T4 execute opt: 'BEGIN' + Q12 finished at: 2022-4-24 13:36:26:13:169 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,3) + + Q13 finished at: 2022-4-24 13:36:26:77:932 + Q14-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q14 finished at: 2022-4-24 13:36:26:110:431 + Q15-T4 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-24 13:36:26:142:349 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..6a9172b9 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,245 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:35:34:349:437 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + *(5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,3) + (7) expected_result: + (0,1,0,3) + *(8) expected_result: + (0,1,0,0) + (9) expected_result: + (0,1,0,3) + (10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,0) + (12) expected_result: + (0,1,0,3) + (13) expected_result: + (0,1,0,3) + (14) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-24 13:35:34:387:353 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:35:35:351:373 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + *(7) expected_result: + (1,3,1,0) + (8) expected_result: + (1,3,1,1) + *(9) expected_result: + (1,3,1,0) + (10) expected_result: + (1,3,1,1) + (11) expected_result: + (1,3,1,1) + (12) expected_result: + (1,3,1,1) + (13) expected_result: + (1,3,1,1) + *(14) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-24 13:35:35:430:652 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-24 13:35:36:349:264 + Q6-T3 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q6 finished at: 2022-4-24 13:35:36:423:278 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 13:35:36:460:804 + Q8-T4 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 13:35:37:353:35 + Q9-T4 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q9 finished at: 2022-4-24 13:35:37:434:490 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 13:35:37:475:605 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + (3) expected_result: + (0,1,0,3) + (4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,0) + *(6) expected_result: + (0,1,0,0) + *(7) expected_result: + (0,1,0,0) + *(8) expected_result: + (0,1,0,0) + (9) expected_result: + (0,1,0,3) + (10) expected_result: + (0,1,0,3) + (11) expected_result: + (0,1,0,3) + *(12) expected_result: + (0,1,0,0) + (13) expected_result: + (0,1,0,3) + (14) expected_result: + (0,1,0,3) + + Q11 finished at: 2022-4-24 13:35:38:352:507 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 13:35:38:391:485 +Q13-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,0) + *(4) expected_result: + (1,3,1,0) + (5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,0) + (7) expected_result: + (1,3,1,1) + (8) expected_result: + (1,3,1,1) + *(9) expected_result: + (1,3,1,0) + (10) expected_result: + (1,3,1,1) + (11) expected_result: + (1,3,1,1) + (12) expected_result: + (1,3,1,1) + *(13) expected_result: + (1,3,1,0) + (14) expected_result: + (1,3,1,1) + +Q13 finished at: 2022-4-24 13:35:39:350:410 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-24 13:35:39:387:563 + Q15-T5 execute opt: 'BEGIN' + Q15 finished at: 2022-4-24 13:35:49:352:418 + Q16-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,3) + *(7) expected_result: + (0,1,0,3) + *(8) expected_result: + (0,1,0,3) + *(9) expected_result: + (0,1,0,3) + *(10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,3) + *(12) expected_result: + (0,1,0,3) + *(13) expected_result: + (0,1,0,3) + *(14) expected_result: + (0,1,0,3) + + Q16 finished at: 2022-4-24 13:35:49:434:434 + Q17-T5 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + *(7) expected_result: + (1,3,1,1) + *(8) expected_result: + (1,3,1,1) + *(9) expected_result: + (1,3,1,1) + *(10) expected_result: + (1,3,1,1) + *(11) expected_result: + (1,3,1,1) + *(12) expected_result: + (1,3,1,1) + *(13) expected_result: + (1,3,1,1) + *(14) expected_result: + (1,3,1,1) + + Q17 finished at: 2022-4-24 13:35:49:475:302 + Q18-T5 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-24 13:35:49:515:98 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..926ae8df --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,129 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:31:46:555:842 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-24 13:31:46:592:464 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:31:47:559:487 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + null + *(6) expected_result: + (0,1,0,0) + + Q4 finished at: 2022-4-24 13:31:47:639:65 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-24 13:31:48:556:445 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + null + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + null + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-4-24 13:31:48:630:170 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE value1=0;' +Q7 finished at: 2022-4-24 13:31:49:556:413 + Q8-T2 execute sql: 'DELETE FROM t2 WHERE value1=1;' + Q8 finished at: 2022-4-24 13:31:50:560:210 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE value1=2;' +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 13:31:52:556:926 + Q9 finished at: 2022-4-24 13:31:52:561:396 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 13:31:53:560:421 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 13:31:54:557:503 + Q13-T4 execute opt: 'BEGIN' + Q13 finished at: 2022-4-24 13:32:4:556:968 + Q14-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q14 finished at: 2022-4-24 13:32:4:633:46 + Q15-T4 execute sql: 'SELECT * FROM t2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q15 finished at: 2022-4-24 13:32:4:670:177 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-24 13:32:4:707:8 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..d551c4f5 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,126 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:32:29:383:11 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,0,2,0) + (5) expected_result: + (2,0,2,0) + (6) expected_result: + (2,0,2,0) + +Q2 finished at: 2022-4-24 13:32:29:420:975 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:32:30:383:741 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + null + (1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,0) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1,0,0) + *(6) expected_result: + null + + Q4 finished at: 2022-4-24 13:32:30:457:81 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-24 13:32:31:383:670 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + null + (1) expected_result: + (1,3,1,0) + *(2) expected_result: + null + (3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,0) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-24 13:32:31:462:554 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q7 finished at: 2022-4-24 13:32:32:383:515 + Q8-T2 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + Q8 finished at: 2022-4-24 13:32:33:383:968 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + Q9 finished at: 2022-4-24 13:32:34:384:664 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 13:32:35:383:794 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 13:32:36:384:545 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 13:32:37:384:629 + Q13-T4 execute opt: 'BEGIN' + Q13 finished at: 2022-4-24 13:32:47:387:435 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,0) (2,0,2,0) + *(1) expected_result: + (0,1,0,0) (2,0,2,0) + *(2) expected_result: + (0,1,0,0) (2,0,2,0) + *(3) expected_result: + (0,1,0,0) (2,0,2,0) + *(4) expected_result: + (0,1,0,0) (2,0,2,0) + *(5) expected_result: + (0,1,0,0) (2,0,2,0) + *(6) expected_result: + (0,1,0,0) (2,0,2,0) + + Q14 finished at: 2022-4-24 13:32:47:468:50 + Q15-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,0) + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q15 finished at: 2022-4-24 13:32:47:508:366 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-24 13:32:47:548:397 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..2f7f72b4 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,160 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:36:51:258:144 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + *(5) expected_result: + (0,1,0,0) + *(6) expected_result: + (0,1,0,0) + +Q2 finished at: 2022-4-24 13:36:51:299:668 +Q3-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + +Q3 finished at: 2022-4-24 13:36:51:339:859 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-24 13:36:52:257:344 + Q5-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,0) + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q5 finished at: 2022-4-24 13:36:52:337:427 + Q6-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q6 finished at: 2022-4-24 13:36:52:377:5 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 13:36:52:417:540 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 13:36:53:254:848 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + (4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,0) + *(6) expected_result: + (0,1,0,0) + + Q9 finished at: 2022-4-24 13:36:53:329:411 + Q10-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + (2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + (5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,0) + + Q10 finished at: 2022-4-24 13:36:53:366:538 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 13:36:53:403:263 +Q12-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q12 finished at: 2022-4-24 13:36:54:258:629 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-24 13:36:54:298:889 + Q14-T4 execute opt: 'BEGIN' + Q14 finished at: 2022-4-24 13:37:4:254:159 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,3) + + Q15 finished at: 2022-4-24 13:37:4:328:447 + Q16-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q16 finished at: 2022-4-24 13:37:4:365:290 + Q17-T4 execute opt: 'COMMIT'; + Q17 finished at: 2022-4-24 13:37:4:401:428 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..76c59de9 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,184 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:33:51:958:901 +Q2-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,2) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + +Q2 finished at: 2022-4-24 13:33:51:992:533 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:33:52:959:678 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,2) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + (0,1,0,2) + (6) expected_result: + (0,1,0,2) + + Q4 finished at: 2022-4-24 13:33:53:27:253 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-24 13:33:53:60:223 + Q6-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,0) + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-4-24 13:33:53:93:249 + Q7-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q7 finished at: 2022-4-24 13:33:53:126:250 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 13:33:53:159:281 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 13:33:53:957:836 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + *(4) expected_result: + (2,0,2,0) + *(5) expected_result: + (2,0,2,0) + *(6) expected_result: + (2,0,2,0) + + Q10 finished at: 2022-4-24 13:33:54:22:729 + Q11-T3 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q11 finished at: 2022-4-24 13:33:54:55:41 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,0) + + Q12 finished at: 2022-4-24 13:33:54:87:515 + Q13-T3 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q13 finished at: 2022-4-24 13:33:54:119:863 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 13:33:54:152:422 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + (2,0,2,2) + (5) expected_result: + (2,0,2,1) + (6) expected_result: + (2,0,2,1) + +Q15 finished at: 2022-4-24 13:33:54:959:504 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-24 13:33:54:992:201 + Q17-T4 execute opt: 'BEGIN' + Q17 finished at: 2022-4-24 13:34:4:962:830 + Q18-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,2) (2,0,2,1) + *(1) expected_result: + (0,1,0,2) (2,0,2,1) + *(2) expected_result: + (0,1,0,2) (2,0,2,1) + *(3) expected_result: + (0,1,0,2) (2,0,2,1) + *(4) expected_result: + (0,1,0,2) (2,0,2,1) + *(5) expected_result: + (0,1,0,2) (2,0,2,1) + *(6) expected_result: + (0,1,0,2) (2,0,2,1) + + Q18 finished at: 2022-4-24 13:34:5:37:562 + Q19-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q19 finished at: 2022-4-24 13:34:5:75:11 + Q20-T4 execute opt: 'COMMIT'; + Q20 finished at: 2022-4-24 13:34:5:111:999 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_sda_lost_update_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..3ff24810 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_sda_lost_update_committed.txt @@ -0,0 +1,52 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:13:32:295:363 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 13:13:32:328:577 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:13:33:295:952 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 13:13:33:362:510 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 13:13:33:396:349 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-24 13:13:34:296:351 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 13:13:34:329:608 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 13:13:44:295:512 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-24 13:13:44:362:234 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 13:13:44:395:78 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..cbe40cb9 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:13:2:913:324 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 13:13:2:949:582 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:13:3:917:571 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 13:13:3:999:269 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 13:13:4:40:340 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-24 13:13:4:913:420 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 13:13:4:949:6 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 13:13:14:912:893 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-24 13:13:14:985:494 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 13:13:15:21:169 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_double_write_skew1.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..8314e5e5 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_double_write_skew1.txt @@ -0,0 +1,68 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:36:32:704:93 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 12:36:32:745:172 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:36:33:703:324 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-24 12:36:33:784:467 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-4-24 12:36:33:825:62 +Q6-T1 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 12:36:35:704:75 +Q6 finished at: 2022-4-24 12:36:35:705:56 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 12:36:36:704:699 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 12:36:46:698:804 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 12:36:46:769:635 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,2) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,2) + + Q11 finished at: 2022-4-24 12:36:46:805:343 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 12:36:46:840:605 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..46146e65 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,68 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:36:58:815:71 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 12:36:58:852:148 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:36:59:815:920 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-24 12:36:59:890:502 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-4-24 12:36:59:927:926 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 12:36:59:965:915 +Q7-T1 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' +Q7 finished at: 2022-4-24 12:37:0:815:519 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 12:37:0:852:127 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 12:37:10:815:62 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 12:37:10:889:260 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,2) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,2) + + Q11 finished at: 2022-4-24 12:37:10:926:592 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 12:37:10:962:845 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_double_write_skew2.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..6bed68a9 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_double_write_skew2.txt @@ -0,0 +1,68 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:38:30:426:477 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 12:38:30:467:164 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:38:31:423:479 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-24 12:38:31:498:103 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q6 finished at: 2022-4-24 12:38:32:427:379 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 12:38:32:467:808 + Q5 finished at: 2022-4-24 12:38:32:468:352 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 12:38:33:424:154 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 12:38:43:422:943 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,2) + *(1) expected_result: + (0,1,0,2) + *(2) expected_result: + (0,1,0,2) + + Q10 finished at: 2022-4-24 12:38:43:496:29 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-24 12:38:43:532:771 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 12:38:43:568:984 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_read_skew.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_read_skew.txt new file mode 100644 index 00000000..029c7dbc --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_read_skew.txt @@ -0,0 +1,75 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:29:34:792:829 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-24 12:29:34:829:303 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:29:35:832:144 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q6 finished at: 2022-4-24 12:29:36:828:835 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 12:29:38:829:77 + Q4 finished at: 2022-4-24 12:29:38:829:930 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-24 12:29:38:867:60 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 12:29:38:904:289 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 12:29:48:825:689 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 12:29:48:859:323 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-24 12:29:48:892:742 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 12:29:48:925:568 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_read_skew2.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_read_skew2.txt new file mode 100644 index 00000000..e05d046e --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_read_skew2.txt @@ -0,0 +1,75 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:39:57:464:178 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 14:39:57:501:678 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:39:58:463:500 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-24 14:39:58:538:66 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-4-24 14:39:58:575:103 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-4-24 14:39:59:464:677 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 14:39:59:501:991 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 14:40:0:463:883 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 14:40:10:467:623 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 14:40:10:549:602 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-24 14:40:10:590:617 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 14:40:10:630:774 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..41e6e71a --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_read_skew2_committed.txt @@ -0,0 +1,75 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:40:36:520:71 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 14:40:36:556:878 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:40:37:520:678 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-24 14:40:37:596:703 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-4-24 14:40:37:635:15 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 14:40:37:672:417 +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-4-24 14:40:38:520:614 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 14:40:38:557:216 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 14:40:48:521:643 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 14:40:48:596:347 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-24 14:40:48:633:735 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 14:40:48:670:908 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..2af2b16b --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,75 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:38:59:828:246 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value2=0;' + current_result: + (0,1,0,0) + (1) expected_result: + null + *(2) expected_result: + (0,1,0,0) + +Q2 finished at: 2022-4-24 12:38:59:866:142 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:39:0:827:982 + Q4-T2 execute sql: 'DELETE FROM t2 WHERE value1=1;' + Q4 finished at: 2022-4-24 12:39:0:901:306 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE value1=0;' + Q5 finished at: 2022-4-24 12:39:0:938:576 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 12:39:0:975:294 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE value2=0;' + current_result: + (0,1,0,0) + (1) expected_result: + null + *(2) expected_result: + (0,1,0,0) + +Q7 finished at: 2022-4-24 12:39:1:828:736 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 12:39:1:865:558 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 12:39:11:831:879 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q10 finished at: 2022-4-24 12:39:11:919:801 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q11 finished at: 2022-4-24 12:39:11:960:788 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 12:39:12:1:314 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..553ab941 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,62 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:39:23:492:652 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-24 12:39:23:531:377 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:39:24:492:311 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-24 12:39:24:564:566 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-24 12:39:24:600:604 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 12:39:24:637:9 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-24 12:39:25:493:475 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 12:39:25:530:61 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 12:39:35:492:274 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q10 finished at: 2022-4-24 12:39:35:566:583 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 12:39:35:609:562 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_write_read_skew.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..d856ceac --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_write_read_skew.txt @@ -0,0 +1,73 @@ +#### db_type: tdsql #### +#### test_type: dda_write_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:39:7:178:270 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 14:39:7:212:539 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:39:8:184:702 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-24 14:39:8:259:944 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-4-24 14:39:8:297:534 +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1; ' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q6 finished at: 2022-4-24 14:39:9:178:787 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 14:39:10:182:962 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 14:39:11:179:741 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 14:39:21:181:436 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 14:39:21:255:585 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-24 14:39:21:292:816 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 14:39:21:329:329 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..fa268a14 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,75 @@ +#### db_type: tdsql #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:36:7:935:95 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 12:36:7:968:671 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:36:8:939:389 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-24 12:36:9:13:877 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-4-24 12:36:9:51:617 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 12:36:9:89:239 +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,1) + (1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,1) + +Q7 finished at: 2022-4-24 12:36:9:935:600 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 12:36:9:968:860 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 12:36:19:934:497 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 12:36:19:999:478 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-24 12:36:20:32:121 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 12:36:20:64:351 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_mda_step_rat.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_mda_step_rat.txt new file mode 100644 index 00000000..25f82914 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_mda_step_rat.txt @@ -0,0 +1,148 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t3;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t3 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t3 VALUES (2, 0, 2, 0);' + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:37:13:593:591 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 15:37:13:630:35 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:37:18:586:257 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-24 15:37:18:667:569 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-4-24 15:37:18:709:760 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-24 15:37:23:586:510 + Q7-T3 execute sql: 'UPDATE t3 SET value2=1 WHERE value1=2;' + Q7 finished at: 2022-4-24 15:37:23:668:154 + Q8-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q8 finished at: 2022-4-24 15:37:23:708:699 +Q9-T1 execute sql: 'SELECT * FROM t3 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + (2,0,2,1) + (5) expected_result: + (2,0,2,1) + (6) expected_result: + (2,0,2,1) + +Q9 finished at: 2022-4-24 15:37:28:595:288 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 15:37:28:632:13 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 15:37:33:587:552 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 15:37:38:586:753 + Q13-T4 execute opt: 'BEGIN' + Q13 finished at: 2022-4-24 15:38:8:583:768 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,3) + + Q14 finished at: 2022-4-24 15:38:8:659:764 + Q15-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q15 finished at: 2022-4-24 15:38:8:697:795 + Q16-T4 execute sql: 'SELECT * FROM t3 ORDER BY k;' + current_result: + (2,0,2,1) + *(1) expected_result: + (2,0,2,1) + *(2) expected_result: + (2,0,2,1) + *(3) expected_result: + (2,0,2,1) + *(4) expected_result: + (2,0,2,1) + *(5) expected_result: + (2,0,2,1) + *(6) expected_result: + (2,0,2,1) + + Q16 finished at: 2022-4-24 15:38:8:735:688 + Q17-T4 execute opt: 'COMMIT'; + Q17 finished at: 2022-4-24 15:38:8:773:168 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..5fac11bd --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,245 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN' + Q1 finished at: 2022-4-24 14:42:30:499:863 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + (4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + (7) expected_result: + (0,1,0,3) + (8) expected_result: + (0,1,0,3) + *(9) expected_result: + (0,1,0,0) + (10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,0) + (12) expected_result: + (0,1,0,3) + *(13) expected_result: + (0,1,0,0) + *(14) expected_result: + (0,1,0,0) + + Q2 finished at: 2022-4-24 14:42:30:574:70 +Q3-T1 execute opt: 'BEGIN' +Q3 finished at: 2022-4-24 14:42:31:499:602 +Q4-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q4 finished at: 2022-4-24 14:42:31:536:254 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-24 14:42:32:503:517 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + (7) expected_result: + (1,3,1,1) + *(8) expected_result: + (1,3,1,0) + (9) expected_result: + (1,3,1,1) + (10) expected_result: + (1,3,1,1) + *(11) expected_result: + (1,3,1,0) + *(12) expected_result: + (1,3,1,0) + *(13) expected_result: + (1,3,1,0) + (14) expected_result: + (1,3,1,1) + + Q6 finished at: 2022-4-24 14:42:32:584:860 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + (3) expected_result: + (0,1,0,3) + (4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + (7) expected_result: + (0,1,0,3) + (8) expected_result: + (0,1,0,3) + (9) expected_result: + (0,1,0,3) + *(10) expected_result: + (0,1,0,0) + *(11) expected_result: + (0,1,0,0) + *(12) expected_result: + (0,1,0,0) + (13) expected_result: + (0,1,0,3) + (14) expected_result: + (0,1,0,3) + + Q7 finished at: 2022-4-24 14:42:32:625:588 + Q8-T2 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 14:42:33:501:898 + Q9-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q9 finished at: 2022-4-24 14:42:33:575:304 + Q10-T4 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + *(7) expected_result: + (1,3,1,0) + (8) expected_result: + (1,3,1,1) + (9) expected_result: + (1,3,1,1) + (10) expected_result: + (1,3,1,1) + (11) expected_result: + (1,3,1,1) + *(12) expected_result: + (1,3,1,0) + *(13) expected_result: + (1,3,1,0) + *(14) expected_result: + (1,3,1,0) + + Q10 finished at: 2022-4-24 14:42:34:501:279 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-24 14:42:35:500:996 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 14:42:36:500:890 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-24 14:42:37:504:287 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 14:42:38:500:101 + Q15-T5 execute opt: 'BEGIN' + Q15 finished at: 2022-4-24 14:42:48:496:600 + Q16-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,3) + *(7) expected_result: + (0,1,0,3) + *(8) expected_result: + (0,1,0,3) + *(9) expected_result: + (0,1,0,3) + *(10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,3) + *(12) expected_result: + (0,1,0,3) + *(13) expected_result: + (0,1,0,3) + *(14) expected_result: + (0,1,0,3) + + Q16 finished at: 2022-4-24 14:42:48:619:445 + Q17-T5 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + *(7) expected_result: + (1,3,1,1) + *(8) expected_result: + (1,3,1,1) + *(9) expected_result: + (1,3,1,1) + *(10) expected_result: + (1,3,1,1) + *(11) expected_result: + (1,3,1,1) + *(12) expected_result: + (1,3,1,1) + *(13) expected_result: + (1,3,1,1) + *(14) expected_result: + (1,3,1,1) + + Q17 finished at: 2022-4-24 14:42:48:653:138 + Q18-T5 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-24 14:42:48:685:961 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..78b5a709 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,110 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:43:19:564:587 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-24 14:43:19:605:74 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:43:20:560:736 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-24 14:43:20:633:758 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-24 14:43:20:670:517 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-24 14:43:21:563:469 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-24 14:43:21:641:733 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-24 14:43:21:680:919 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-24 14:43:22:565:388 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 14:43:22:605:845 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 14:43:23:562:295 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 14:43:24:565:704 + Q13-T4 execute opt: 'BEGIN' + Q13 finished at: 2022-4-24 14:43:34:558:254 + Q14-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q14 finished at: 2022-4-24 14:43:34:626:339 + Q15-T4 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-24 14:43:34:659:805 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..f0520298 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,107 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:42:57:845:71 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-24 12:42:57:882:784 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:42:58:844:495 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-24 12:42:58:916:326 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-24 12:42:58:952:277 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-24 12:42:59:841:814 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-24 12:42:59:909:424 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-24 12:42:59:943:28 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-24 12:43:0:846:703 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 12:43:0:883:436 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 12:43:1:845:23 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 12:43:2:842:624 + Q13-T4 execute opt: 'BEGIN' + Q13 finished at: 2022-4-24 12:43:12:849:301 + Q14-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q14 finished at: 2022-4-24 12:43:12:931:474 + Q15-T4 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-24 12:43:12:972:15 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_sda_dirty_read.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_sda_dirty_read.txt new file mode 100644 index 00000000..bbe0ed2c --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_sda_dirty_read.txt @@ -0,0 +1,48 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:38:10:26:954 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 13:38:10:65:826 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:38:11:30:201 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 13:38:11:114:739 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-24 13:38:12:27:498 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 13:38:13:30:395 + Q7-T3 execute opt: 'BEGIN' + Q7 finished at: 2022-4-24 13:38:23:24:330 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q8 finished at: 2022-4-24 13:38:23:96:392 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 13:38:23:132:65 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_sda_intermediate_read.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..a6ea764d --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_sda_intermediate_read.txt @@ -0,0 +1,52 @@ +#### db_type: tdsql #### +#### test_type: sda_intermediate_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:26:43:398:205 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 12:26:43:434:335 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:26:44:434:827 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 12:26:44:472:225 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-24 12:26:45:434:337 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 12:26:46:434:961 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 12:26:47:473:102 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 12:26:57:431:123 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q9 finished at: 2022-4-24 12:26:57:464:619 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 12:26:57:497:655 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..f3304728 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:36:55:404:860 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 14:36:55:441:781 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:36:56:407:751 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 14:36:56:488:878 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 14:36:56:528:645 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-24 14:36:57:404:906 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 14:36:57:441:613 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 14:37:7:403:798 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q9 finished at: 2022-4-24 14:37:7:477:347 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 14:37:7:512:926 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_sda_lost_self_update.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..4840af84 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_sda_lost_self_update.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_self_update #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:35:15:469:107 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 12:35:15:509:941 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:35:16:468:856 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-24 12:35:17:469:877 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 12:35:17:510:406 + Q4 finished at: 2022-4-24 12:35:17:510:506 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 12:35:18:469:747 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 12:35:28:465:652 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q9 finished at: 2022-4-24 12:35:28:539:380 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 12:35:28:576:4 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..a747109b --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_sda_non_repeatable_read.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:26:25:160:342 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 12:26:25:196:629 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:26:26:197:885 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-24 12:26:27:196:595 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 12:26:29:196:737 + Q4 finished at: 2022-4-24 12:26:29:197:456 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 12:26:29:235:250 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 12:26:39:193:292 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-24 12:26:39:226:870 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 12:26:39:260:528 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..7c055df9 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:33:46:710:879 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 12:33:46:748:108 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:33:47:711:175 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-24 12:33:47:785:788 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 12:33:47:823:225 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-24 12:33:48:871:233 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 12:33:48:907:678 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 12:33:58:711:266 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q9 finished at: 2022-4-24 12:33:58:785:574 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 12:33:58:823:0 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..b526fa1d --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,60 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:34:24:62:68 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 12:34:24:97:578 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:34:25:69:701 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-24 12:34:25:151:17 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 12:34:25:191:776 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-24 12:34:26:62:870 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 12:34:26:96:686 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 12:34:36:65:484 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q9 finished at: 2022-4-24 12:34:36:139:841 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 12:34:36:176:285 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..1c316187 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,68 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:47:6:857:531 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 12:47:6:890:712 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:47:7:858:20 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-24 12:47:7:924:331 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q7 finished at: 2022-4-24 12:47:8:858:86 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 12:47:8:890:770 + Q5 finished at: 2022-4-24 12:47:8:891:50 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 12:47:8:924:443 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 12:47:18:863:589 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,2) + *(1) expected_result: + (0,1,0,2) + (2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 12:47:18:939:914 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-24 12:47:18:978:370 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 12:47:19:16:335 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..4e6b21e6 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,36 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:47:39:234:876 +Q2-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q2 finished at: 2022-4-24 12:47:39:268:556 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:47:40:237:915 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-24 12:47:40:311:16 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-4-24 12:47:41:238:216 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 12:47:41:272:293 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-122-6264d66c-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-24 12:47:41:741:445 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-122-6264d66c-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..74f4dfec --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,34 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:48:5:561:584 +Q2-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q2 finished at: 2022-4-24 12:48:5:594:303 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:48:6:564:403 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-24 12:48:6:635:172 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-4-24 12:48:7:563:193 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='1-cf-16a-6264d686-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-24 12:48:8:64:954 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='1-cf-16a-6264d686-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..dfa86fcc --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,36 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:48:35:46:45 +Q2-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q2 finished at: 2022-4-24 12:48:35:78:783 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:48:36:61:456 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-24 12:48:36:134:283 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-4-24 12:48:37:49:693 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 12:48:37:82:143 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-129-6264d6a4-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-24 12:48:37:550:199 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-129-6264d6a4-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..85d19409 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,66 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:49:27:814:882 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-24 12:49:27:852:597 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:49:28:814:563 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-24 12:49:28:889:78 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-24 12:49:28:926:377 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 12:49:30:816:546 +Q6 finished at: 2022-4-24 12:49:30:816:823 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 12:49:30:854:444 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 12:49:40:814:917 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 12:49:40:889:513 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + (1) expected_result: + (1,3,1,2) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-24 12:49:40:926:862 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 12:49:40:963:535 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..51abb12a --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,66 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:50:6:484:752 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-24 12:50:6:522:817 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:50:7:486:630 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-24 12:50:7:565:600 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-24 12:50:7:605:490 +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 12:50:9:487:724 +Q6 finished at: 2022-4-24 12:50:9:488:462 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 12:50:10:485:478 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 12:50:20:479:808 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 12:50:20:544:765 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + (1) expected_result: + (1,3,1,2) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-24 12:50:20:577:628 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 12:50:20:609:959 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..9e0e13b7 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,66 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:51:17:99:452 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 12:51:17:133:133 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:51:18:103:241 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-24 12:51:18:177:818 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-4-24 12:51:19:100:174 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 12:51:19:133:936 + Q5 finished at: 2022-4-24 12:51:19:138:184 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 12:51:20:104:1 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 12:51:30:103:26 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,2) + *(1) expected_result: + (0,1,0,2) + (2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 12:51:30:177:253 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-24 12:51:30:214:450 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 12:51:30:255:744 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..98b6faef --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,66 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:54:49:419:533 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 12:54:49:457:670 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:54:50:422:743 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-24 12:54:50:503:288 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-4-24 12:54:51:420:120 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 12:54:53:420:652 + Q5 finished at: 2022-4-24 12:54:53:423:813 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 12:54:53:464:248 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 12:55:3:419:964 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,2) + *(1) expected_result: + (0,1,0,2) + (2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 12:55:3:495:604 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-24 12:55:3:533:132 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 12:55:3:570:329 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..a6cfc4dc --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,66 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:55:16:746:892 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 12:55:16:781:15 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:55:17:749:764 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-24 12:55:17:822:934 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-4-24 12:55:18:747:70 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 12:55:18:780:838 + Q5 finished at: 2022-4-24 12:55:18:781:225 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 12:55:18:817:906 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 12:55:28:753:761 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,2) + *(1) expected_result: + (0,1,0,2) + (2) expected_result: + (0,1,0,3) + + Q10 finished at: 2022-4-24 12:55:28:840:569 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + + Q11 finished at: 2022-4-24 12:55:28:881:703 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 12:55:28:922:534 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_mda_step_wat_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..3b25fa9b --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_mda_step_wat_c1.txt @@ -0,0 +1,43 @@ +#### db_type: tdsql #### +#### test_type: mda_step_wat_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t3;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t3 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t3 VALUES (2, 0, 2, 0);' + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:46:19:563:847 +Q2-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q2 finished at: 2022-4-24 15:46:19:597:531 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:46:20:567:89 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-24 15:46:20:641:428 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-24 15:46:21:570:864 + Q7-T3 execute sql: 'UPDATE t3 SET value2=3 WHERE value1=2;' + Q7 finished at: 2022-4-24 15:46:21:651:804 + Q8-T3 execute sql: 'UPDATE t2 SET value2=3 WHERE value1=1;' +Q9-T1 execute sql: 'UPDATE t3 SET value2=1 WHERE value1=2;' + Q5 finished at: 2022-4-24 15:46:22:568:458 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-260-6265004b-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-24 15:46:23:465:509 + Q8 finished at: 2022-4-24 15:46:23:534:481 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-260-6265004b-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_mda_step_wat_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..be339106 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_mda_step_wat_c2.txt @@ -0,0 +1,43 @@ +#### db_type: tdsql #### +#### test_type: mda_step_wat_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t3;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t3 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t3 VALUES (2, 0, 2, 0);' + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:47:13:594:249 +Q2-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q2 finished at: 2022-4-24 15:47:13:631:932 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:47:14:595:819 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-24 15:47:14:670:780 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-24 15:47:15:598:947 + Q7-T3 execute sql: 'UPDATE t3 SET value2=3 WHERE value1=2;' + Q7 finished at: 2022-4-24 15:47:15:680:78 + Q8-T3 execute sql: 'UPDATE t2 SET value2=3 WHERE value1=1;' +Q9-T1 execute sql: 'UPDATE t3 SET value2=1 WHERE value1=2;' + Q5 finished at: 2022-4-24 15:47:16:596:708 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-267-62650081-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-24 15:47:17:496:334 + Q8 finished at: 2022-4-24 15:47:17:631:606 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-267-62650081-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..16d0646a --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,45 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:46:56:300:43 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 14:46:56:337:469 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:46:57:302:874 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-24 14:46:58:300:712 + Q4 finished at: 2022-4-24 14:46:58:314:959 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 14:46:59:303:809 + Q7-T3 execute opt: 'BEGIN' + Q7 finished at: 2022-4-24 14:47:9:298:598 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-24 14:47:9:370:352 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 14:47:9:405:852 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..f4f859f8 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,45 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:44:22:950:643 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 12:44:22:984:504 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:44:23:950:391 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-24 12:44:24:951:433 + Q4 finished at: 2022-4-24 12:44:24:951:713 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 12:44:25:951:387 + Q7-T3 execute opt: 'BEGIN' + Q7 finished at: 2022-4-24 12:44:35:953:771 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-24 12:44:36:26:795 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 12:44:36:63:184 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_sda_full_write.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_sda_full_write.txt new file mode 100644 index 00000000..3586843a --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_sda_full_write.txt @@ -0,0 +1,47 @@ +#### db_type: tdsql #### +#### test_type: sda_full_write #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:44:48:126:940 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 12:44:48:160:723 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:44:49:130:868 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-24 12:44:50:127:632 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 12:44:50:161:349 + Q4 finished at: 2022-4-24 12:44:50:161:491 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 12:44:51:131:32 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 12:45:1:130:671 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q9 finished at: 2022-4-24 12:45:1:205:432 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 12:45:1:242:379 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_sda_full_write_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..db47e3f3 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_sda_full_write_committed.txt @@ -0,0 +1,47 @@ +#### db_type: tdsql #### +#### test_type: sda_full_write_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:45:15:791:638 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 12:45:15:824:500 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:45:16:799:965 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-24 12:45:17:792:279 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 12:45:17:825:274 + Q4 finished at: 2022-4-24 12:45:17:829:665 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 12:45:17:870:693 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 12:45:27:796:47 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q9 finished at: 2022-4-24 12:45:27:870:377 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 12:45:27:907:584 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..ab0aecce --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:46:43:47:712 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 12:46:43:81:374 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:46:44:58:209 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-24 12:46:45:48:716 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 12:46:45:83:98 + Q4 finished at: 2022-4-24 12:46:45:85:364 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 12:46:45:122:370 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 12:46:55:54:718 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q9 finished at: 2022-4-24 12:46:55:135:229 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 12:46:55:175:210 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_sda_lost_update_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..1a5ef1d3 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_sda_lost_update_c1.txt @@ -0,0 +1,52 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:45:47:216:696 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 12:45:47:253:804 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:45:48:212:700 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 12:45:48:277:120 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 12:45:50:213:529 +Q5 finished at: 2022-4-24 12:45:50:218:282 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 12:45:50:254:850 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 12:46:0:220:875 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-24 12:46:0:302:9 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 12:46:0:342:139 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_sda_lost_update_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..362c63ed --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/repeatable-read/wat_sda_lost_update_c2.txt @@ -0,0 +1,52 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:46:15:24:95 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 12:46:15:64:799 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:46:16:16:565 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 12:46:16:83:31 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 12:46:18:17:866 +Q5 finished at: 2022-4-24 12:46:18:21:372 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 12:46:19:26:136 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 12:46:29:20:454 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-24 12:46:29:94:301 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 12:46:29:131:206 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/result_summary/read-committed_total-result.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..38745346 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/result_summary/repeatable-read_total-result.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/result_summary/repeatable-read_total-result.txt new file mode 100644 index 00000000..ef182286 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/result_summary/repeatable-read_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/result_summary/serializable_total-result.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/result_summary/serializable_total-result.txt new file mode 100644 index 00000000..b5b686cf --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/result_summary/serializable_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Rollback + +rat_dda_write_read_skew_committed: Rollback + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Rollback + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Rollback + +rat_dda_read_skew2_committed: Rollback + +rat_mda_step_rat: Rollback + +rat_mda_step_rat_long_fork: Rollback + +rat_mda_step_rat_predicate_based_delete: Rollback + +rat_mda_step_rat_predicate_based_insert: Rollback + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Rollback + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Rollback + +iat_dda_write_skew_predicate_based-intersecting_data: Avoid + +iat_dda_write_skew_predicate_based-overdraft_protection: Rollback + +iat_dda_write_skew_committed: Rollback + +iat_mda_step_iat: Rollback + +iat_mda_step_iat_predicate_based_delete: Rollback + +iat_mda_step_iat_predicate_based_insert: Rollback + +iat_mda_step_iat_uname_anomaly: Rollback + +iat_mda_step_iat_cross_phenomenon: Rollback + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Rollback + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_dda_read_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..2572a301 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_dda_read_skew_committed.txt @@ -0,0 +1,43 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:26:44:67:658 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-24 14:26:44:104:413 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:26:45:69:14 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-24 14:26:45:144:212 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + Q5 finished at: 2022-4-24 14:26:46:69:473 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 14:26:46:107:334 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-229-6264eda4-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-24 14:26:46:769:323 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-229-6264eda4-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..b4cc008b --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,43 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:27:8:795:44 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-24 14:27:8:829:0 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:27:9:797:974 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-24 14:27:9:871:553 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q5 finished at: 2022-4-24 14:27:10:799:528 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 14:27:10:836:333 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-1ff-6264edbc-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-24 14:27:11:497:78 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-1ff-6264edbc-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_dda_write_skew.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_dda_write_skew.txt new file mode 100644 index 00000000..9d485e1b --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_dda_write_skew.txt @@ -0,0 +1,50 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:27:32:438:902 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-24 14:27:32:479:809 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:27:33:435:704 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-24 14:27:33:510:260 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-4-24 14:27:34:440:411 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 14:27:34:480:799 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='1-cf-204-6264edd5-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-24 14:27:34:941:409 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='1-cf-204-6264edd5-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_dda_write_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..efe9ff7f --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_dda_write_skew_committed.txt @@ -0,0 +1,50 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:29:7:546:660 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-24 14:29:7:584:722 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:29:8:542:610 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-24 14:29:8:609:293 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-4-24 14:29:9:548:384 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 14:29:9:585:976 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='1-cf-20b-6264ee34-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-24 14:29:10:45:717 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='1-cf-20b-6264ee34-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..819f245a --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,77 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL PRIMARY KEY);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:28:10:996:44 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-24 14:28:11:35:541 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-24 14:28:11:72:323 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-24 14:28:11:995:538 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' +Q8-T1 execute opt: 'COMMIT'; + current_result: + (330,) + *(1) expected_result: + (330,) + (2) expected_result: + (300,) + + Q5 finished at: 2022-4-24 14:28:12:992:327 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' +Q8 finished at: 2022-4-24 14:28:12:996:813 + Q6 finished at: 2022-4-24 14:28:13:30:1 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 14:28:13:66:666 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 14:28:22:995:751 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-24 14:28:23:69:806 + Q11-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q11 finished at: 2022-4-24 14:28:23:106:694 + Q12-T3 execute sql: 'DROP TABLE mytab;' + Q12 finished at: 2022-4-24 14:28:23:160:872 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-24 14:28:23:197:255 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..7e9598e1 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,48 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:28:39:675:478 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-24 14:28:39:715:593 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:28:40:668:462 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-24 14:28:40:734:518 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' + Q5 finished at: 2022-4-24 14:28:41:674:329 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 14:28:41:707:273 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-1c7-6264ee17-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-24 14:28:42:377:195 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-1c7-6264ee17-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_mda_step_iat.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_mda_step_iat.txt new file mode 100644 index 00000000..d2c169d0 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_mda_step_iat.txt @@ -0,0 +1,87 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:29:30:644:144 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + (2,0,2,1) + (5) expected_result: + (2,0,2,1) + (6) expected_result: + (2,0,2,1) + +Q2 finished at: 2022-4-24 14:29:30:680:423 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:29:31:641:185 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,,3) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + + Q4 finished at: 2022-4-24 14:29:31:708:106 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-24 14:29:32:644:771 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-4-24 14:29:32:718:833 +Q7-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q8-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q9-T3 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q8 finished at: 2022-4-24 14:29:35:643:792 + Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='1-cf-20e-6264ee4c-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q9 failed at: 2022-4-24 14:29:36:547:793 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]set_1650716943_1:Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-24 14:29:55:348:260 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='1-cf-20e-6264ee4c-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..92e9861d --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,128 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:33:0:798:700 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + (3) expected_result: + (0,1,0,3) + (4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-24 14:33:0:836:657 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:33:1:793:845 + Q4-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-24 14:33:2:798:425 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q10-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,0) + (5) expected_result: + (1,3,1,1) + (6) expected_result: + (1,3,1,1) + +Q10 finished at: 2022-4-24 14:33:3:799:421 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-24 14:33:3:836:783 + Q4 finished at: 2022-4-24 14:33:3:846:941 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 14:33:3:881:332 + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,0) + + Q7 finished at: 2022-4-24 14:33:3:885:828 + Q8-T3 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q8 finished at: 2022-4-24 14:33:3:923:658 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 14:33:3:961:145 + Q12-T4 execute opt: 'BEGIN' + Q12 finished at: 2022-4-24 14:33:13:797:793 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + *(2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,3) + + Q13 finished at: 2022-4-24 14:33:13:883:454 + Q14-T4 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + (1,3,1,1) + *(1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,1) + *(4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,1) + *(6) expected_result: + (1,3,1,1) + + Q14 finished at: 2022-4-24 14:33:13:920:444 + Q15-T4 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-24 14:33:13:956:982 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..5bc1fb2b --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,172 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:32:28:726:214 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + *(5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,3) + (7) expected_result: + (0,1,0,3) + *(8) expected_result: + (0,1,0,0) + (9) expected_result: + (0,1,0,3) + (10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,0) + (12) expected_result: + (0,1,0,3) + (13) expected_result: + (0,1,0,3) + (14) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-24 14:32:28:762:644 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:32:29:722:534 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + *(7) expected_result: + (1,3,1,0) + (8) expected_result: + (1,3,1,1) + *(9) expected_result: + (1,3,1,0) + (10) expected_result: + (1,3,1,1) + (11) expected_result: + (1,3,1,1) + (12) expected_result: + (1,3,1,1) + (13) expected_result: + (1,3,1,1) + *(14) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-24 14:32:29:790:318 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-24 14:32:30:721:333 + Q6-T3 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q8-T4 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 14:32:31:724:744 + Q9-T4 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q13-T1 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + (3) expected_result: + (0,1,0,3) + (4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,0) + *(6) expected_result: + (0,1,0,0) + *(7) expected_result: + (0,1,0,0) + *(8) expected_result: + (0,1,0,0) + (9) expected_result: + (0,1,0,3) + (10) expected_result: + (0,1,0,3) + (11) expected_result: + (0,1,0,3) + *(12) expected_result: + (0,1,0,0) + (13) expected_result: + (0,1,0,3) + (14) expected_result: + (0,1,0,3) + + Q11 finished at: 2022-4-24 14:32:33:727:469 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 14:32:33:761:58 + Q9 finished at: 2022-4-24 14:32:33:764:126 + Q10-T4 execute opt: 'COMMIT'; + current_result: + (1,3,1,1) + (1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,1) + (6) expected_result: + (1,3,1,0) + *(7) expected_result: + (1,3,1,1) + *(8) expected_result: + (1,3,1,1) + (9) expected_result: + (1,3,1,0) + *(10) expected_result: + (1,3,1,1) + *(11) expected_result: + (1,3,1,1) + *(12) expected_result: + (1,3,1,1) + (13) expected_result: + (1,3,1,0) + *(14) expected_result: + (1,3,1,1) + +Q13 finished at: 2022-4-24 14:32:33:797:133 +Q14-T1 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 14:32:33:800:422 +Q14 finished at: 2022-4-24 14:32:33:832:777 + Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-251-6264eefe-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q6 failed at: 2022-4-24 14:32:34:326:814 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-251-6264eefe-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..94c44bda --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,87 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:30:6:530:361 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-24 14:30:6:567:520 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:30:7:530:473 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + null + *(6) expected_result: + (0,1,0,0) + + Q4 finished at: 2022-4-24 14:30:7:604:386 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-24 14:30:8:530:113 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + null + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + null + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-4-24 14:30:8:603:490 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE value1=0;' + Q8-T2 execute sql: 'DELETE FROM t2 WHERE value1=1;' + Q9-T3 execute sql: 'DELETE FROM t1 WHERE value1=2;' + Q8 finished at: 2022-4-24 14:30:11:533:95 + Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-239-6264ee70-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q9 failed at: 2022-4-24 14:30:12:432:939 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]set_1650716943_1:Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-24 14:30:31:237:388 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-239-6264ee70-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..a7d1255b --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,84 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:30:42:622:168 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,0,2,0) + (5) expected_result: + (2,0,2,0) + (6) expected_result: + (2,0,2,0) + +Q2 finished at: 2022-4-24 14:30:42:660:669 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:30:43:625:266 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + null + (1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,0) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1,0,0) + *(6) expected_result: + null + + Q4 finished at: 2022-4-24 14:30:43:705:129 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-24 14:30:44:618:287 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + null + (1) expected_result: + (1,3,1,0) + *(2) expected_result: + null + (3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,0) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-24 14:30:44:685:730 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' + Q8-T2 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + Q8 finished at: 2022-4-24 14:30:47:622:998 + Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-1ca-6264ee94-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q9 failed at: 2022-4-24 14:30:48:520:573 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]set_1650716943_1:Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-24 14:31:7:320:920 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-1ca-6264ee94-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..6b3b17d5 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,121 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:33:50:863:294 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + *(5) expected_result: + (0,1,0,0) + *(6) expected_result: + (0,1,0,0) + +Q2 finished at: 2022-4-24 14:33:50:901:31 +Q3-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + +Q3 finished at: 2022-4-24 14:33:50:938:516 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-24 14:33:51:859:484 + Q5-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,0) + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q5 finished at: 2022-4-24 14:33:51:925:836 + Q6-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 14:33:52:862:847 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + (4) expected_result: + (0,1,0,3) + *(5) expected_result: + (0,1,0,0) + *(6) expected_result: + (0,1,0,0) + + Q9 finished at: 2022-4-24 14:33:52:936:663 + Q10-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' +Q12-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q10 finished at: 2022-4-24 14:33:53:865:358 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 14:33:53:901:655 +Q12 finished at: 2022-4-24 14:33:53:902:328 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-24 14:33:53:939:486 + Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-1d5-6264ef4f-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q6 failed at: 2022-4-24 14:33:54:466:71 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-1d5-6264ef4f-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..6943f1b6 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,128 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0, 2, 0);' + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:31:40:947:893 +Q2-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,2) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + +Q2 finished at: 2022-4-24 14:31:40:987:438 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:31:41:945:377 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,2) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + (0,1,0,2) + (6) expected_result: + (0,1,0,2) + + Q4 finished at: 2022-4-24 14:31:42:21:141 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5 finished at: 2022-4-24 14:31:42:57:760 + Q6-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + *(3) expected_result: + (1,3,1,0) + *(4) expected_result: + (1,3,1,0) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q6 finished at: 2022-4-24 14:31:42:94:578 + Q7-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 14:31:42:945:598 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE value1=2;' +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE value1=2;' + Q7 finished at: 2022-4-24 14:31:43:947:362 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 14:31:43:983:955 + current_result: + (2,0,2,0) + *(1) expected_result: + (2,0,2,0) + *(2) expected_result: + (2,0,2,0) + *(3) expected_result: + (2,0,2,0) + *(4) expected_result: + (2,0,2,0) + *(5) expected_result: + (2,0,2,0) + *(6) expected_result: + (2,0,2,0) + + Q10 finished at: 2022-4-24 14:31:43:984:243 + Q11-T3 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=2;' + Q11 finished at: 2022-4-24 14:31:44:21:229 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,3) + *(1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,0) + *(3) expected_result: + (0,1,0,3) + *(4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,0) + (6) expected_result: + (0,1,0,0) + + Q12 finished at: 2022-4-24 14:31:44:58:684 + Q13-T3 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q13 finished at: 2022-4-24 14:31:44:95:858 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 14:31:44:133:695 +Q15 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='1-cf-21a-6264eecc-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q15 failed at: 2022-4-24 14:31:45:447:100 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='1-cf-21a-6264eecc-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_sda_lost_update_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..c7f262c0 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_sda_lost_update_committed.txt @@ -0,0 +1,38 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:26:21:258:230 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 14:26:21:298:771 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:26:22:257:937 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-24 14:26:23:259:801 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 14:26:23:300:529 + Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-226-6264ed8e-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q4 failed at: 2022-4-24 14:26:23:659:568 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-226-6264ed8e-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..d2583c7b --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:25:46:418:103 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 14:25:46:455:228 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:25:47:417:834 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-24 14:25:48:418:751 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 14:25:48:454:938 + Q4 finished at: 2022-4-24 14:25:48:458:40 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 14:25:48:494:728 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 14:25:58:413:608 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-24 14:25:58:479:332 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 14:25:58:511:312 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_double_write_skew1.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..dde6adb4 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_double_write_skew1.txt @@ -0,0 +1,34 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:58:34:607:295 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 13:58:34:647:940 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:58:35:600:734 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-24 13:58:35:668:442 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' +Q6 finished at: 2022-4-24 13:58:36:609:104 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-1e8-6264e70b-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-24 13:58:37:106:455 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-1e8-6264e70b-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..5d314797 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,36 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:59:1:59:676 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 13:59:1:97:417 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:59:2:59:164 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-24 13:59:2:132:778 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' +Q7 finished at: 2022-4-24 13:59:3:61:541 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 13:59:3:99:59 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-1ec-6264e726-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-24 13:59:3:561:432 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-1ec-6264e726-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_double_write_skew2.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..83e97a02 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_double_write_skew2.txt @@ -0,0 +1,43 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:59:26:761:703 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 13:59:26:798:527 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:59:27:757:831 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-24 13:59:27:823:877 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q6 finished at: 2022-4-24 13:59:28:764:102 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 13:59:28:801:43 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-1ca-6264e73f-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-24 13:59:29:260:72 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-1ca-6264e73f-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_read_skew.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_read_skew.txt new file mode 100644 index 00000000..859903dd --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_read_skew.txt @@ -0,0 +1,41 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:59:52:144:144 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-24 13:59:52:182:436 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:59:53:144:809 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-24 13:59:53:221:270 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + Q5 finished at: 2022-4-24 13:59:54:145:978 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-1cd-6264e758-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-24 13:59:54:745:670 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-1cd-6264e758-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_read_skew2.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_read_skew2.txt new file mode 100644 index 00000000..34826d88 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_read_skew2.txt @@ -0,0 +1,43 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:4:2:367:822 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 14:4:2:408:275 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:4:3:362:952 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-24 14:4:3:436:118 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-4-24 14:4:4:368:704 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 14:4:4:409:644 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-193-6264e853-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-24 14:4:4:865:314 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-193-6264e853-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..9b0d6e4e --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_read_skew2_committed.txt @@ -0,0 +1,43 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:4:26:866:98 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 14:4:26:903:317 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:4:27:861:746 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE k=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-24 14:4:27:926:718 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-4-24 14:4:28:868:313 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 14:4:28:905:217 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-196-6264e86b-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-24 14:4:29:364:284 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-196-6264e86b-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..efae420b --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,75 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:0:22:298:617 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value2=0;' + current_result: + (0,1,0,0) + (1) expected_result: + null + *(2) expected_result: + (0,1,0,0) + +Q2 finished at: 2022-4-24 14:0:22:338:573 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:0:23:301:141 + Q4-T2 execute sql: 'DELETE FROM t2 WHERE value1=1;' + Q4 finished at: 2022-4-24 14:0:23:385:508 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE value1=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE value2=0;' + current_result: + (0,1,0,0) + (1) expected_result: + null + *(2) expected_result: + (0,1,0,0) + +Q7 finished at: 2022-4-24 14:0:24:300:104 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 14:0:24:339:480 + Q5 finished at: 2022-4-24 14:0:24:340:864 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 14:0:24:383:391 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 14:0:34:293:146 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q10 finished at: 2022-4-24 14:0:34:359:466 + Q11-T3 execute sql: 'SELECT * FROM t2 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q11 finished at: 2022-4-24 14:0:34:392:614 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 14:0:34:425:189 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..897189a8 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,62 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:3:39:232:989 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-24 14:3:39:273:838 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:3:40:234:534 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-24 14:3:41:233:235 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 14:3:41:272:615 + Q4 finished at: 2022-4-24 14:3:41:273:42 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-24 14:3:41:313:793 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 14:3:41:354:492 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-24 14:3:51:233:72 + Q10-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q10 finished at: 2022-4-24 14:3:51:313:332 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 14:3:51:353:130 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_write_read_skew.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..cec848db --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_write_read_skew.txt @@ -0,0 +1,41 @@ +#### db_type: tdsql #### +#### test_type: dda_write_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:56:29:872:374 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 13:56:29:913:110 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:56:30:867:334 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-24 13:56:30:939:107 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' +Q6-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1; ' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q6 finished at: 2022-4-24 13:56:31:873:736 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-18a-6264e68e-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-24 13:56:32:370:414 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-18a-6264e68e-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..6cbb039f --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,43 @@ +#### db_type: tdsql #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:57:7:768:310 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 13:57:7:804:985 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:57:8:767:363 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-24 13:57:8:839:659 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q7 finished at: 2022-4-24 13:57:9:769:879 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 13:57:9:806:424 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='1-cf-1ba-6264e6b4-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-24 13:57:10:266:261 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='1-cf-1ba-6264e6b4-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_mda_step_rat.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_mda_step_rat.txt new file mode 100644 index 00000000..3dd61bc3 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_mda_step_rat.txt @@ -0,0 +1,73 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t3;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t3 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t3 VALUES (2, 0, 2, 0);' + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:48:46:576:185 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 15:48:46:615:416 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:48:47:570:145 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-24 15:48:47:639:212 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-24 15:48:48:577:305 + Q7-T3 execute sql: 'UPDATE t3 SET value2=1 WHERE value1=2;' + Q7 finished at: 2022-4-24 15:48:48:656:702 + Q8-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' +Q9-T1 execute sql: 'SELECT * FROM t3 WHERE value1=2;' + current_result: + (0,1,0,0) + (1) expected_result: + (0,1,0,3) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + *(4) expected_result: + (0,1,0,0) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + + Q5 finished at: 2022-4-24 15:48:49:583:339 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-298-626500de-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-24 15:48:50:483:362 + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + *(6) expected_result: + (1,3,1,0) + + Q8 finished at: 2022-4-24 15:48:50:556:71 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-298-626500de-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..bb7e8d77 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,167 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN' + Q1 finished at: 2022-4-24 14:10:6:496:991 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + *(3) expected_result: + (0,1,0,0) + (4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + (7) expected_result: + (0,1,0,3) + (8) expected_result: + (0,1,0,3) + *(9) expected_result: + (0,1,0,0) + (10) expected_result: + (0,1,0,3) + *(11) expected_result: + (0,1,0,0) + (12) expected_result: + (0,1,0,3) + *(13) expected_result: + (0,1,0,0) + *(14) expected_result: + (0,1,0,0) + + Q2 finished at: 2022-4-24 14:10:6:574:342 +Q3-T1 execute opt: 'BEGIN' +Q3 finished at: 2022-4-24 14:10:7:498:90 +Q4-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-24 14:10:8:496:359 + Q6-T3 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + *(2) expected_result: + (1,3,1,0) + (3) expected_result: + (1,3,1,1) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + (7) expected_result: + (1,3,1,1) + *(8) expected_result: + (1,3,1,0) + (9) expected_result: + (1,3,1,1) + (10) expected_result: + (1,3,1,1) + *(11) expected_result: + (1,3,1,0) + *(12) expected_result: + (1,3,1,0) + *(13) expected_result: + (1,3,1,0) + (14) expected_result: + (1,3,1,1) + + Q6 finished at: 2022-4-24 14:10:8:573:353 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + Q8-T2 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 14:10:9:498:234 + Q9-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q10-T4 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + *(2) expected_result: + (0,1,0,0) + (3) expected_result: + (0,1,0,3) + (4) expected_result: + (0,1,0,3) + (5) expected_result: + (0,1,0,3) + *(6) expected_result: + (0,1,0,0) + (7) expected_result: + (0,1,0,3) + (8) expected_result: + (0,1,0,3) + (9) expected_result: + (0,1,0,3) + *(10) expected_result: + (0,1,0,0) + *(11) expected_result: + (0,1,0,0) + *(12) expected_result: + (0,1,0,0) + (13) expected_result: + (0,1,0,3) + (14) expected_result: + (0,1,0,3) + + Q7 finished at: 2022-4-24 14:10:10:499:808 +Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-1f9-6264e9bf-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q4 failed at: 2022-4-24 14:10:10:899:133 + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + *(3) expected_result: + (1,3,1,0) + (4) expected_result: + (1,3,1,1) + *(5) expected_result: + (1,3,1,0) + (6) expected_result: + (1,3,1,1) + *(7) expected_result: + (1,3,1,0) + (8) expected_result: + (1,3,1,1) + (9) expected_result: + (1,3,1,1) + (10) expected_result: + (1,3,1,1) + (11) expected_result: + (1,3,1,1) + *(12) expected_result: + (1,3,1,0) + *(13) expected_result: + (1,3,1,0) + *(14) expected_result: + (1,3,1,0) + + Q10 finished at: 2022-4-24 14:10:30:501:52 + Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]set_1650716943_1:Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q9 failed at: 2022-4-24 14:10:31:399:574 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-1f9-6264e9bf-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..807767e4 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,69 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:10:43:883:91 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-24 14:10:43:918:55 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:10:44:882:36 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-24 14:10:44:949:197 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-24 14:10:45:886:808 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-24 14:10:45:963:170 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-24 14:10:46:884:807 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-19e-6264e9e3-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-24 14:10:47:786:48 + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-24 14:10:47:854:506 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-19e-6264e9e3-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..ad61940e --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,66 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:11:16:308:675 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-24 14:11:16:343:400 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:11:17:311:740 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-24 14:11:17:385:503 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-24 14:11:18:308:575 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-24 14:11:18:375:830 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-24 14:11:19:314:391 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-1a3-6264ea04-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-24 14:11:20:210:933 + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-24 14:11:20:277:417 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-1a3-6264ea04-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_sda_dirty_read.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_sda_dirty_read.txt new file mode 100644 index 00000000..01d698eb --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_sda_dirty_read.txt @@ -0,0 +1,48 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:40:17:358:323 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 13:40:17:398:313 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:40:18:352:448 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-24 13:40:19:355:272 + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 13:40:19:356:266 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 13:40:20:353:444 + Q7-T3 execute opt: 'BEGIN' + Q7 finished at: 2022-4-24 13:40:30:350:767 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q8 finished at: 2022-4-24 13:40:30:422:415 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 13:40:30:457:664 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_sda_intermediate_read.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..4111ef17 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_sda_intermediate_read.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: sda_intermediate_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:53:37:192:145 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 13:53:37:228:976 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:53:38:191:957 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-24 13:53:39:192:559 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 13:53:41:192:940 + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 13:53:41:193:67 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 13:53:41:229:390 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 13:53:51:192:325 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q9 finished at: 2022-4-24 13:53:51:276:283 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 13:53:51:312:659 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..b919d762 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:54:3:617:378 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 13:54:3:653:640 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:54:4:618:278 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-24 13:54:5:620:401 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 13:54:5:656:677 + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 13:54:5:661:11 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 13:54:5:697:522 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 13:54:15:617:491 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q9 finished at: 2022-4-24 13:54:15:689:710 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 13:54:15:725:349 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_sda_lost_self_update.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..ea385944 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_sda_lost_self_update.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_self_update #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:55:55:688:229 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 13:55:55:725:327 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:55:56:672:759 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-24 13:55:57:687:77 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 13:55:57:723:919 + Q4 finished at: 2022-4-24 13:55:57:727:447 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 13:55:58:673:743 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 13:56:8:673:363 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q9 finished at: 2022-4-24 13:56:8:746:164 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 13:56:8:782:59 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..3fe15bd2 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_sda_non_repeatable_read.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:41:3:100:93 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 13:41:3:133:422 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:41:4:107:251 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-24 13:41:5:100:870 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 13:41:7:100:646 + Q4 finished at: 2022-4-24 13:41:7:104:529 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 13:41:7:145:784 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 13:41:17:99:855 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q9 finished at: 2022-4-24 13:41:17:168:683 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 13:41:17:201:40 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..f0b42642 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:54:58:383:103 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 13:54:58:416:68 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:54:59:381:751 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-24 13:55:0:382:212 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 13:55:0:414:519 + Q4 finished at: 2022-4-24 13:55:0:415:161 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 13:55:0:448:524 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 13:55:10:385:465 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q9 finished at: 2022-4-24 13:55:10:459:280 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 13:55:10:495:715 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..e035e29d --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,60 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 13:55:28:315:429 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 13:55:28:350:65 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 13:55:29:318:157 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-24 13:55:30:315:895 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 13:55:30:349:429 + Q4 finished at: 2022-4-24 13:55:30:349:442 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 13:55:30:386:949 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 13:55:40:314:234 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q9 finished at: 2022-4-24 13:55:40:380:523 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 13:55:40:413:518 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..cbc10b35 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,43 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:20:48:149:661 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 14:20:48:189:189 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:20:49:151:927 + Q4-T2 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q4 finished at: 2022-4-24 14:20:49:237:837 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q7-T1 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + *(1) expected_result: + (1,3,1,0) + (2) expected_result: + (1,3,1,1) + +Q7 finished at: 2022-4-24 14:20:50:151:345 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 14:20:50:190:705 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-1b0-6264ec41-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-24 14:20:50:652:963 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-1b0-6264ec41-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..11cf2b7d --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,36 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:21:16:428:719 +Q2-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q2 finished at: 2022-4-24 14:21:16:462:315 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:21:17:432:426 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-24 14:21:17:513:217 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-4-24 14:21:18:436:731 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 14:21:18:469:846 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-214-6264ec5d-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-24 14:21:18:937:141 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-214-6264ec5d-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..48b3d6a9 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,34 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:21:46:250:33 +Q2-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q2 finished at: 2022-4-24 14:21:46:286:904 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:21:47:249:698 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-24 14:21:47:322:608 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-4-24 14:21:48:251:809 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-217-6264ec7b-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-24 14:21:48:752:152 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-217-6264ec7b-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..966f310f --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,36 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:22:11:344:891 +Q2-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q2 finished at: 2022-4-24 14:22:11:378:166 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:22:12:350:468 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-24 14:22:12:422:349 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-4-24 14:22:13:346:629 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 14:22:13:379:629 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-1b4-6264ec94-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-24 14:22:13:850:656 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-1b4-6264ec94-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..30bdf001 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,41 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:22:35:589:955 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-24 14:22:35:627:380 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:22:36:586:62 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-24 14:22:36:651:400 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q5 finished at: 2022-4-24 14:22:37:589:961 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='1-cf-1ec-6264ecab-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-24 14:22:38:194:741 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='1-cf-1ec-6264ecab-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..bb1bbb4a --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,41 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:22:59:478:481 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE value1=0;' + current_result: + (0,1,0,0) + *(1) expected_result: + (0,1,0,0) + (2) expected_result: + (0,1,0,3) + +Q2 finished at: 2022-4-24 14:22:59:516:571 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:23:0:474:359 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-24 14:23:0:543:442 + Q5-T2 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' + Q5 finished at: 2022-4-24 14:23:1:476:826 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-21b-6264ecc3-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-24 14:23:2:80:704 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-21b-6264ecc3-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..289d87e3 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,43 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:23:28:696:285 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 14:23:28:729:686 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:23:29:699:201 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-24 14:23:29:872:646 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-4-24 14:23:30:697:798 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 14:23:30:731:114 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='1-cf-1f4-6264ece1-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-24 14:23:31:201:230 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='1-cf-1f4-6264ece1-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..75fc44c4 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,41 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:23:55:838:446 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 14:23:55:879:155 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:23:56:844:284 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-24 14:23:56:917:691 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q6-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q6 finished at: 2022-4-24 14:23:57:839:976 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-1ba-6264ecfc-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-24 14:23:58:336:685 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-1ba-6264ecfc-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..e956ae73 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,43 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:24:27:387:106 +Q2-T1 execute sql: 'UPDATE t1 SET value2=3 WHERE value1=0;' +Q2 finished at: 2022-4-24 14:24:27:424:162 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:24:28:391:39 + Q4-T2 execute sql: 'SELECT * FROM t2 WHERE value1=1;' + current_result: + (1,3,1,0) + (1) expected_result: + (1,3,1,1) + *(2) expected_result: + (1,3,1,0) + + Q4 finished at: 2022-4-24 14:24:28:476:576 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' +Q7-T1 execute sql: 'UPDATE t2 SET value2=1 WHERE value1=1;' +Q7 finished at: 2022-4-24 14:24:29:388:599 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 14:24:29:425:511 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-1c0-6264ed1c-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-24 14:24:29:890:380 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-99-1c0-6264ed1c-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_mda_step_wat_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..ae50c8c3 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_mda_step_wat_c1.txt @@ -0,0 +1,43 @@ +#### db_type: tdsql #### +#### test_type: mda_step_wat_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t3;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t3 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t3 VALUES (2, 0, 2, 0);' + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:49:56:418:1 +Q2-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q2 finished at: 2022-4-24 15:49:56:458:284 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:49:57:417:781 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-24 15:49:57:497:145 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-24 15:49:58:415:398 + Q7-T3 execute sql: 'UPDATE t3 SET value2=3 WHERE value1=2;' + Q7 finished at: 2022-4-24 15:49:58:494:347 + Q8-T3 execute sql: 'UPDATE t2 SET value2=3 WHERE value1=1;' +Q9-T1 execute sql: 'UPDATE t3 SET value2=1 WHERE value1=2;' + Q5 finished at: 2022-4-24 15:49:59:419:585 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-26c-62650124-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-24 15:50:0:319:547 + Q8 finished at: 2022-4-24 15:50:0:400:384 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-26c-62650124-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_mda_step_wat_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..ddc74021 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_mda_step_wat_c2.txt @@ -0,0 +1,43 @@ +#### db_type: tdsql #### +#### test_type: mda_step_wat_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t2;' +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t3;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t2 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'CREATE TABLE t3 (k INT, v INT, value1 INT, value2 INT, PRIMARY KEY (v,k)) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1, 0, 0);' +Q0-T1 execute sql: 'INSERT INTO t2 VALUES (1, 3, 1, 0);' +Q0-T1 execute sql: 'INSERT INTO t3 VALUES (2, 0, 2, 0);' + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 15:50:22:70:415 +Q2-T1 execute sql: 'UPDATE t1 SET value2=1 WHERE value1=0;' +Q2 finished at: 2022-4-24 15:50:22:107:664 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 15:50:23:66:727 + Q4-T2 execute sql: 'UPDATE t2 SET value2=2 WHERE value1=1;' + Q4 finished at: 2022-4-24 15:50:23:134:142 + Q5-T2 execute sql: 'UPDATE t1 SET value2=2 WHERE value1=0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-24 15:50:24:70:902 + Q7-T3 execute sql: 'UPDATE t3 SET value2=3 WHERE value1=2;' + Q7 finished at: 2022-4-24 15:50:24:145:812 + Q8-T3 execute sql: 'UPDATE t2 SET value2=3 WHERE value1=1;' +Q9-T1 execute sql: 'UPDATE t3 SET value2=1 WHERE value1=2;' + Q5 finished at: 2022-4-24 15:50:25:68:463 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='1-cf-293-6265013e-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-24 15:50:25:971:933 + Q8 finished at: 2022-4-24 15:50:26:107:707 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='1-cf-293-6265013e-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..ee16c5ca --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,45 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:12:8:949:470 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 14:12:8:986:250 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:12:9:949:272 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-24 14:12:10:949:830 + Q4 finished at: 2022-4-24 14:12:10:949:936 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 14:12:11:950:100 + Q7-T3 execute opt: 'BEGIN' + Q7 finished at: 2022-4-24 14:12:21:948:912 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-24 14:12:22:25:453 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 14:12:22:61:690 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..7620f9ed --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,45 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:14:28:8:184 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 14:14:28:48:425 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:14:29:8:567 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-24 14:14:30:9:405 + Q4 finished at: 2022-4-24 14:14:30:10:142 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 14:14:31:9:323 + Q7-T3 execute opt: 'BEGIN' + Q7 finished at: 2022-4-24 14:14:41:4:988 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-24 14:14:41:79:4 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 14:14:41:115:300 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_sda_full_write.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_sda_full_write.txt new file mode 100644 index 00000000..bea20708 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_sda_full_write.txt @@ -0,0 +1,47 @@ +#### db_type: tdsql #### +#### test_type: sda_full_write #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:17:39:465:817 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 14:17:39:506:261 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:17:40:466:291 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-24 14:17:41:466:221 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 14:17:41:506:633 + Q4 finished at: 2022-4-24 14:17:41:507:276 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 14:17:42:467:26 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 14:17:52:463:55 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q9 finished at: 2022-4-24 14:17:52:538:151 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 14:17:52:575:49 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_sda_full_write_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..c0e38e4c --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_sda_full_write_committed.txt @@ -0,0 +1,47 @@ +#### db_type: tdsql #### +#### test_type: sda_full_write_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:18:9:164:430 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 14:18:9:202:869 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:18:10:170:467 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-24 14:18:11:164:751 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 14:18:11:202:969 + Q4 finished at: 2022-4-24 14:18:11:205:973 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 14:18:11:246:75 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 14:18:21:163:545 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q9 finished at: 2022-4-24 14:18:21:236:776 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 14:18:21:274:408 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..d0547122 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:20:16:720:723 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 14:20:16:758:301 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:20:17:719:115 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-24 14:20:18:721:358 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 14:20:18:758:916 + Q4 finished at: 2022-4-24 14:20:18:761:753 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 14:20:18:798:278 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 14:20:28:719:573 + Q9-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q9 finished at: 2022-4-24 14:20:28:795:25 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 14:20:28:831:412 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_sda_lost_update_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..466f92b4 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_sda_lost_update_c1.txt @@ -0,0 +1,38 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:18:39:472:277 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 14:18:39:513:848 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:18:40:468:672 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-24 14:18:41:474:609 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 14:18:41:515:529 + Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-1eb-6264ebc0-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q4 failed at: 2022-4-24 14:18:41:874:193 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-1eb-6264ebc0-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_sda_lost_update_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..0af89e84 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_dist/serializable/wat_sda_lost_update_c2.txt @@ -0,0 +1,36 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 14:19:8:536:812 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 14:19:8:572:457 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 14:19:9:540:424 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-24 14:19:10:538:346 + Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-20d-6264ebdd-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q4 failed at: 2022-4-24 14:19:10:938:864 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-20d-6264ebdd-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_dda_read_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..eccb91ba --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:15:17:391:717 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:15:17:427:134 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:15:20:401:617 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 15:15:20:441:859 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:15:20:481:587 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:15:20:523:643 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-18 15:15:23:396:21 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:15:23:447:383 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:15:53:399:241 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:15:53:439:438 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..b46a33bb --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:16:1:671:282 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:16:1:705:318 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:16:4:677:75 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:16:4:716:996 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:16:4:756:830 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:16:4:796:475 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-18 15:16:7:671:601 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:16:7:705:558 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:16:37:678:636 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:16:37:718:691 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_dda_write_skew.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..6cb0ad30 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:16:45:953:334 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:16:45:987:543 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:16:48:959:115 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:16:48:999:529 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:16:49:39:142 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-18 15:16:51:954:19 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:16:51:988:132 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:16:54:959:660 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:17:24:960:821 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:17:25:1:26 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_dda_write_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..662ef40b --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:19:2:41:502 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:19:2:75:636 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:19:5:47:232 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:19:5:87:156 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:19:5:126:947 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:19:5:166:932 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-18 15:19:8:42:5 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:19:8:76:97 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:19:38:48:663 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:19:38:88:879 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..8152674c --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL PRIMARY KEY);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 20:48:7:328:957 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-23 20:48:7:364:543 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-23 20:48:7:399:719 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-23 20:48:8:330:210 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-23 20:48:8:403:496 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-23 20:48:8:440:555 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 20:48:8:478:136 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 20:48:9:329:760 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-23 20:48:29:367:67 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-23 20:48:29:403:231 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 20:48:29:438:865 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..51139b15 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:18:17:761:965 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-18 15:18:17:796:249 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:18:20:728:244 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-18 15:18:20:769:6 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-18 15:18:20:808:999 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:18:20:849:778 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-18 15:18:23:762:560 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:18:23:796:655 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-18 15:18:53:769:126 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:18:53:809:232 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_mda_step_iat.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..62a3372c --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:19:46:360:118 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-18 15:19:46:394:380 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:19:49:366:72 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-18 15:19:49:405:834 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 15:19:52:377:413 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-18 15:19:52:418:582 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-18 15:19:55:360:731 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-18 15:19:58:366:475 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-18 15:20:1:367:176 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 15:20:4:361:19 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 15:20:7:366:912 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:20:10:368:334 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-18 15:20:40:367:138 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:20:40:407:411 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..87e2ee39 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,106 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:24:33:810:836 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:24:33:845:129 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:24:36:816:56 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-18 15:24:36:855:950 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:24:36:895:695 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 15:24:39:817:2 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-18 15:24:39:857:907 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-18 15:24:39:898:278 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:24:39:938:953 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2022-4-18 15:24:42:810:777 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-18 15:24:42:844:500 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-18 15:25:12:817:326 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-18 15:25:12:857:300 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..c39b88d9 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,207 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:23:40:499:987 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:23:40:534:825 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:23:43:506:65 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:23:43:546:324 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 15:23:46:506:762 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-18 15:23:46:547:516 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:23:46:588:189 + Q8-T4 execute opt: 'BEGIN' + Q8 finished at: 2022-4-18 15:23:49:506:148 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-18 15:23:49:546:600 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:23:49:586:864 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-4-18 15:23:52:506:575 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:23:52:546:512 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-18 15:23:55:500:837 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-18 15:23:55:534:754 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-18 15:24:25:540:387 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-18 15:24:25:576:375 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..f1a37275 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:20:48:676:936 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-18 15:20:48:711:103 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:20:51:682:656 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-18 15:20:51:723:69 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 15:20:54:683:791 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-18 15:20:54:724:596 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-18 15:20:57:677:433 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-18 15:21:0:683:232 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-18 15:21:3:684:251 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 15:21:6:677:569 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 15:21:9:683:489 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:21:12:684:339 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-18 15:21:42:685:639 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:21:42:742:259 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..2928622b --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:21:50:870:799 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-18 15:21:50:906:231 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:21:53:909:664 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-18 15:21:53:949:760 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 15:21:56:910:525 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-18 15:21:56:951:685 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-18 15:21:59:904:830 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-18 15:22:2:910:145 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-18 15:22:5:911:215 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 15:22:8:905:99 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 15:22:11:910:960 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:22:14:911:445 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-18 15:22:44:911:540 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:22:44:951:204 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..f289c970 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:25:21:89:672 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-18 15:25:21:123:663 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-18 15:25:21:160:114 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-18 15:25:24:94:583 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-18 15:25:24:134:468 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-18 15:25:24:174:149 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:25:24:213:969 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-18 15:25:27:95:483 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-18 15:25:27:136:386 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-18 15:25:27:177:66 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 15:25:27:217:409 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-18 15:25:30:89:331 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-18 15:25:30:123:645 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-18 15:26:0:97:637 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-18 15:26:0:138:240 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..d7a6c712 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,162 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:22:53:220:840 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-18 15:22:53:266:405 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:22:56:226:576 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-18 15:22:56:266:885 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:22:56:307:242 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-18 15:22:56:347:543 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-18 15:22:56:387:67 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:22:56:427:238 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-18 15:22:59:227:830 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-18 15:22:59:269:11 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-18 15:22:59:309:620 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-18 15:22:59:350:232 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-18 15:22:59:390:808 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:22:59:431:465 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2022-4-18 15:23:2:221:462 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-18 15:23:2:267:280 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-18 15:23:32:228:65 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-18 15:23:32:269:261 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_sda_lost_update_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..970f0a90 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:14:33:106:757 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-18 15:14:33:140:820 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:14:36:111:849 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-18 15:14:36:152:208 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:14:36:192:852 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-18 15:14:39:107:572 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:14:39:143:57 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-18 15:15:9:118:814 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:15:9:159:42 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..af3f964b --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,60 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:13:48:817:780 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:13:48:851:985 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:13:51:784:465 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-18 15:13:51:824:621 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:13:51:864:809 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-18 15:13:54:818:406 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:13:54:852:79 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-18 15:14:24:825:217 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:14:24:865:695 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:14:24:906:497 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_double_write_skew1.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..f3a93e04 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,56 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 20:48:33:681:580 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 20:48:33:716:863 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 20:48:34:682:864 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 20:48:34:719:566 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-23 20:48:34:756:530 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 20:48:36:683:669 +Q6 finished at: 2022-4-23 20:48:36:685:371 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 20:48:37:681:978 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-23 20:48:57:683:237 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 20:48:57:718:849 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..76b0cf6b --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,56 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:50:17:952:991 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:50:17:987:209 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:50:20:958:986 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 14:50:20:999:601 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 14:50:21:43:893 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 14:50:21:83:932 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-18 14:50:23:953:767 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 14:50:23:987:540 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-18 14:50:53:960:564 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 14:50:54:0:460 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_double_write_skew2.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..50bca9e1 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,56 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:51:2:233:702 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:51:2:267:654 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:51:5:239:481 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 14:51:5:279:522 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-18 14:51:8:234:307 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 14:51:8:268:89 + Q5 finished at: 2022-4-18 14:51:8:271:328 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 14:51:11:239:773 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 14:51:41:251:970 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 14:51:41:292:675 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_read_skew.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..9edce572 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:51:49:526:931 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 14:51:49:560:970 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:51:52:532:530 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 14:51:52:572:399 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 14:51:52:611:820 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-18 14:51:55:529:106 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 14:51:58:533:496 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 14:52:1:527:429 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 14:52:31:534:641 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 14:52:31:574:524 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_read_skew2.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..cf81889a --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:54:8:306:447 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:54:8:341:75 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:54:11:312:88 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 14:54:11:352:304 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 14:54:11:391:874 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-18 14:54:14:306:985 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 14:54:14:340:765 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 14:54:17:401:934 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 14:54:47:314:77 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 14:54:47:354:253 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..fc33f859 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:54:55:589:148 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:54:55:623:138 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:54:58:594:975 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 14:54:58:635:381 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 14:54:58:674:926 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 14:54:58:714:160 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-18 14:55:1:590:12 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 14:55:1:624:639 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 14:55:31:596:801 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 14:55:31:636:747 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..de8405ce --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:52:39:808:424 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-18 14:52:39:842:651 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:52:42:814:170 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-18 14:52:42:855:24 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-18 14:52:42:894:710 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 14:52:42:934:637 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-18 14:52:45:808:948 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 14:52:45:842:473 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-18 14:53:15:815:793 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 14:53:15:855:696 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..7ba1c0b9 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,59 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:53:23:984:175 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-18 14:53:24:19:358 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:53:27:27:435 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-18 14:53:27:67:88 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-18 14:53:27:108:573 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 14:53:27:148:473 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-18 14:53:30:18:180 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 14:53:30:51:611 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-18 14:54:0:24:863 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 14:54:0:64:728 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_write_read_skew.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..c29e97a8 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:47:53:112:989 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:47:53:150:541 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:47:56:118:294 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 14:47:56:158:215 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 14:47:56:198:334 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-18 14:47:59:113:306 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 14:48:2:198:833 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 14:48:5:113:211 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 14:48:35:120:89 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 14:48:35:160:29 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..ecd63f83 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tdsql #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:48:43:395:933 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:48:43:429:935 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:48:46:401:616 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 14:48:46:441:474 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 14:48:46:481:307 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 14:48:46:520:662 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-18 14:48:49:396:508 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 14:48:49:430:286 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 14:49:19:403:316 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 14:49:19:443:482 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_mda_step_rat.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..0dd9262a --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:55:39:902:589 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:55:39:936:737 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:55:42:908:401 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 14:55:42:948:303 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 14:55:42:988:784 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 14:55:45:909:449 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-18 14:55:45:950:558 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-18 14:55:45:991:68 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-18 14:55:48:903:415 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 14:55:48:937:506 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 14:55:51:909:398 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 14:55:54:910:182 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-18 14:56:24:949:534 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 14:56:24:988:937 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..5d80be7e --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN' + Q1 finished at: 2022-4-18 14:56:33:228:606 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-18 14:56:33:269:487 +Q3-T1 execute opt: 'BEGIN' +Q3 finished at: 2022-4-18 14:56:36:222:301 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-18 14:56:36:256:594 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 14:56:39:229:34 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-18 14:56:39:270:424 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-18 14:56:39:311:222 + Q8-T2 execute opt: 'BEGIN' + Q8 finished at: 2022-4-18 14:56:42:228:93 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-18 14:56:42:267:958 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-18 14:56:45:229:648 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-18 14:56:48:222:780 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 14:56:51:228:973 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-18 14:56:54:229:651 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 14:57:24:228:965 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-18 14:57:24:270:535 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-18 14:57:24:311:285 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..2ec15f59 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:57:32:576:60 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:57:32:609:998 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:57:35:581:748 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-18 14:57:35:621:711 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-18 14:57:35:661:482 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 14:57:38:586:149 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-18 14:57:38:627:911 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-18 14:57:38:669:317 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-18 14:57:41:576:867 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 14:57:41:611:120 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 14:57:44:582:405 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 14:57:47:583:981 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-18 14:58:17:583:297 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 14:58:17:622:798 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..38b0b3a9 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:58:25:754:376 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-18 14:58:25:789:385 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:58:28:793:634 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-18 14:58:28:833:968 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-18 14:58:28:873:882 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 14:58:31:794:285 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-18 14:58:31:837:190 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-18 14:58:31:877:930 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-18 14:58:34:791:90 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 14:58:34:825:174 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 14:58:37:794:63 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 14:58:40:795:95 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-18 14:59:10:794:948 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 14:59:10:836:247 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_sda_dirty_read.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..c9f759b5 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:42:25:329:647 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:42:25:367:350 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:42:28:338:202 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-18 14:42:28:417:951 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-18 14:42:31:329:662 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 14:42:34:336:85 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-18 14:43:4:376:745 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 14:43:4:417:82 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_sda_intermediate_read.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..be50eb4e --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:44:2:863:843 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:44:2:897:684 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:44:5:867:300 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-18 14:44:5:907:946 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-18 14:44:8:861:613 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 14:44:11:867:57 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 14:44:14:861:592 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-18 14:44:44:868:705 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 14:44:44:908:925 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..f3b6f135 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:44:53:107:861 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:44:53:143:759 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:44:56:113:591 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-18 14:44:56:153:556 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 14:44:56:193:747 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-18 14:44:59:108:653 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 14:44:59:143:188 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-18 14:45:29:115:663 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 14:45:29:155:622 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_sda_lost_self_update.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..36bb4c28 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:47:5:817:242 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:47:5:851:212 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:47:8:822:866 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-18 14:47:11:817:829 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-18 14:47:11:851:535 + Q4 finished at: 2022-4-18 14:47:11:855:51 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 14:47:14:823:696 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-18 14:47:44:824:494 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 14:47:44:864:411 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..7954b328 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:43:12:614:644 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 14:43:12:649:188 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:43:15:620:548 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-18 14:43:15:660:442 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-18 14:43:18:615:494 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 14:43:21:621:17 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 14:43:24:614:884 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-18 14:43:54:622:39 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 14:43:54:662:17 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..4778fa8c --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,58 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:45:37:351:867 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-18 14:45:37:386:232 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:45:40:357:133 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-18 14:45:40:398:697 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 14:45:40:438:395 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-18 14:45:43:352:239 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 14:45:43:385:955 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-18 14:46:13:358:942 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 14:46:13:400:860 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..291e0b0a --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,57 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:46:21:534:85 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-18 14:46:21:569:383 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:46:24:572:930 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-18 14:46:24:612:705 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 14:46:24:652:598 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-18 14:46:27:567:736 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 14:46:27:601:108 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-18 14:46:57:574:641 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 14:46:57:614:620 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..21e0db23 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,56 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:4:46:937:125 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:4:46:971:154 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:4:49:942:963 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 15:4:49:982:987 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-18 15:4:52:937:933 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:4:52:971:706 + Q5 finished at: 2022-4-18 15:4:52:974:952 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:4:53:15:127 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:5:22:944:649 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:5:22:984:956 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..504f2e5f --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,33 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:5:31:217:63 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:5:31:251:36 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:5:34:222:866 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:5:34:262:976 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-18 15:5:37:221:315 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-e5-3c-625d0dbb-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-18 15:5:37:818:624 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-e5-3c-625d0dbb-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..6c7115d9 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,33 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:6:18:642:90 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:6:18:676:380 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:6:21:608:637 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:6:21:648:709 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-18 15:6:24:646:644 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-e5-41-625d0dea-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-18 15:6:25:243:498 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-e5-41-625d0dea-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..6d15cfc9 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:7:9:85:633 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:7:9:119:770 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:7:12:52:469 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:7:12:97:971 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-18 15:7:15:97:784 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:7:15:137:896 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-e5-46-625d0e1d-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-18 15:7:15:787:384 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-e5-46-625d0e1d-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..1f3877b8 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 20:49:1:958:380 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 20:49:1:993:904 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 20:49:2:959:777 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-23 20:49:2:998:453 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-23 20:49:3:35:173 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-23 20:49:4:960:156 +Q6 finished at: 2022-4-23 20:49:4:961:669 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 20:49:4:997:38 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-23 20:49:24:960:158 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 20:49:24:995:709 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..c393a0e0 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 20:49:29:236:396 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 20:49:29:271:838 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 20:49:30:237:696 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-23 20:49:30:276:528 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-23 20:49:30:312:997 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 20:49:32:238:222 +Q6 finished at: 2022-4-23 20:49:32:240:7 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 20:49:33:236:881 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-23 20:49:53:238:214 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 20:49:53:273:863 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..07a39ebd --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:9:31:92:426 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:9:31:126:574 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:9:34:99:509 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:9:34:147:241 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-18 15:9:37:93:211 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:9:37:127:396 + Q5 finished at: 2022-4-18 15:9:37:130:598 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:9:40:107:237 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:10:10:99:723 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:10:10:139:759 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..df3fe717 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:10:18:372:289 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:10:18:406:219 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:10:21:378:67 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:10:21:418:529 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-18 15:10:24:373:147 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:10:30:373:213 + Q5 finished at: 2022-4-18 15:10:30:376:121 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:10:30:416:710 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:11:0:379:838 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:11:0:420:795 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..cda73ace --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:11:8:652:296 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:11:8:686:98 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:11:11:658:268 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:11:11:697:925 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-18 15:11:14:653:77 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:11:14:687:197 + Q5 finished at: 2022-4-18 15:11:14:690:262 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:11:14:730:80 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:11:44:659:975 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:11:44:700:882 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_mda_step_wat_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..0c14f0d9 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:11:52:967:902 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:11:53:1:985 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:11:55:973:459 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:11:56:13:682 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 15:11:58:975:376 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-18 15:11:59:16:365 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-18 15:12:1:971:972 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-e5-54-625d0f38-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-18 15:12:2:869:558 + Q8 finished at: 2022-4-18 15:12:2:945:925 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-e5-54-625d0f38-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_mda_step_wat_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..4037cdf0 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:12:46:428:155 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:12:46:462:168 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:12:49:394:761 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:12:49:434:818 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 15:12:52:394:768 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-18 15:12:58:439:739 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-18 15:13:1:432:535 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-e5-5a-625d0f6e-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-18 15:13:2:329:704 + Q8 finished at: 2022-4-18 15:13:4:467:579 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-e5-5a-625d0f6e-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..d318473f --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 14:59:19:61:270 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 14:59:19:97:151 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 14:59:22:68:408 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-18 14:59:25:61:799 + Q4 finished at: 2022-4-18 14:59:25:67:826 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 14:59:28:68:198 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-18 14:59:58:68:828 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-18 14:59:58:124:918 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 14:59:58:165:148 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..32a0f8df --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:0:6:364:302 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:0:6:398:669 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:0:9:370:295 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-18 15:0:12:365:135 + Q4 finished at: 2022-4-18 15:0:12:368:336 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:0:15:370:896 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-18 15:0:45:371:971 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-18 15:0:45:427:511 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:0:45:467:517 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_sda_full_write.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..6468e30c --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:0:53:666:194 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:0:53:700:244 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:0:56:672:40 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-18 15:0:59:666:436 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-18 15:0:59:701:165 + Q4 finished at: 2022-4-18 15:0:59:703:444 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:1:2:673:74 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-18 15:1:32:673:475 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:1:32:713:698 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_sda_full_write_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..8425c099 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:1:40:914:644 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:1:40:948:992 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:1:43:920:777 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-18 15:1:46:915:179 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:1:46:949:309 + Q4 finished at: 2022-4-18 15:1:46:952:502 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:1:46:992:292 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-18 15:2:16:923:975 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:2:16:964:942 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..b2ca35a6 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:4:2:656:456 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:4:2:690:321 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:4:5:662:272 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-18 15:4:8:657:49 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:4:8:691:41 + Q4 finished at: 2022-4-18 15:4:8:694:118 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:4:8:733:763 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-18 15:4:38:664:425 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:4:38:704:874 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_sda_lost_update_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..b560cfc8 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 20:49:57:479:233 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-23 20:49:57:514:659 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 20:49:58:481:719 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-23 20:49:58:520:918 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 20:50:0:481:456 +Q5 finished at: 2022-4-23 20:50:0:483:211 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-23 20:50:0:518:609 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-23 20:50:20:481:34 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 20:50:20:519:63 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_sda_lost_update_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..9319700f --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 20:50:24:726:989 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-23 20:50:24:763:466 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 20:50:25:728:286 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-23 20:50:25:765:27 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 20:50:27:729:32 +Q5 finished at: 2022-4-23 20:50:27:730:794 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 20:50:28:727:661 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-23 20:50:48:728:730 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 20:50:48:764:315 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_dda_read_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..cb713a4a --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_dda_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:41:42:503:147 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:41:42:535:828 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:41:43:503:318 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 15:41:43:536:624 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:41:43:569:303 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:41:43:602:157 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-18 15:41:44:504:230 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:41:44:536:575 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:41:54:507:703 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:41:54:543:599 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..1d57c3f9 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:41:58:770:750 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:41:58:804:38 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:41:59:772:232 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:41:59:805:544 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:41:59:838:390 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:41:59:871:278 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-18 15:42:0:771:234 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:42:0:803:707 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:42:10:775:592 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:42:10:811:632 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_dda_write_skew.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_dda_write_skew.txt new file mode 100644 index 00000000..54a43dfe --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:42:15:43:528 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:42:15:111:407 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:42:16:43:648 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:42:16:76:829 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:42:16:109:549 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-18 15:42:17:43:902 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:42:17:81:34 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:42:18:44:114 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:42:28:47:615 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:42:28:83:552 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_dda_write_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..c2e4b535 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:43:5:186:275 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:43:5:219:0 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:43:6:191:698 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:43:6:225:772 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:43:6:258:480 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:43:6:291:496 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-18 15:43:7:187:103 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:43:7:219:603 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:43:17:190:681 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:43:17:226:425 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..e05579c4 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL PRIMARY KEY);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 20:52:34:444:395 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-23 20:52:34:486:718 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-23 20:52:34:525:613 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-23 20:52:35:443:334 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-23 20:52:35:517:933 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-23 20:52:35:555:85 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 20:52:35:592:364 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 20:52:36:444:982 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-23 20:52:56:479:560 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-23 20:52:56:516:90 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 20:52:56:551:794 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..c1db5233 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:42:48:918:38 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-18 15:42:48:950:638 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:42:49:886:179 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-18 15:42:49:919:732 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-18 15:42:49:952:957 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:42:49:985:978 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-18 15:42:50:939:456 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:42:50:972:251 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,checking,1400) (kevin,saving,1400) + *(1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + *(2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-18 15:43:0:922:528 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:43:0:958:471 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_mda_step_iat.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_mda_step_iat.txt new file mode 100644 index 00000000..76a39fc2 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:43:21:486:548 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-18 15:43:21:519:365 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:43:22:487:448 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-18 15:43:22:520:776 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 15:43:23:490:601 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-18 15:43:23:527:110 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-18 15:43:24:487:98 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-18 15:43:25:487:368 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-18 15:43:26:490:929 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 15:43:27:486:918 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 15:43:28:488:84 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:43:29:490:910 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-18 15:43:39:498:612 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:43:39:537:664 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..6b86a05f --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:45:4:907:138 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:45:4:940:67 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:45:5:907:603 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-18 15:45:5:940:761 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:45:5:974:3 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 15:45:6:911:187 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-18 15:45:6:947:667 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-18 15:45:6:983:867 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:45:7:20:321 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-18 15:45:7:908:111 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-18 15:45:7:940:996 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-18 15:45:17:914:699 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-18 15:45:17:953:720 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..9b5df999 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,209 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:44:45:592:531 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:44:45:627:679 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:44:46:591:988 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:44:46:625:291 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 15:44:47:595:884 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-18 15:44:47:632:397 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:44:47:668:703 + Q8-T4 execute opt: 'BEGIN' + Q8 finished at: 2022-4-18 15:44:48:599:57 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-18 15:44:48:639:8 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:44:48:678:444 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-18 15:44:49:592:998 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:44:49:626:54 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-18 15:44:50:592:840 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-18 15:44:50:625:103 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-18 15:45:0:640:113 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-18 15:45:0:680:241 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..bc238946 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:43:43:796:182 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-18 15:43:43:829:24 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:43:44:796:121 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-18 15:43:44:829:649 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 15:43:45:799:665 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-18 15:43:45:835:966 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-18 15:43:46:796:876 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-18 15:43:47:796:910 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-18 15:43:48:800:63 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 15:43:49:796:670 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 15:43:50:796:783 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:43:51:800:145 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-18 15:44:1:808:289 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:44:1:848:132 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..e52d527d --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:44:5:976:315 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-18 15:44:6:9:821 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:44:7:8:306 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-18 15:44:7:41:457 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 15:44:8:11:878 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-18 15:44:8:48:312 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-18 15:44:9:9:542 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-18 15:44:10:9:19 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-18 15:44:11:12:264 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 15:44:12:8:958 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 15:44:13:9:279 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:44:14:12:579 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-18 15:44:24:16:442 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:44:24:55:566 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..b61161b0 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:45:22:181:589 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-18 15:45:22:214:460 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-18 15:45:22:247:289 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-18 15:45:23:183:201 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-18 15:45:23:216:217 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-18 15:45:23:248:810 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:45:23:282:61 + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-18 15:45:24:184:513 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-18 15:45:24:221:764 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-18 15:45:24:257:976 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 15:45:24:294:324 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-18 15:45:25:181:400 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-18 15:45:25:214:195 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-18 15:45:35:185:328 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-18 15:45:35:222:134 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..2e1ff714 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,164 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:44:28:317:196 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-18 15:44:28:349:845 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:44:29:324:585 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-18 15:44:29:357:807 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:44:29:391:618 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-18 15:44:29:424:717 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-18 15:44:29:457:395 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:44:29:490:445 + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-18 15:44:30:320:712 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-18 15:44:30:359:933 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-18 15:44:30:396:251 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-18 15:44:30:432:490 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-18 15:44:30:468:801 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:44:30:505:164 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-18 15:44:31:324:325 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-18 15:44:31:356:468 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-18 15:44:41:324:744 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-18 15:44:41:363:970 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_sda_lost_update_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..7536ff22 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:41:26:235:443 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-18 15:41:26:268:102 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:41:27:235:580 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-18 15:41:27:268:920 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:41:27:301:787 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-18 15:41:28:238:656 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:41:28:271:415 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-18 15:41:38:239:976 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:41:38:275:804 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..99abff34 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:41:9:951:482 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:41:9:984:828 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:41:10:918:709 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-18 15:41:10:951:859 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:41:10:984:546 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-18 15:41:11:951:166 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:41:11:984:962 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-18 15:41:21:957:389 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:41:21:993:134 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:41:22:29:3 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_double_write_skew1.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..581ab111 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_double_write_skew1.txt @@ -0,0 +1,56 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 20:53:0:809:710 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 20:53:0:848:420 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 20:53:1:808:760 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 20:53:1:846:502 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-23 20:53:1:883:914 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-23 20:53:3:806:834 + Q7 finished at: 2022-4-23 20:53:3:809:936 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 20:53:4:810:446 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-23 20:53:24:808:607 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 20:53:24:844:204 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..fc2f295b --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,56 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:32:35:191:9 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:32:35:223:638 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:32:36:191:121 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 15:32:36:224:531 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 15:32:36:257:343 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:32:36:295:408 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-18 15:32:37:191:680 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:32:37:224:165 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-18 15:32:47:195:409 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:32:47:230:986 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_double_write_skew2.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..1a3f6b7a --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_double_write_skew2.txt @@ -0,0 +1,56 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:32:51:473:702 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:32:51:506:272 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:32:52:473:942 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 15:32:52:506:897 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-18 15:32:53:474:222 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:32:53:507:505 + Q5 finished at: 2022-4-18 15:32:53:508:502 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:32:54:474:556 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:33:4:478:280 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:33:4:513:910 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_read_skew.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_read_skew.txt new file mode 100644 index 00000000..bb5a9809 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:33:8:741:873 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:33:8:774:486 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:33:9:741:921 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 15:33:9:776:97 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:33:9:809:74 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-18 15:33:10:744:265 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:33:11:746:307 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:33:12:742:249 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:33:22:746:921 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:33:22:782:661 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_read_skew2.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_read_skew2.txt new file mode 100644 index 00000000..08d121ec --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:33:59:480:793 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:33:59:513:333 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:34:0:481:11 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:34:0:514:150 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 15:34:0:547:112 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-18 15:34:1:482:216 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:34:1:514:826 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:34:2:481:437 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:34:12:485:571 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:34:12:521:162 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..39bdc507 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:34:16:747:495 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:34:16:780:197 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:34:17:748:60 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:34:17:781:467 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 15:34:17:814:403 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:34:17:846:716 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-18 15:34:18:748:307 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:34:18:781:214 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:34:28:752:86 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:34:28:787:811 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..ac9c646c --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:33:27:8:914 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-18 15:33:27:41:470 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:33:28:9:312 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-18 15:33:28:42:267 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:33:28:74:770 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:33:28:107:682 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-18 15:33:29:9:580 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:33:29:41:382 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-18 15:33:39:13:226 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:33:39:50:151 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..5ebb0989 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:33:43:178:584 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-18 15:33:43:212:230 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:33:44:210:667 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-18 15:33:44:243:769 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-18 15:33:44:276:563 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:33:44:309:432 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-18 15:33:45:211:461 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:33:45:243:579 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-18 15:33:55:214:990 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:33:55:250:523 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_write_read_skew.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..5a6df7ba --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_write_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:31:42:388:115 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:31:42:420:691 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:31:43:388:319 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 15:31:43:421:737 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 15:31:43:454:577 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-18 15:31:44:388:698 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:31:45:388:964 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:31:46:388:563 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:31:56:392:337 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:31:56:427:895 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..1189597e --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tdsql #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:32:0:654:190 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:32:0:687:468 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:32:1:654:418 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 15:32:1:687:508 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 15:32:1:721:417 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:32:1:754:248 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-18 15:32:2:654:804 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:32:2:687:185 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:32:12:658:649 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:32:12:694:91 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_mda_step_rat.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_mda_step_rat.txt new file mode 100644 index 00000000..9e2464a5 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:34:33:56:258 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:34:33:88:925 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:34:34:56:596 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-18 15:34:34:89:610 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-18 15:34:34:122:604 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 15:34:35:60:178 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-18 15:34:35:96:693 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-18 15:34:35:133:314 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-18 15:34:36:57:369 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 15:34:36:91:288 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 15:34:37:57:438 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:34:38:60:607 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-18 15:34:48:102:969 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:34:48:142:43 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..25542689 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN' + Q1 finished at: 2022-4-18 15:34:52:378:962 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-18 15:34:52:419:417 +Q3-T1 execute opt: 'BEGIN' +Q3 finished at: 2022-4-18 15:34:53:371:775 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-18 15:34:53:404:324 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 15:34:54:375:267 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-18 15:34:54:411:762 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-18 15:34:54:448:38 + Q8-T2 execute opt: 'BEGIN' + Q8 finished at: 2022-4-18 15:34:55:372:244 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-18 15:34:55:405:70 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-18 15:34:56:379:815 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-18 15:34:57:378:664 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:34:58:372:688 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-18 15:34:59:375:722 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:35:9:379:67 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-18 15:35:9:418:904 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-18 15:35:9:457:994 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..31b814bc --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:35:13:720:180 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:35:13:752:744 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:35:14:720:892 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-18 15:35:14:753:984 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-18 15:35:14:786:754 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 15:35:15:724:61 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-18 15:35:15:760:291 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-18 15:35:15:796:609 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-18 15:35:16:721:4 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 15:35:16:753:533 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 15:35:17:721:481 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:35:18:724:500 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-18 15:35:28:728:40 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:35:28:766:952 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..25d8f7f2 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:35:32:898:5 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-18 15:35:32:931:710 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:35:33:930:119 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-18 15:35:33:963:273 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-18 15:35:33:996:350 + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 15:35:34:933:794 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-18 15:35:34:970:138 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-18 15:35:35:6:603 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-18 15:35:35:931:9 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-18 15:35:35:963:589 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-18 15:35:36:931:15 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-18 15:35:37:934:240 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-18 15:35:47:937:760 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-18 15:35:47:976:647 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_sda_dirty_read.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_sda_dirty_read.txt new file mode 100644 index 00000000..08bf1251 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:29:42:702:59 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:29:42:734:684 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:29:43:701:861 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-18 15:29:43:767:438 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-18 15:29:44:702:25 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:29:45:702:159 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-18 15:29:55:741:497 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:29:55:776:948 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_sda_intermediate_read.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..b68cf440 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_intermediate_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:30:18:208:850 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:30:18:241:309 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:30:19:208:486 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-18 15:30:19:241:706 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-18 15:30:20:208:784 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:30:21:209:261 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:30:22:209:569 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-18 15:30:32:212:765 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:30:32:248:232 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..16eb2a2c --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:30:36:442:245 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:30:36:474:912 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:30:37:442:684 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-18 15:30:37:477:613 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:30:37:511:550 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-18 15:30:38:442:847 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:30:38:475:369 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-18 15:30:48:447:578 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:30:48:483:388 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_sda_lost_self_update.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..6eff50b3 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_self_update #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:31:25:117:112 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:31:25:150:728 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:31:26:116:285 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-18 15:31:27:116:906 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-18 15:31:27:149:268 + Q4 finished at: 2022-4-18 15:31:27:149:697 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:31:28:117:140 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-18 15:31:38:120:538 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:31:38:156:212 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..ae7a3812 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:29:59:971:224 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:30:0:6:742 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:30:0:971:15 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-18 15:30:1:4:112 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-18 15:30:1:973:150 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:30:2:971:826 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:30:3:971:345 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-18 15:30:13:975:541 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:30:14:11:11 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..fedb6911 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:30:52:677:914 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-18 15:30:52:710:553 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:30:53:678:111 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-18 15:30:53:711:28 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:30:53:743:666 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-18 15:30:54:678:654 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:30:54:711:95 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-18 15:31:4:683:585 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:31:4:720:69 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..b0c575ac --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:31:8:848:995 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-18 15:31:8:882:541 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:31:9:881:189 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-18 15:31:9:914:245 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:31:9:946:941 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-18 15:31:10:881:345 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:31:10:913:334 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-18 15:31:20:885:412 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:31:20:922:726 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..5dc2dacc --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,56 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 20:53:29:104:260 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 20:53:29:143:888 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 20:53:30:104:611 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 20:53:30:143:522 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-23 20:53:31:105:410 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 20:53:31:150:626 + Q5 finished at: 2022-4-23 20:53:31:153:680 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 20:53:31:191:237 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-23 20:53:51:102:653 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 20:53:51:138:347 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..e88fd420 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,33 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:38:8:255:63 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:38:8:288:881 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:38:9:255:199 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:38:9:288:502 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-18 15:38:10:257:327 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-74-58-625d1560-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-18 15:38:10:857:476 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-74-58-625d1560-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..22c51306 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,33 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:38:25:748:398 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:38:25:781:326 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:38:26:708:801 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:38:26:742:493 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-18 15:38:27:741:867 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-74-5d-625d1571-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-18 15:38:28:343:51 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-74-5d-625d1571-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..cd0327ce --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:38:44:162:396 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:38:44:195:16 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:38:45:130:142 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:38:45:163:396 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-18 15:38:46:163:499 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:38:46:196:538 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-74-62-625d1584-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-18 15:38:46:863:642 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-74-62-625d1584-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..3a051dcb --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:39:0:620:344 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:39:0:652:938 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:39:1:586:472 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:39:1:619:813 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:39:1:652:398 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:39:3:619:382 +Q6 finished at: 2022-4-18 15:39:3:620:240 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:39:3:656:252 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:39:13:622:773 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:39:13:658:609 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..e3e3f2fd --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:39:17:921:422 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-18 15:39:17:954:141 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:39:18:886:588 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:39:18:919:740 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-18 15:39:18:954:40 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:39:20:887:874 +Q6 finished at: 2022-4-18 15:39:20:888:700 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:39:21:887:491 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:39:31:892:38 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:39:31:927:859 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..9679f888 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:39:36:208:856 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:39:36:242:900 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:39:37:207:699 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:39:37:241:320 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-18 15:39:38:207:896 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:39:38:241:263 + Q5 finished at: 2022-4-18 15:39:38:241:778 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-18 15:39:39:208:259 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:39:49:211:745 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:39:49:248:375 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..11261695 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:39:53:476:591 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:39:53:515:580 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:39:54:476:762 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-18 15:39:54:510:3 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-18 15:39:55:482:961 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-18 15:39:57:477:603 + Q5 finished at: 2022-4-18 15:39:57:478:602 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:39:57:511:478 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-18 15:40:7:485:163 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-18 15:40:7:521:147 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..a954df96 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 20:53:55:401:230 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 20:53:55:440:239 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 20:53:56:400:152 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-23 20:53:56:440:602 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-23 20:53:57:403:955 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 20:53:57:442:480 + Q5 finished at: 2022-4-23 20:53:57:445:438 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 20:53:57:482:833 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-23 20:54:17:400:9 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 20:54:17:435:982 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_mda_step_wat_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..8505987b --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_mda_step_wat_c1.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: mda_step_wat_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:40:28:66:634 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:40:28:99:327 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:40:29:67:485 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:40:29:100:504 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-18 15:40:30:70:65 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-18 15:40:30:107:10 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-18 15:40:31:68:216 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-74-70-625d15ec-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-18 15:40:31:968:349 + Q8 finished at: 2022-4-18 15:40:32:37:223 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-74-70-625d15ec-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_mda_step_wat_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..eab33a57 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_mda_step_wat_c2.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: mda_step_wat_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:40:47:562:721 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:40:47:595:263 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:40:48:530:736 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-18 15:40:48:563:863 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-18 15:40:49:530:738 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-18 15:40:51:567:663 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-18 15:40:52:564:273 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-74-76-625d15ff-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-18 15:40:53:464:405 + Q8 finished at: 2022-4-18 15:40:53:598:596 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='2-74-76-625d15ff-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..c326781e --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:35:52:175:2 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:35:52:207:421 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:35:53:175:224 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-18 15:35:54:175:611 + Q4 finished at: 2022-4-18 15:35:54:175:906 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:35:55:176:673 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-18 15:36:5:179:750 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-18 15:36:5:232:914 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:36:5:268:602 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..03555579 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:36:9:468:469 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:36:9:502:399 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:36:10:469:357 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-18 15:36:11:468:187 + Q4 finished at: 2022-4-18 15:36:11:468:502 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:36:12:468:540 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-18 15:36:22:471:834 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-18 15:36:22:524:49 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:36:22:559:527 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_sda_full_write.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_sda_full_write.txt new file mode 100644 index 00000000..ea4f4df2 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_full_write #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:36:26:762:755 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:36:26:795:330 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:36:27:762:958 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-18 15:36:28:763:312 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-18 15:36:28:796:284 + Q4 finished at: 2022-4-18 15:36:28:796:633 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-18 15:36:29:763:657 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-18 15:36:39:767:743 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:36:39:804:45 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_sda_full_write_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..6798de5e --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_full_write_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:36:43:998:163 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:36:44:33:978 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:36:44:998:769 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-18 15:36:45:998:973 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:36:46:31:449 + Q4 finished at: 2022-4-18 15:36:46:31:804 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:36:46:64:624 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-18 15:36:56:2:589 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:36:56:38:224 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..640bfdf4 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:37:35:714:993 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-18 15:37:35:747:473 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:37:36:731:225 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-18 15:37:37:716:82 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:37:37:749:566 + Q4 finished at: 2022-4-18 15:37:37:751:461 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-18 15:37:37:785:912 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-18 15:37:47:719:563 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:37:47:755:527 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_sda_lost_update_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..8515e2a6 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 20:54:21:659:361 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-23 20:54:21:698:431 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 20:54:22:658:243 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-23 20:54:22:697:789 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-23 20:54:24:656:112 +Q6-T1 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 20:54:24:658:821 +Q6 finished at: 2022-4-23 20:54:24:694:817 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-23 20:54:44:657:889 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 20:54:44:693:623 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_sda_lost_update_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..2b455816 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/repeatable-read/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-18 15:37:17:472:38 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-18 15:37:17:504:623 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-18 15:37:18:472:337 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-18 15:37:18:505:413 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-18 15:37:20:472:946 +Q5 finished at: 2022-4-18 15:37:20:473:652 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-18 15:37:21:474:879 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-18 15:37:31:484:98 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-18 15:37:31:520:53 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/result_summary/read-committed_total-result.txt b/test_result/distributed_result/tdsql_test/tdsql_single/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..38745346 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/result_summary/repeatable-read_total-result.txt b/test_result/distributed_result/tdsql_test/tdsql_single/result_summary/repeatable-read_total-result.txt new file mode 100644 index 00000000..ef182286 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/result_summary/repeatable-read_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/result_summary/serializable_total-result.txt b/test_result/distributed_result/tdsql_test/tdsql_single/result_summary/serializable_total-result.txt new file mode 100644 index 00000000..b5b686cf --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/result_summary/serializable_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Rollback + +rat_dda_write_read_skew_committed: Rollback + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Rollback + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Rollback + +rat_dda_read_skew2_committed: Rollback + +rat_mda_step_rat: Rollback + +rat_mda_step_rat_long_fork: Rollback + +rat_mda_step_rat_predicate_based_delete: Rollback + +rat_mda_step_rat_predicate_based_insert: Rollback + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Rollback + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Rollback + +iat_dda_write_skew_predicate_based-intersecting_data: Avoid + +iat_dda_write_skew_predicate_based-overdraft_protection: Rollback + +iat_dda_write_skew_committed: Rollback + +iat_mda_step_iat: Rollback + +iat_mda_step_iat_predicate_based_delete: Rollback + +iat_mda_step_iat_predicate_based_insert: Rollback + +iat_mda_step_iat_uname_anomaly: Rollback + +iat_mda_step_iat_cross_phenomenon: Rollback + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Rollback + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_dda_read_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..ed9314ee --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_dda_read_skew_committed.txt @@ -0,0 +1,42 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:23:55:649:6 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 21:23:55:683:111 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:23:56:615:509 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 21:23:56:655:683 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:23:57:654:414 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:23:57:693:262 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-99-6263fdeb-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-23 21:23:58:350:6 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-99-6263fdeb-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..8a79473b --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:24:22:74:447 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 21:24:22:109:490 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:24:23:29:810 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-23 21:24:23:69:169 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:24:24:68:968 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:24:24:107:661 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-a0-6263fe06-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-23 21:24:24:775:449 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-a0-6263fe06-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_dda_write_skew.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_dda_write_skew.txt new file mode 100644 index 00000000..b9dcf586 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_dda_write_skew.txt @@ -0,0 +1,47 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:24:48:488:80 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 21:24:48:522:156 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:24:49:454:536 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-23 21:24:49:493:665 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:24:50:493:547 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-a7-6263fe20-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-23 21:24:51:89:337 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-a7-6263fe20-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_dda_write_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..09aae02d --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_dda_write_skew_committed.txt @@ -0,0 +1,49 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:26:8:699:307 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 21:26:8:734:564 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:26:9:665:879 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-23 21:26:9:705:680 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:26:10:704:891 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:26:10:743:456 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-b9-6263fe70-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-23 21:26:11:400:883 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-b9-6263fe70-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..0d192f0b --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,74 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL PRIMARY KEY);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:25:15:968:256 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-23 21:25:16:2:367 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-23 21:25:16:36:275 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-23 21:25:16:934:793 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 21:25:17:968:681 + current_result: + (330,) + *(1) expected_result: + (330,) + (2) expected_result: + (300,) + + Q5 finished at: 2022-4-23 21:25:17:973:644 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-23 21:25:18:12:292 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 21:25:18:51:74 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-23 21:25:37:970:562 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-23 21:25:38:6:22 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 21:25:38:40:887 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..5c38d3c6 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,49 @@ +#### db_type: tdsql #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:25:42:272:969 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + *(1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-23 21:25:42:307:782 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:25:43:277:568 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (checking,500,) (saving,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + *(2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-23 21:25:43:317:621 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' + Q5 finished at: 2022-4-23 21:25:44:278:959 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:25:44:317:748 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-b2-6263fe56-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-23 21:25:44:974:595 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-b2-6263fe56-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_mda_step_iat.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_mda_step_iat.txt new file mode 100644 index 00000000..a203da36 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_mda_step_iat.txt @@ -0,0 +1,86 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:21:28:7:132 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-24 12:21:28:44:30 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:21:28:970:0 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 12:21:29:7:199 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-24 12:21:29:970:13 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 12:21:30:4:790 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q8 finished at: 2022-4-24 12:21:33:8:364 + Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-157-6264d049-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q9 failed at: 2022-4-24 12:21:33:904:522 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]set_1650716943_1:Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-24 12:21:52:709:607 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-157-6264d049-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..2c1658b8 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:29:9:223:885 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 21:29:9:258:237 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:29:10:190:386 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-23 21:29:11:190:408 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-23 21:29:12:224:901 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-23 21:29:12:258:791 + Q4 finished at: 2022-4-23 21:29:12:263:517 + Q5-T2 execute opt: 'COMMIT'; + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-23 21:29:12:298:983 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:29:12:302:324 + Q8 finished at: 2022-4-23 21:29:12:334:487 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:29:12:369:975 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-23 21:29:32:223:152 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-23 21:29:32:255:149 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..83f30d91 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,171 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:20:21:906:223 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 12:20:21:943:337 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:20:22:905:735 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 12:20:22:979:246 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-24 12:20:23:902:219 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q8-T4 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 12:20:24:906:45 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-24 12:20:26:908:95 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 12:20:26:945:454 + Q9 finished at: 2022-4-24 12:20:26:945:830 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 12:20:26:982:432 + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-24 12:20:26:982:731 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-24 12:20:27:19:39 + Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-14c-6264d007-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q6 failed at: 2022-4-24 12:20:27:504:275 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-14c-6264d007-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..843fc799 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,86 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:20:41:367:839 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-24 12:20:41:404:536 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-24 12:20:42:331:569 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 12:20:42:368:578 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-24 12:20:43:331:621 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 12:20:43:367:50 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q8 finished at: 2022-4-24 12:20:46:369:581 + Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-14f-6264d01b-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q9 failed at: 2022-4-24 12:20:47:265:789 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]set_1650716943_1:Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-24 12:21:6:71:47 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-14f-6264d01b-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..e878d4a8 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,81 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:27:39:902:9 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-23 21:27:39:937:101 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:27:40:901:992 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-23 21:27:40:941:185 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-23 21:27:41:901:984 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-23 21:27:41:938:715 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-d3-6263fecc-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q8 failed at: 2022-4-23 21:27:44:741:390 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]set_1650716943_1:Lock wait timeout exceeded; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-23 21:28:4:638:982 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-d3-6263fecc-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..dd59de9c --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,120 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-24 12:21:10:533:651 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 12:21:10:570:426 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-24 12:21:10:607:10 + Q4-T2 execute opt: 'BEGIN' + Q4 finished at: 2022-4-24 12:21:11:497:374 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-24 12:21:11:535:777 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q8-T3 execute opt: 'BEGIN' + Q8 finished at: 2022-4-24 12:21:12:497:400 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-24 12:21:12:533:554 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' + Q6 finished at: 2022-4-24 12:21:13:536:18 + Q7-T2 execute opt: 'COMMIT'; + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-24 12:21:13:569:7 + Q11-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 12:21:13:572:975 + Q11 finished at: 2022-4-24 12:21:13:602:2 +Q12 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-168-6264d036-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q12 failed at: 2022-4-24 12:21:14:735:866 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-168-6264d036-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..58ad193c --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,127 @@ +#### db_type: tdsql #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:28:12:381:50 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-23 21:28:12:415:314 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:28:13:347:668 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-23 21:28:13:388:208 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-23 21:28:13:432:630 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-23 21:28:13:471:305 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9-T3 execute opt: 'BEGIN' + Q9 finished at: 2022-4-23 21:28:14:347:665 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-23 21:28:14:383:666 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-23 21:28:14:431:981 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-23 21:28:15:386:970 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-23 21:28:15:425:795 + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-23 21:28:15:431:774 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-23 21:28:15:467:372 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-23 21:28:15:503:176 +Q15 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-de-6263feec-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q15 failed at: 2022-4-23 21:28:16:882:722 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-de-6263feec-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_sda_lost_update_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..0046ee13 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_sda_lost_update_committed.txt @@ -0,0 +1,39 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:23:29:218:876 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-23 21:23:29:252:817 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:23:30:223:370 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-23 21:23:31:219:728 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 21:23:31:253:629 + Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-93-6263fdd2-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q4 failed at: 2022-4-23 21:23:31:624:832 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-93-6263fdd2-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..1112ca71 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:23:2:902:855 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 21:23:2:937:12 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:23:3:906:866 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-23 21:23:4:902:782 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 21:23:4:936:336 + Q4 finished at: 2022-4-23 21:23:4:941:187 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-23 21:23:4:979:961 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-23 21:23:24:939:639 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:23:24:974:486 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 21:23:25:9:325 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_double_write_skew1.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..e37c27be --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_double_write_skew1.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:5:6:259:733 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:5:6:295:417 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:5:7:224:975 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 21:5:7:263:576 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-23 21:5:8:264:771 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-19-6263f982-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-23 21:5:8:865:144 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-19-6263f982-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..bc978167 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,42 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:5:34:679:937 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:5:34:715:292 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:5:35:645:237 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 21:5:35:683:945 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-23 21:5:36:684:831 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:5:36:723:688 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-1e-6263f99e-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-23 21:5:37:381:533 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-1e-6263f99e-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_double_write_skew2.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..d43aa058 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_double_write_skew2.txt @@ -0,0 +1,33 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:6:1:133:757 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:6:1:169:57 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:6:2:99:229 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 21:6:2:138:153 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:6:3:138:754 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-22-6263f9b9-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-23 21:6:3:735:442 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-22-6263f9b9-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_read_skew.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_read_skew.txt new file mode 100644 index 00000000..5167cd5b --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_read_skew.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:6:28:555:531 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 21:6:28:590:720 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:6:29:520:909 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 21:6:29:559:765 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:6:30:560:114 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-27-6263f9d4-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-23 21:6:31:156:890 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-27-6263f9d4-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_read_skew2.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_read_skew2.txt new file mode 100644 index 00000000..84bbe279 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_read_skew2.txt @@ -0,0 +1,42 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:7:49:453:427 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:7:49:488:734 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:7:50:457:634 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-23 21:7:50:497:539 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-23 21:7:51:454:397 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 21:7:51:489:711 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-26-6263fa26-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-23 21:7:51:958:437 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-26-6263fa26-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..dc982e69 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_read_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:8:16:882:872 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:8:16:918:172 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:8:17:844:956 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-23 21:8:17:884:959 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-23 21:8:18:880:613 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 21:8:18:915:947 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-29-6263fa41-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-23 21:8:19:384:775 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-29-6263fa41-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..7f73f850 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:6:56:975:211 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-23 21:6:57:10:525 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:6:57:940:661 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-23 21:6:58:975:772 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 21:6:59:10:604 + Q4 finished at: 2022-4-23 21:6:59:14:431 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-23 21:6:59:52:831 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:6:59:91:149 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-23 21:7:18:976:531 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 21:7:19:11:604 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..1b441532 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: tdsql #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:7:23:144:21 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-23 21:7:23:180:333 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:7:24:181:749 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-23 21:7:25:179:176 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 21:7:25:214:53 + Q4 finished at: 2022-4-23 21:7:25:217:843 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-23 21:7:25:256:255 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:7:25:294:613 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-23 21:7:45:179:818 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 21:7:45:215:193 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_write_read_skew.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..a0a7067e --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_write_read_skew.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: dda_write_read_skew #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:4:11:407:474 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:4:11:442:588 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:4:12:410:694 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 21:4:12:454:807 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-23 21:4:13:412:705 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-10-6263f94b-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-23 21:4:14:9:332 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-10-6263f94b-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..71ba70ab --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,42 @@ +#### db_type: tdsql #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:4:39:829:953 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:4:39:865:329 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:4:40:794:867 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 21:4:40:833:998 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-23 21:4:41:836:960 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:4:41:875:264 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-15-6263f967-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-23 21:4:42:533:750 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-15-6263f967-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_mda_step_rat.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_mda_step_rat.txt new file mode 100644 index 00000000..f6be0c64 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_mda_step_rat.txt @@ -0,0 +1,70 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:8:43:338:753 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:8:43:374:5 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:8:44:304:142 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 21:8:44:343:826 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-23 21:8:45:339:232 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-23 21:8:45:375:296 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-23 21:8:46:343:983 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-38-6263fa5b-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-23 21:8:47:240:544 + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-23 21:8:47:312:162 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-38-6263fa5b-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..c0a2eaa0 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,166 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute opt: 'BEGIN' + Q1 finished at: 2022-4-23 21:9:12:760:640 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-23 21:9:12:835:441 +Q3-T1 execute opt: 'BEGIN' +Q3 finished at: 2022-4-23 21:9:13:759:71 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-23 21:9:14:724:513 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-23 21:9:14:761:179 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + Q8-T2 execute opt: 'BEGIN' + Q8 finished at: 2022-4-23 21:9:15:724:545 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-23 21:9:16:766:460 +Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-42-6263fa79-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q4 failed at: 2022-4-23 21:9:17:164:652 + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-23 21:9:36:765:137 + Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]set_1650716943_1:Lock wait timeout exceeded; try restarting transaction errcode: HY000 + Q9 failed at: 2022-4-23 21:9:37:669:929 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-42-6263fa79-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..078e00c4 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,70 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:9:44:216:510 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:9:44:251:834 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:9:45:181:951 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-23 21:9:45:220:819 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-23 21:9:46:181:947 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-23 21:9:46:221:343 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-23 21:9:47:221:528 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-4c-6263fa98-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-23 21:9:48:118:301 + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-23 21:9:48:189:819 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-4c-6263fa98-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..1e0f80fd --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,67 @@ +#### db_type: tdsql #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:10:13:531:113 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-23 21:10:13:567:618 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:10:14:531:106 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-23 21:10:14:569:933 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-23 21:10:15:531:102 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-23 21:10:15:567:279 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-23 21:10:16:570:892 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-56-6263fab5-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-23 21:10:17:467:517 + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-23 21:10:17:539:32 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-56-6263fab5-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_sda_dirty_read.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_sda_dirty_read.txt new file mode 100644 index 00000000..51ed9b31 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:1:1:674:100 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:1:1:713:609 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:1:2:677:288 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-23 21:1:3:674:682 + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-23 21:1:3:678:335 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:1:4:677:466 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-23 21:1:24:710:918 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-23 21:1:24:745:980 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_sda_intermediate_read.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..0424a315 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_intermediate_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:1:57:194:109 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:1:57:229:409 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:1:58:197:550 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-23 21:1:59:195:159 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 21:2:1:194:989 + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-23 21:2:1:198:820 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:2:1:237:28 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-23 21:2:21:195:609 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:2:21:230:587 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..1ca86551 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:2:25:437:120 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:2:25:472:467 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:2:26:440:447 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-23 21:2:27:437:581 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 21:2:27:472:773 + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,0) + + Q4 finished at: 2022-4-23 21:2:27:476:613 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-23 21:2:27:514:707 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-23 21:2:47:438:459 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:2:47:473:445 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_sda_lost_self_update.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..1b87a0e4 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_self_update #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:3:44:129:351 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:3:44:164:425 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:3:45:132:579 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-23 21:3:46:129:832 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-23 21:3:46:165:157 + Q4 finished at: 2022-4-23 21:3:46:168:771 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 21:3:47:133:225 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-23 21:4:7:130:793 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:4:7:166:391 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..79213e34 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:1:28:949:843 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 21:1:28:985:241 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:1:29:953:131 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-23 21:1:30:950:579 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 21:1:32:950:136 + Q4 finished at: 2022-4-23 21:1:32:954:36 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:1:32:992:550 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-23 21:1:52:951:67 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:1:52:986:42 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..998e13f1 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:2:51:686:191 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-23 21:2:51:721:411 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:2:52:688:572 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-23 21:2:53:686:132 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 21:2:53:720:909 + Q4 finished at: 2022-4-23 21:2:53:724:671 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-23 21:2:53:763:7 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-23 21:3:13:686:775 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:3:13:721:763 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..f7815365 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: tdsql #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:3:17:854:448 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-23 21:3:17:890:670 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:3:18:892:326 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-23 21:3:19:889:624 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 21:3:19:924:534 + Q4 finished at: 2022-4-23 21:3:19:928:294 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-23 21:3:19:966:726 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-23 21:3:39:890:625 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:3:39:926:177 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..b6c41c1d --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,35 @@ +#### db_type: tdsql #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:16:34:13:569 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:16:34:52:516 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:16:35:16:819 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 21:16:35:57:787 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:16:36:18:364 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:16:36:58:239 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-4e-6263fc32-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-23 21:16:36:715:254 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-4e-6263fc32-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..37a46f64 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,33 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:17:0:446:485 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:17:0:483:540 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:17:1:410:126 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-23 21:17:1:450:518 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:17:2:451:0 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-52-6263fc4c-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-23 21:17:3:47:730 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-52-6263fc4c-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..378176e1 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,33 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:17:27:877:89 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:17:27:913:861 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:17:28:840:946 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-23 21:17:28:884:493 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:17:29:881:876 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-57-6263fc67-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-23 21:17:30:478:940 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-57-6263fc67-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..19fd387e --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: tdsql #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:17:56:307:471 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:17:56:344:300 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:17:57:271:400 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-23 21:17:57:311:373 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:17:58:312:281 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:17:58:352:90 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-5c-6263fc84-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q7 failed at: 2022-4-23 21:17:59:9:103 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-5c-6263fc84-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..eea7a9f0 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:18:22:740:399 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 21:18:22:777:399 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:18:23:704:326 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-23 21:18:23:744:461 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:18:24:745:136 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-60-6263fc9e-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-23 21:18:25:341:791 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-60-6263fc9e-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..1b00fa9a --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:18:50:172:600 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 21:18:50:209:543 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:18:51:136:562 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-23 21:18:51:179:218 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-23 21:18:52:177:411 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-65-6263fcba-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q6 failed at: 2022-4-23 21:18:52:774:105 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-65-6263fcba-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..3abac102 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,42 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:19:18:603:104 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:19:18:639:782 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:19:19:567:54 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-23 21:19:19:607:243 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-23 21:19:20:604:377 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 21:19:20:641:144 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-7d-6263fcd7-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-23 21:19:21:108:353 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-7d-6263fcd7-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..7edfbd95 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:19:46:39:105 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:19:46:75:891 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:19:47:2:611 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-23 21:19:47:44:69 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-23 21:19:48:39:886 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-80-6263fcf3-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-23 21:19:48:543:790 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-80-6263fcf3-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..939b0344 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,42 @@ +#### db_type: tdsql #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:20:14:468:93 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:20:14:505:267 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:20:15:431:223 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-23 21:20:15:472:742 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-23 21:20:16:468:356 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 21:20:16:505:94 + Q5 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-84-6263fd0f-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q5 failed at: 2022-4-23 21:20:16:972:512 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-84-6263fd0f-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_mda_step_wat_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..f2b32d0b --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_mda_step_wat_c1.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: mda_step_wat_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:20:40:931:362 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:20:40:968:539 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:20:41:895:130 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-23 21:20:41:936:937 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute opt: 'BEGIN' + Q6 finished at: 2022-4-23 21:20:42:931:769 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-23 21:20:42:969:150 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-23 21:20:43:936:195 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-76-6263fd28-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-23 21:20:44:834:507 + Q8 finished at: 2022-4-23 21:20:44:911:158 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-76-6263fd28-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_mda_step_wat_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..cd55af75 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_mda_step_wat_c2.txt @@ -0,0 +1,40 @@ +#### db_type: tdsql #### +#### test_type: mda_step_wat_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:21:10:398:167 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:21:10:434:935 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:21:11:362:99 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-23 21:21:11:402:515 + Q5-T3 execute opt: 'BEGIN' + Q5 finished at: 2022-4-23 21:21:12:362:108 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-23 21:21:14:399:190 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-23 21:21:15:403:259 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-7c-6263fd46-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 +Q9 failed at: 2022-4-23 21:21:16:300:98 + Q8 finished at: 2022-4-23 21:21:16:438:277 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='3-2c-7c-6263fd46-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..02cd9270 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:13:23:782:21 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:13:23:818:703 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:13:24:785:427 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-23 21:13:25:782:625 + Q4 finished at: 2022-4-23 21:13:25:786:244 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:13:26:787:659 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-23 21:13:46:820:391 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-23 21:13:46:872:980 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:13:46:909:834 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..6226c96b --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:13:51:123:939 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:13:51:160:734 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:13:52:126:303 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-23 21:13:53:123:739 + Q4 finished at: 2022-4-23 21:13:53:127:409 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 21:13:54:127:91 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-23 21:14:14:124:381 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-23 21:14:14:178:350 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:14:14:214:975 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_sda_full_write.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_sda_full_write.txt new file mode 100644 index 00000000..f8444b76 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_full_write #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:14:18:429:816 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:14:18:466:745 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:14:19:432:883 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-23 21:14:20:430:586 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-23 21:14:20:467:441 + Q4 finished at: 2022-4-23 21:14:20:471:132 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 21:14:21:433:978 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-23 21:14:41:431:96 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:14:41:467:661 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_sda_full_write_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..d81dda48 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: tdsql #### +#### test_type: sda_full_write_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:14:45:679:620 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:14:45:716:422 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:14:46:682:522 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-23 21:14:47:680:52 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 21:14:47:716:696 + Q4 finished at: 2022-4-23 21:14:47:720:462 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-23 21:14:47:760:388 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-23 21:15:7:680:811 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:15:7:718:510 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..2bafe1e6 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:16:7:728:800 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 21:16:7:765:956 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:16:8:692:446 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-23 21:16:9:729:164 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 21:16:9:765:805 + Q4 finished at: 2022-4-23 21:16:9:769:659 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-23 21:16:9:809:420 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-23 21:16:29:729:725 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 21:16:29:766:186 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_sda_lost_update_c1.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..a0444e85 --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_sda_lost_update_c1.txt @@ -0,0 +1,39 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_c1 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:15:11:929:604 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-23 21:15:11:966:563 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:15:12:937:284 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-23 21:15:13:930:843 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-23 21:15:13:967:597 + Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-63-6263fbe0-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q4 failed at: 2022-4-23 21:15:14:334:750 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-63-6263fbe0-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_sda_lost_update_c2.txt b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..12a4f38b --- /dev/null +++ b/test_result/distributed_result/tdsql_test/tdsql_single/serializable/wat_sda_lost_update_c2.txt @@ -0,0 +1,37 @@ +#### db_type: tdsql #### +#### test_type: sda_lost_update_c2 #### +#### isolation: serializable #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = serializable for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute opt: 'BEGIN' +Q1 finished at: 2022-4-23 21:15:39:330:622 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-23 21:15:39:367:735 + Q3-T2 execute opt: 'BEGIN' + Q3 finished at: 2022-4-23 21:15:40:294:369 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-23 21:15:41:331:560 + Q4 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-66-6263fbfc-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' errcode: HY000 + Q4 failed at: 2022-4-23 21:15:41:735:685 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-8.0.22-v18-txsql-2.0.1-V2.0R710D002-20210517-2251]Got an error in the state of 'ABORTING', xid='4-95-66-6263fbfc-0', errmsg='XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected' + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_dda_read_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..5144f5a1 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:42:33:779:91 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:42:33:784:729 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:42:34:779:31 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:42:34:780:214 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 10:42:34:781:140 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:42:34:781:726 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-24 10:42:35:779:792 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:42:35:780:187 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:42:45:779:917 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:42:45:780:311 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..538ed5e6 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:42:49:806:540 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:42:49:811:800 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:42:50:806:617 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 10:42:50:809:107 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 10:42:50:810:96 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:42:50:810:725 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 10:42:51:807:562 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738971105624065, conflictStartTS=432738971367768064, conflictCommitTS=432738971368816640, key={tableID=2795, handle=2} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 10:42:52:608:425 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738971105624065, conflictStartTS=432738971367768064, conflictCommitTS=432738971368816640, key={tableID=2795, handle=2} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_dda_write_skew.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..c565db3e --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:43:5:831:344 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:43:5:836:867 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:43:6:831:324 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 10:43:6:832:445 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 10:43:6:833:342 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 10:43:7:831:801 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:43:7:832:410 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 10:43:8:831:577 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:43:18:832:20 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 10:43:18:832:435 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_dda_write_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..2ef0d1d8 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:43:54:914:95 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:43:54:919:548 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:43:55:913:866 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 10:43:55:915:720 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 10:43:55:916:564 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:43:55:917:191 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 10:43:56:914:658 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:43:56:915:219 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:44:6:914:669 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:44:6:915:53 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..86e32e07 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:43:22:859:781 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-24 10:43:22:860:781 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-24 10:43:22:861:313 + Q4-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q4 finished at: 2022-4-24 10:43:23:859:794 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-24 10:43:23:861:185 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-24 10:43:23:861:816 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:43:23:862:472 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:43:24:860:112 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-24 10:43:34:860:468 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-24 10:43:34:861:326 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 10:43:34:861:709 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..b0bb7ca0 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:43:38:888:140 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (saving,500,) (checking,500,) + (1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-24 10:43:38:889:764 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:43:39:888:205 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (saving,500,) (checking,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + (2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-24 10:43:39:890:368 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-24 10:43:39:891:67 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:43:39:891:654 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-24 10:43:40:888:442 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:43:40:889:47 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,saving,1400) (kevin,checking,1400) + (1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + (2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-24 10:43:50:888:800 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:43:50:889:214 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_mda_step_iat.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..c24d1efc --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:44:10:941:278 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-24 10:44:10:946:691 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:44:11:941:299 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 10:44:11:943:504 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 10:44:12:941:301 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 10:44:12:942:488 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-24 10:44:13:942:246 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-24 10:44:14:942:355 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-24 10:44:15:942:226 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 10:44:16:941:617 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 10:44:17:941:689 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 10:44:18:941:776 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 10:44:28:942:182 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 10:44:28:942:583 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..3b41c815 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:45:53:78:316 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:45:53:83:861 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:45:54:78:270 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 10:45:54:79:465 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 10:45:54:80:88 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-24 10:45:55:78:268 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-24 10:45:55:79:481 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-24 10:45:55:80:355 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:45:55:80:982 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-24 10:45:56:79:450 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-24 10:45:56:79:927 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-24 10:46:6:79:257 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-24 10:46:6:79:658 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..5cf96034 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,209 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:45:34:49:835 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:45:34:55:482 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:45:35:49:799 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 10:45:35:51:815 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 10:45:36:49:828 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-24 10:45:36:50:917 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:45:36:51:524 + Q8-T4 execute sql: 'BEGIN OPTIMISTIC;' + Q8 finished at: 2022-4-24 10:45:37:49:947 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-24 10:45:37:51:313 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:45:37:51:939 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-24 10:45:38:50:821 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 10:45:38:51:261 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-24 10:45:39:50:936 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-24 10:45:39:51:393 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-24 10:45:49:51:88 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-24 10:45:49:51:532 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..5827a7e1 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:44:32:970:25 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-24 10:44:32:975:559 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:44:33:969:976 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 10:44:33:971:806 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 10:44:34:969:975 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 10:44:34:971:117 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-24 10:44:35:970:802 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-24 10:44:36:970:893 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-24 10:44:37:970:673 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 10:44:38:970:577 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 10:44:39:970:383 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 10:44:40:970:439 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-24 10:44:50:970:980 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 10:44:50:971:403 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..79f4954a --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:44:54:996:297 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-24 10:44:55:1:920 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:44:55:996:244 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-24 10:44:55:998:198 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 10:44:56:996:342 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-24 10:44:56:997:659 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-24 10:44:57:996:914 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-24 10:44:58:996:675 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-24 10:44:59:996:577 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 10:45:0:996:695 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 10:45:1:996:666 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 10:45:2:996:836 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 10:45:12:997:531 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 10:45:12:998:43 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..14c45f78 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(100));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:46:10:108:402 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 10:46:10:113:844 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-24 10:46:10:114:825 + Q4-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q4 finished at: 2022-4-24 10:46:11:108:381 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-24 10:46:11:109:743 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-24 10:46:11:110:747 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:46:11:111:410 + Q8-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q8 finished at: 2022-4-24 10:46:12:108:552 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-24 10:46:12:109:749 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-24 10:46:12:110:661 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 10:46:12:111:71 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-24 10:46:13:109:518 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-24 10:46:13:110:318 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-24 10:46:23:109:214 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-24 10:46:23:109:651 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..cad91527 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,164 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:45:17:25:922 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-24 10:45:17:31:531 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:45:18:24:512 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-24 10:45:18:25:711 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 10:45:18:26:548 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 10:45:18:27:521 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-24 10:45:18:28:360 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 10:45:18:28:953 + Q9-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q9 finished at: 2022-4-24 10:45:19:24:595 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-24 10:45:19:25:867 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-24 10:45:19:26:738 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-24 10:45:19:27:825 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-24 10:45:19:28:741 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 10:45:19:29:389 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-24 10:45:20:25:605 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-24 10:45:20:26:48 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-24 10:45:30:25:521 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-24 10:45:30:25:997 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_sda_lost_update_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..0a913b56 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:42:17:753:149 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 10:42:17:758:792 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:42:18:753:104 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 10:42:18:755:302 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 10:42:18:755:932 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-24 10:42:19:753:852 +Q7-T1 execute opt: 'COMMIT'; +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738962703122432, conflictStartTS=432738962965266432, conflictCommitTS=432738962965790720, key={tableID=2785, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q7 failed at: 2022-4-24 10:42:20:454:806 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738962703122432, conflictStartTS=432738962965266432, conflictCommitTS=432738962965790720, key={tableID=2785, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..6d2ab660 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:42:1:721:906 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:42:1:727:522 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:42:2:721:835 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 10:42:2:723:27 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 10:42:2:723:619 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-24 10:42:3:722:809 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:42:3:723:196 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 10:42:13:722:515 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:42:13:722:887 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:42:13:723:179 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_double_write_skew1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..dcceda5d --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:33:16:940:413 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:33:16:945:965 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:33:17:940:347 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:33:17:941:740 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 10:33:17:942:698 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q6 finished at: 2022-4-24 10:33:18:941:177 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:33:19:940:549 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738820932239360, conflictStartTS=432738821194383360, conflictCommitTS=432738821718671360, key={tableID=2630, handle=2} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 10:33:21:740:938 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738820932239360, conflictStartTS=432738821194383360, conflictCommitTS=432738821718671360, key={tableID=2630, handle=2} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..32e613e8 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:33:34:967:148 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:33:34:972:525 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:33:35:967:92 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:33:35:968:330 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 10:33:35:969:392 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:33:35:969:866 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-24 10:33:36:968:85 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738825657909248, conflictStartTS=432738825919791104, conflictCommitTS=432738825920577536, key={tableID=2635, handle=2} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 10:33:37:769:69 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738825657909248, conflictStartTS=432738825919791104, conflictCommitTS=432738825920577536, key={tableID=2635, handle=2} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_double_write_skew2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..748138d8 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:33:50:993:292 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:33:50:998:904 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:33:51:993:246 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:33:51:994:512 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 10:33:51:995:492 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-24 10:33:52:993:998 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:33:52:994:475 + Q8-T2 execute opt: 'COMMIT'; + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738830121172992, conflictStartTS=432738829859028992, conflictCommitTS=432738830383579136, key={tableID=2640, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 + Q8 failed at: 2022-4-24 10:33:54:793:877 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738830121172992, conflictStartTS=432738829859028992, conflictCommitTS=432738830383579136, key={tableID=2640, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_read_skew.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..d22e81de --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:34:8:16:863 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:34:8:22:348 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:34:9:16:693 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:34:9:17:855 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 10:34:9:18:877 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-24 10:34:10:17:572 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:34:11:16:887 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:34:12:16:679 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:34:22:17:623 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:34:22:17:938 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_read_skew2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..dab970be --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:34:58:98:191 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:34:58:103:576 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:34:59:98:177 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 10:34:59:99:420 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 10:34:59:100:396 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 10:35:0:99:31 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:35:0:99:552 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 10:35:1:98:236 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:35:11:98:900 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:35:11:99:244 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..76e2c0f0 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:35:15:125:146 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:35:15:130:529 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:35:16:125:186 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 10:35:16:127:372 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 10:35:16:128:223 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:35:16:128:556 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 10:35:17:126:251 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:35:17:126:823 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:35:27:125:952 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:35:27:126:433 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..e86caddd --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:34:26:44:675 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-24 10:34:26:49:915 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:34:27:44:747 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:34:27:46:653 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-24 10:34:27:47:652 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:34:27:48:278 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-24 10:34:28:45:493 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:34:28:45:824 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-24 10:34:38:45:364 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:34:38:45:744 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..65c2eb88 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:34:42:70:572 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-24 10:34:42:75:759 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:34:43:70:614 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-24 10:34:43:71:459 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-24 10:34:43:71:987 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:34:43:72:547 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-24 10:34:44:71:179 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:34:44:71:525 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-24 10:34:54:71:392 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:34:54:71:744 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_write_read_skew.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..8586c38a --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:32:42:886:313 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:32:42:891:718 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:32:43:886:177 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:32:43:887:331 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 10:32:43:888:236 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-24 10:32:44:887:27 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:32:45:886:463 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:32:46:886:354 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:32:56:887:46 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:32:56:887:360 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..66a6041d --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:33:0:912:971 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:33:0:918:379 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:33:1:913:33 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:33:1:915:733 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 10:33:1:916:923 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:33:1:917:516 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-24 10:33:2:913:875 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:33:2:914:401 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:33:12:913:764 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:33:12:914:73 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_mda_step_rat.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..00c084f2 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:35:31:152:442 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:35:31:157:977 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:35:32:152:410 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:35:32:154:774 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 10:35:32:155:739 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-24 10:35:33:152:407 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-24 10:35:33:153:536 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-24 10:35:33:154:564 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-24 10:35:34:153:466 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 10:35:34:154:135 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 10:35:35:152:703 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 10:35:36:152:673 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 10:35:46:153:553 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 10:35:46:153:878 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..919d8ee0 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN OPTIMISTIC;' + Q1 finished at: 2022-4-24 10:35:50:180:346 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-24 10:35:50:186:250 +Q3-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q3 finished at: 2022-4-24 10:35:51:180:342 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-24 10:35:51:182:488 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 10:35:52:180:341 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-24 10:35:52:181:951 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-24 10:35:52:183:238 + Q8-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q8 finished at: 2022-4-24 10:35:53:180:387 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-24 10:35:53:181:699 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-24 10:35:54:181:464 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-24 10:35:55:180:648 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 10:35:56:180:610 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-24 10:35:57:180:493 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 10:36:7:180:730 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-24 10:36:7:182:462 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-24 10:36:7:182:883 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..e1354fdf --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:36:11:208:393 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:36:11:209:536 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:36:12:208:386 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:36:12:209:617 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-24 10:36:12:210:903 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-24 10:36:13:208:416 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-24 10:36:13:209:650 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-24 10:36:13:210:970 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-24 10:36:14:209:854 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 10:36:14:210:447 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 10:36:15:208:666 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 10:36:16:208:653 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-24 10:36:26:209:245 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 10:36:26:209:594 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..89c61570 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:36:30:234:359 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-24 10:36:30:235:209 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:36:31:234:359 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-24 10:36:31:234:862 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-24 10:36:31:240:623 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-24 10:36:32:234:391 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-24 10:36:32:234:913 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-24 10:36:32:236:346 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-24 10:36:33:235:672 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 10:36:33:236:243 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 10:36:34:234:646 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 10:36:35:234:624 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 10:36:45:235:344 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 10:36:45:235:682 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_sda_dirty_read.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..4be7a30b --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:30:44:706:921 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:30:44:712:283 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:30:45:706:938 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 10:30:45:708:170 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-24 10:30:46:706:968 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:30:47:706:828 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-24 10:30:57:707:625 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 10:30:57:707:945 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_sda_intermediate_read.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..4d729716 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:31:19:757:822 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:31:19:763:202 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:31:20:757:853 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 10:31:20:758:923 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-24 10:31:21:758:852 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:31:22:757:857 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:31:23:758:143 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-24 10:31:33:758:504 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:31:33:758:803 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..b4cc8d21 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:31:37:784:381 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:31:37:789:753 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:31:38:784:317 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 10:31:38:785:419 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 10:31:38:785:713 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-24 10:31:39:785:99 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:31:39:785:645 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-24 10:31:49:784:928 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:31:49:785:258 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_sda_lost_self_update.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..c32ee0fa --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:32:25:860:389 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:32:25:865:596 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:32:26:860:444 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 10:32:26:862:412 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-24 10:32:27:861:270 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 10:32:27:861:779 + Q7-T2 execute opt: 'COMMIT'; + Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738807804067840, conflictStartTS=432738807541923840, conflictCommitTS=432738808066473984, key={tableID=2615, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 + Q7 failed at: 2022-4-24 10:32:29:561:610 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738807804067840, conflictStartTS=432738807541923840, conflictCommitTS=432738808066473984, key={tableID=2615, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..b223267c --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:31:1:731:874 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:31:1:737:345 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:31:2:731:880 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 10:31:2:734:92 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-24 10:31:3:732:676 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:31:4:732:92 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:31:5:731:886 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 10:31:15:732:609 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:31:15:732:945 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..7f049bc6 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:31:53:808:797 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 10:31:53:813:894 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:31:54:808:827 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-24 10:31:54:811:73 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 10:31:54:811:552 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-24 10:31:55:809:180 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:31:55:809:491 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-24 10:32:5:809:449 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:32:5:809:741 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..ab64cf68 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:32:9:834:318 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 10:32:9:839:592 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:32:10:834:201 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-24 10:32:10:836:165 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 10:32:10:836:622 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-24 10:32:11:834:962 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:32:11:835:322 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-24 10:32:21:834:983 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:32:21:835:327 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..ff76bbe5 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:38:47:440:531 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:38:47:446:16 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:38:48:440:665 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:38:48:442:511 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 10:38:48:443:523 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:38:48:444:164 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-24 10:38:49:441:388 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738907570831360, conflictStartTS=432738907832975360, conflictCommitTS=432738907833761792, key={tableID=2725, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 10:38:50:242:316 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738907570831360, conflictStartTS=432738907832975360, conflictCommitTS=432738907833761792, key={tableID=2725, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..8ab6ab07 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,37 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:39:3:466:651 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:39:3:472:212 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:39:4:466:599 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 10:39:4:467:812 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 10:39:4:468:737 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 10:39:5:467:474 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:39:5:468:100 + Q8-T2 execute opt: 'COMMIT'; + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738912034095104, conflictStartTS=432738911771951104, conflictCommitTS=432738912296501248, key={tableID=2730, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 + Q8 failed at: 2022-4-24 10:39:7:267:279 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738912034095104, conflictStartTS=432738911771951104, conflictCommitTS=432738912296501248, key={tableID=2730, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..cd2e0ca9 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,37 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:39:20:492:698 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:39:20:498:358 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:39:21:492:569 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 10:39:21:493:931 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 10:39:21:494:786 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 10:39:22:493:379 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:39:23:492:880 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738916235214848, conflictStartTS=432738916497358848, conflictCommitTS=432738917021646848, key={tableID=2735, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 10:39:25:293:203 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738916235214848, conflictStartTS=432738916497358848, conflictCommitTS=432738917021646848, key={tableID=2735, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..72e6ea4c --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,37 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:39:38:516:25 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:39:38:521:371 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:39:39:515:986 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 10:39:39:517:218 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 10:39:39:518:98 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:39:39:518:734 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 10:39:40:517:65 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738920959836160, conflictStartTS=432738921221980160, conflictCommitTS=432738921222766592, key={tableID=2740, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 10:39:41:317:940 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738920959836160, conflictStartTS=432738921221980160, conflictCommitTS=432738921222766592, key={tableID=2740, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..1d3362b6 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:39:54:542:252 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:39:54:547:718 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:39:55:542:185 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 10:39:55:543:400 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 10:39:55:544:465 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 10:39:56:543:43 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:39:56:543:628 + Q8-T2 execute opt: 'COMMIT'; + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738925423362048, conflictStartTS=432738925161218048, conflictCommitTS=432738925685768192, key={tableID=2745, handle=2} primary=[]byte(nil) [try again later] errcode: HY000 + Q8 failed at: 2022-4-24 10:39:58:342:894 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738925423362048, conflictStartTS=432738925161218048, conflictCommitTS=432738925685768192, key={tableID=2745, handle=2} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..a1473502 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:40:11:568:301 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:40:11:573:757 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:40:12:568:223 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 10:40:12:569:525 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 10:40:12:570:663 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 10:40:13:569:94 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:40:14:568:666 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738929624481792, conflictStartTS=432738929886625792, conflictCommitTS=432738930410913792, key={tableID=2750, handle=2} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 10:40:16:368:938 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738929624481792, conflictStartTS=432738929886625792, conflictCommitTS=432738930410913792, key={tableID=2750, handle=2} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..c9f782be --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:40:29:592:154 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:40:29:597:599 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:40:30:592:117 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 10:40:30:593:334 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 10:40:30:594:276 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 10:40:31:593:112 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:40:31:593:692 + Q8-T2 execute opt: 'COMMIT'; + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738934611509248, conflictStartTS=432738934349365248, conflictCommitTS=432738934873915392, key={tableID=2755, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 + Q8 failed at: 2022-4-24 10:40:33:392:898 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738934611509248, conflictStartTS=432738934349365248, conflictCommitTS=432738934873915392, key={tableID=2755, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..a87c95bd --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:40:46:615:983 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:40:46:621:313 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:40:47:615:961 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 10:40:47:617:233 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 10:40:47:618:197 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 10:40:48:616:937 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:40:49:616:366 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738938811842560, conflictStartTS=432738939073986560, conflictCommitTS=432738939598536704, key={tableID=2760, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 10:40:51:416:693 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738938811842560, conflictStartTS=432738939073986560, conflictCommitTS=432738939598536704, key={tableID=2760, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..20c80686 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:41:4:642:468 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:41:4:647:938 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:41:5:642:435 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 10:41:5:643:628 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 10:41:5:644:697 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:41:5:645:337 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 10:41:6:643:371 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738943537512448, conflictStartTS=432738943799656448, conflictCommitTS=432738943800442880, key={tableID=2765, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 10:41:7:444:286 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738943537512448, conflictStartTS=432738943799656448, conflictCommitTS=432738943800442880, key={tableID=2765, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_mda_step_wat_c1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..9d5054d0 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,47 @@ +#### db_type: tidb #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:41:20:669:366 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:41:20:675:63 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:41:21:669:287 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 10:41:21:670:495 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 10:41:21:671:434 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-24 10:41:22:669:294 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-24 10:41:22:670:534 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' + Q8 finished at: 2022-4-24 10:41:22:671:550 +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q9 finished at: 2022-4-24 10:41:23:670:242 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 10:41:23:671:141 + Q11-T2 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; + Q11 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738948001038336, conflictStartTS=432738947738894336, conflictCommitTS=432738948525588480, key={tableID=2770, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 + Q11 failed at: 2022-4-24 10:41:25:770:38 + Q12 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738948263182336, conflictStartTS=432738947738894336, conflictCommitTS=432738948525588480, key={tableID=2770, handle=3} primary=[]byte(nil) [try again later] errcode: HY000 + Q12 failed at: 2022-4-24 10:41:26:870:132 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738948001038336, conflictStartTS=432738947738894336, conflictCommitTS=432738948525588480, key={tableID=2770, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_mda_step_wat_c2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..f97b6cd2 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,47 @@ +#### db_type: tidb #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:41:39:696:206 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:41:39:701:861 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:41:40:696:263 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 10:41:40:697:484 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 10:41:41:696:238 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6 finished at: 2022-4-24 10:41:42:697:198 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-24 10:41:43:697:62 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' + Q8 finished at: 2022-4-24 10:41:43:698:10 +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q9 finished at: 2022-4-24 10:41:44:697:327 + Q10-T2 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:41:45:696:509 +Q11-T1 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; +Q11 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738952726708224, conflictStartTS=432738952988852224, conflictCommitTS=432738954299572224, key={tableID=2775, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q11 failed at: 2022-4-24 10:41:47:796:770 + Q12 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738953250996224, conflictStartTS=432738952988852224, conflictCommitTS=432738954299572224, key={tableID=2775, handle=2} primary=[]byte(nil) [try again later] errcode: HY000 + Q12 failed at: 2022-4-24 10:41:48:896:875 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738952726708224, conflictStartTS=432738952988852224, conflictCommitTS=432738954299572224, key={tableID=2775, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..619eb952 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:36:49:261:330 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:36:49:266:735 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:36:50:261:291 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 10:36:50:262:433 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-24 10:36:51:261:273 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:36:52:261:763 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-24 10:37:2:262:105 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-24 10:37:2:277:316 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:37:2:277:742 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..abbed4c6 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,32 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:37:6:288:372 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:37:6:293:752 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:37:7:288:391 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 10:37:7:290:432 +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-24 10:37:8:288:653 + Q6-T2 execute opt: 'COMMIT'; + Q6 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738881316585472, conflictStartTS=432738881054441472, conflictCommitTS=432738881578729472, key={tableID=2695, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 + Q6 failed at: 2022-4-24 10:37:9:889:208 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738881316585472, conflictStartTS=432738881054441472, conflictCommitTS=432738881578729472, key={tableID=2695, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_sda_full_write.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..7986fbe5 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_sda_full_write.txt @@ -0,0 +1,34 @@ +#### db_type: tidb #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:37:23:314:46 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:37:23:319:402 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:37:24:313:950 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 10:37:24:315:121 +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-24 10:37:25:314:823 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 10:37:25:315:429 + Q7-T2 execute opt: 'COMMIT'; + Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738885779587072, conflictStartTS=432738885517443072, conflictCommitTS=432738886042255360, key={tableID=2700, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 + Q7 failed at: 2022-4-24 10:37:27:14:593 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738885779587072, conflictStartTS=432738885517443072, conflictCommitTS=432738886042255360, key={tableID=2700, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_sda_full_write_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..0a18530a --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,34 @@ +#### db_type: tidb #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:37:40:339:420 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:37:40:345:85 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:37:41:339:359 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 10:37:41:340:631 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 10:37:41:341:242 +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-24 10:37:42:340:223 +Q7-T1 execute opt: 'COMMIT'; +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738889980706816, conflictStartTS=432738890242850816, conflictCommitTS=432738890243375104, key={tableID=2705, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q7 failed at: 2022-4-24 10:37:43:41:180 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738889980706816, conflictStartTS=432738890242850816, conflictCommitTS=432738890243375104, key={tableID=2705, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..30182887 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:38:31:414:519 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:38:31:419:994 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:38:32:414:491 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 10:38:32:415:565 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 10:38:32:416:377 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-24 10:38:33:416:249 +Q7-T1 execute opt: 'COMMIT'; +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738903369711616, conflictStartTS=432738903631855616, conflictCommitTS=432738903632379904, key={tableID=2720, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q7 failed at: 2022-4-24 10:38:34:117:156 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738903369711616, conflictStartTS=432738903631855616, conflictCommitTS=432738903632379904, key={tableID=2720, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_sda_lost_update_c1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..e2334532 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:37:56:365:144 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 10:37:56:370:584 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:37:57:365:101 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 10:37:57:366:212 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-24 10:37:58:365:844 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 10:37:58:372:589 + Q7-T2 execute opt: 'COMMIT'; + Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738894443970560, conflictStartTS=432738894181826560, conflictCommitTS=432738894707949568, key={tableID=2710, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 + Q7 failed at: 2022-4-24 10:38:0:65:783 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738894443970560, conflictStartTS=432738894181826560, conflictCommitTS=432738894707949568, key={tableID=2710, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_sda_lost_update_c2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..fc8d4c39 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:38:13:390:648 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 10:38:13:396:208 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:38:14:390:587 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 10:38:14:391:725 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-24 10:38:15:391:385 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:38:16:390:924 +Q7-T1 execute opt: 'COMMIT'; +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738898644828160, conflictStartTS=432738898906972160, conflictCommitTS=432738899431260160, key={tableID=2715, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q7 failed at: 2022-4-24 10:38:18:91:252 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432738898644828160, conflictStartTS=432738898906972160, conflictCommitTS=432738899431260160, key={tableID=2715, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_dda_read_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..b3dc5c19 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_dda_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:1:11:982:822 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:1:11:988:295 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:1:12:982:819 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 11:1:12:983:986 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 11:1:12:984:865 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:1:12:985:477 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-24 11:1:13:983:540 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:1:13:983:922 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 11:1:23:983:635 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:1:23:984:41 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..2a5b9e13 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:1:28:8:414 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:1:28:13:732 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:1:29:8:347 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 11:1:29:10:107 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 11:1:29:10:966 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:1:29:11:667 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 11:1:30:9:293 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739264235569152, conflictStartTS=432739264497713152, conflictCommitTS=432739264498499584, key={tableID=3061, handle=2} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 11:1:30:810:242 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739264235569152, conflictStartTS=432739264497713152, conflictCommitTS=432739264498499584, key={tableID=3061, handle=2} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_dda_write_skew.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_dda_write_skew.txt new file mode 100644 index 00000000..090aead0 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:1:44:34:85 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:1:44:39:586 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:1:45:34:44 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 11:1:45:35:295 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 11:1:45:36:285 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 11:1:46:35:12 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:1:46:38:45 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 11:1:47:34:352 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 11:1:57:34:854 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 11:1:57:35:343 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_dda_write_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..c2df0b0c --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:2:33:114:896 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:2:33:120:380 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:2:34:114:931 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 11:2:34:117:339 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 11:2:34:118:151 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:2:34:118:902 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 11:2:35:115:526 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:2:35:116:90 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 11:2:45:115:617 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:2:45:116:7 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..782ee340 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:2:1:61:386 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-24 11:2:1:62:563 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-24 11:2:1:63:62 + Q4-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q4 finished at: 2022-4-24 11:2:2:61:352 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-24 11:2:2:66:221 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-24 11:2:2:66:915 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 11:2:2:67:599 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:2:3:61:656 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-24 11:2:13:62:513 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-24 11:2:13:63:573 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 11:2:13:63:979 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..24061f89 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:2:17:89:581 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (saving,500,) (checking,500,) + (1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-24 11:2:17:91:27 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:2:18:89:589 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (saving,500,) (checking,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + (2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-24 11:2:18:91:155 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-24 11:2:18:91:902 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:2:18:92:491 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-24 11:2:19:90:72 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:2:19:90:792 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,saving,1400) (kevin,checking,1400) + (1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + (2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-24 11:2:29:90:163 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:2:29:90:662 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_mda_step_iat.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_mda_step_iat.txt new file mode 100644 index 00000000..9457e102 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:2:49:142:459 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-24 11:2:49:147:963 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:2:50:142:429 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 11:2:50:144:841 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 11:2:51:142:402 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 11:2:51:143:732 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-24 11:2:52:143:254 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-24 11:2:53:143:158 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-24 11:2:54:143:298 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 11:2:55:142:819 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 11:2:56:142:846 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 11:2:57:142:837 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 11:3:7:143:403 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 11:3:7:143:802 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..593796d1 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:4:31:276:657 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:4:31:282:276 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:4:32:276:601 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 11:4:32:277:804 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 11:4:32:278:416 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-24 11:4:33:276:681 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-24 11:4:33:278:7 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-24 11:4:33:279:111 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 11:4:33:279:804 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-24 11:4:34:277:560 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-24 11:4:34:277:991 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-24 11:4:44:277:537 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-24 11:4:44:277:995 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..5ba97251 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,209 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:4:12:248:913 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:4:12:254:771 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:4:13:248:804 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 11:4:13:250:144 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 11:4:14:248:778 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-24 11:4:14:249:879 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 11:4:14:250:583 + Q8-T4 execute sql: 'BEGIN OPTIMISTIC;' + Q8 finished at: 2022-4-24 11:4:15:248:816 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-24 11:4:15:250:82 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:4:15:250:756 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-24 11:4:16:249:988 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 11:4:16:250:441 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-24 11:4:17:251:741 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-24 11:4:17:252:217 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-24 11:4:27:250:30 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-24 11:4:27:250:458 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..c8a52558 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:3:11:175:323 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-24 11:3:11:180:926 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:3:12:169:985 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 11:3:12:171:235 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 11:3:13:169:989 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 11:3:13:171:266 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-24 11:3:14:170:696 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-24 11:3:15:170:708 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-24 11:3:16:170:834 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 11:3:17:170:357 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 11:3:18:170:331 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 11:3:19:170:346 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-24 11:3:29:170:861 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 11:3:29:171:321 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..330cfa8c --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:3:33:195:610 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-24 11:3:33:200:945 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:3:34:195:631 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-24 11:3:34:197:896 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 11:3:35:195:626 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-24 11:3:35:196:990 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-24 11:3:36:196:186 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-24 11:3:37:195:955 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-24 11:3:38:195:914 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 11:3:39:196:182 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 11:3:40:196:84 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 11:3:41:196:64 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 11:3:51:196:623 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 11:3:51:197:17 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..e762eb9c --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(100));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:4:48:303:133 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 11:4:48:308:878 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-24 11:4:48:310:249 + Q4-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q4 finished at: 2022-4-24 11:4:49:303:104 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-24 11:4:49:304:645 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-24 11:4:49:305:541 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 11:4:49:306:176 + Q8-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q8 finished at: 2022-4-24 11:4:50:303:80 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-24 11:4:50:304:464 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-24 11:4:50:305:440 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 11:4:50:305:862 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-24 11:4:51:303:891 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-24 11:4:51:309:533 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-24 11:5:1:303:968 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-24 11:5:1:304:422 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..6df16691 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,164 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:3:55:223:404 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-24 11:3:55:228:894 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:3:56:223:397 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-24 11:3:56:225:550 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 11:3:56:226:431 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 11:3:56:227:398 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-24 11:3:56:228:391 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 11:3:56:229:5 + Q9-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q9 finished at: 2022-4-24 11:3:57:223:426 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-24 11:3:57:224:904 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-24 11:3:57:225:942 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-24 11:3:57:227:94 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-24 11:3:57:228:158 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 11:3:57:228:841 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-24 11:3:58:224:398 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-24 11:3:58:224:843 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-24 11:4:8:224:178 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-24 11:4:8:224:621 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_sda_lost_update_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..925b7972 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_sda_lost_update_committed.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:0:55:956:627 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 11:0:55:961:913 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:0:56:956:616 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 11:0:56:957:929 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 11:0:56:958:581 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-24 11:0:57:957:471 +Q7-T1 execute opt: 'COMMIT'; +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739255833329664, conflictStartTS=432739256095473664, conflictCommitTS=432739256095997952, key={tableID=3051, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q7 failed at: 2022-4-24 11:0:58:658:446 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739255833329664, conflictStartTS=432739256095473664, conflictCommitTS=432739256095997952, key={tableID=3051, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..d34dfd1e --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:0:39:930:767 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:0:39:936:0 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:0:40:930:721 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 11:0:40:931:882 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 11:0:40:932:454 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-24 11:0:41:931:593 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:0:41:931:966 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 11:0:51:931:483 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 11:0:51:931:875 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:0:51:932:151 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_double_write_skew1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..c5a37545 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_double_write_skew1.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:51:55:150:835 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:51:55:156:223 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:51:56:150:777 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:51:56:151:953 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 10:51:56:152:868 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q6 finished at: 2022-4-24 10:51:57:151:614 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:51:58:151:42 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739114064281600, conflictStartTS=432739114326425600, conflictCommitTS=432739114850713600, key={tableID=2896, handle=2} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 10:51:59:951:387 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739114064281600, conflictStartTS=432739114326425600, conflictCommitTS=432739114850713600, key={tableID=2896, handle=2} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..4f7fb0e3 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:52:13:177:981 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:52:13:183:640 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:52:14:177:770 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:52:14:178:883 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 10:52:14:179:968 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:52:14:180:564 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-24 10:52:15:178:624 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739118789951488, conflictStartTS=432739119052095488, conflictCommitTS=432739119052881920, key={tableID=2901, handle=2} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 10:52:15:979:555 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739118789951488, conflictStartTS=432739119052095488, conflictCommitTS=432739119052881920, key={tableID=2901, handle=2} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_double_write_skew2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..40328040 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_double_write_skew2.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:52:29:201:761 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:52:29:207:219 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:52:30:201:721 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:52:30:203:749 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 10:52:30:204:720 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-24 10:52:31:202:681 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:52:31:203:295 + Q8-T2 execute opt: 'COMMIT'; + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739123252690944, conflictStartTS=432739122990546944, conflictCommitTS=432739123515359232, key={tableID=2906, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 + Q8 failed at: 2022-4-24 10:52:33:2:382 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739123252690944, conflictStartTS=432739122990546944, conflictCommitTS=432739123515359232, key={tableID=2906, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_read_skew.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_read_skew.txt new file mode 100644 index 00000000..cbfbf7ca --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:52:46:227:630 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:52:46:233:121 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:52:47:227:509 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:52:47:228:623 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 10:52:47:229:445 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-24 10:52:48:228:300 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:52:49:227:763 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:52:50:227:717 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:53:0:228:506 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:53:0:228:836 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_read_skew2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_read_skew2.txt new file mode 100644 index 00000000..a50bca1e --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:53:36:307:543 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:53:36:312:694 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:53:37:307:638 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 10:53:37:309:620 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 10:53:37:310:491 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 10:53:38:308:382 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:53:38:308:934 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 10:53:39:307:618 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:53:49:308:406 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:53:49:308:745 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..97e0cd2f --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:53:53:335:342 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:53:53:340:764 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:53:54:335:328 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 10:53:54:337:779 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 10:53:54:338:783 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:53:54:339:199 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 10:53:55:336:266 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:53:55:336:895 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:54:5:336:12 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:54:5:336:390 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..9a92f420 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:53:4:254:524 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-24 10:53:4:259:942 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:53:5:254:515 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:53:5:256:362 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-24 10:53:5:257:301 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:53:5:257:832 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-24 10:53:6:255:277 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:53:6:255:660 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-24 10:53:16:255:242 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:53:16:255:559 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..9aed9253 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:53:20:280:680 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-24 10:53:20:285:949 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:53:21:280:690 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-24 10:53:21:281:665 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-24 10:53:21:282:314 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:53:21:282:899 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-24 10:53:22:281:383 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:53:22:281:706 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-24 10:53:32:281:502 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:53:32:281:916 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_write_read_skew.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..b552f654 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:51:21:96:875 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:51:21:102:340 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:51:22:96:795 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:51:22:97:918 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 10:51:22:98:847 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-24 10:51:23:97:718 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:51:24:96:989 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:51:25:96:981 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:51:35:97:557 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:51:35:97:874 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..240d8180 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:51:39:123:940 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:51:39:129:331 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:51:40:124:153 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:51:40:126:326 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 10:51:40:127:490 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:51:40:128:86 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-24 10:51:41:124:881 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:51:41:125:556 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:51:51:124:725 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:51:51:125:60 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_mda_step_rat.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_mda_step_rat.txt new file mode 100644 index 00000000..35ff9458 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:54:9:364:108 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:54:9:369:671 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:54:10:364:105 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:54:10:366:308 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 10:54:10:367:397 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-24 10:54:11:364:97 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-24 10:54:11:365:307 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-24 10:54:11:366:345 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-24 10:54:12:365:344 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 10:54:12:365:853 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 10:54:13:364:443 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 10:54:14:364:359 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 10:54:24:365:228 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 10:54:24:365:556 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..c37c0464 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN OPTIMISTIC;' + Q1 finished at: 2022-4-24 10:54:28:391:857 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-24 10:54:28:397:785 +Q3-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q3 finished at: 2022-4-24 10:54:29:391:779 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-24 10:54:29:393:922 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 10:54:30:391:831 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-24 10:54:30:393:362 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-24 10:54:30:394:447 + Q8-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q8 finished at: 2022-4-24 10:54:31:391:929 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-24 10:54:31:393:285 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-24 10:54:32:392:988 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-24 10:54:33:392:134 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 10:54:34:392:212 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-24 10:54:35:392:4 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 10:54:45:391:990 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-24 10:54:45:394:76 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-24 10:54:45:394:443 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..3685fd7f --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:54:49:420:944 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:54:49:426:353 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:54:50:420:922 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:54:50:422:780 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-24 10:54:50:424:65 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-24 10:54:51:420:966 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-24 10:54:51:422:190 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-24 10:54:51:423:532 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-24 10:54:52:422:242 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 10:54:52:422:882 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 10:54:53:421:229 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 10:54:54:421:245 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-24 10:55:4:421:856 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 10:55:4:422:305 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..33eb62ba --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:55:8:446:609 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-24 10:55:8:447:489 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:55:9:446:668 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-24 10:55:9:447:247 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-24 10:55:9:453:93 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-24 10:55:10:446:641 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-24 10:55:10:447:189 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-24 10:55:10:448:652 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-24 10:55:11:448:143 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 10:55:11:448:765 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 10:55:12:446:935 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 10:55:13:446:880 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 10:55:23:447:530 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 10:55:23:447:866 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_sda_dirty_read.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_sda_dirty_read.txt new file mode 100644 index 00000000..155ecce4 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:49:22:916:38 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:49:22:921:317 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:49:23:915:979 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 10:49:23:917:213 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-24 10:49:24:915:803 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:49:25:915:807 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-24 10:49:35:916:735 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 10:49:35:917:43 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_sda_intermediate_read.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..d3a5c9c4 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_intermediate_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:49:57:968:29 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:49:57:973:649 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:49:58:967:862 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 10:49:58:969:808 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-24 10:49:59:968:786 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:50:0:967:897 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:50:1:968:141 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-24 10:50:11:968:605 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:50:11:968:903 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..441c4439 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:50:15:994:412 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:50:15:999:621 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:50:16:994:378 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 10:50:16:995:419 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 10:50:16:995:706 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-24 10:50:17:995:238 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:50:17:995:778 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-24 10:50:27:995:47 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:50:27:995:373 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_sda_lost_self_update.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..a2f7c7a5 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_sda_lost_self_update.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_self_update #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:51:4:71:254 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:51:4:76:644 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:51:5:71:261 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 10:51:5:75:313 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-24 10:51:6:72:31 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 10:51:6:72:569 + Q7-T2 execute opt: 'COMMIT'; + Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739100936372224, conflictStartTS=432739100674228224, conflictCommitTS=432739101198778368, key={tableID=2881, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 + Q7 failed at: 2022-4-24 10:51:7:771:872 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739100936372224, conflictStartTS=432739100674228224, conflictCommitTS=432739101198778368, key={tableID=2881, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..a703713f --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:49:39:942:245 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:49:39:947:622 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:49:40:942:174 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 10:49:40:943:335 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-24 10:49:41:942:988 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:49:42:942:445 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:49:43:942:164 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 10:49:53:942:896 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:49:53:943:208 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..e3f5eda8 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:50:32:19:337 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 10:50:32:24:613 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:50:33:19:347 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-24 10:50:33:20:956 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 10:50:33:21:436 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-24 10:50:34:20:95 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:50:34:20:411 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-24 10:50:44:20:46 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:50:44:20:363 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..81dd31f1 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:50:48:44:569 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 10:50:48:49:805 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:50:49:44:598 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-24 10:50:49:46:167 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 10:50:49:46:664 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-24 10:50:50:45:60 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:50:50:45:373 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-24 10:51:0:45:303 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:51:0:45:610 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..ede74972 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:57:25:650:584 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:57:25:655:939 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:57:26:650:576 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:57:26:651:915 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 10:57:26:652:811 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:57:26:653:417 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-24 10:57:27:651:555 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739200702873600, conflictStartTS=432739200965017600, conflictCommitTS=432739200965804032, key={tableID=2991, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 10:57:28:452:414 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739200702873600, conflictStartTS=432739200965017600, conflictCommitTS=432739200965804032, key={tableID=2991, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..01717dea --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,37 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:57:41:676:641 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:57:41:681:989 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:57:42:676:674 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 10:57:42:677:857 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 10:57:42:678:772 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 10:57:43:677:498 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:57:43:678:49 + Q8-T2 execute opt: 'COMMIT'; + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739205166137344, conflictStartTS=432739204903993344, conflictCommitTS=432739205428543488, key={tableID=2996, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 + Q8 failed at: 2022-4-24 10:57:45:477:498 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739205166137344, conflictStartTS=432739204903993344, conflictCommitTS=432739205428543488, key={tableID=2996, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..640a0976 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,37 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:57:58:701:366 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:57:58:707:113 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:57:59:701:153 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 10:57:59:702:516 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 10:57:59:703:525 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 10:58:0:701:970 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:58:1:701:495 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739209366994944, conflictStartTS=432739209629138944, conflictCommitTS=432739210153426944, key={tableID=3001, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 10:58:3:501:766 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739209366994944, conflictStartTS=432739209629138944, conflictCommitTS=432739210153426944, key={tableID=3001, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..049b48a9 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,37 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:58:16:729:134 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:58:16:734:711 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:58:17:729:127 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 10:58:17:730:343 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 10:58:17:731:274 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:58:17:731:932 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 10:58:18:729:902 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739214092926976, conflictStartTS=432739214355070976, conflictCommitTS=432739214355595264, key={tableID=3006, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 10:58:19:530:786 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739214092926976, conflictStartTS=432739214355070976, conflictCommitTS=432739214355595264, key={tableID=3006, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..bdc20997 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:58:32:755:11 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:58:32:760:424 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:58:33:755:58 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 10:58:33:756:250 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 10:58:33:757:217 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 10:58:34:755:917 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:58:34:756:484 + Q8-T2 execute opt: 'COMMIT'; + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739218555928576, conflictStartTS=432739218293784576, conflictCommitTS=432739218818596864, key={tableID=3011, handle=2} primary=[]byte(nil) [try again later] errcode: HY000 + Q8 failed at: 2022-4-24 10:58:36:555:715 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739218555928576, conflictStartTS=432739218293784576, conflictCommitTS=432739218818596864, key={tableID=3011, handle=2} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..abc9eab7 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:58:49:781:347 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:58:49:786:723 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:58:50:781:346 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 10:58:50:782:639 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 10:58:50:783:553 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 10:58:51:782:103 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:58:52:781:675 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739222757310464, conflictStartTS=432739223019454464, conflictCommitTS=432739223543742464, key={tableID=3016, handle=2} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 10:58:54:581:905 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739222757310464, conflictStartTS=432739223019454464, conflictCommitTS=432739223543742464, key={tableID=3016, handle=2} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..abbc2195 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:59:7:805:317 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:59:7:808:791 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:59:8:805:408 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 10:59:8:806:558 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 10:59:8:807:390 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 10:59:9:806:267 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:59:9:806:864 + Q8-T2 execute opt: 'COMMIT'; + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739227744337920, conflictStartTS=432739227482193920, conflictCommitTS=432739228006744064, key={tableID=3021, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 + Q8 failed at: 2022-4-24 10:59:11:606:242 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739227744337920, conflictStartTS=432739227482193920, conflictCommitTS=432739228006744064, key={tableID=3021, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..376bab93 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:59:24:830:346 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:59:24:835:845 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:59:25:830:327 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 10:59:25:831:328 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 10:59:25:832:131 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 10:59:26:831:288 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:59:27:830:707 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739231945195520, conflictStartTS=432739232207339520, conflictCommitTS=432739232731627520, key={tableID=3026, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 10:59:29:630:887 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739231945195520, conflictStartTS=432739232207339520, conflictCommitTS=432739232731627520, key={tableID=3026, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..66144e56 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:59:42:854:488 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:59:42:859:805 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:59:43:854:421 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 10:59:43:855:299 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 10:59:43:856:124 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:59:43:856:780 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 10:59:44:855:361 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739236670078976, conflictStartTS=432739236932222976, conflictCommitTS=432739236932747264, key={tableID=3031, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 10:59:45:656:391 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739236670078976, conflictStartTS=432739236932222976, conflictCommitTS=432739236932747264, key={tableID=3031, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_mda_step_wat_c1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..6a02fc3d --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_mda_step_wat_c1.txt @@ -0,0 +1,47 @@ +#### db_type: tidb #### +#### test_type: mda_step_wat_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:59:58:881:15 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:59:58:886:264 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:59:59:881:61 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 10:59:59:882:288 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 10:59:59:883:213 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-24 11:0:0:881:53 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-24 11:0:0:882:379 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' + Q8 finished at: 2022-4-24 11:0:0:883:370 +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q9 finished at: 2022-4-24 11:0:1:881:610 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 11:0:1:882:162 + Q11-T2 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; + Q11 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739241133342720, conflictStartTS=432739240871198720, conflictCommitTS=432739241657892864, key={tableID=3036, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 + Q11 failed at: 2022-4-24 11:0:3:982:64 + Q12 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739241395486720, conflictStartTS=432739240871198720, conflictCommitTS=432739241657892864, key={tableID=3036, handle=3} primary=[]byte(nil) [try again later] errcode: HY000 + Q12 failed at: 2022-4-24 11:0:5:81:832 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739241133342720, conflictStartTS=432739240871198720, conflictCommitTS=432739241657892864, key={tableID=3036, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_mda_step_wat_c2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..dab2eea8 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_mda_step_wat_c2.txt @@ -0,0 +1,47 @@ +#### db_type: tidb #### +#### test_type: mda_step_wat_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:0:17:907:550 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:0:17:912:809 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:0:18:907:541 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 11:0:18:908:864 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 11:0:19:907:483 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6 finished at: 2022-4-24 11:0:20:908:409 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-24 11:0:21:908:467 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' + Q8 finished at: 2022-4-24 11:0:21:909:632 +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q9 finished at: 2022-4-24 11:0:22:908:517 + Q10-T2 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:0:23:907:942 +Q11-T1 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; +Q11 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739245859012608, conflictStartTS=432739246121156608, conflictCommitTS=432739247431876608, key={tableID=3041, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q11 failed at: 2022-4-24 11:0:26:8:227 + Q12 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739246383300608, conflictStartTS=432739246121156608, conflictCommitTS=432739247431876608, key={tableID=3041, handle=2} primary=[]byte(nil) [try again later] errcode: HY000 + Q12 failed at: 2022-4-24 11:0:27:108:219 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739245859012608, conflictStartTS=432739246121156608, conflictCommitTS=432739247431876608, key={tableID=3041, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..8638c1e7 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:55:27:475:495 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:55:27:480:993 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:55:28:475:429 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 10:55:28:476:644 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-24 10:55:29:475:434 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:55:30:475:792 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-24 10:55:40:476:191 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-24 10:55:40:491:392 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:55:40:491:840 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..8056b035 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,32 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:55:44:501:212 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:55:44:506:409 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:55:45:501:212 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 10:55:45:503:58 +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-24 10:55:46:501:442 + Q6-T2 execute opt: 'COMMIT'; + Q6 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739174449414144, conflictStartTS=432739174187270144, conflictCommitTS=432739174711558144, key={tableID=2961, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 + Q6 failed at: 2022-4-24 10:55:48:101:966 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739174449414144, conflictStartTS=432739174187270144, conflictCommitTS=432739174711558144, key={tableID=2961, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_sda_full_write.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_sda_full_write.txt new file mode 100644 index 00000000..399c7f8a --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_sda_full_write.txt @@ -0,0 +1,34 @@ +#### db_type: tidb #### +#### test_type: sda_full_write #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:56:1:526:544 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:56:1:532:245 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:56:2:526:463 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 10:56:2:527:991 +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-24 10:56:3:527:215 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 10:56:3:527:859 + Q7-T2 execute opt: 'COMMIT'; + Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739178912415744, conflictStartTS=432739178650271744, conflictCommitTS=432739179174821888, key={tableID=2966, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 + Q7 failed at: 2022-4-24 10:56:5:227:50 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739178912415744, conflictStartTS=432739178650271744, conflictCommitTS=432739179174821888, key={tableID=2966, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_sda_full_write_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..4013264d --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_sda_full_write_committed.txt @@ -0,0 +1,34 @@ +#### db_type: tidb #### +#### test_type: sda_full_write_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:56:18:551:915 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:56:18:557:526 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:56:19:551:768 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 10:56:19:552:942 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 10:56:19:553:533 +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-24 10:56:20:552:602 +Q7-T1 execute opt: 'COMMIT'; +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739183113273344, conflictStartTS=432739183375417344, conflictCommitTS=432739183375941632, key={tableID=2971, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q7 failed at: 2022-4-24 10:56:21:253:505 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739183113273344, conflictStartTS=432739183375417344, conflictCommitTS=432739183375941632, key={tableID=2971, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..c7fa0b63 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:57:9:624:629 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:57:9:630:119 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:57:10:624:559 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 10:57:10:626:549 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 10:57:10:627:163 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-24 10:57:11:625:390 +Q7-T1 execute opt: 'COMMIT'; +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739196501753856, conflictStartTS=432739196763897856, conflictCommitTS=432739196764422144, key={tableID=2986, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q7 failed at: 2022-4-24 10:57:12:326:336 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739196501753856, conflictStartTS=432739196763897856, conflictCommitTS=432739196764422144, key={tableID=2986, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_sda_lost_update_c1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..788375ad --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_sda_lost_update_c1.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:56:34:577:362 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 10:56:34:582:966 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:56:35:577:334 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 10:56:35:578:694 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-24 10:56:36:578:23 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 10:56:36:578:573 + Q7-T2 execute opt: 'COMMIT'; + Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739187576537088, conflictStartTS=432739187314393088, conflictCommitTS=432739187838943232, key={tableID=2976, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 + Q7 failed at: 2022-4-24 10:56:38:277:920 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739187576537088, conflictStartTS=432739187314393088, conflictCommitTS=432739187838943232, key={tableID=2976, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_sda_lost_update_c2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..b24a2005 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/repeatable-read/wat_sda_lost_update_c2.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 10:56:51:600:145 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 10:56:51:605:509 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 10:56:52:600:103 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 10:56:52:601:448 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-24 10:56:53:601:173 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:56:54:600:440 +Q7-T1 execute opt: 'COMMIT'; +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739191776870400, conflictStartTS=432739192039014400, conflictCommitTS=432739192563302400, key={tableID=2981, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q7 failed at: 2022-4-24 10:56:56:300:756 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739191776870400, conflictStartTS=432739192039014400, conflictCommitTS=432739192563302400, key={tableID=2981, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/result_summary/read-committed_total-result.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..45e2cffc --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Rollback + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Rollback + +wat_sda_full_write: Rollback + +wat_sda_full_write_committed: Rollback + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Rollback + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_dist/result_summary/repeatable-read_total-result.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/result_summary/repeatable-read_total-result.txt new file mode 100644 index 00000000..45e2cffc --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_dist/result_summary/repeatable-read_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Rollback + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Rollback + +wat_sda_full_write: Rollback + +wat_sda_full_write_committed: Rollback + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Rollback + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_dda_read_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..a957c600 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:39:33:754:86 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:39:33:754:649 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:39:34:754:103 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 11:39:34:754:821 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 11:39:34:755:422 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:39:34:756:118 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-24 11:39:35:754:359 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:39:35:754:729 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 11:39:45:754:805 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:39:45:755:181 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..eacc44b8 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:39:49:779:697 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:39:49:780:249 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:39:50:779:723 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 11:39:50:781:245 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 11:39:50:781:708 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:39:50:782:275 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 11:39:51:780:91 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739867631026176, conflictStartTS=432739867893170176, conflictCommitTS=432739867893956608, key={tableID=3404, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 11:39:52:581:57 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739867631026176, conflictStartTS=432739867893170176, conflictCommitTS=432739867893956608, key={tableID=3404, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_dda_write_skew.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..9a044007 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:40:5:803:594 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:40:5:804:197 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:40:6:803:606 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 11:40:6:804:193 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 11:40:6:804:685 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 11:40:7:803:719 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:40:7:804:270 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 11:40:8:803:906 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 11:40:18:804:248 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 11:40:18:804:643 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_dda_write_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..d6d419e7 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:40:54:883:285 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:40:54:883:917 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:40:55:883:210 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 11:40:55:884:857 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 11:40:55:885:468 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:40:55:886:105 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 11:40:56:883:509 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:40:56:884:168 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 11:41:6:883:931 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:41:6:884:370 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..c22c486b --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL PRIMARY KEY);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:40:22:830:297 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-24 11:40:22:831:227 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-24 11:40:22:831:697 + Q4-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q4 finished at: 2022-4-24 11:40:23:830:401 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-24 11:40:23:832:455 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-24 11:40:23:833:109 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 11:40:23:833:770 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:40:24:830:705 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-24 11:40:34:831:19 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-24 11:40:34:832:69 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 11:40:34:832:563 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..443b47dd --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:40:38:858:5 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (saving,500,) (checking,500,) + (1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-24 11:40:38:859:413 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:40:39:858:47 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (saving,500,) (checking,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + (2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-24 11:40:39:859:616 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-24 11:40:39:860:449 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:40:39:861:65 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-24 11:40:40:858:344 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:40:40:858:947 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,saving,1400) (kevin,checking,1400) + (1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + (2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-24 11:40:50:858:603 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:40:50:859:57 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_mda_step_iat.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..d777f841 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:41:10:908:52 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-24 11:41:10:908:657 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:41:11:908:73 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 11:41:11:908:791 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 11:41:12:908:79 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 11:41:12:908:751 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-24 11:41:13:908:282 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-24 11:41:14:908:338 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-24 11:41:15:908:366 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 11:41:16:908:398 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 11:41:17:908:434 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 11:41:18:908:547 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 11:41:28:909:85 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 11:41:28:909:511 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..dd1101da --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:42:53:35:602 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:42:53:36:310 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:42:54:35:651 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 11:42:54:39:963 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 11:42:54:40:561 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-24 11:42:55:35:751 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-24 11:42:55:36:504 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-24 11:42:55:37:52 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 11:42:55:37:686 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-24 11:42:56:35:946 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-24 11:42:56:36:422 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-24 11:43:6:36:560 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-24 11:43:6:37:5 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..2c0c5be2 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,209 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:42:34:9:610 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:42:34:10:643 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:42:35:9:529 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 11:42:35:11:46 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 11:42:36:9:355 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-24 11:42:36:9:975 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 11:42:36:10:615 + Q8-T4 execute sql: 'BEGIN OPTIMISTIC;' + Q8 finished at: 2022-4-24 11:42:37:9:487 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-24 11:42:37:10:147 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:42:37:10:831 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-24 11:42:38:9:841 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 11:42:38:10:292 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-24 11:42:39:9:902 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-24 11:42:39:10:411 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-24 11:42:49:10:480 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-24 11:42:49:10:913 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..f0334d8b --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:41:32:934:805 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-24 11:41:32:935:449 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:41:33:934:723 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 11:41:33:935:328 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 11:41:34:934:715 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 11:41:34:935:286 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-24 11:41:35:934:958 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-24 11:41:36:934:940 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-24 11:41:37:934:923 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 11:41:38:935:138 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 11:41:39:935:163 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 11:41:40:935:134 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-24 11:41:50:935:535 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 11:41:50:936:1 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..7703c0eb --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:41:54:959:71 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-24 11:41:54:959:760 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:41:55:959:25 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-24 11:41:55:960:534 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 11:41:56:959:118 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-24 11:41:56:959:785 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-24 11:41:57:959:280 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-24 11:41:58:959:246 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-24 11:41:59:959:421 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 11:42:0:959:455 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 11:42:1:959:552 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 11:42:2:959:495 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 11:42:12:959:915 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 11:42:12:960:318 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..9cf4d488 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:43:10:63:522 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 11:43:10:64:217 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-24 11:43:10:64:904 + Q4-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q4 finished at: 2022-4-24 11:43:11:63:482 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-24 11:43:11:64:202 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-24 11:43:11:64:825 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 11:43:11:65:474 + Q8-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q8 finished at: 2022-4-24 11:43:12:63:532 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-24 11:43:12:64:267 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-24 11:43:12:64:867 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 11:43:12:65:292 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-24 11:43:13:63:734 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-24 11:43:13:64:358 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-24 11:43:23:64:131 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-24 11:43:23:64:573 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..db7bcc81 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,164 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:42:16:985:21 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-24 11:42:16:985:709 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:42:17:985:22 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-24 11:42:17:985:660 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 11:42:17:986:125 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 11:42:17:986:660 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-24 11:42:17:987:73 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 11:42:17:987:741 + Q9-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q9 finished at: 2022-4-24 11:42:18:985:69 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-24 11:42:18:985:756 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-24 11:42:18:986:288 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-24 11:42:18:986:846 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-24 11:42:18:987:298 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 11:42:18:987:910 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-24 11:42:19:985:281 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-24 11:42:19:985:693 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-24 11:42:29:985:774 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-24 11:42:29:986:183 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_sda_lost_update_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..023d4c1a --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:39:17:729:213 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 11:39:17:729:842 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:39:18:729:258 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 11:39:18:729:912 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 11:39:18:730:498 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-24 11:39:19:729:478 +Q7-T1 execute opt: 'COMMIT'; +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739859229310976, conflictStartTS=432739859491454976, conflictCommitTS=432739859491717120, key={tableID=3398, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q7 failed at: 2022-4-24 11:39:20:430:339 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739859229310976, conflictStartTS=432739859491454976, conflictCommitTS=432739859491717120, key={tableID=3398, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..b0d9cb0a --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:39:1:704:962 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:39:1:705:676 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:39:2:704:981 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 11:39:2:705:581 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 11:39:2:706:109 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-24 11:39:3:705:213 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:39:3:705:626 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 11:39:13:705:489 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 11:39:13:705:873 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:39:13:706:338 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_double_write_skew1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..74c1f9bf --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:30:16:962:774 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:30:16:963:382 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:30:17:962:719 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 11:30:17:963:303 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 11:30:17:963:797 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q6 finished at: 2022-4-24 11:30:18:962:980 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 11:30:19:962:851 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739717470486528, conflictStartTS=432739717732630528, conflictCommitTS=432739718256918528, key={tableID=3305, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 11:30:21:763:369 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739717470486528, conflictStartTS=432739717732630528, conflictCommitTS=432739718256918528, key={tableID=3305, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..b8ee9ca6 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:30:34:987:274 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:30:34:987:933 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:30:35:987:272 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 11:30:35:987:873 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 11:30:35:988:385 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:30:35:988:903 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-24 11:30:36:987:489 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739722195632128, conflictStartTS=432739722457776128, conflictCommitTS=432739722458038272, key={tableID=3308, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 11:30:37:788:319 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739722195632128, conflictStartTS=432739722457776128, conflictCommitTS=432739722458038272, key={tableID=3308, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_double_write_skew2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..e7d4a1c3 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:30:51:11:525 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:30:51:12:160 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:30:52:11:598 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 11:30:52:12:197 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 11:30:52:12:777 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-24 11:30:53:12:308 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:30:53:12:903 + Q8-T2 execute opt: 'COMMIT'; + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739726658371584, conflictStartTS=432739726396227584, conflictCommitTS=432739726920777728, key={tableID=3311, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q8 failed at: 2022-4-24 11:30:54:812:70 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739726658371584, conflictStartTS=432739726396227584, conflictCommitTS=432739726920777728, key={tableID=3311, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_read_skew.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..fb5ed353 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:31:8:37:516 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:31:8:38:178 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:31:9:36:100 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 11:31:9:36:851 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 11:31:9:37:306 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-24 11:31:10:36:463 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 11:31:11:36:389 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:31:12:36:230 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 11:31:22:36:912 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:31:22:37:229 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_read_skew2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..215ffa9f --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:31:58:110:704 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:31:58:111:446 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:31:59:110:668 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 11:31:59:112:357 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 11:31:59:112:811 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 11:32:0:110:939 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:32:0:111:489 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 11:32:1:110:671 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 11:32:11:111:168 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:32:11:111:500 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..f951fe1d --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:32:15:135:556 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:32:15:136:144 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:32:16:135:568 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 11:32:16:137:265 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 11:32:16:137:864 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:32:16:138:253 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 11:32:17:135:739 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:32:17:136:418 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 11:32:27:136:274 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:32:27:136:630 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..da07b7bc --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:31:26:61:544 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-24 11:31:26:62:532 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:31:27:61:603 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-24 11:31:27:68:520 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-24 11:31:27:69:78 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:31:27:69:665 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-24 11:31:28:62:259 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:31:28:62:593 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-24 11:31:38:62:44 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:31:38:62:373 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..194114df --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:31:42:85:381 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-24 11:31:42:90:791 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:31:43:85:440 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-24 11:31:43:86:842 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-24 11:31:43:87:319 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:31:43:87:930 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-24 11:31:44:85:874 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:31:44:86:196 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-24 11:31:54:85:975 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:31:54:86:328 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_write_read_skew.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..14207f57 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:29:42:913:573 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:29:42:914:154 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:29:43:912:389 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 11:29:43:913:86 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 11:29:43:913:749 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-24 11:29:44:912:698 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 11:29:45:912:653 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:29:46:912:610 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 11:29:56:913:102 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:29:56:913:510 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..b02e8b9a --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:30:0:937:481 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:30:0:938:308 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:30:1:937:388 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 11:30:1:939:369 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 11:30:1:939:868 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:30:1:940:376 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-24 11:30:2:937:658 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:30:2:938:162 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 11:30:12:938:122 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:30:12:938:439 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_mda_step_rat.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..86a06e44 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:32:31:161:488 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:32:31:162:129 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:32:32:161:443 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 11:32:32:162:888 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 11:32:32:163:454 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-24 11:32:33:161:467 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-24 11:32:33:162:63 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-24 11:32:33:162:645 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-24 11:32:34:161:757 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 11:32:34:162:310 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 11:32:35:161:701 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 11:32:36:161:730 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 11:32:46:162:322 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 11:32:46:162:659 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..6290aa07 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN OPTIMISTIC;' + Q1 finished at: 2022-4-24 11:32:50:187:176 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-24 11:32:50:187:934 +Q3-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q3 finished at: 2022-4-24 11:32:51:187:201 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-24 11:32:51:187:829 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 11:32:52:187:230 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-24 11:32:52:188:10 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-24 11:32:52:188:696 + Q8-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q8 finished at: 2022-4-24 11:32:53:187:232 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-24 11:32:53:188:451 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-24 11:32:54:187:710 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-24 11:32:55:187:590 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 11:32:56:187:526 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-24 11:32:57:187:371 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 11:33:7:187:378 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-24 11:33:7:188:549 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-24 11:33:7:188:846 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..59cfbdad --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:33:11:213:842 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:33:11:214:375 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:33:12:213:863 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-24 11:33:12:214:395 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-24 11:33:12:215:275 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-24 11:33:13:213:875 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-24 11:33:13:214:419 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-24 11:33:13:215:269 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-24 11:33:14:214:947 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 11:33:14:215:507 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 11:33:15:214:81 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 11:33:16:214:178 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-24 11:33:26:214:467 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 11:33:26:214:820 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..8f405714 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:33:30:237:718 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-24 11:33:30:238:223 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:33:31:237:687 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-24 11:33:31:238:717 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-24 11:33:31:239:727 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-24 11:33:32:237:709 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-24 11:33:32:238:247 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-24 11:33:32:239:166 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-24 11:33:33:238:352 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 11:33:33:238:880 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 11:33:34:237:983 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 11:33:35:238:46 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 11:33:45:238:499 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 11:33:45:238:837 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_sda_dirty_read.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..6170d2ea --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:27:44:743:466 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:27:44:744:58 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:27:45:743:787 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 11:27:45:744:567 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-24 11:27:46:743:354 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:27:47:743:364 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-24 11:27:57:744:50 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 11:27:57:744:340 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_sda_intermediate_read.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..61428ec7 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:28:19:792:250 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:28:19:792:874 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:28:20:792:279 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 11:28:20:792:888 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-24 11:28:21:792:450 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:28:22:792:236 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:28:23:792:444 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-24 11:28:33:792:870 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 11:28:33:793:184 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..54caebc7 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:28:37:815:565 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:28:37:816:233 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:28:38:815:494 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 11:28:38:816:73 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 11:28:38:816:358 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-24 11:28:39:815:702 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:28:39:816:227 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-24 11:28:49:815:847 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 11:28:49:816:221 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_sda_lost_self_update.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..2cea3b2c --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:29:25:887:743 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:29:25:888:309 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:29:26:887:792 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 11:29:26:889:83 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-24 11:29:27:887:956 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 11:29:27:888:499 + Q7-T2 execute opt: 'COMMIT'; + Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739704343625728, conflictStartTS=432739704081481728, conflictCommitTS=432739704606031872, key={tableID=3296, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q7 failed at: 2022-4-24 11:29:29:588:252 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739704343625728, conflictStartTS=432739704081481728, conflictCommitTS=432739704606031872, key={tableID=3296, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..954a8103 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:28:1:767:869 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:28:1:768:491 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:28:2:767:880 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 11:28:2:769:254 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-24 11:28:3:768:313 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:28:4:768:88 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:28:5:767:879 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 11:28:15:768:460 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 11:28:15:768:798 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..b65a7b1a --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:28:53:840:213 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 11:28:53:841:314 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:28:54:840:231 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-24 11:28:54:840:764 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 11:28:54:841:261 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-24 11:28:55:840:697 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:28:55:840:972 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-24 11:29:5:840:726 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 11:29:5:841:48 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..4e24b698 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:29:9:863:626 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 11:29:9:869:0 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:29:10:863:563 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-24 11:29:10:865:169 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 11:29:10:865:671 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-24 11:29:11:864:320 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:29:11:864:639 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-24 11:29:21:864:156 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 11:29:21:864:465 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..a3ed1f7d --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:35:47:431:679 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:35:47:432:301 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:35:48:431:627 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 11:35:48:432:240 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 11:35:48:432:784 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:35:48:433:375 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-24 11:35:49:432:58 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739804100952064, conflictStartTS=432739804363096064, conflictCommitTS=432739804363620352, key={tableID=3362, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 11:35:50:232:958 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739804100952064, conflictStartTS=432739804363096064, conflictCommitTS=432739804363620352, key={tableID=3362, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..2ce0b5a6 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,37 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:36:3:456:514 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:36:3:457:215 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:36:4:456:463 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 11:36:4:457:100 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 11:36:4:457:634 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 11:36:5:456:782 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:36:5:457:400 + Q8-T2 execute opt: 'COMMIT'; + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739808563953664, conflictStartTS=432739808301809664, conflictCommitTS=432739808826359808, key={tableID=3365, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q8 failed at: 2022-4-24 11:36:7:257:224 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739808563953664, conflictStartTS=432739808301809664, conflictCommitTS=432739808826359808, key={tableID=3365, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..9aa25945 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,37 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:36:20:481:661 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:36:20:482:461 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:36:21:481:512 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 11:36:21:482:95 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 11:36:21:482:677 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 11:36:22:481:768 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 11:36:23:481:817 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739812764811264, conflictStartTS=432739813026955264, conflictCommitTS=432739813551243264, key={tableID=3368, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 11:36:25:282:194 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739812764811264, conflictStartTS=432739813026955264, conflictCommitTS=432739813551243264, key={tableID=3368, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..53f11d4a --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,37 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:36:38:506:386 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:36:38:506:980 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:36:39:506:308 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 11:36:39:506:993 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 11:36:39:507:421 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:36:39:507:957 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 11:36:40:506:556 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739817489956864, conflictStartTS=432739817752100864, conflictCommitTS=432739817752363008, key={tableID=3371, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 11:36:41:307:551 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739817489956864, conflictStartTS=432739817752100864, conflictCommitTS=432739817752363008, key={tableID=3371, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..01b8ae6a --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:36:54:530:116 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:36:54:530:833 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:36:55:530:64 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 11:36:55:530:733 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 11:36:55:531:217 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 11:36:56:530:267 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:36:56:530:873 + Q8-T2 execute opt: 'COMMIT'; + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739821952434176, conflictStartTS=432739821690552320, conflictCommitTS=432739822214840320, key={tableID=3374, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 + Q8 failed at: 2022-4-24 11:36:58:330:741 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739821952434176, conflictStartTS=432739821690552320, conflictCommitTS=432739822214840320, key={tableID=3374, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..eda2f655 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:37:11:555:510 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:37:11:556:229 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:37:12:555:277 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 11:37:12:555:915 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 11:37:12:556:365 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 11:37:13:555:531 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 11:37:14:555:565 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739826153553920, conflictStartTS=432739826415697920, conflictCommitTS=432739826939985920, key={tableID=3377, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 11:37:16:355:939 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739826153553920, conflictStartTS=432739826415697920, conflictCommitTS=432739826939985920, key={tableID=3377, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..6ae84061 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:37:29:582:59 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:37:29:582:779 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:37:30:580:406 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 11:37:30:581:54 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 11:37:30:581:525 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 11:37:31:580:756 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:37:31:581:406 + Q8-T2 execute opt: 'COMMIT'; + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739831140843520, conflictStartTS=432739830878961664, conflictCommitTS=432739831403249664, key={tableID=3380, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q8 failed at: 2022-4-24 11:37:33:381:151 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739831140843520, conflictStartTS=432739830878961664, conflictCommitTS=432739831403249664, key={tableID=3380, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..8cd5db84 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:37:46:604:258 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:37:46:604:979 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:37:47:604:369 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 11:37:47:605:177 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 11:37:47:605:712 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 11:37:48:604:435 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 11:37:49:604:606 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739835341438976, conflictStartTS=432739835603582976, conflictCommitTS=432739836127870976, key={tableID=3383, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 11:37:51:404:917 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739835341438976, conflictStartTS=432739835603582976, conflictCommitTS=432739836127870976, key={tableID=3383, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..a30c33cd --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:38:4:629:115 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:38:4:629:737 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:38:5:629:53 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 11:38:5:629:633 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 11:38:5:630:131 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:38:5:630:668 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 11:38:6:629:447 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739840066584576, conflictStartTS=432739840328466432, conflictCommitTS=432739840328990720, key={tableID=3386, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 11:38:7:430:345 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739840066584576, conflictStartTS=432739840328466432, conflictCommitTS=432739840328990720, key={tableID=3386, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_mda_step_wat_c1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..1dfccc92 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,47 @@ +#### db_type: tidb #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:38:20:654:445 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:38:20:655:24 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:38:21:654:325 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 11:38:21:654:925 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 11:38:21:655:404 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-24 11:38:22:654:400 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-24 11:38:22:655:33 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' + Q8 finished at: 2022-4-24 11:38:22:655:541 +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q9 finished at: 2022-4-24 11:38:23:654:639 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 11:38:23:655:922 + Q11-T2 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; + Q11 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739844529586176, conflictStartTS=432739844267442176, conflictCommitTS=432739845054136320, key={tableID=3389, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q11 failed at: 2022-4-24 11:38:25:755:66 + Q12 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739844791730176, conflictStartTS=432739844267442176, conflictCommitTS=432739845054136320, key={tableID=3389, handle=2} primary=[]byte(nil) [try again later] errcode: HY000 + Q12 failed at: 2022-4-24 11:38:26:855:107 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739844529586176, conflictStartTS=432739844267442176, conflictCommitTS=432739845054136320, key={tableID=3389, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_mda_step_wat_c2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..e7d0fba0 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,47 @@ +#### db_type: tidb #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:38:39:680:418 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:38:39:681:156 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:38:40:680:301 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 11:38:40:680:990 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 11:38:41:680:648 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6 finished at: 2022-4-24 11:38:42:680:542 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-24 11:38:43:680:584 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' + Q8 finished at: 2022-4-24 11:38:43:681:32 +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q9 finished at: 2022-4-24 11:38:44:680:632 + Q10-T2 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:38:45:680:743 +Q11-T1 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; +Q11 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739849254993920, conflictStartTS=432739849517137920, conflictCommitTS=432739850827857920, key={tableID=3392, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q11 failed at: 2022-4-24 11:38:47:781:33 + Q12 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739849779281920, conflictStartTS=432739849517137920, conflictCommitTS=432739850827857920, key={tableID=3392, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 + Q12 failed at: 2022-4-24 11:38:48:881:104 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739849254993920, conflictStartTS=432739849517137920, conflictCommitTS=432739850827857920, key={tableID=3392, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..e8d94923 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:33:49:262:959 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:33:49:263:527 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:33:50:262:916 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 11:33:50:263:507 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-24 11:33:51:262:986 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:33:52:263:233 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-24 11:34:2:263:629 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-24 11:34:2:278:388 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 11:34:2:278:826 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..65786973 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,32 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:34:6:288:423 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:34:6:289:27 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:34:7:288:400 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 11:34:7:289:10 +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-24 11:34:8:288:691 + Q6-T2 execute opt: 'COMMIT'; + Q6 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739777849065472, conflictStartTS=432739777586921472, conflictCommitTS=432739778111209472, key={tableID=3344, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q6 failed at: 2022-4-24 11:34:9:889:40 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739777849065472, conflictStartTS=432739777586921472, conflictCommitTS=432739778111209472, key={tableID=3344, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_sda_full_write.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..76349a6a --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_sda_full_write.txt @@ -0,0 +1,34 @@ +#### db_type: tidb #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:34:23:312:469 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:34:23:313:32 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:34:24:312:511 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 11:34:24:313:229 +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-24 11:34:25:312:747 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 11:34:25:313:423 + Q7-T2 execute opt: 'COMMIT'; + Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739782311804928, conflictStartTS=432739782049660928, conflictCommitTS=432739782574211072, key={tableID=3347, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q7 failed at: 2022-4-24 11:34:27:13:160 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739782311804928, conflictStartTS=432739782049660928, conflictCommitTS=432739782574211072, key={tableID=3347, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_sda_full_write_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..74f9f041 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,34 @@ +#### db_type: tidb #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:34:40:336:875 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:34:40:337:619 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:34:41:336:816 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 11:34:41:337:438 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 11:34:41:337:996 +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-24 11:34:42:337:4 +Q7-T1 execute opt: 'COMMIT'; +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739786512400384, conflictStartTS=432739786774544384, conflictCommitTS=432739786774806528, key={tableID=3350, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q7 failed at: 2022-4-24 11:34:43:37:998 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739786512400384, conflictStartTS=432739786774544384, conflictCommitTS=432739786774806528, key={tableID=3350, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..9975b6c2 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:35:31:407:725 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:35:31:408:364 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:35:32:407:732 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 11:35:32:408:333 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 11:35:32:408:882 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-24 11:35:33:407:921 +Q7-T1 execute opt: 'COMMIT'; +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739799900356608, conflictStartTS=432739800162500608, conflictCommitTS=432739800162762752, key={tableID=3359, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q7 failed at: 2022-4-24 11:35:34:108:838 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739799900356608, conflictStartTS=432739800162500608, conflictCommitTS=432739800162762752, key={tableID=3359, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_sda_lost_update_c1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..3c94df74 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:34:56:360:560 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 11:34:56:361:236 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:34:57:360:514 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 11:34:57:361:140 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-24 11:34:58:360:785 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 11:34:58:361:369 + Q7-T2 execute opt: 'COMMIT'; + Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739790975139840, conflictStartTS=432739790712995840, conflictCommitTS=432739791237545984, key={tableID=3353, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q7 failed at: 2022-4-24 11:35:0:61:198 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739790975139840, conflictStartTS=432739790712995840, conflictCommitTS=432739791237545984, key={tableID=3353, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_sda_lost_update_c2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..d75851c4 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:35:13:384:747 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 11:35:13:385:349 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:35:14:384:800 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 11:35:14:385:385 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-24 11:35:15:384:994 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:35:16:385:235 +Q7-T1 execute opt: 'COMMIT'; +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739795175735296, conflictStartTS=432739795437879296, conflictCommitTS=432739795962167296, key={tableID=3356, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q7 failed at: 2022-4-24 11:35:18:85:365 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739795175735296, conflictStartTS=432739795437879296, conflictCommitTS=432739795962167296, key={tableID=3356, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_dda_read_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..01c3022b --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_dda_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:22:48:642:216 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:22:48:642:957 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:22:49:642:213 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 11:22:49:642:866 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 11:22:49:643:328 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:22:49:643:915 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-24 11:22:50:642:436 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:22:50:642:829 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 11:23:0:642:829 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:23:0:643:186 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..56bb798a --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:23:4:667:781 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:23:4:668:372 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:23:5:667:726 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 11:23:5:668:974 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 11:23:5:669:531 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:23:5:670:143 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 11:23:6:668:14 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739604146946048, conflictStartTS=432739604409090048, conflictCommitTS=432739604409614336, key={tableID=3242, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 11:23:7:469:8 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739604146946048, conflictStartTS=432739604409090048, conflictCommitTS=432739604409614336, key={tableID=3242, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_dda_write_skew.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_dda_write_skew.txt new file mode 100644 index 00000000..68ab5cb9 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:23:20:692:338 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:23:20:692:968 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:23:21:692:352 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 11:23:21:693:9 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 11:23:21:693:556 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 11:23:22:692:681 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:23:22:693:313 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 11:23:23:692:675 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 11:23:33:692:982 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 11:23:33:693:378 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_dda_write_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..29a79a0b --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:24:9:770:411 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:24:9:770:982 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:24:10:770:656 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 11:24:10:772:137 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 11:24:10:772:842 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:24:10:773:541 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 11:24:11:770:658 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:24:11:771:318 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 11:24:21:771:19 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:24:21:771:441 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..eebbefbc --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL PRIMARY KEY);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:23:37:717:252 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-24 11:23:37:718:577 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-24 11:23:37:719:160 + Q4-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q4 finished at: 2022-4-24 11:23:38:717:154 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-24 11:23:38:719:462 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-24 11:23:38:719:994 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 11:23:38:720:657 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:23:39:717:491 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-24 11:23:49:718:75 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-24 11:23:49:719:114 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 11:23:49:719:588 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..cd2cb1e1 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:23:53:745:336 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (saving,500,) (checking,500,) + (1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-24 11:23:53:746:711 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:23:54:745:326 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (saving,500,) (checking,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + (2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-24 11:23:54:747:424 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-24 11:23:54:748:71 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:23:54:748:693 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-24 11:23:55:745:821 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:23:55:746:527 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,saving,1400) (kevin,checking,1400) + (1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + (2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-24 11:24:5:745:854 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:24:5:746:259 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_mda_step_iat.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_mda_step_iat.txt new file mode 100644 index 00000000..f9102636 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:24:25:796:755 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-24 11:24:25:797:418 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:24:26:796:540 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 11:24:26:797:706 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 11:24:27:796:584 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 11:24:27:797:281 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-24 11:24:28:796:861 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-24 11:24:29:796:810 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-24 11:24:30:796:856 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 11:24:31:796:885 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 11:24:32:796:943 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 11:24:33:796:984 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 11:24:43:797:447 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 11:24:43:797:887 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..f5ba694f --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:26:7:925:598 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:26:7:926:390 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:26:8:925:570 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 11:26:8:926:157 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 11:26:8:926:751 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-24 11:26:9:925:549 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-24 11:26:9:926:244 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-24 11:26:9:926:719 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 11:26:9:927:313 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-24 11:26:10:925:820 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-24 11:26:10:926:295 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-24 11:26:20:926:332 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-24 11:26:20:926:741 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..9fbcc0bb --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,209 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:25:48:899:442 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:25:48:900:299 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:25:49:899:332 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 11:25:49:900:216 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 11:25:50:899:419 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-24 11:25:50:900:130 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 11:25:50:900:791 + Q8-T4 execute sql: 'BEGIN OPTIMISTIC;' + Q8 finished at: 2022-4-24 11:25:51:899:436 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-24 11:25:51:900:161 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:25:51:900:854 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-24 11:25:52:899:988 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 11:25:52:900:520 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-24 11:25:53:902:503 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-24 11:25:53:903:73 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-24 11:26:3:900:576 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-24 11:26:3:901:7 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..968d649c --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:24:47:823:325 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-24 11:24:47:823:988 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:24:48:823:344 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 11:24:48:824:49 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 11:24:49:823:235 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 11:24:49:823:793 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-24 11:24:50:823:500 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-24 11:24:51:823:508 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-24 11:24:52:823:479 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 11:24:53:823:760 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 11:24:54:823:743 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 11:24:55:823:663 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-24 11:25:5:824:87 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 11:25:5:824:511 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..8859656d --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:25:9:847:617 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-24 11:25:9:848:319 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:25:10:847:569 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-24 11:25:10:849:306 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 11:25:11:847:657 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-24 11:25:11:848:355 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-24 11:25:12:847:949 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-24 11:25:13:847:810 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-24 11:25:14:848:18 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 11:25:15:848:21 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 11:25:16:847:921 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 11:25:17:848:106 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 11:25:27:848:448 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 11:25:27:848:874 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..034742ab --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:26:24:951:536 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 11:26:24:952:245 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-24 11:26:24:952:881 + Q4-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q4 finished at: 2022-4-24 11:26:25:951:484 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-24 11:26:25:952:181 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-24 11:26:25:952:662 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 11:26:25:953:309 + Q8-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q8 finished at: 2022-4-24 11:26:26:951:510 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-24 11:26:26:952:228 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-24 11:26:26:952:763 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 11:26:26:953:173 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-24 11:26:27:951:822 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-24 11:26:27:952:987 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-24 11:26:37:952:86 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-24 11:26:37:952:528 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..35faa887 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,164 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:25:31:873:708 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-24 11:25:31:874:347 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:25:32:873:795 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-24 11:25:32:875:273 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 11:25:32:875:913 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 11:25:32:876:617 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-24 11:25:32:877:190 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 11:25:32:877:904 + Q9-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q9 finished at: 2022-4-24 11:25:33:873:787 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-24 11:25:33:874:640 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-24 11:25:33:875:282 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-24 11:25:33:875:996 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-24 11:25:33:876:600 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 11:25:33:877:278 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-24 11:25:34:874:90 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-24 11:25:34:874:616 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-24 11:25:44:874:516 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-24 11:25:44:874:932 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_sda_lost_update_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..673d026e --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_sda_lost_update_committed.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:22:32:617:143 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 11:22:32:617:744 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:22:33:617:235 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 11:22:33:617:906 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 11:22:33:618:503 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-24 11:22:34:617:390 +Q7-T1 execute opt: 'COMMIT'; +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739595745230848, conflictStartTS=432739596007374848, conflictCommitTS=432739596007636992, key={tableID=3236, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q7 failed at: 2022-4-24 11:22:35:318:281 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739595745230848, conflictStartTS=432739596007374848, conflictCommitTS=432739596007636992, key={tableID=3236, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..ac17e33f --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:22:16:592:842 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:22:16:593:416 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:22:17:592:816 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 11:22:17:594:579 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 11:22:17:595:129 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-24 11:22:18:593:47 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:22:18:593:438 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 11:22:28:593:487 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 11:22:28:593:865 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:22:28:594:139 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_double_write_skew1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..d8086cfd --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_double_write_skew1.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:13:31:852:807 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:13:31:853:321 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:13:32:852:769 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 11:13:32:853:306 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 11:13:32:853:812 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q6 finished at: 2022-4-24 11:13:33:853:23 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 11:13:34:852:951 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739453986930688, conflictStartTS=432739454249074688, conflictCommitTS=432739454773362688, key={tableID=3143, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 11:13:36:653:419 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739453986930688, conflictStartTS=432739454249074688, conflictCommitTS=432739454773362688, key={tableID=3143, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..0271eca5 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:13:49:877:176 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:13:49:877:728 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:13:50:877:313 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 11:13:50:877:952 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 11:13:50:878:519 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:13:50:879:51 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-24 11:13:51:877:477 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739458712076288, conflictStartTS=432739458974220288, conflictCommitTS=432739458974482432, key={tableID=3146, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 11:13:52:678:330 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739458712076288, conflictStartTS=432739458974220288, conflictCommitTS=432739458974482432, key={tableID=3146, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_double_write_skew2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..0e006356 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_double_write_skew2.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:14:5:901:962 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:14:5:902:650 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:14:6:901:665 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 11:14:6:902:250 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 11:14:6:902:700 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-24 11:14:7:901:836 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:14:7:902:417 + Q8-T2 execute opt: 'COMMIT'; + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739463174815744, conflictStartTS=432739462912671744, conflictCommitTS=432739463437221888, key={tableID=3149, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q8 failed at: 2022-4-24 11:14:9:702:183 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739463174815744, conflictStartTS=432739462912671744, conflictCommitTS=432739463437221888, key={tableID=3149, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_read_skew.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_read_skew.txt new file mode 100644 index 00000000..5c62a40d --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:14:22:926:81 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:14:22:926:650 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:14:23:926:335 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 11:14:23:926:902 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 11:14:23:927:396 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-24 11:14:24:926:420 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 11:14:25:926:301 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:14:26:926:134 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 11:14:36:926:835 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:14:36:927:156 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_read_skew2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_read_skew2.txt new file mode 100644 index 00000000..ed69890e --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:15:13:0:206 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:15:13:0:868 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:15:14:0:153 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 11:15:14:2:436 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 11:15:14:2:883 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 11:15:15:0:457 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:15:15:1:38 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 11:15:16:0:188 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 11:15:26:0:814 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:15:26:1:121 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..038720a3 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:15:30:25:205 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:15:30:25:804 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:15:31:25:142 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 11:15:31:27:186 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 11:15:31:27:622 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:15:31:27:928 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 11:15:32:25:481 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:15:32:26:77 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 11:15:42:25:874 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:15:42:26:289 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..73687277 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:14:40:951:252 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-24 11:14:40:952:110 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:14:41:951:290 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-24 11:14:41:951:819 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-24 11:14:41:952:223 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:14:41:952:739 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-24 11:14:42:951:993 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:14:42:952:337 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-24 11:14:52:951:733 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:14:52:952:42 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..ac947a64 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:14:56:974:698 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-24 11:14:56:979:996 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:14:57:974:621 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-24 11:14:57:975:162 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-24 11:14:57:975:577 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:14:57:976:86 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-24 11:14:58:975:179 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:14:58:975:514 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-24 11:15:8:975:538 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:15:8:975:911 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_write_read_skew.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..94c7a788 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:12:57:802:799 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:12:57:803:423 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:12:58:802:824 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 11:12:58:803:369 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 11:12:58:803:859 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-24 11:12:59:803:28 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 11:13:0:803:145 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:13:1:802:928 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 11:13:11:803:530 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:13:11:803:831 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..65220860 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:13:15:827:696 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:13:15:828:317 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:13:16:827:651 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 11:13:16:828:276 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 11:13:16:828:809 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:13:16:829:321 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-24 11:13:17:827:931 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 11:13:17:828:652 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 11:13:27:828:344 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:13:27:828:673 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_mda_step_rat.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_mda_step_rat.txt new file mode 100644 index 00000000..fc8dcc39 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:15:46:51:326 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:15:46:52:139 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:15:47:51:240 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 11:15:47:51:779 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 11:15:47:52:331 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-24 11:15:48:51:280 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-24 11:15:48:51:832 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-24 11:15:48:52:372 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-24 11:15:49:51:664 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 11:15:49:52:207 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 11:15:50:51:462 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 11:15:51:51:521 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 11:16:1:52:74 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 11:16:1:52:443 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..f7091ca8 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN OPTIMISTIC;' + Q1 finished at: 2022-4-24 11:16:5:77:44 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-24 11:16:5:77:846 +Q3-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q3 finished at: 2022-4-24 11:16:6:77:105 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-24 11:16:6:79:772 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 11:16:7:77:78 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-24 11:16:7:77:924 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-24 11:16:7:78:585 + Q8-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q8 finished at: 2022-4-24 11:16:8:77:32 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-24 11:16:8:77:670 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-24 11:16:9:77:516 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-24 11:16:10:77:353 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 11:16:11:77:343 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-24 11:16:12:77:183 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 11:16:22:77:256 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-24 11:16:22:78:696 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-24 11:16:22:79:94 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..8e114ec6 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:16:26:103:57 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:16:26:103:586 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:16:27:103:87 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-24 11:16:27:104:182 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-24 11:16:27:105:124 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-24 11:16:28:103:124 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-24 11:16:28:103:693 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-24 11:16:28:104:617 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-24 11:16:29:103:654 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 11:16:29:104:179 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 11:16:30:103:370 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 11:16:31:103:498 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-24 11:16:41:103:805 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 11:16:41:104:126 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..91fa917e --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:16:45:125:435 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-24 11:16:45:126:9 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:16:46:125:458 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-24 11:16:46:126:88 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-24 11:16:46:127:307 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-24 11:16:47:125:463 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-24 11:16:47:126:13 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-24 11:16:47:126:899 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-24 11:16:48:126:436 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 11:16:48:127:137 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 11:16:49:125:716 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 11:16:50:125:795 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 11:17:0:126:281 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 11:17:0:126:619 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_sda_dirty_read.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_sda_dirty_read.txt new file mode 100644 index 00000000..59895b2e --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:10:59:633:870 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:10:59:634:517 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:11:0:633:984 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 11:11:0:634:645 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-24 11:11:1:633:817 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:11:2:633:868 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-24 11:11:12:634:645 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 11:11:12:634:935 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_sda_intermediate_read.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..1a4ffae4 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_intermediate_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:11:34:682:724 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:11:34:683:312 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:11:35:682:713 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 11:11:35:684:896 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-24 11:11:36:682:921 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:11:37:682:702 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:11:38:682:937 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-24 11:11:48:683:359 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 11:11:48:683:632 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..c107c77b --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:11:52:706:267 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:11:52:706:876 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:11:53:706:231 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 11:11:53:706:799 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 11:11:53:707:66 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-24 11:11:54:706:426 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:11:54:706:920 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-24 11:12:4:706:786 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 11:12:4:707:91 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_sda_lost_self_update.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..6e6ca217 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_sda_lost_self_update.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_self_update #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:12:40:779:524 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:12:40:780:137 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:12:41:779:514 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 11:12:41:781:320 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-24 11:12:42:779:816 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 11:12:42:780:523 + Q7-T2 execute opt: 'COMMIT'; + Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739440860594176, conflictStartTS=432739440598450176, conflictCommitTS=432739441123000320, key={tableID=3134, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q7 failed at: 2022-4-24 11:12:44:479:987 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739440860594176, conflictStartTS=432739440598450176, conflictCommitTS=432739441123000320, key={tableID=3134, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..18838bff --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:11:16:658:579 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:11:16:659:316 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:11:17:658:535 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 11:11:17:660:379 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-24 11:11:18:658:789 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:11:19:658:759 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:11:20:658:521 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 11:11:30:659:77 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 11:11:30:659:494 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..b2c56d85 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:12:8:729:754 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 11:12:8:730:784 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:12:9:729:746 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-24 11:12:9:731:452 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 11:12:9:731:939 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-24 11:12:10:730:542 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:12:10:730:844 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-24 11:12:20:730:511 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 11:12:20:730:917 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..021ef3b0 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:12:24:754:368 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 11:12:24:759:562 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:12:25:754:398 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-24 11:12:25:757:420 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 11:12:25:757:928 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-24 11:12:26:755:12 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:12:26:755:343 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-24 11:12:36:754:962 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 11:12:36:755:328 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..aafcc45f --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:19:2:319:957 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:19:2:320:572 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:19:3:318:955 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 11:19:3:319:646 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 11:19:3:320:67 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:19:3:320:605 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-24 11:19:4:319:232 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739540616871936, conflictStartTS=432739540878753792, conflictCommitTS=432739540879278080, key={tableID=3200, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 11:19:5:120:161 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739540616871936, conflictStartTS=432739540878753792, conflictCommitTS=432739540879278080, key={tableID=3200, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..403f8b7f --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,37 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:19:18:343:582 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:19:18:344:179 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:19:19:343:592 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 11:19:19:344:232 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 11:19:19:344:744 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 11:19:20:343:815 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:19:20:344:386 + Q8-T2 execute opt: 'COMMIT'; + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739545079611392, conflictStartTS=432739544817467392, conflictCommitTS=432739545342017536, key={tableID=3203, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q8 failed at: 2022-4-24 11:19:22:144:228 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739545079611392, conflictStartTS=432739544817467392, conflictCommitTS=432739545342017536, key={tableID=3203, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..c91b9e41 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,37 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:19:35:368:780 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:19:35:369:384 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:19:36:368:668 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 11:19:36:369:269 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 11:19:36:369:734 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 11:19:37:368:904 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 11:19:38:368:944 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739549280468992, conflictStartTS=432739549542612992, conflictCommitTS=432739550066900992, key={tableID=3206, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 11:19:40:169:311 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739549280468992, conflictStartTS=432739549542612992, conflictCommitTS=432739550066900992, key={tableID=3206, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..319ba0e9 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,37 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:19:53:393:602 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:19:53:394:242 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:19:54:393:570 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 11:19:54:394:174 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 11:19:54:394:595 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:19:54:395:136 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 11:19:55:393:861 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739554005614592, conflictStartTS=432739554267758592, conflictCommitTS=432739554268020736, key={tableID=3209, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 11:19:56:194:754 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739554005614592, conflictStartTS=432739554267758592, conflictCommitTS=432739554268020736, key={tableID=3209, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..0fe9ea2c --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:20:9:416:572 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:20:9:417:163 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:20:10:416:578 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 11:20:10:417:188 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 11:20:10:417:629 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 11:20:11:416:850 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:20:11:417:416 + Q8-T2 execute opt: 'COMMIT'; + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739558468091904, conflictStartTS=432739558205947904, conflictCommitTS=432739558730498048, key={tableID=3212, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 + Q8 failed at: 2022-4-24 11:20:13:217:233 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739558468091904, conflictStartTS=432739558205947904, conflictCommitTS=432739558730498048, key={tableID=3212, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..c8b8c5c4 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:20:26:442:366 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 11:20:26:442:964 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:20:27:442:392 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 11:20:27:443:654 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 11:20:27:444:77 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 11:20:28:442:633 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 11:20:29:442:722 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739562669211648, conflictStartTS=432739562931355648, conflictCommitTS=432739563455643648, key={tableID=3215, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 11:20:31:243:91 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739562669211648, conflictStartTS=432739562931355648, conflictCommitTS=432739563455643648, key={tableID=3215, handle=1} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..bbe47cb4 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:20:44:467:825 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:20:44:468:497 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:20:45:467:824 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 11:20:45:468:436 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 11:20:45:468:976 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 11:20:46:468:102 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 11:20:46:468:764 + Q8-T2 execute opt: 'COMMIT'; + Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739567656501248, conflictStartTS=432739567394357248, conflictCommitTS=432739567918907392, key={tableID=3218, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q8 failed at: 2022-4-24 11:20:48:268:504 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739567656501248, conflictStartTS=432739567394357248, conflictCommitTS=432739567918907392, key={tableID=3218, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..1c00ffe2 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:21:1:492:333 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:21:1:492:956 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:21:2:492:395 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 11:21:2:494:365 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 11:21:2:494:918 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 11:21:3:492:596 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 11:21:4:492:682 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739571857358848, conflictStartTS=432739572119502848, conflictCommitTS=432739572643790848, key={tableID=3221, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 11:21:6:293:11 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739571857358848, conflictStartTS=432739572119502848, conflictCommitTS=432739572643790848, key={tableID=3221, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..07887eb2 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,44 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:21:19:516:327 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:21:19:516:942 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:21:20:516:322 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 11:21:20:516:928 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 11:21:20:517:384 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:21:20:517:943 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 11:21:21:516:632 +Q8-T1 execute opt: 'COMMIT'; +Q8 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739576582242304, conflictStartTS=432739576844386304, conflictCommitTS=432739576844648448, key={tableID=3224, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q8 failed at: 2022-4-24 11:21:22:317:519 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739576582242304, conflictStartTS=432739576844386304, conflictCommitTS=432739576844648448, key={tableID=3224, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_mda_step_wat_c1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..2542cd30 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_mda_step_wat_c1.txt @@ -0,0 +1,47 @@ +#### db_type: tidb #### +#### test_type: mda_step_wat_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:21:35:542:866 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:21:35:543:510 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:21:36:542:856 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 11:21:36:543:516 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q5 finished at: 2022-4-24 11:21:36:543:933 + Q6-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q6 finished at: 2022-4-24 11:21:37:542:883 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-24 11:21:37:544:882 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' + Q8 finished at: 2022-4-24 11:21:37:545:300 +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q9 finished at: 2022-4-24 11:21:38:543:139 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 11:21:38:543:731 + Q11-T2 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; + Q11 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739581045506048, conflictStartTS=432739580783362048, conflictCommitTS=432739581570056192, key={tableID=3227, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q11 failed at: 2022-4-24 11:21:40:643:606 + Q12 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739581307650048, conflictStartTS=432739580783362048, conflictCommitTS=432739581570056192, key={tableID=3227, handle=2} primary=[]byte(nil) [try again later] errcode: HY000 + Q12 failed at: 2022-4-24 11:21:41:743:625 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739581045506048, conflictStartTS=432739580783362048, conflictCommitTS=432739581570056192, key={tableID=3227, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_mda_step_wat_c2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..dc596101 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_mda_step_wat_c2.txt @@ -0,0 +1,47 @@ +#### db_type: tidb #### +#### test_type: mda_step_wat_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:21:54:568:576 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:21:54:569:226 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:21:55:568:542 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 11:21:55:569:134 + Q5-T3 execute sql: 'BEGIN OPTIMISTIC;' + Q5 finished at: 2022-4-24 11:21:56:568:597 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6 finished at: 2022-4-24 11:21:57:568:797 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-24 11:21:58:568:817 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' + Q8 finished at: 2022-4-24 11:21:58:569:277 +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' +Q9 finished at: 2022-4-24 11:21:59:568:849 + Q10-T2 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 11:22:0:568:898 +Q11-T1 execute opt: 'COMMIT'; + Q12-T3 execute opt: 'COMMIT'; +Q11 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739585770913792, conflictStartTS=432739586033057792, conflictCommitTS=432739587343777792, key={tableID=3230, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q11 failed at: 2022-4-24 11:22:2:669:289 + Q12 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739586295201792, conflictStartTS=432739586033057792, conflictCommitTS=432739587343777792, key={tableID=3230, handle=1} primary=[]byte(nil) [try again later] errcode: HY000 + Q12 failed at: 2022-4-24 11:22:3:769:296 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739585770913792, conflictStartTS=432739586033057792, conflictCommitTS=432739587343777792, key={tableID=3230, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..44386a48 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:17:4:150:302 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:17:4:151:85 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:17:5:150:199 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 11:17:5:150:807 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-24 11:17:6:150:231 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:17:7:150:541 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-24 11:17:17:150:898 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-24 11:17:17:165:516 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 11:17:17:165:948 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..52828381 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,32 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:17:21:175:779 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:17:21:176:383 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:17:22:175:780 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 11:17:22:176:387 +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-24 11:17:23:176:37 + Q6-T2 execute opt: 'COMMIT'; + Q6 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739514364723200, conflictStartTS=432739514102579200, conflictCommitTS=432739514626867200, key={tableID=3182, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q6 failed at: 2022-4-24 11:17:24:776:331 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739514364723200, conflictStartTS=432739514102579200, conflictCommitTS=432739514626867200, key={tableID=3182, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_sda_full_write.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_sda_full_write.txt new file mode 100644 index 00000000..bb56e182 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_sda_full_write.txt @@ -0,0 +1,34 @@ +#### db_type: tidb #### +#### test_type: sda_full_write #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:17:38:199:891 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:17:38:200:486 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:17:39:199:881 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 11:17:39:200:519 +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-24 11:17:40:200:107 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 11:17:40:200:706 + Q7-T2 execute opt: 'COMMIT'; + Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739518827462656, conflictStartTS=432739518565318656, conflictCommitTS=432739519089868800, key={tableID=3185, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q7 failed at: 2022-4-24 11:17:41:900:488 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739518827462656, conflictStartTS=432739518565318656, conflictCommitTS=432739519089868800, key={tableID=3185, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_sda_full_write_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..dc59e281 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_sda_full_write_committed.txt @@ -0,0 +1,34 @@ +#### db_type: tidb #### +#### test_type: sda_full_write_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:17:55:223:74 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:17:55:223:669 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:17:56:223:71 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 11:17:56:223:700 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 11:17:56:224:243 +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-24 11:17:57:223:437 +Q7-T1 execute opt: 'COMMIT'; +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739523027795968, conflictStartTS=432739523289939968, conflictCommitTS=432739523290464256, key={tableID=3188, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q7 failed at: 2022-4-24 11:17:57:924:359 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739523027795968, conflictStartTS=432739523289939968, conflictCommitTS=432739523290464256, key={tableID=3188, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..ca79a5b6 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:18:46:295:257 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 11:18:46:295:862 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:18:47:295:236 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 11:18:47:298:823 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 11:18:47:299:342 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-24 11:18:48:295:445 +Q7-T1 execute opt: 'COMMIT'; +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739536416276480, conflictStartTS=432739536678420480, conflictCommitTS=432739536679469056, key={tableID=3197, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q7 failed at: 2022-4-24 11:18:48:996:327 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739536416276480, conflictStartTS=432739536678420480, conflictCommitTS=432739536679469056, key={tableID=3197, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_sda_lost_update_c1.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..646769d5 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_sda_lost_update_c1.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:18:11:246:859 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 11:18:11:247:436 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:18:12:246:863 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 11:18:12:247:599 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-24 11:18:13:247:125 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 11:18:13:247:839 + Q7-T2 execute opt: 'COMMIT'; + Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739527490535424, conflictStartTS=432739527228391424, conflictCommitTS=432739527752941568, key={tableID=3191, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 + Q7 failed at: 2022-4-24 11:18:14:947:485 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739527490535424, conflictStartTS=432739527228391424, conflictCommitTS=432739527752941568, key={tableID=3191, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_sda_lost_update_c2.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..07013a34 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/repeatable-read/wat_sda_lost_update_c2.txt @@ -0,0 +1,41 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN OPTIMISTIC;' +Q1 finished at: 2022-4-24 11:18:28:270:832 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 11:18:28:271:446 + Q3-T2 execute sql: 'BEGIN OPTIMISTIC;' + Q3 finished at: 2022-4-24 11:18:29:270:643 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 11:18:29:271:249 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q5 finished at: 2022-4-24 11:18:30:270:844 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 11:18:31:270:946 +Q7-T1 execute opt: 'COMMIT'; +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739531691130880, conflictStartTS=432739531953274880, conflictCommitTS=432739532477562880, key={tableID=3194, handle=0} primary=[]byte(nil) [try again later] errcode: HY000 +Q7 failed at: 2022-4-24 11:18:32:971:288 + +Test Result: Rollback +[MySQL][ODBC 5.2(w) Driver]Write conflict, txnStartTS=432739531691130880, conflictStartTS=432739531953274880, conflictCommitTS=432739532477562880, key={tableID=3194, handle=0} primary=[]byte(nil) [try again later] + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/result_summary/read-committed_total-result.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..45e2cffc --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Rollback + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Rollback + +wat_sda_full_write: Rollback + +wat_sda_full_write_committed: Rollback + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Rollback + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/tidb_test/tidb_optimistic_single/result_summary/repeatable-read_total-result.txt b/test_result/distributed_result/tidb_test/tidb_optimistic_single/result_summary/repeatable-read_total-result.txt new file mode 100644 index 00000000..45e2cffc --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_optimistic_single/result_summary/repeatable-read_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Rollback + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Rollback + +rat_dda_double_write_skew1_committed: Rollback + +rat_dda_double_write_skew2: Rollback + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Rollback + +wat_sda_full_write: Rollback + +wat_sda_full_write_committed: Rollback + +wat_sda_lost_update_c1: Rollback + +wat_sda_lost_update_c2: Rollback + +wat_sda_lost_self_update_committed: Rollback + +wat_dda_double_write_skew2_committed: Rollback + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Rollback + +wat_dda_read_write_skew1_c2: Rollback + +wat_dda_read_write_skew2_c1: Rollback + +wat_dda_read_write_skew2_c2: Rollback + +wat_dda_read_write_skew2_committed: Rollback + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Rollback + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Rollback + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_dda_read_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..da22c292 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:16:17:364:765 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:16:17:370:175 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:16:18:364:789 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:16:18:366:319 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 10:16:18:367:534 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:16:18:368:298 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-24 10:16:19:365:623 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:16:19:366:37 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:16:39:365:806 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:16:39:366:189 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..cccdf404 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:16:43:394:9 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:16:43:399:180 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:16:44:393:991 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 10:16:44:396:758 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 10:16:44:398:109 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:16:44:398:916 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 10:16:45:395:135 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:16:45:395:908 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:17:5:394:705 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:17:5:395:97 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_dda_write_skew.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..2b21db71 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:17:9:419:999 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:17:9:425:631 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:17:10:420:28 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 10:17:10:422:841 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 10:17:10:424:95 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 10:17:11:421:16 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:17:11:421:771 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 10:17:12:420:679 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:17:32:420:774 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 10:17:32:421:183 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_dda_write_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..5104be5c --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:18:28:502:258 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:18:28:507:777 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:18:29:502:222 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 10:18:29:503:993 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 10:18:29:505:220 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:18:29:505:815 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 10:18:30:503:482 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:18:30:504:171 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:18:50:503:113 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:18:50:503:563 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..fb75517f --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:17:36:447:508 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-24 10:17:36:448:688 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-24 10:17:36:449:279 + Q4-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q4 finished at: 2022-4-24 10:17:37:447:527 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-24 10:17:37:449:581 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-24 10:17:37:450:163 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:17:37:450:873 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:17:38:447:830 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-24 10:17:58:448:687 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-24 10:17:58:449:564 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 10:17:58:449:958 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..7060971f --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:18:2:475:482 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (saving,500,) (checking,500,) + (1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-24 10:18:2:476:834 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:18:3:475:479 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (saving,500,) (checking,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + (2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-24 10:18:3:477:587 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-24 10:18:3:478:393 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:18:3:479:44 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-24 10:18:4:475:991 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:18:4:476:617 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,saving,1400) (kevin,checking,1400) + (1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + (2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-24 10:18:24:476:153 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:18:24:476:683 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_mda_step_iat.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..6e31afa0 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:18:54:529:466 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-24 10:18:54:534:945 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:18:55:529:505 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 10:18:55:532:162 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-24 10:18:56:529:505 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 10:18:56:530:840 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-24 10:18:57:530:915 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-24 10:18:58:530:777 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-24 10:18:59:530:634 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 10:19:0:529:903 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 10:19:1:529:856 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 10:19:2:529:912 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 10:19:22:530:479 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 10:19:22:530:893 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..151638a3 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:21:26:665:204 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:21:26:670:880 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:21:27:665:110 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 10:21:27:667:387 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 10:21:27:667:976 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-24 10:21:28:665:164 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-24 10:21:28:666:404 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-24 10:21:28:667:501 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:21:28:668:238 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2022-4-24 10:21:29:666:42 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-24 10:21:29:666:477 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-24 10:21:49:666:76 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-24 10:21:49:666:517 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..ef58ff26 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,207 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:20:57:637:421 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:20:57:643:212 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:20:58:637:967 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 10:20:58:639:348 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-24 10:20:59:637:404 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-24 10:20:59:638:848 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:20:59:639:508 + Q8-T4 execute sql: 'BEGIN PESSIMISTIC;' + Q8 finished at: 2022-4-24 10:21:0:637:381 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-24 10:21:0:638:754 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:21:0:639:408 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-4-24 10:21:1:638:415 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 10:21:1:638:853 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-24 10:21:2:638:474 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-24 10:21:2:638:906 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-24 10:21:22:638:573 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-24 10:21:22:639:10 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..16b55543 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:19:26:557:336 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-24 10:19:26:562:969 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:19:27:557:294 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 10:19:27:559:286 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-24 10:19:28:557:330 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 10:19:28:558:542 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-24 10:19:29:558:656 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-24 10:19:30:558:422 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-24 10:19:31:558:411 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 10:19:32:557:842 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 10:19:33:557:717 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 10:19:34:557:719 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-24 10:19:54:558:99 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 10:19:54:558:544 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..2b5ccf60 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:19:58:583:316 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-24 10:19:58:588:897 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:19:59:583:256 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-24 10:19:59:585:536 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-24 10:20:0:583:272 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-24 10:20:0:584:656 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-24 10:20:1:583:880 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-24 10:20:2:583:562 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-24 10:20:3:583:675 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 10:20:4:583:659 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 10:20:5:583:658 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 10:20:6:583:694 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 10:20:26:584:104 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 10:20:26:584:525 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..bf80e742 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(100));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:21:53:692:308 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 10:21:53:697:887 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-24 10:21:53:698:895 + Q4-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q4 finished at: 2022-4-24 10:21:54:692:332 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-24 10:21:54:701:522 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-24 10:21:54:702:667 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:21:54:703:332 + Q8-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q8 finished at: 2022-4-24 10:21:55:692:357 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-24 10:21:55:693:670 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-24 10:21:55:694:619 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 10:21:55:695:72 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-24 10:21:56:693:473 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-24 10:21:56:694:240 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-24 10:22:16:693:163 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-24 10:22:16:693:618 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..fa705587 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,162 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:20:30:609:238 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-24 10:20:30:614:864 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:20:31:609:223 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-24 10:20:31:615:49 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 10:20:31:616:238 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 10:20:31:617:377 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-24 10:20:31:618:712 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 10:20:31:619:393 + Q9-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q9 finished at: 2022-4-24 10:20:32:609:309 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-24 10:20:32:610:581 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-24 10:20:32:611:701 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-24 10:20:32:612:769 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-24 10:20:32:614:129 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 10:20:32:614:914 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2022-4-24 10:20:33:610:215 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-24 10:20:33:610:779 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-24 10:20:53:610:320 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-24 10:20:53:610:742 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_sda_lost_update_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..38c400ef --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:15:51:337:842 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 10:15:51:343:444 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:15:52:337:850 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 10:15:52:340:226 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 10:15:52:340:934 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-24 10:15:53:338:944 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:15:53:339:668 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 10:16:13:338:527 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:16:13:338:951 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..604e8cf8 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,60 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:15:25:311:327 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:15:25:316:744 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:15:26:311:263 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 10:15:26:312:758 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 10:15:26:313:372 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-24 10:15:27:312:125 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:15:27:312:572 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 10:15:47:311:974 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:15:47:312:381 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:15:47:312:690 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_double_write_skew1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..d63edf35 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:1:40:516:546 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:1:40:522:135 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:1:41:516:519 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:1:41:518:509 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 10:1:41:519:634 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:1:43:516:742 +Q6 finished at: 2022-4-24 10:1:43:517:818 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:1:44:516:792 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-24 10:2:4:517:312 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:2:4:517:646 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..d9cb4d79 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:2:8:542:719 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:2:8:548:451 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:2:9:542:692 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:2:9:544:984 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 10:2:9:546:39 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:2:9:546:565 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-24 10:2:10:543:823 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:2:10:544:452 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-24 10:2:30:543:454 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:2:30:543:799 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_double_write_skew2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..4677bb21 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:2:34:569:256 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:2:34:575:94 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:2:35:569:201 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:2:35:571:480 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-24 10:2:36:570:299 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:2:36:570:914 + Q5 finished at: 2022-4-24 10:2:36:571:831 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 10:2:37:569:444 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:2:57:569:975 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:2:57:570:275 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_read_skew.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..879f3c08 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:3:1:595:835 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:3:1:601:87 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:3:2:595:844 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:3:2:598:131 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 10:3:2:599:443 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-24 10:3:3:596:639 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:3:4:596:34 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:3:5:595:838 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:3:25:596:603 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:3:25:596:941 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_read_skew2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..6e0205d0 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:4:21:673:549 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:4:21:679:84 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:4:22:673:621 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 10:4:22:675:429 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 10:4:22:676:254 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 10:4:23:674:637 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:4:23:675:183 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 10:4:24:673:570 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:4:44:674:395 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:4:44:674:701 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..49950b2d --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:4:48:702:525 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:4:48:708:119 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:4:49:702:484 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 10:4:49:704:548 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 10:4:49:705:352 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:4:49:705:656 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 10:4:50:703:656 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:4:50:704:181 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:5:10:703:296 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:5:10:703:626 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..bc969d4b --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:3:29:622:348 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-24 10:3:29:627:575 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:3:30:622:395 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:3:30:624:0 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-24 10:3:30:625:578 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:3:30:626:166 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-24 10:3:31:623:102 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:3:31:623:444 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-24 10:3:51:623:118 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:3:51:623:530 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..c84f4b93 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,59 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:3:55:647:508 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-24 10:3:55:652:884 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:3:56:647:488 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-24 10:3:56:649:305 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-24 10:3:56:649:963 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:3:56:650:520 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (1,0) (0,0) + (1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-24 10:3:57:648:308 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:3:57:648:720 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-24 10:4:17:648:287 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:4:17:648:652 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_write_read_skew.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..21960d1e --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:0:46:465:64 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:0:46:470:801 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:0:47:465:65 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:0:47:467:934 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 10:0:47:469:143 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-24 10:0:48:466:12 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:0:49:465:241 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:0:50:465:183 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:1:10:465:848 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:1:10:466:183 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..77461df3 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:1:14:491:758 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:1:14:497:495 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:1:15:491:741 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:1:15:494:217 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 10:1:15:495:342 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:1:15:495:834 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-24 10:1:16:492:586 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:1:16:493:80 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:1:36:492:446 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:1:36:492:760 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_mda_step_rat.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..97d13d3c --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:5:14:729:318 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:5:14:734:997 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:5:15:729:326 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:5:15:731:542 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 10:5:15:732:785 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-24 10:5:16:729:310 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-24 10:5:16:730:849 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-24 10:5:16:732:56 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-24 10:5:17:730:284 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 10:5:17:730:801 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 10:5:18:729:580 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 10:5:19:729:620 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 10:5:39:730:387 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 10:5:39:730:758 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..d6b38845 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN PESSIMISTIC;' + Q1 finished at: 2022-4-24 10:5:43:756:151 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-24 10:5:43:762:50 +Q3-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q3 finished at: 2022-4-24 10:5:44:756:118 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-24 10:5:44:758:240 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-24 10:5:45:756:83 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-24 10:5:45:757:504 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-24 10:5:45:758:533 + Q8-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q8 finished at: 2022-4-24 10:5:46:756:181 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-24 10:5:46:757:748 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-24 10:5:47:757:250 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-24 10:5:48:756:390 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 10:5:49:756:512 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-24 10:5:50:756:446 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 10:6:10:756:253 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-24 10:6:10:757:619 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-24 10:6:10:757:936 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..ced50e09 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:6:14:783:948 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:6:14:789:683 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:6:15:783:898 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:6:15:786:479 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-24 10:6:15:787:898 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-24 10:6:16:783:906 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-24 10:6:16:785:292 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-24 10:6:16:786:812 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-24 10:6:17:785:177 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 10:6:17:785:730 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 10:6:18:784:263 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 10:6:19:784:201 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-24 10:6:39:784:710 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 10:6:39:785:95 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..f37b4b63 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:6:43:807:789 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-24 10:6:43:808:803 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:6:44:807:786 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-24 10:6:44:809:428 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-24 10:6:44:810:983 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-24 10:6:45:807:848 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-24 10:6:45:808:644 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-24 10:6:45:810:265 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-24 10:6:46:808:675 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 10:6:46:809:189 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 10:6:47:808:87 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 10:6:48:808:92 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 10:7:8:808:724 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 10:7:8:809:375 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_sda_dirty_read.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..ed7329bd --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 9:57:38:289:52 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 9:57:38:294:725 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 9:57:39:289:158 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 9:57:39:291:608 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-24 9:57:40:289:42 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 9:57:41:289:32 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-24 9:58:1:289:886 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 9:58:1:290:277 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_sda_intermediate_read.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..3e508b88 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 9:58:33:339:113 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 9:58:33:344:828 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 9:58:34:339:49 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 9:58:34:340:729 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-24 9:58:35:340:201 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 9:58:36:339:0 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 9:58:37:339:553 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-24 9:58:57:339:706 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 9:58:57:340:67 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..adc2bb96 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 9:59:1:364:650 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 9:59:1:370:192 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 9:59:2:364:662 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 9:59:2:366:717 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 9:59:2:367:4 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-24 9:59:3:365:780 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 9:59:3:366:379 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-24 9:59:23:365:302 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 9:59:23:365:620 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_sda_lost_self_update.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..15a99833 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:0:19:438:961 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:0:19:444:742 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:0:20:438:760 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-24 10:0:21:439:614 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 10:0:21:440:110 + Q4 finished at: 2022-4-24 10:0:21:441:98 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:0:22:439:34 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 10:0:42:439:479 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:0:42:439:780 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..6d2b2eb0 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 9:58:5:313:583 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 9:58:5:318:960 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 9:58:6:313:620 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 9:58:6:319:152 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-24 9:58:7:314:358 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 9:58:8:313:770 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 9:58:9:313:598 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 9:58:29:314:240 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 9:58:29:314:560 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..714cd9cc --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,58 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 9:59:27:390:231 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 9:59:27:395:552 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 9:59:28:390:264 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-24 9:59:28:392:226 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 9:59:28:392:845 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-24 9:59:29:390:818 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 9:59:29:391:122 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-24 9:59:49:390:935 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 9:59:49:391:251 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..4ee2c070 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,57 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 9:59:53:413:448 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 9:59:53:418:652 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 9:59:54:413:388 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-24 9:59:54:415:66 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 9:59:54:415:606 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-24 9:59:55:414:110 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 9:59:55:414:521 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-24 10:0:15:414:105 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:0:15:414:418 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..78eb17ba --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:10:21:18:961 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:10:21:24:750 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:10:22:18:937 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 10:10:22:21:193 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-24 10:10:23:19:731 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:10:23:20:289 + Q5 finished at: 2022-4-24 10:10:23:21:114 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:10:23:21:713 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:10:43:19:991 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:10:43:20:383 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..caf7c651 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,33 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:10:47:46:564 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:10:47:52:128 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:10:48:46:615 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 10:10:48:49:942 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-24 10:10:49:48:617 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-24 10:10:49:648:273 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..78a445eb --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,33 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:11:14:73:283 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:11:14:78:887 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:11:15:73:332 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 10:11:15:74:895 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-24 10:11:16:75:303 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-24 10:11:16:674:939 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..cae40a23 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:11:42:99:696 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:11:42:105:316 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:11:43:99:724 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 10:11:43:101:215 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-24 10:11:44:101:668 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:11:44:102:497 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-24 10:11:44:801:180 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..e55caa92 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:12:8:124:862 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:12:8:130:167 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:12:9:124:864 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 10:12:9:126:383 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 10:12:9:127:762 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 10:12:11:125:198 +Q6 finished at: 2022-4-24 10:12:11:126:181 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:12:11:126:813 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:12:31:125:832 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:12:31:126:196 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..892560b4 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:12:35:151:889 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 10:12:35:157:374 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:12:36:151:842 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 10:12:36:153:786 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 10:12:36:155:122 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:12:38:152:194 +Q6 finished at: 2022-4-24 10:12:38:153:154 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:12:39:152:206 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:12:59:152:636 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:12:59:153:19 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..085f5d22 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:13:3:178:956 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:13:3:184:591 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:13:4:178:973 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 10:13:4:181:909 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 10:13:5:180:347 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:13:5:181:62 + Q5 finished at: 2022-4-24 10:13:5:181:862 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 10:13:6:179:283 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:13:26:179:786 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:13:26:180:161 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..62754fef --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:13:30:204:116 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:13:30:209:980 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:13:31:204:162 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 10:13:31:205:840 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 10:13:32:205:369 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:13:34:204:526 + Q5 finished at: 2022-4-24 10:13:34:205:534 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:13:34:206:160 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:13:54:205:35 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:13:54:205:430 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..37b24c67 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:13:58:231:571 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:13:58:237:228 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:13:59:231:524 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 10:13:59:232:600 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 10:14:0:234:99 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 10:14:0:235:73 + Q5 finished at: 2022-4-24 10:14:0:236:173 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:14:0:236:949 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 10:14:20:232:354 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 10:14:20:232:832 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_mda_step_wat_c1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..7a30f6e1 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,40 @@ +#### db_type: tidb #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:14:24:258:768 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:14:24:264:527 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:14:25:258:750 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 10:14:25:262:660 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-24 10:14:26:258:735 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-24 10:14:26:260:120 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-24 10:14:27:260:956 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-24 10:14:28:160:545 + Q8 finished at: 2022-4-24 10:14:28:162:406 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_mda_step_wat_c2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..45bb5e6f --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,40 @@ +#### db_type: tidb #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:14:53:285:356 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:14:53:291:185 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:14:54:285:355 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 10:14:54:286:872 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-24 10:14:55:285:395 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-24 10:14:57:286:488 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-24 10:14:58:287:680 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-24 10:14:59:187:189 + Q8 finished at: 2022-4-24 10:14:59:286:606 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..e596e2aa --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:7:12:834:23 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:7:12:839:645 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:7:13:833:973 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-24 10:7:14:834:79 + Q4 finished at: 2022-4-24 10:7:14:835:113 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:7:15:834:347 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-24 10:7:35:834:719 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-24 10:7:35:849:543 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:7:35:850:23 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..94f5fd52 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:7:39:860:116 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:7:39:865:918 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:7:40:860:51 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-24 10:7:41:860:267 + Q4 finished at: 2022-4-24 10:7:41:861:235 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:7:42:860:430 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-24 10:8:2:860:762 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-24 10:8:2:875:762 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:8:2:876:217 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_sda_full_write.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..a050c061 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:8:6:886:557 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:8:6:892:215 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:8:7:886:489 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-24 10:8:8:887:733 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 10:8:8:888:580 + Q4 finished at: 2022-4-24 10:8:8:889:460 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:8:9:886:834 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-24 10:8:29:887:303 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:8:29:887:740 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_sda_full_write_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..8822a2c6 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:8:33:913:8 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:8:33:920:224 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:8:34:912:768 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-24 10:8:35:913:950 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:8:35:914:642 + Q4 finished at: 2022-4-24 10:8:35:915:508 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 10:8:35:916:115 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-24 10:8:55:913:432 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:8:55:913:760 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..cc32f26b --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:9:54:990:294 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 10:9:54:995:989 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:9:55:990:205 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-24 10:9:56:991:130 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:9:56:991:685 + Q4 finished at: 2022-4-24 10:9:56:992:584 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 10:9:56:993:164 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 10:10:16:993:596 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:10:16:994:51 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_sda_lost_update_c1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..cb97349e --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:8:59:938:544 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 10:8:59:944:157 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:9:0:938:542 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 10:9:0:940:583 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 10:9:2:938:863 +Q5 finished at: 2022-4-24 10:9:2:939:825 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 10:9:2:940:413 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 10:9:22:938:995 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:9:22:939:336 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_sda_lost_update_c2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..a0000a13 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 10:9:26:964:197 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 10:9:26:969:658 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 10:9:27:964:218 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 10:9:27:966:724 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 10:9:29:964:531 +Q5 finished at: 2022-4-24 10:9:29:965:482 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 10:9:30:964:576 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 10:9:50:964:990 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 10:9:50:965:462 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_dda_read_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..72427cd6 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_dda_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:19:6:854:702 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 1:19:6:860:165 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:19:7:854:659 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 1:19:7:856:584 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 1:19:7:857:843 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 1:19:7:858:731 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-24 1:19:8:855:530 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 1:19:8:855:978 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 1:19:28:855:246 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 1:19:28:855:676 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..53df58a8 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:19:32:881:84 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 1:19:32:886:510 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:19:33:881:157 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 1:19:33:883:326 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 1:19:33:884:754 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 1:19:33:885:539 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 1:19:34:882:176 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 1:19:34:882:838 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 1:19:54:881:943 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 1:19:54:882:448 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_dda_write_skew.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_dda_write_skew.txt new file mode 100644 index 00000000..fbcf7e54 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:19:58:906:479 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 1:19:58:911:735 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:19:59:906:547 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 1:19:59:908:593 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 1:19:59:909:805 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 1:20:0:907:646 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 1:20:0:908:275 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 1:20:1:906:750 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 1:20:21:907:316 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 1:20:21:907:698 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_dda_write_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..a7ee55f1 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:21:17:988:790 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 1:21:17:994:171 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:21:18:988:793 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 1:21:18:989:926 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 1:21:18:991:145 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 1:21:18:991:805 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 1:21:19:989:720 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 1:21:19:990:377 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 1:21:39:989:592 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 1:21:39:990:0 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..15c4d111 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:20:25:934:498 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-24 1:20:25:935:455 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-24 1:20:25:936:37 + Q4-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q4 finished at: 2022-4-24 1:20:26:934:577 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-24 1:20:26:936:554 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-24 1:20:26:937:311 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 1:20:26:937:999 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 1:20:27:934:850 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-24 1:20:47:935:442 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-24 1:20:47:936:456 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 1:20:47:936:969 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..7a5e2671 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:20:51:962:220 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (saving,500,) (checking,500,) + (1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-24 1:20:51:963:639 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:20:52:962:285 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (saving,500,) (checking,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + (2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-24 1:20:52:964:527 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-24 1:20:52:965:349 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 1:20:52:965:915 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-24 1:20:53:962:741 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 1:20:53:963:357 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,saving,1400) (kevin,checking,1400) + (1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + (2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-24 1:21:13:962:832 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 1:21:13:963:232 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_mda_step_iat.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_mda_step_iat.txt new file mode 100644 index 00000000..90366d80 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:21:44:14:372 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-24 1:21:44:19:801 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:21:45:14:384 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 1:21:45:16:254 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-24 1:21:46:14:425 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 1:21:46:15:774 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-24 1:21:47:15:346 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-24 1:21:48:15:610 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-24 1:21:49:15:598 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 1:21:50:14:758 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 1:21:51:14:780 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 1:21:52:14:779 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 1:22:12:15:406 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 1:22:12:15:859 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..9c110b88 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:24:16:148:996 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 1:24:16:154:583 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:24:17:148:972 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 1:24:17:157:319 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 1:24:17:158:55 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-24 1:24:18:149:36 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-24 1:24:18:150:437 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-24 1:24:18:151:742 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 1:24:18:152:492 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-24 1:24:19:149:954 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-24 1:24:19:150:481 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-24 1:24:39:149:841 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-24 1:24:39:150:264 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..4b439c23 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,209 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:23:47:121:244 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 1:23:47:127:13 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:23:48:121:256 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 1:23:48:123:198 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-24 1:23:49:121:300 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-24 1:23:49:122:998 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 1:23:49:123:756 + Q8-T4 execute sql: 'BEGIN PESSIMISTIC;' + Q8 finished at: 2022-4-24 1:23:50:121:178 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-24 1:23:50:122:728 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 1:23:50:123:348 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-24 1:23:51:122:338 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 1:23:51:122:783 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-24 1:23:52:122:372 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-24 1:23:52:122:824 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-24 1:24:12:122:497 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-24 1:24:12:123:11 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..23950cc3 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:22:16:42:206 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-24 1:22:16:47:694 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:22:17:42:266 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 1:22:17:44:515 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-24 1:22:18:42:217 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 1:22:18:43:489 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-24 1:22:19:43:341 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-24 1:22:20:43:179 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-24 1:22:21:43:343 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 1:22:22:42:567 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 1:22:23:42:511 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 1:22:24:42:654 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-24 1:22:44:43:26 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 1:22:44:43:428 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..94a22b81 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:22:48:68:639 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-24 1:22:48:74:143 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:22:49:68:706 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-24 1:22:49:70:780 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-24 1:22:50:68:609 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-24 1:22:50:69:814 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-24 1:22:51:69:305 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-24 1:22:52:68:983 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-24 1:22:53:69:37 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 1:22:54:69:34 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 1:22:55:69:82 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 1:22:56:69:80 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 1:23:16:69:564 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 1:23:16:70:7 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..d6b5de48 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(100));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:24:43:175:952 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 1:24:43:181:560 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-24 1:24:43:182:733 + Q4-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q4 finished at: 2022-4-24 1:24:44:175:896 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-24 1:24:44:177:843 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-24 1:24:44:179:80 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 1:24:44:179:846 + Q8-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q8 finished at: 2022-4-24 1:24:45:175:884 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-24 1:24:45:177:235 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-24 1:24:45:178:369 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 1:24:45:178:817 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-24 1:24:46:177:73 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-24 1:24:46:177:842 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-24 1:25:6:176:756 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-24 1:25:6:177:171 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..82008fcf --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,164 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:23:20:96:863 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-24 1:23:20:102:378 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:23:21:97:161 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-24 1:23:21:98:394 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 1:23:21:99:581 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 1:23:21:100:657 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-24 1:23:21:101:876 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 1:23:21:102:609 + Q9-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q9 finished at: 2022-4-24 1:23:22:96:901 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-24 1:23:22:98:136 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-24 1:23:22:99:186 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-24 1:23:22:100:261 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-24 1:23:22:101:533 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 1:23:22:102:367 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-24 1:23:23:97:865 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-24 1:23:23:98:368 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-24 1:23:43:97:892 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-24 1:23:43:98:359 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_sda_lost_update_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..1b281760 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:18:40:827:983 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 1:18:40:833:191 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:18:41:828:61 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 1:18:41:830:359 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 1:18:41:831:54 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-24 1:18:42:829:199 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 1:18:42:829:952 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 1:19:2:828:613 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 1:19:2:829:7 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..687f1997 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:18:14:801:702 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 1:18:14:807:136 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:18:15:801:714 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 1:18:15:803:200 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 1:18:15:803:890 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-24 1:18:16:803:18 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 1:18:16:803:404 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 1:18:36:802:438 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 1:18:36:802:852 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 1:18:36:803:115 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_double_write_skew1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..3c2a556e --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_double_write_skew1.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:4:30:13:342 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:4:30:19:112 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:4:31:13:311 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 1:4:31:15:550 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 1:4:31:16:721 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 1:4:33:13:530 +Q6 finished at: 2022-4-24 1:4:33:14:453 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 1:4:34:13:570 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-24 1:4:54:14:10 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 1:4:54:14:314 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..1d21c438 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:4:58:40:13 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:4:58:45:924 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:4:59:39:856 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 1:4:59:42:987 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 1:4:59:44:79 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 1:4:59:44:628 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-24 1:5:0:40:980 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 1:5:0:41:618 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-24 1:5:20:40:554 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 1:5:20:40:885 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_double_write_skew2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..1c9cdaa9 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_double_write_skew2.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:5:24:66:193 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:5:24:71:824 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:5:25:66:236 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 1:5:25:68:300 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-24 1:5:26:67:15 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 1:5:26:67:627 + Q5 finished at: 2022-4-24 1:5:26:68:487 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 1:5:27:66:534 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 1:5:47:67:7 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 1:5:47:67:416 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_read_skew.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_read_skew.txt new file mode 100644 index 00000000..043a4a15 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:5:51:93:98 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 1:5:51:98:495 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:5:52:93:60 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 1:5:52:97:626 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 1:5:52:98:973 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-24 1:5:53:93:828 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 1:5:54:93:249 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 1:5:55:93:114 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 1:6:15:93:849 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 1:6:15:94:203 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_read_skew2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_read_skew2.txt new file mode 100644 index 00000000..3c7179db --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:7:11:171:436 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:7:11:177:148 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:7:12:171:448 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 1:7:12:173:610 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 1:7:12:174:452 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 1:7:13:172:670 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 1:7:13:173:271 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 1:7:14:171:485 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 1:7:34:172:277 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 1:7:34:172:639 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..1a84cfac --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:7:38:198:354 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:7:38:204:58 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:7:39:198:351 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 1:7:39:200:288 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 1:7:39:201:115 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 1:7:39:201:460 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 1:7:40:199:508 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 1:7:40:200:150 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 1:8:0:199:81 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 1:8:0:199:420 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..3bc7fc82 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:6:19:119:849 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-24 1:6:19:125:264 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:6:20:119:792 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-24 1:6:20:121:177 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-24 1:6:20:122:367 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 1:6:20:123:8 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-24 1:6:21:120:434 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 1:6:21:120:783 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-24 1:6:41:120:409 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 1:6:41:120:768 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..9d6ed583 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:6:45:144:897 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-24 1:6:45:150:279 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:6:46:144:841 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-24 1:6:46:146:514 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-24 1:6:46:147:95 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 1:6:46:147:591 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-24 1:6:47:145:620 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 1:6:47:145:972 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-24 1:7:7:145:687 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 1:7:7:146:6 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_write_read_skew.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..1fd91e2d --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:3:35:956:885 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:3:35:962:563 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:3:36:956:836 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 1:3:36:958:768 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 1:3:36:959:795 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-24 1:3:37:957:436 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 1:3:38:957:58 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 1:3:39:956:984 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 1:3:59:957:579 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 1:3:59:957:901 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..b66f9449 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:4:3:987:262 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:4:3:992:966 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:4:4:987:218 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 1:4:4:989:255 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 1:4:4:990:222 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 1:4:4:990:767 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-24 1:4:5:988:77 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 1:4:5:988:624 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 1:4:25:987:883 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 1:4:25:988:201 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_mda_step_rat.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_mda_step_rat.txt new file mode 100644 index 00000000..33012019 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:8:4:224:336 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:8:4:229:978 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:8:5:224:326 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 1:8:5:226:668 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 1:8:5:227:813 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-24 1:8:6:224:334 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-24 1:8:6:225:834 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-24 1:8:6:226:979 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-24 1:8:7:225:323 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 1:8:7:225:864 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 1:8:8:224:757 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 1:8:9:224:640 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 1:8:29:225:386 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 1:8:29:225:759 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..d1b3d0b3 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN PESSIMISTIC;' + Q1 finished at: 2022-4-24 1:8:33:251:234 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-24 1:8:33:256:839 +Q3-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q3 finished at: 2022-4-24 1:8:34:251:254 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-24 1:8:34:253:931 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-24 1:8:35:251:251 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-24 1:8:35:252:723 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-24 1:8:35:253:765 + Q8-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q8 finished at: 2022-4-24 1:8:36:251:286 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-24 1:8:36:252:810 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-24 1:8:37:252:386 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-24 1:8:38:251:507 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 1:8:39:251:572 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-24 1:8:40:251:442 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 1:9:0:251:432 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-24 1:9:0:252:811 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-24 1:9:0:253:127 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..1b2dfdba --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:9:4:279:639 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:9:4:285:306 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:9:5:279:632 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-24 1:9:5:281:519 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-24 1:9:5:283:56 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-24 1:9:6:279:622 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-24 1:9:6:280:957 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-24 1:9:6:282:450 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-24 1:9:7:280:898 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 1:9:7:281:437 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 1:9:8:279:867 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 1:9:9:279:917 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-24 1:9:29:280:470 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 1:9:29:280:851 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..5a1469c5 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:9:33:302:533 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-24 1:9:33:303:460 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:9:34:302:666 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-24 1:9:34:304:341 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-24 1:9:34:306:205 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-24 1:9:35:302:525 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-24 1:9:35:303:203 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-24 1:9:35:304:611 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-24 1:9:36:303:676 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 1:9:36:304:229 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 1:9:37:302:791 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 1:9:38:302:920 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 1:9:58:303:559 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 1:9:58:303:917 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_sda_dirty_read.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_sda_dirty_read.txt new file mode 100644 index 00000000..0760b7ac --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:0:27:781:816 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:0:27:787:644 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:0:28:781:836 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 1:0:28:783:70 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-24 1:0:29:781:713 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 1:0:30:781:674 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-24 1:0:50:782:546 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 1:0:50:782:845 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_sda_intermediate_read.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..db3fc6b8 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_intermediate_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:1:22:830:901 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:1:22:836:184 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:1:23:830:952 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 1:1:23:832:685 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-24 1:1:24:832:238 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 1:1:25:830:821 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 1:1:26:831:218 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-24 1:1:46:831:398 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 1:1:46:831:690 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..e9fd1f5d --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:1:50:856:308 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:1:50:861:921 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:1:51:856:360 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 1:1:51:858:260 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 1:1:51:858:678 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-24 1:1:52:857:517 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 1:1:52:858:66 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-24 1:2:12:857:1 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 1:2:12:857:309 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_sda_lost_self_update.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..7fbd8632 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_lost_self_update #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:3:8:930:487 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:3:8:936:147 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:3:9:930:483 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-24 1:3:10:931:132 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 1:3:10:931:656 + Q4 finished at: 2022-4-24 1:3:10:932:593 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 1:3:11:930:763 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 1:3:31:930:965 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 1:3:31:931:265 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..853d5fe5 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:0:54:806:140 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 1:0:54:811:704 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:0:55:806:165 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 1:0:55:807:982 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-24 1:0:56:806:831 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 1:0:57:806:336 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 1:0:58:806:19 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 1:1:18:806:789 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 1:1:18:807:106 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..5d4a94fe --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:2:16:883:192 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 1:2:16:888:221 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:2:17:882:95 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-24 1:2:17:883:471 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 1:2:17:883:996 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-24 1:2:18:882:829 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 1:2:18:883:240 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-24 1:2:38:882:764 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 1:2:38:883:163 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..3dc03d8b --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:2:42:905:751 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 1:2:42:910:973 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:2:43:905:732 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-24 1:2:43:907:534 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 1:2:43:908:77 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-24 1:2:44:906:388 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 1:2:44:906:768 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-24 1:3:4:906:294 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 1:3:4:906:695 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..af9d2081 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:13:10:513:221 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:13:10:518:905 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:13:11:513:238 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 1:13:11:515:237 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-24 1:13:12:514:3 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 1:13:12:514:562 + Q5 finished at: 2022-4-24 1:13:12:515:450 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 1:13:12:516:74 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 1:13:32:513:997 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 1:13:32:514:361 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..1c61f124 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,33 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:13:36:539:844 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:13:36:545:512 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:13:37:539:821 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 1:13:37:541:770 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-24 1:13:38:542:25 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-24 1:13:39:141:524 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..6048c9bd --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,33 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:14:3:565:928 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:14:3:571:582 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:14:4:565:926 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 1:14:4:567:466 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-24 1:14:5:568:65 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-24 1:14:6:167:551 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..e9b47ab9 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:14:31:591:970 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:14:31:597:768 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:14:32:591:872 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 1:14:32:593:241 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-24 1:14:33:593:808 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 1:14:33:594:655 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-24 1:14:34:293:487 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..ca5f51d4 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:14:57:616:575 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 1:14:57:622:129 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:14:58:616:550 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 1:14:58:618:34 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 1:14:58:619:178 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 1:15:0:616:912 +Q6 finished at: 2022-4-24 1:15:0:617:875 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 1:15:0:618:465 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 1:15:20:617:363 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 1:15:20:617:739 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..a64f0bb2 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:15:24:643:645 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 1:15:24:649:212 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:15:25:643:548 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 1:15:25:645:696 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 1:15:25:646:959 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 1:15:27:643:887 +Q6 finished at: 2022-4-24 1:15:27:644:793 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 1:15:28:643:954 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 1:15:48:644:844 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 1:15:48:645:303 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..b26e1c56 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:15:52:670:983 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:15:52:676:615 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:15:53:671:21 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 1:15:53:672:803 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 1:15:54:672:99 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 1:15:54:672:814 + Q5 finished at: 2022-4-24 1:15:54:673:610 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 1:15:55:671:383 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 1:16:15:671:757 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 1:16:15:672:207 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..c941d7a7 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:16:19:697:787 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:16:19:703:507 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:16:20:697:697 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 1:16:20:698:903 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 1:16:21:698:739 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 1:16:23:698:32 + Q5 finished at: 2022-4-24 1:16:23:698:961 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 1:16:23:699:573 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 1:16:43:698:539 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 1:16:43:698:965 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..99286983 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:16:47:723:563 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:16:47:729:240 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:16:48:723:598 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 1:16:48:725:445 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 1:16:49:724:619 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 1:16:49:725:273 + Q5 finished at: 2022-4-24 1:16:49:726:203 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 1:16:49:726:833 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 1:17:9:724:403 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 1:17:9:724:815 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_mda_step_wat_c1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..ec8288bc --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_mda_step_wat_c1.txt @@ -0,0 +1,40 @@ +#### db_type: tidb #### +#### test_type: mda_step_wat_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:17:13:750:833 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:17:13:756:605 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:17:14:750:840 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 1:17:14:753:835 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-24 1:17:15:750:818 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-24 1:17:15:752:321 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-24 1:17:16:752:979 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-24 1:17:17:652:569 + Q8 finished at: 2022-4-24 1:17:17:654:512 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_mda_step_wat_c2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..488aa752 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_mda_step_wat_c2.txt @@ -0,0 +1,40 @@ +#### db_type: tidb #### +#### test_type: mda_step_wat_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:17:42:777:749 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:17:42:783:376 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:17:43:777:729 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 1:17:43:779:127 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-24 1:17:44:777:759 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-24 1:17:46:779:65 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-24 1:17:47:779:419 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-24 1:17:48:679:507 + Q8 finished at: 2022-4-24 1:17:48:779:55 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..4d6360e1 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:10:2:328:872 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:10:2:334:575 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:10:3:328:851 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-24 1:10:4:328:898 + Q4 finished at: 2022-4-24 1:10:4:329:978 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 1:10:5:329:359 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-24 1:10:25:329:513 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-24 1:10:25:344:442 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 1:10:25:344:957 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..1678c620 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:10:29:355:248 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:10:29:360:974 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:10:30:355:261 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-24 1:10:31:355:459 + Q4 finished at: 2022-4-24 1:10:31:356:578 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 1:10:32:355:577 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-24 1:10:52:356:33 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-24 1:10:52:371:109 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 1:10:52:371:588 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_sda_full_write.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_sda_full_write.txt new file mode 100644 index 00000000..dad24579 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_full_write #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:10:56:382:48 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:10:56:387:592 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:10:57:382:111 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-24 1:10:58:383:284 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 1:10:58:383:989 + Q4 finished at: 2022-4-24 1:10:58:384:768 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 1:10:59:382:353 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-24 1:11:19:382:768 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 1:11:19:383:128 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_sda_full_write_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..fc74fdec --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_full_write_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:11:23:406:604 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:11:23:411:972 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:11:24:406:593 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-24 1:11:25:407:821 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 1:11:25:408:493 + Q4 finished at: 2022-4-24 1:11:25:409:317 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 1:11:25:409:838 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-24 1:11:45:407:234 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 1:11:45:407:575 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..b1a450da --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:12:44:486:941 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 1:12:44:492:940 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:12:45:486:863 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-24 1:12:46:487:861 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 1:12:46:488:445 + Q4 finished at: 2022-4-24 1:12:46:489:239 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 1:12:46:489:785 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 1:13:6:487:497 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 1:13:6:487:870 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_sda_lost_update_c1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..5d184529 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:11:49:431:580 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 1:11:49:437:49 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:11:50:431:582 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 1:11:50:433:514 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 1:11:52:431:871 +Q5 finished at: 2022-4-24 1:11:52:432:914 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 1:11:52:433:445 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 1:12:12:432:266 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 1:12:12:432:661 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_sda_lost_update_c2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..2856e08d --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/repeatable-read/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT, v INT) PARTITION BY RANGE(v) (PARTITION p0 VALUES LESS THAN(2), PARTITION p1 VALUES LESS THAN(4));' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 1:12:16:456:6 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 1:12:16:461:463 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 1:12:17:455:971 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 1:12:17:458:256 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 1:12:19:456:325 +Q5 finished at: 2022-4-24 1:12:19:457:280 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 1:12:20:456:276 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 1:12:40:456:809 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 1:12:40:457:244 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/result_summary/read-committed_total-result.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..38745346 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/result_summary/repeatable-read_total-result.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/result_summary/repeatable-read_total-result.txt new file mode 100644 index 00000000..42d5fc7b --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_dist/result_summary/repeatable-read_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_dda_read_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..36f98120 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_dda_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:9:32:864:927 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 0:9:32:865:661 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:9:33:864:942 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 0:9:33:866:442 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 0:9:33:866:996 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:9:33:867:552 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-24 0:9:34:865:52 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:9:34:865:426 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:9:54:865:514 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:9:54:865:904 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..8bf3295b --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:9:58:890:590 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 0:9:58:891:234 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:9:59:890:484 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 0:9:59:893:563 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 0:9:59:894:69 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:9:59:894:614 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 0:10:0:890:847 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:10:0:891:445 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:10:20:891:95 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:10:20:891:496 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_dda_write_skew.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_dda_write_skew.txt new file mode 100644 index 00000000..2497c6b7 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:10:24:914:745 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 0:10:24:915:476 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:10:25:914:653 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 0:10:25:916:377 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 0:10:25:916:962 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 0:10:26:915:14 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 0:10:26:915:697 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 0:10:27:915:62 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:10:47:915:325 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 0:10:47:915:730 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_dda_write_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..3af21b8d --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:11:43:980:821 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 0:11:43:981:422 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:11:44:980:866 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 0:11:44:984:732 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 0:11:44:985:295 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:11:44:985:913 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 0:11:45:981:187 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:11:45:981:788 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:12:5:981:454 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:12:5:981:855 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..8a687096 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL PRIMARY KEY);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:10:51:927:440 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-24 0:10:51:928:684 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-24 0:10:51:929:232 + Q4-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q4 finished at: 2022-4-24 0:10:52:927:337 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-24 0:10:52:929:653 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-24 0:10:52:930:198 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 0:10:52:930:850 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:10:53:927:713 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-24 0:11:13:928:150 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-24 0:11:13:929:171 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 0:11:13:929:581 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..b7385115 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:11:17:955:259 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (saving,500,) (checking,500,) + (1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-24 0:11:17:956:668 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:11:18:955:242 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (saving,500,) (checking,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + (2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-24 0:11:18:956:622 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-24 0:11:18:957:422 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:11:18:958:10 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-24 0:11:19:955:694 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:11:19:956:246 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,saving,1400) (kevin,checking,1400) + (1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + (2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-24 0:11:39:955:855 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:11:39:956:283 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_mda_step_iat.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_mda_step_iat.txt new file mode 100644 index 00000000..df7e1216 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:12:10:6:598 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-24 0:12:10:7:263 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:12:11:6:570 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 0:12:11:8:717 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-24 0:12:12:6:598 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 0:12:12:7:264 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-24 0:12:13:6:924 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-24 0:12:14:6:916 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-24 0:12:15:7:1 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 0:12:16:6:961 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 0:12:17:6:937 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 0:12:18:6:971 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 0:12:38:7:270 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 0:12:38:7:667 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..9c75e855 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:14:42:135:76 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 0:14:42:135:914 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:14:43:134:907 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 0:14:43:140:534 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 0:14:43:141:122 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-24 0:14:44:134:872 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-24 0:14:44:135:759 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-24 0:14:44:136:449 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:14:44:137:178 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,1) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + *(6) expected_result: + (1,1) + +Q10 finished at: 2022-4-24 0:14:45:135:299 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-24 0:14:45:135:858 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-24 0:15:5:135:666 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-24 0:15:5:136:110 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..a9f522aa --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,207 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:14:13:107:654 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 0:14:13:108:430 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:14:14:107:588 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 0:14:14:109:733 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-24 0:14:15:107:610 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-24 0:14:15:108:290 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 0:14:15:108:898 + Q8-T4 execute sql: 'BEGIN PESSIMISTIC;' + Q8 finished at: 2022-4-24 0:14:16:107:733 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-24 0:14:16:108:646 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:14:16:109:287 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + (7) expected_result: + (0,0) + (8) expected_result: + (0,0) + *(9) expected_result: + (0,1) + *(10) expected_result: + (0,1) + *(11) expected_result: + (0,1) + (12) expected_result: + (0,0) + *(13) expected_result: + (0,1) + *(14) expected_result: + (0,1) + + Q11 finished at: 2022-4-24 0:14:17:108:90 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 0:14:17:108:612 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + (2) expected_result: + (1,0) + (3) expected_result: + (1,0) + (4) expected_result: + (1,0) + *(5) expected_result: + (1,1) + (6) expected_result: + (1,0) + *(7) expected_result: + (1,1) + *(8) expected_result: + (1,1) + (9) expected_result: + (1,0) + *(10) expected_result: + (1,1) + *(11) expected_result: + (1,1) + *(12) expected_result: + (1,1) + (13) expected_result: + (1,0) + *(14) expected_result: + (1,1) + +Q13 finished at: 2022-4-24 0:14:18:108:131 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-24 0:14:18:108:594 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-24 0:14:38:108:860 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-24 0:14:38:109:409 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..91d66bba --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:12:42:31:861 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-24 0:12:42:32:549 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:12:43:31:948 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 0:12:43:33:731 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-24 0:12:44:31:819 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 0:12:44:32:452 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-24 0:12:45:32:246 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-24 0:12:46:32:231 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-24 0:12:47:32:118 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 0:12:48:32:258 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 0:12:49:32:286 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 0:12:50:32:254 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-24 0:13:10:32:644 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 0:13:10:33:82 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..661a3583 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:13:14:55:961 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-24 0:13:14:56:852 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:13:15:55:946 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-24 0:13:15:57:941 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-24 0:13:16:55:995 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-24 0:13:16:56:662 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-24 0:13:17:56:226 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-24 0:13:18:56:286 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-24 0:13:19:56:343 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 0:13:20:56:302 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 0:13:21:56:446 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 0:13:22:56:410 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 0:13:42:56:774 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 0:13:42:57:205 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..e4759de8 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:15:9:160:788 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 0:15:9:161:494 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-24 0:15:9:162:72 + Q4-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q4 finished at: 2022-4-24 0:15:10:160:748 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-24 0:15:10:162:451 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-24 0:15:10:163:146 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 0:15:10:163:860 + Q8-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q8 finished at: 2022-4-24 0:15:11:160:853 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-24 0:15:11:161:732 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-24 0:15:11:162:455 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 0:15:11:162:982 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-24 0:15:12:161:160 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-24 0:15:12:161:868 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-24 0:15:32:161:412 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-24 0:15:32:161:849 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..765a1cfb --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,162 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:13:46:82:757 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-24 0:13:46:83:452 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:13:47:82:687 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-24 0:13:47:84:711 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 0:13:47:85:270 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 0:13:47:85:938 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-24 0:13:47:86:513 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 0:13:47:87:70 + Q9-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q9 finished at: 2022-4-24 0:13:48:82:699 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-24 0:13:48:83:410 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-24 0:13:48:83:995 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-24 0:13:48:84:563 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-24 0:13:48:85:84 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 0:13:48:85:631 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,1) + (1) expected_result: + (2,0) + (2) expected_result: + (2,0) + (3) expected_result: + (2,0) + (4) expected_result: + (2,2) + *(5) expected_result: + (2,1) + *(6) expected_result: + (2,1) + +Q15 finished at: 2022-4-24 0:13:49:83:128 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-24 0:13:49:83:618 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-24 0:14:9:83:695 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-24 0:14:9:84:159 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_sda_lost_update_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..3c2dbd98 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:9:6:839:913 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 0:9:6:840:633 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:9:7:839:815 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 0:9:7:841:133 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 0:9:7:841:697 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-24 0:9:8:840:215 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 0:9:8:840:816 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 0:9:28:840:193 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:9:28:840:604 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..407945ca --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,60 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:8:40:815:145 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 0:8:40:815:638 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:8:41:815:226 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 0:8:41:815:944 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 0:8:41:816:565 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + (1) expected_result: + (0,0) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-24 0:8:42:815:423 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 0:8:42:815:817 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 0:9:2:815:721 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:9:2:816:92 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:9:2:816:352 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_double_write_skew1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..18ad308c --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_double_write_skew1.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-23 23:54:56:66:721 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 23:54:56:67:501 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-23 23:54:57:66:659 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 23:54:57:68:185 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-23 23:54:57:68:746 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 23:54:59:66:900 +Q6 finished at: 2022-4-23 23:54:59:67:252 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 23:55:0:66:917 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-23 23:55:20:67:224 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 23:55:20:67:558 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..5a70235d --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-23 23:55:24:91:489 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 23:55:24:92:157 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-23 23:55:25:91:521 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 23:55:25:92:880 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-23 23:55:25:93:398 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 23:55:25:93:854 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-23 23:55:26:91:733 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 23:55:26:92:222 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-23 23:55:46:92:236 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 23:55:46:92:562 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_double_write_skew2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..be3097c8 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_double_write_skew2.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-23 23:55:50:115:673 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 23:55:50:116:299 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-23 23:55:51:115:792 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 23:55:51:118:121 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-23 23:55:52:116:9 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 23:55:52:116:602 + Q5 finished at: 2022-4-23 23:55:52:116:989 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-23 23:55:53:115:885 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-23 23:56:13:116:403 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 23:56:13:116:854 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_read_skew.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_read_skew.txt new file mode 100644 index 00000000..2431b950 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-23 23:56:17:141:969 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 23:56:17:142:587 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-23 23:56:18:140:739 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 23:56:18:141:479 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-23 23:56:18:142:2 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-23 23:56:19:140:996 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 23:56:20:141:8 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 23:56:21:140:664 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-23 23:56:41:141:403 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 23:56:41:141:727 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_read_skew2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_read_skew2.txt new file mode 100644 index 00000000..c362711b --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-23 23:57:37:214:215 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 23:57:37:214:886 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-23 23:57:38:214:178 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-23 23:57:38:215:703 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-23 23:57:38:216:144 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-23 23:57:39:214:470 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 23:57:39:215:2 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-23 23:57:40:214:207 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-23 23:58:0:214:830 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 23:58:0:215:153 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..841d6e9c --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-23 23:58:4:239:418 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 23:58:4:240:125 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-23 23:58:5:239:401 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-23 23:58:5:240:706 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-23 23:58:5:241:158 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 23:58:5:241:459 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-23 23:58:6:239:693 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 23:58:6:240:209 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-23 23:58:26:240:322 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 23:58:26:240:810 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..2e690b30 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-23 23:56:45:166:155 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-23 23:56:45:167:194 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-23 23:56:46:166:85 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-23 23:56:46:167:393 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-23 23:56:46:167:824 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 23:56:46:168:290 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-23 23:56:47:166:882 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 23:56:47:167:203 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-23 23:57:7:166:699 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 23:57:7:167:142 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..e9b537d4 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,59 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-23 23:57:11:189:899 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-23 23:57:11:195:211 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-23 23:57:12:189:920 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-23 23:57:12:192:243 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-23 23:57:12:192:936 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 23:57:12:193:580 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-23 23:57:13:190:668 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 23:57:13:191:68 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-23 23:57:33:190:546 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 23:57:33:190:881 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_write_read_skew.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..d5ab6033 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_read_skew #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-23 23:54:2:16:22 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 23:54:2:16:844 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-23 23:54:3:15:913 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 23:54:3:17:280 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-23 23:54:3:17:816 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-23 23:54:4:16:148 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 23:54:5:16:98 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 23:54:6:16:149 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-23 23:54:26:16:445 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 23:54:26:16:758 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..98ab9c6f --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-23 23:54:30:41:405 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 23:54:30:42:54 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-23 23:54:31:41:467 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 23:54:31:42:732 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-23 23:54:31:43:263 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 23:54:31:43:734 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,1) + (1) expected_result: + (1,0) + *(2) expected_result: + (1,1) + +Q7 finished at: 2022-4-23 23:54:32:41:673 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-23 23:54:32:42:259 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-23 23:54:52:42:89 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-23 23:54:52:42:383 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_mda_step_rat.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_mda_step_rat.txt new file mode 100644 index 00000000..1a5eec63 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-23 23:58:30:266:696 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 23:58:30:267:366 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-23 23:58:31:266:680 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-23 23:58:31:267:843 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-23 23:58:31:268:622 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-23 23:58:32:266:648 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-23 23:58:32:267:367 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-23 23:58:32:267:993 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-23 23:58:33:267:34 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-23 23:58:33:267:544 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-23 23:58:34:266:994 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 23:58:35:266:931 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-23 23:58:55:267:596 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-23 23:58:55:267:913 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..0bcf670b --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN PESSIMISTIC;' + Q1 finished at: 2022-4-23 23:58:59:291:14 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-23 23:58:59:291:826 +Q3-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q3 finished at: 2022-4-23 23:59:0:290:960 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-23 23:59:0:292:332 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-23 23:59:1:291:73 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-23 23:59:1:291:913 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-23 23:59:1:292:611 + Q8-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q8 finished at: 2022-4-23 23:59:2:291:73 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-23 23:59:2:291:821 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-23 23:59:3:291:552 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-23 23:59:4:291:296 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 23:59:5:291:298 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-23 23:59:6:291:147 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-23 23:59:26:291:209 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-23 23:59:26:292:439 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-23 23:59:26:292:805 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..cff2d5bb --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-23 23:59:30:316:96 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-23 23:59:30:316:700 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-23 23:59:31:316:72 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-23 23:59:31:317:870 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-23 23:59:31:318:803 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-23 23:59:32:316:126 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-23 23:59:32:316:827 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-23 23:59:32:317:707 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-23 23:59:33:316:716 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-23 23:59:33:317:260 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-23 23:59:34:316:340 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-23 23:59:35:316:358 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-23 23:59:55:316:878 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-23 23:59:55:317:203 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..0d9855a1 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-23 23:59:59:340:77 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-23 23:59:59:340:941 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:0:0:340:92 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-24 0:0:0:341:982 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-24 0:0:0:343:85 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-24 0:0:1:340:69 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-24 0:0:1:340:711 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-24 0:0:1:341:809 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-24 0:0:2:340:863 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 0:0:2:341:402 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 0:0:3:340:553 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 0:0:4:340:378 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 0:0:24:340:951 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 0:0:24:341:299 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_sda_dirty_read.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_sda_dirty_read.txt new file mode 100644 index 00000000..8efeda80 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-23 23:50:53:844:917 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 23:50:53:845:696 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-23 23:50:54:845:12 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-23 23:50:54:845:670 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-23 23:50:55:844:873 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 23:50:56:844:865 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-23 23:51:16:846:789 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-23 23:51:16:847:76 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_sda_intermediate_read.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..a9d6a4c8 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_intermediate_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-23 23:51:48:894:837 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 23:51:48:895:468 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-23 23:51:49:894:775 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-23 23:51:49:896:290 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-23 23:51:50:895:49 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 23:51:51:894:830 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 23:51:52:894:951 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-23 23:52:12:895:446 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 23:52:12:895:785 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..b0cba149 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-23 23:52:16:919:353 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 23:52:16:919:931 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-23 23:52:17:919:394 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-23 23:52:17:920:137 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-23 23:52:17:920:554 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-23 23:52:18:919:653 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 23:52:18:920:228 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-23 23:52:38:920:223 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 23:52:38:920:643 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_sda_lost_self_update.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..12827dde --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_lost_self_update #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-23 23:53:34:992:809 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-23 23:53:34:993:402 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-23 23:53:35:992:854 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-23 23:53:36:993:57 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-23 23:53:36:993:570 + Q4 finished at: 2022-4-23 23:53:36:994:74 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-23 23:53:37:992:967 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-23 23:53:57:993:429 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 23:53:57:993:734 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..8951cf77 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-23 23:51:20:870:655 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-23 23:51:20:871:234 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-23 23:51:21:870:709 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-23 23:51:21:871:918 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-23 23:51:22:871:9 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-23 23:51:23:870:869 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 23:51:24:870:643 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-23 23:51:44:871:205 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 23:51:44:871:485 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..add2e3ce --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,58 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-23 23:52:42:945:101 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-23 23:52:42:946:242 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-23 23:52:43:945:263 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-23 23:52:43:946:875 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-23 23:52:43:947:323 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-23 23:52:44:945:850 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 23:52:44:946:149 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-23 23:53:4:945:518 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 23:53:4:945:787 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..40cce817 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,57 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-23 23:53:8:968:522 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-23 23:53:8:973:825 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-23 23:53:9:968:624 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-23 23:53:9:969:725 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-23 23:53:9:970:192 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-23 23:53:10:969:15 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-23 23:53:10:969:323 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-23 23:53:30:969:61 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-23 23:53:30:969:372 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..56cc9fdb --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:3:36:539:377 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:3:36:540:22 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:3:37:539:279 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 0:3:37:541:10 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-24 0:3:38:539:554 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:3:38:540:74 + Q5 finished at: 2022-4-24 0:3:38:540:455 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:3:38:541:13 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:3:58:540:8 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:3:58:540:453 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..998f0177 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,33 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:4:2:564:772 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:4:2:565:398 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:4:3:564:805 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 0:4:3:566:645 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-24 0:4:4:565:869 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-24 0:4:5:165:760 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..0c8dea4c --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,33 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:4:29:589:478 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:4:29:590:162 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:4:30:589:555 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 0:4:30:590:452 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-24 0:4:31:590:416 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-24 0:4:32:190:288 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..81a057e0 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:4:57:614:102 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:4:57:614:819 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:4:58:614:98 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 0:4:58:614:804 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-24 0:4:59:615:143 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:4:59:615:860 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-24 0:5:0:314:906 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..ea6e1221 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:5:23:638:353 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 0:5:23:639:28 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:5:24:638:331 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 0:5:24:638:998 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 0:5:24:639:594 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 0:5:26:638:635 +Q6 finished at: 2022-4-24 0:5:26:638:995 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 0:5:26:639:629 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:5:46:638:972 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:5:46:639:341 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..94b095e8 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:5:50:665:569 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 0:5:50:666:289 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:5:51:665:569 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 0:5:51:666:217 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 0:5:51:666:743 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 0:5:53:665:901 +Q6 finished at: 2022-4-24 0:5:53:666:237 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:5:54:665:862 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:6:14:666:223 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:6:14:666:752 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..bd7a5d34 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:6:18:691:173 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:6:18:691:880 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:6:19:691:347 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 0:6:19:692:6 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 0:6:20:691:484 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 0:6:20:692:60 + Q5 finished at: 2022-4-24 0:6:20:692:358 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 0:6:21:691:399 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:6:41:691:790 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:6:41:692:249 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..d1b412f9 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:6:45:715:987 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:6:45:716:709 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:6:46:715:995 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 0:6:46:717:436 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 0:6:47:716:246 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:6:49:716:292 + Q5 finished at: 2022-4-24 0:6:49:716:786 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 0:6:49:717:273 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:7:9:716:688 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:7:9:717:45 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..9d7686ba --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:7:13:741:759 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:7:13:742:440 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:7:14:741:717 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 0:7:14:743:165 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 0:7:15:742:20 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:7:15:742:582 + Q5 finished at: 2022-4-24 0:7:15:742:862 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:7:15:743:287 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:7:35:742:362 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:7:35:742:747 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_mda_step_wat_c1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..00c24630 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_mda_step_wat_c1.txt @@ -0,0 +1,40 @@ +#### db_type: tidb #### +#### test_type: mda_step_wat_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:7:39:767:645 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:7:39:768:287 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:7:40:767:685 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 0:7:40:768:968 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-24 0:7:41:767:835 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-24 0:7:41:768:554 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-24 0:7:42:768:588 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-24 0:7:43:668:524 + Q8 finished at: 2022-4-24 0:7:43:669:779 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_mda_step_wat_c2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..b7b3abaf --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_mda_step_wat_c2.txt @@ -0,0 +1,40 @@ +#### db_type: tidb #### +#### test_type: mda_step_wat_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:8:8:792:786 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:8:8:793:425 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:8:9:792:809 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 0:8:9:793:475 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-24 0:8:10:792:777 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-24 0:8:12:793:228 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-24 0:8:13:793:843 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-24 0:8:14:693:681 + Q8 finished at: 2022-4-24 0:8:14:793:366 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..01950b11 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:0:28:365:229 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:0:28:366:24 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:0:29:365:242 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-24 0:0:30:365:319 + Q4 finished at: 2022-4-24 0:0:30:365:732 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:0:31:365:474 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-24 0:0:51:365:863 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-24 0:0:51:381:165 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:0:51:381:633 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..2f307746 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:0:55:391:591 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:0:55:392:245 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:0:56:391:570 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-24 0:0:57:391:843 + Q4 finished at: 2022-4-24 0:0:57:392:220 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:0:58:391:822 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-24 0:1:18:392:161 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-24 0:1:18:406:818 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:1:18:407:298 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_sda_full_write.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_sda_full_write.txt new file mode 100644 index 00000000..c95371fd --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_full_write #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:1:22:416:68 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:1:22:416:857 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:1:23:416:7 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-24 0:1:24:416:231 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 0:1:24:416:799 + Q4 finished at: 2022-4-24 0:1:24:417:163 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 0:1:25:416:247 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-24 0:1:45:416:599 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:1:45:416:997 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_sda_full_write_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..5fb41b93 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_full_write_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:1:49:440:600 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:1:49:441:357 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:1:50:440:541 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-24 0:1:51:440:829 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 0:1:51:441:529 + Q4 finished at: 2022-4-24 0:1:51:441:889 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 0:1:51:442:300 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-24 0:2:11:441:59 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:2:11:441:422 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..472aeb31 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:3:10:514:55 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:3:10:514:901 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:3:11:514:76 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-24 0:3:12:514:246 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 0:3:12:514:813 + Q4 finished at: 2022-4-24 0:3:12:515:166 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 0:3:12:515:582 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 0:3:32:514:584 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:3:32:514:944 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_sda_lost_update_c1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..c068425b --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_c1 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:2:15:465:236 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 0:2:15:465:844 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:2:16:465:213 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 0:2:16:467:309 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 0:2:18:465:581 +Q5 finished at: 2022-4-24 0:2:18:465:916 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 0:2:18:466:353 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 0:2:38:465:820 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:2:38:466:189 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_sda_lost_update_c2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..455e0db0 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/read-committed/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_c2 #### +#### isolation: read-committed #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = read-committed for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:2:42:490:352 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 0:2:42:490:965 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:2:43:490:264 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 0:2:43:491:693 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:2:45:490:487 +Q5 finished at: 2022-4-24 0:2:45:491:13 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 0:2:46:490:570 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 0:3:6:490:899 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:3:6:491:491 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_dda_read_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..2297092c --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_dda_read_skew_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:37:9:716:85 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 0:37:9:716:685 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:37:10:716:166 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 0:37:10:717:914 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 0:37:10:718:379 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:37:10:718:939 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-24 0:37:11:716:349 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:37:11:716:796 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:37:31:716:714 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:37:31:717:107 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_dda_read_write_skew1_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..c1c1a5da --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_read_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_read_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:37:35:741:626 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 0:37:35:742:212 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:37:36:741:658 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 0:37:36:743:7 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 0:37:36:743:505 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:37:36:744:175 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 0:37:37:742:11 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:37:37:742:590 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:37:57:742:194 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:37:57:742:585 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_dda_write_skew.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_dda_write_skew.txt new file mode 100644 index 00000000..a9312b07 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_dda_write_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:38:1:767:385 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 0:38:1:767:989 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:38:2:767:417 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 0:38:2:769:152 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 0:38:2:769:846 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 0:38:3:767:710 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 0:38:3:768:294 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 0:38:4:767:743 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:38:24:768:78 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 0:38:24:768:496 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_dda_write_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..14967613 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_dda_write_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:39:20:848:393 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0; ' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 0:39:20:849:28 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:39:21:848:409 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 0:39:21:849:830 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 0:39:21:850:413 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:39:21:850:996 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 0:39:22:848:619 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:39:22:849:211 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:39:42:849:56 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:39:42:849:464 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..5194a01f --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,72 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_predicate_based-intersecting_data #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-intersecting_data test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS mytab;' +Q0-T1 execute sql: 'CREATE TABLE mytab(class int NOT NULL, value int NOT NULL PRIMARY KEY);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 10);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (1, 20);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 100);' +Q0-T1 execute sql: 'INSERT INTO mytab VALUES (2, 200);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-intersecting_data test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:38:28:794:46 +Q2-T1 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (30,) + *(1) expected_result: + (30,) + (2) expected_result: + (330,) + +Q2 finished at: 2022-4-24 0:38:28:795:259 +Q3-T1 execute sql: 'INSERT INTO mytab VALUES (2, 30);' +Q3 finished at: 2022-4-24 0:38:28:795:813 + Q4-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q4 finished at: 2022-4-24 0:38:29:794:59 + Q5-T2 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (300,) + (1) expected_result: + (330,) + *(2) expected_result: + (300,) + + Q5 finished at: 2022-4-24 0:38:29:796:73 + Q6-T2 execute sql: 'INSERT INTO mytab VALUES (1, 300);' + Q6 finished at: 2022-4-24 0:38:29:796:645 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 0:38:29:797:214 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:38:30:794:417 + Q9-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 1;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q9 finished at: 2022-4-24 0:38:50:794:932 + Q10-T3 execute sql: 'SELECT SUM(value) FROM mytab WHERE class = 2;' + current_result: + (330,) + *(1) expected_result: + (330,) + *(2) expected_result: + (330,) + + Q10 finished at: 2022-4-24 0:38:50:795:776 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 0:38:50:796:186 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..692aeb2b --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_skew_predicate_based-overdraft_protection #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_dda_write_skew_predicate_based-overdraft_protection test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS account;' +Q0-T1 execute sql: 'create table account (name varchar(255) not null, type varchar(255) not null, balance int not null default 0.00, primary key (name, type));' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','saving', 500);' +Q0-T1 execute sql: 'INSERT into account VALUES ('kevin','checking', 500);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_dda_write_skew_predicate_based-overdraft_protection test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:38:54:822:67 +Q2-T1 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (saving,500,) (checking,500,) + (1) expected_result: + (checking,500,) (saving,500,) + (2) expected_result: + (checking,1400,) (saving,500,) + +Q2 finished at: 2022-4-24 0:38:54:823:693 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:38:55:822:13 + Q4-T2 execute sql: 'SELECT type, balance FROM account WHERE name = 'kevin';' + current_result: + (saving,500,) (checking,500,) + (1) expected_result: + (checking,500,) (saving,1400,) + (2) expected_result: + (checking,500,) (saving,500,) + + Q4 finished at: 2022-4-24 0:38:55:823:699 + Q5-T2 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'saving';' + Q5 finished at: 2022-4-24 0:38:55:824:560 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:38:55:825:196 +Q7-T1 execute sql: 'UPDATE account SET balance = balance + 900 WHERE name = 'kevin' and type = 'checking';' +Q7 finished at: 2022-4-24 0:38:56:822:577 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:38:56:823:229 + Q9-T3 execute sql: 'SELECT * FROM account;' + current_result: + (kevin,saving,1400) (kevin,checking,1400) + (1) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + (2) expected_result: + (kevin,checking,1400) (kevin,saving,1400) + + Q9 finished at: 2022-4-24 0:39:16:823:180 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:39:16:823:624 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_mda_step_iat.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_mda_step_iat.txt new file mode 100644 index 00000000..f4281754 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_mda_step_iat.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:39:46:874:938 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-24 0:39:46:875:490 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:39:47:875:243 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 0:39:47:876:871 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-24 0:39:48:875:2 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 0:39:48:875:636 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q7 finished at: 2022-4-24 0:39:49:875:214 + Q8-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-24 0:39:50:875:384 + Q9-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q9 finished at: 2022-4-24 0:39:51:875:378 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 0:39:52:875:271 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 0:39:53:875:360 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 0:39:54:875:355 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 0:40:14:875:899 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 0:40:14:876:272 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..68074e5b --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,108 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_causality_violation_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_causality_violation_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_causality_violation_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:42:19:3:893 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 0:42:19:4:569 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:42:20:3:829 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 0:42:20:4:448 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 0:42:20:5:80 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-24 0:42:21:3:951 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q7 finished at: 2022-4-24 0:42:21:4:647 + Q8-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8 finished at: 2022-4-24 0:42:21:5:241 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:42:21:5:842 +Q10-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + (6) expected_result: + (1,1) + +Q10 finished at: 2022-4-24 0:42:22:4:905 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-24 0:42:22:5:350 + Q12-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + + Q12 finished at: 2022-4-24 0:42:42:4:787 + Q13-T4 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-24 0:42:42:5:272 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..52d9e5b4 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,209 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_cross_phenomenon #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_cross_phenomenon test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_cross_phenomenon test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:41:49:978:101 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + (6) expected_result: + (0,1) + (7) expected_result: + (0,1) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 0:41:49:978:865 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:41:50:978:62 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + (13) expected_result: + (1,1) + *(14) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 0:41:50:979:949 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-24 0:41:51:978:111 + Q6-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6 finished at: 2022-4-24 0:41:51:978:824 + Q7-T3 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 0:41:51:979:421 + Q8-T4 execute sql: 'BEGIN PESSIMISTIC;' + Q8 finished at: 2022-4-24 0:41:52:978:47 + Q9-T4 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-24 0:41:52:978:787 + Q10-T4 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:41:52:979:376 + Q11-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + *(7) expected_result: + (0,0) + *(8) expected_result: + (0,0) + (9) expected_result: + (0,1) + (10) expected_result: + (0,1) + (11) expected_result: + (0,1) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + (14) expected_result: + (0,1) + + Q11 finished at: 2022-4-24 0:41:53:978:576 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 0:41:53:979:54 +Q13-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + (5) expected_result: + (1,1) + *(6) expected_result: + (1,0) + (7) expected_result: + (1,1) + (8) expected_result: + (1,1) + *(9) expected_result: + (1,0) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + (12) expected_result: + (1,1) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + +Q13 finished at: 2022-4-24 0:41:54:978:618 +Q14-T1 execute opt: 'COMMIT'; +Q14 finished at: 2022-4-24 0:41:54:979:58 + Q15-T5 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-24 0:42:14:979:97 + Q16-T5 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-24 0:42:14:979:524 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..bd71390b --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:40:18:901:332 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + null + (5) expected_result: + null + (6) expected_result: + null + +Q2 finished at: 2022-4-24 0:40:18:901:998 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:40:19:901:152 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + null + (2) expected_result: + null + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + null + *(6) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 0:40:19:901:826 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-24 0:40:20:901:296 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + null + *(2) expected_result: + (1,0) + (3) expected_result: + null + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 0:40:20:902:55 +Q7-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q7 finished at: 2022-4-24 0:40:21:901:489 + Q8-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q8 finished at: 2022-4-24 0:40:22:901:390 + Q9-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q9 finished at: 2022-4-24 0:40:23:901:482 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 0:40:24:901:566 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 0:40:25:901:467 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 0:40:26:901:538 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-24 0:40:46:901:793 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 0:40:46:902:313 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..4a88443f --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:40:50:925:672 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q2 finished at: 2022-4-24 0:40:50:926:374 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:40:51:925:770 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + null + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + null + *(4) expected_result: + null + (5) expected_result: + (0,1) + *(6) expected_result: + null + + Q4 finished at: 2022-4-24 0:40:51:927:187 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-24 0:40:52:925:630 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + null + (1) expected_result: + (1,1) + *(2) expected_result: + null + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + null + *(6) expected_result: + null + + Q6 finished at: 2022-4-24 0:40:52:926:282 +Q7-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q7 finished at: 2022-4-24 0:40:53:926:105 + Q8-T2 execute sql: 'INSERT INTO t1 VALUES (1, 0);' + Q8 finished at: 2022-4-24 0:40:54:926:7 + Q9-T3 execute sql: 'INSERT INTO t1 VALUES (2, 0);' + Q9 finished at: 2022-4-24 0:40:55:925:999 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 0:40:56:926:74 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 0:40:57:926:89 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 0:40:58:926:46 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) (2,0) + (1) expected_result: + (0,1) (1,1) (2,1) + (2) expected_result: + (0,1) (1,1) (2,1) + (3) expected_result: + (0,1) (1,1) (2,1) + (4) expected_result: + (0,1) (1,1) (2,1) + (5) expected_result: + (0,1) (1,1) (2,1) + (6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 0:41:18:926:575 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 0:41:18:927:29 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..55e2ad2c --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,140 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_read_only_transaction_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_read_only_transaction_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_read_only_transaction_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:42:46:29:918 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 0:42:46:30:578 +Q3-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,20) + (4) expected_result: + (1,20) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,20) + +Q3 finished at: 2022-4-24 0:42:46:31:109 + Q4-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q4 finished at: 2022-4-24 0:42:47:29:902 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q5 finished at: 2022-4-24 0:42:47:31:289 + Q6-T2 execute sql: 'UPDATE t1 SET v=20 WHERE k=1;' + Q6 finished at: 2022-4-24 0:42:47:31:825 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 0:42:47:32:413 + Q8-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q8 finished at: 2022-4-24 0:42:48:29:908 + Q9-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,11) + (2) expected_result: + (0,11) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,11) + *(5) expected_result: + (0,0) + *(6) expected_result: + (0,0) + + Q9 finished at: 2022-4-24 0:42:48:30:600 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,20) + *(1) expected_result: + (1,20) + (2) expected_result: + (1,0) + *(3) expected_result: + (1,20) + *(4) expected_result: + (1,20) + (5) expected_result: + (1,0) + (6) expected_result: + (1,0) + + Q10 finished at: 2022-4-24 0:42:48:31:147 + Q11-T3 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 0:42:48:31:581 +Q12-T1 execute sql: 'UPDATE t1 SET v=11 WHERE k=0;' +Q12 finished at: 2022-4-24 0:42:49:30:185 +Q13-T1 execute opt: 'COMMIT'; +Q13 finished at: 2022-4-24 0:42:49:30:792 + Q14-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,11) (1,20) + *(1) expected_result: + (0,11) (1,20) + *(2) expected_result: + (0,11) (1,20) + *(3) expected_result: + (0,11) (1,20) + *(4) expected_result: + (0,11) (1,20) + *(5) expected_result: + (0,11) (1,20) + *(6) expected_result: + (0,11) (1,20) + + Q14 finished at: 2022-4-24 0:43:9:30:660 + Q15-T3 execute opt: 'COMMIT'; + Q15 finished at: 2022-4-24 0:43:9:31:176 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_mda_step_iat_uname_anomaly.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..e5604551 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,164 @@ +#### db_type: tidb #### +#### test_type: mda_step_iat_uname_anomaly #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_mda_step_iat_uname_anomaly test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_mda_step_iat_uname_anomaly test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:41:22:952:430 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,2) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + +Q2 finished at: 2022-4-24 0:41:22:953:122 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:41:23:952:392 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,2) + (6) expected_result: + (0,2) + + Q4 finished at: 2022-4-24 0:41:23:953:994 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 0:41:23:954:588 + Q6-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + *(3) expected_result: + (1,0) + *(4) expected_result: + (1,0) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q6 finished at: 2022-4-24 0:41:23:955:145 + Q7-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7 finished at: 2022-4-24 0:41:23:955:632 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 0:41:23:956:270 + Q9-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q9 finished at: 2022-4-24 0:41:24:952:446 + Q10-T3 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + *(4) expected_result: + (2,0) + *(5) expected_result: + (2,0) + *(6) expected_result: + (2,0) + + Q10 finished at: 2022-4-24 0:41:24:953:226 + Q11-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q11 finished at: 2022-4-24 0:41:24:953:877 + Q12-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + (2) expected_result: + (0,0) + *(3) expected_result: + (0,1) + *(4) expected_result: + (0,1) + (5) expected_result: + (0,0) + (6) expected_result: + (0,0) + + Q12 finished at: 2022-4-24 0:41:24:954:505 + Q13-T3 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q13 finished at: 2022-4-24 0:41:24:955:105 + Q14-T3 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 0:41:24:955:704 +Q15-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,2) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q15 finished at: 2022-4-24 0:41:25:952:709 +Q16-T1 execute opt: 'COMMIT'; +Q16 finished at: 2022-4-24 0:41:25:953:160 + Q17-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) (2,1) + *(1) expected_result: + (0,2) (1,1) (2,1) + *(2) expected_result: + (0,2) (1,1) (2,1) + *(3) expected_result: + (0,2) (1,1) (2,1) + *(4) expected_result: + (0,2) (1,1) (2,1) + *(5) expected_result: + (0,2) (1,1) (2,1) + *(6) expected_result: + (0,2) (1,1) (2,1) + + Q17 finished at: 2022-4-24 0:41:45:953:189 + Q18-T4 execute opt: 'COMMIT'; + Q18 finished at: 2022-4-24 0:41:45:953:606 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_sda_lost_update_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..f58b141f --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_sda_lost_update_committed.txt @@ -0,0 +1,51 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_lost_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_lost_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:36:43:692:56 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 0:36:43:692:748 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:36:44:691:810 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 0:36:44:692:495 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 0:36:44:693:48 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q6 finished at: 2022-4-24 0:36:45:692:257 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 0:36:45:692:892 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 0:37:5:692:356 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:37:5:692:775 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_sda_non_repeatable_read_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..125ed853 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,62 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------iat_sda_non_repeatable_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------iat_sda_non_repeatable_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:36:17:666:583 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 0:36:17:667:148 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:36:18:666:614 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 0:36:18:667:315 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 0:36:18:668:6 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q6 finished at: 2022-4-24 0:36:19:666:866 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 0:36:19:667:276 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 0:36:39:667:185 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:36:39:667:563 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:36:39:667:819 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_double_write_skew1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..ff2af13d --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_double_write_skew1.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:22:32:915:650 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:22:32:916:430 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:22:33:915:591 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 0:22:33:916:938 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 0:22:33:917:476 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 0:22:35:915:774 +Q6 finished at: 2022-4-24 0:22:35:916:141 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:22:36:915:786 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-24 0:22:56:916:186 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:22:56:916:579 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_double_write_skew1_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..b159be92 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew1_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew1_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew1_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:23:0:940:851 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:23:0:941:543 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:23:1:940:866 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 0:23:1:942:38 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 0:23:1:942:571 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:23:1:943:31 +Q7-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' +Q7 finished at: 2022-4-24 0:23:2:941:257 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:23:2:941:782 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,2) + (1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,2) + + Q9 finished at: 2022-4-24 0:23:22:941:516 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:23:22:941:836 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_double_write_skew2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..9bca5b98 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_double_write_skew2.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_double_write_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_double_write_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:23:26:965:755 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:23:26:966:440 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:23:27:965:742 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 0:23:27:967:100 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-24 0:23:28:965:908 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 0:23:28:966:438 + Q5 finished at: 2022-4-24 0:23:28:966:807 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 0:23:29:965:923 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:23:49:966:345 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:23:49:966:684 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_read_skew.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_read_skew.txt new file mode 100644 index 00000000..0d7ca664 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_read_skew.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:23:53:991:54 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 0:23:53:991:796 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:23:54:990:992 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 0:23:54:992:539 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 0:23:54:993:7 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-24 0:23:55:991:149 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 0:23:56:991:236 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:23:57:991:7 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:24:17:991:745 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:24:17:992:68 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_read_skew2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_read_skew2.txt new file mode 100644 index 00000000..bf3aab6e --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_read_skew2.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:25:14:65:197 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:25:14:65:823 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:25:15:65:238 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 0:25:15:66:753 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 0:25:15:67:175 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 0:25:16:65:760 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 0:25:16:66:327 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 0:25:17:65:449 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:25:37:65:903 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:25:37:66:216 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_read_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..cda7d95d --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_read_skew2_committed.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:25:41:90:479 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:25:41:91:81 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:25:42:90:508 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 0:25:42:91:682 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 0:25:42:92:119 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:25:42:92:415 +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 0:25:43:90:790 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:25:43:91:290 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:26:3:91:171 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:26:3:91:497 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..6e74af17 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,63 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:24:22:15:47 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-24 0:24:22:16:50 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:24:23:14:950 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-24 0:24:23:16:89 + Q5-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q5 finished at: 2022-4-24 0:24:23:16:600 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:24:23:17:53 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) (1,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-24 0:24:24:15:696 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:24:24:16:13 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + + Q9 finished at: 2022-4-24 0:24:44:15:723 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:24:44:16:150 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..92c802cf --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_read_skew_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_read_skew_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_read_skew_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:24:48:39:935 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q2 finished at: 2022-4-24 0:24:48:45:197 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:24:49:39:973 + Q4-T2 execute sql: 'INSERT into t1 VALUES(1,0);' + Q4 finished at: 2022-4-24 0:24:49:41:296 + Q5-T2 execute sql: 'INSERT into t1 VALUES(0,0);' + Q5 finished at: 2022-4-24 0:24:49:41:784 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:24:49:42:279 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) (1,0) + +Q7 finished at: 2022-4-24 0:24:50:40:417 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:24:50:40:764 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,0) (1,0) + *(1) expected_result: + (0,0) (1,0) + *(2) expected_result: + (0,0) (1,0) + + Q9 finished at: 2022-4-24 0:25:10:40:586 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:25:10:40:897 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_write_read_skew.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..26d8a1cd --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_write_read_skew.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_read_skew #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:21:38:867:392 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:21:38:868:34 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:21:39:867:439 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 0:21:39:869:367 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 0:21:39:869:973 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=1; ' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q6 finished at: 2022-4-24 0:21:40:867:515 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 0:21:41:867:585 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:21:42:867:618 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:22:2:868:80 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:22:2:868:396 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_write_read_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..c3e5b7c3 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,61 @@ +#### db_type: tidb #### +#### test_type: dda_write_read_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_dda_write_read_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_dda_write_read_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:22:6:892:657 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:22:6:893:460 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:22:7:892:373 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 0:22:7:893:728 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 0:22:7:894:253 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:22:7:894:693 +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-24 0:22:8:892:785 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:22:8:893:357 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:22:28:892:846 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:22:28:893:128 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_mda_step_rat.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_mda_step_rat.txt new file mode 100644 index 00000000..79de48f1 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_mda_step_rat.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:26:7:114:858 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:26:7:115:640 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:26:8:114:804 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 0:26:8:116:264 + Q5-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,1) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + *(4) expected_result: + (0,0) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + + Q5 finished at: 2022-4-24 0:26:8:116:839 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-24 0:26:9:114:869 + Q7-T3 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q7 finished at: 2022-4-24 0:26:9:115:638 + Q8-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + *(6) expected_result: + (1,0) + + Q8 finished at: 2022-4-24 0:26:9:116:218 +Q9-T1 execute sql: 'SELECT * FROM t1 WHERE k=2;' + current_result: + (2,0) + *(1) expected_result: + (2,0) + *(2) expected_result: + (2,0) + *(3) expected_result: + (2,0) + (4) expected_result: + (2,1) + (5) expected_result: + (2,1) + (6) expected_result: + (2,1) + +Q9 finished at: 2022-4-24 0:26:10:115:197 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 0:26:10:115:739 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 0:26:11:115:92 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 0:26:12:115:76 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 0:26:32:115:766 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 0:26:32:116:80 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_mda_step_rat_long_fork.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..34a1b6af --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,209 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_long_fork #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_long_fork test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_long_fork test run---------- + Q1-T4 execute sql: 'BEGIN PESSIMISTIC;' + Q1 finished at: 2022-4-24 0:26:36:140:637 + Q2-T4 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + *(3) expected_result: + (0,0) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + *(9) expected_result: + (0,0) + (10) expected_result: + (0,1) + *(11) expected_result: + (0,0) + (12) expected_result: + (0,1) + *(13) expected_result: + (0,0) + *(14) expected_result: + (0,0) + + Q2 finished at: 2022-4-24 0:26:36:141:431 +Q3-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q3 finished at: 2022-4-24 0:26:37:140:676 +Q4-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q4 finished at: 2022-4-24 0:26:37:142:13 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-24 0:26:38:140:690 + Q6-T3 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + *(2) expected_result: + (1,0) + (3) expected_result: + (1,1) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + (7) expected_result: + (1,1) + *(8) expected_result: + (1,0) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + *(11) expected_result: + (1,0) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + (14) expected_result: + (1,1) + + Q6 finished at: 2022-4-24 0:26:38:141:489 + Q7-T3 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + (3) expected_result: + (0,1) + (4) expected_result: + (0,1) + (5) expected_result: + (0,1) + *(6) expected_result: + (0,0) + (7) expected_result: + (0,1) + (8) expected_result: + (0,1) + (9) expected_result: + (0,1) + *(10) expected_result: + (0,0) + *(11) expected_result: + (0,0) + *(12) expected_result: + (0,0) + (13) expected_result: + (0,1) + *(14) expected_result: + (0,0) + + Q7 finished at: 2022-4-24 0:26:38:142:126 + Q8-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q8 finished at: 2022-4-24 0:26:39:140:681 + Q9-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q9 finished at: 2022-4-24 0:26:39:141:397 + Q10-T4 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + *(3) expected_result: + (1,0) + (4) expected_result: + (1,1) + *(5) expected_result: + (1,0) + (6) expected_result: + (1,1) + *(7) expected_result: + (1,0) + (8) expected_result: + (1,1) + (9) expected_result: + (1,1) + (10) expected_result: + (1,1) + (11) expected_result: + (1,1) + *(12) expected_result: + (1,0) + *(13) expected_result: + (1,0) + *(14) expected_result: + (1,0) + + Q10 finished at: 2022-4-24 0:26:40:141:226 +Q11-T1 execute opt: 'COMMIT'; +Q11 finished at: 2022-4-24 0:26:41:140:920 + Q12-T2 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 0:26:42:141:9 + Q13-T3 execute opt: 'COMMIT'; + Q13 finished at: 2022-4-24 0:26:43:140:862 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 0:27:3:140:853 + Q15-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + *(1) expected_result: + (0,1) (1,1) + *(2) expected_result: + (0,1) (1,1) + *(3) expected_result: + (0,1) (1,1) + *(4) expected_result: + (0,1) (1,1) + *(5) expected_result: + (0,1) (1,1) + *(6) expected_result: + (0,1) (1,1) + *(7) expected_result: + (0,1) (1,1) + *(8) expected_result: + (0,1) (1,1) + *(9) expected_result: + (0,1) (1,1) + *(10) expected_result: + (0,1) (1,1) + *(11) expected_result: + (0,1) (1,1) + *(12) expected_result: + (0,1) (1,1) + *(13) expected_result: + (0,1) (1,1) + *(14) expected_result: + (0,1) (1,1) + + Q15 finished at: 2022-4-24 0:27:3:142:45 + Q16-T4 execute opt: 'COMMIT'; + Q16 finished at: 2022-4-24 0:27:3:142:350 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..4af161a3 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,109 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_predicate_based_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 1);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 1);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:27:7:167:109 +Q2-T1 execute sql: 'DELETE FROM t1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:27:7:167:721 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:27:8:167:54 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=1;' + Q4 finished at: 2022-4-24 0:27:8:168:432 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (1,) + (1) expected_result: + (,) + (2) expected_result: + (,) + *(3) expected_result: + (1,) + *(4) expected_result: + (1,) + (5) expected_result: + (,) + *(6) expected_result: + (1,) + + Q5 finished at: 2022-4-24 0:27:8:169:322 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-24 0:27:9:167:81 + Q7-T3 execute sql: 'DELETE FROM t1 WHERE k=2;' + Q7 finished at: 2022-4-24 0:27:9:167:782 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (1,) + (1) expected_result: + (,) + *(2) expected_result: + (1,) + (3) expected_result: + (,) + *(4) expected_result: + (1,) + *(5) expected_result: + (1,) + *(6) expected_result: + (1,) + + Q8 finished at: 2022-4-24 0:27:9:168:691 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (1,) + *(1) expected_result: + (1,) + *(2) expected_result: + (1,) + *(3) expected_result: + (1,) + (4) expected_result: + (,) + (5) expected_result: + (,) + (6) expected_result: + (,) + +Q9 finished at: 2022-4-24 0:27:10:167:865 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 0:27:10:168:376 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 0:27:11:167:277 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 0:27:12:167:393 + Q13-T4 execute sql: 'SELECT * FROM t1;' + current_result: + null + *(1) expected_result: + null + *(2) expected_result: + null + *(3) expected_result: + null + *(4) expected_result: + null + *(5) expected_result: + null + *(6) expected_result: + null + + Q13 finished at: 2022-4-24 0:27:32:167:449 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 0:27:32:167:813 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..53025a25 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,106 @@ +#### db_type: tidb #### +#### test_type: mda_step_rat_predicate_based_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_mda_step_rat_predicate_based_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_mda_step_rat_predicate_based_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:27:36:193:173 +Q2-T1 execute sql: 'INSERT INTO t1 VALUES (0, 1);' +Q2 finished at: 2022-4-24 0:27:36:193:860 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:27:37:190:805 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (1, 1);' + Q4 finished at: 2022-4-24 0:27:37:193:475 + Q5-T2 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 0;' + current_result: + (,) + *(1) expected_result: + (,) + *(2) expected_result: + (,) + *(3) expected_result: + (,) + (4) expected_result: + (1,) + (5) expected_result: + (1,) + (6) expected_result: + (1,) + + Q5 finished at: 2022-4-24 0:27:37:194:374 + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-24 0:27:38:190:772 + Q7-T3 execute sql: 'INSERT INTO t1 VALUES (2, 1);' + Q7 finished at: 2022-4-24 0:27:38:191:411 + Q8-T3 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 1;' + current_result: + (,) + (1) expected_result: + (1,) + (2) expected_result: + (1,) + *(3) expected_result: + (,) + *(4) expected_result: + (,) + (5) expected_result: + (1,) + *(6) expected_result: + (,) + + Q8 finished at: 2022-4-24 0:27:38:192:396 +Q9-T1 execute sql: 'SELECT SUM(v) FROM t1 WHERE k = 2;' + current_result: + (,) + (1) expected_result: + (1,) + *(2) expected_result: + (,) + (3) expected_result: + (1,) + (4) expected_result: + (1,) + *(5) expected_result: + (,) + *(6) expected_result: + (,) + +Q9 finished at: 2022-4-24 0:27:39:191:497 +Q10-T1 execute opt: 'COMMIT'; +Q10 finished at: 2022-4-24 0:27:39:192:66 + Q11-T2 execute opt: 'COMMIT'; + Q11 finished at: 2022-4-24 0:27:40:191:95 + Q12-T3 execute opt: 'COMMIT'; + Q12 finished at: 2022-4-24 0:27:41:191:49 + Q13-T4 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) (2,1) + *(1) expected_result: + (0,1) (1,1) (2,1) + *(2) expected_result: + (0,1) (1,1) (2,1) + *(3) expected_result: + (0,1) (1,1) (2,1) + *(4) expected_result: + (0,1) (1,1) (2,1) + *(5) expected_result: + (0,1) (1,1) (2,1) + *(6) expected_result: + (0,1) (1,1) (2,1) + + Q13 finished at: 2022-4-24 0:28:1:191:613 + Q14-T4 execute opt: 'COMMIT'; + Q14 finished at: 2022-4-24 0:28:1:191:955 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_sda_dirty_read.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_sda_dirty_read.txt new file mode 100644 index 00000000..6ee856ee --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_sda_dirty_read.txt @@ -0,0 +1,47 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_dirty_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_dirty_read test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:18:30:698:47 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:18:30:698:705 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:18:31:698:160 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k = 0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 0:18:31:698:805 +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-24 0:18:32:698:38 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:18:33:698:147 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + + Q7 finished at: 2022-4-24 0:18:53:698:683 + Q8-T3 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 0:18:53:699:32 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_sda_intermediate_read.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..a97467d9 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_sda_intermediate_read.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_intermediate_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:19:25:746:38 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:19:25:746:817 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:19:26:746:51 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 0:19:26:747:308 +Q5-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5 finished at: 2022-4-24 0:19:27:746:251 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:19:28:745:972 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 0:19:29:746:188 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-24 0:19:49:746:623 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:19:49:746:958 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_sda_intermediate_read_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..1bc4f4c4 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_intermediate_read_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_intermediate_read_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_intermediate_read_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:19:53:770:524 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:19:53:771:169 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:19:54:770:565 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,0) + + Q4 finished at: 2022-4-24 0:19:54:771:834 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 0:19:54:772:104 +Q6-T1 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6 finished at: 2022-4-24 0:19:55:770:758 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 0:19:55:771:269 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + *(2) expected_result: + (0,2) + + Q8 finished at: 2022-4-24 0:20:15:771:173 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:20:15:771:492 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_sda_lost_self_update.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..9329e729 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_sda_lost_self_update.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_lost_self_update #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_lost_self_update test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_lost_self_update test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:21:11:842:876 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:21:11:843:500 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:21:12:842:879 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q5 finished at: 2022-4-24 0:21:13:842:986 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 0:21:13:843:529 + Q4 finished at: 2022-4-24 0:21:13:843:955 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 0:21:14:843:58 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 0:21:34:843:181 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:21:34:843:546 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_sda_non_repeatable_read.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..ff96f7f2 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_sda_non_repeatable_read.txt @@ -0,0 +1,60 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:18:57:721:530 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 0:18:57:722:151 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:18:58:721:571 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q4 finished at: 2022-4-24 0:18:58:723:527 +Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q5 finished at: 2022-4-24 0:18:59:721:766 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:19:0:721:711 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 0:19:1:721:525 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 0:19:21:722:104 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:19:21:722:408 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..c3ad8610 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,60 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_delete #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_delete test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:20:19:795:25 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 0:20:19:796:1 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:20:20:795:49 + Q4-T2 execute sql: 'DELETE FROM t1 WHERE k=0;' + Q4 finished at: 2022-4-24 0:20:20:795:687 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 0:20:20:796:137 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + (0,0) + (1) expected_result: + null + *(2) expected_result: + (0,0) + +Q6 finished at: 2022-4-24 0:20:21:795:660 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 0:20:21:795:980 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + null + (1) expected_result: + (0,0) + *(2) expected_result: + null + + Q8 finished at: 2022-4-24 0:20:41:795:555 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:20:41:795:827 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..43790c11 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,59 @@ +#### db_type: tidb #### +#### test_type: sda_non_repeatable_read_predicate_based-phantom_insert #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute opt: 'COMMIT'; + +----------rat_sda_non_repeatable_read_predicate_based-phantom_insert test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:20:45:818:878 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q2 finished at: 2022-4-24 0:20:45:824:55 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:20:46:818:927 + Q4-T2 execute sql: 'INSERT INTO t1 VALUES (0, 0);' + Q4 finished at: 2022-4-24 0:20:46:821:87 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 0:20:46:821:596 +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE v=0;' + current_result: + null + *(1) expected_result: + null + (2) expected_result: + (0,0) + +Q6 finished at: 2022-4-24 0:20:47:819:529 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 0:20:47:819:843 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + *(2) expected_result: + (0,0) + + Q8 finished at: 2022-4-24 0:21:7:819:293 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:21:7:819:589 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_double_write_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..f537723b --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,56 @@ +#### db_type: tidb #### +#### test_type: dda_double_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_double_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_double_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:31:13:389:109 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:31:13:389:803 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:31:14:389:201 + Q4-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q4 finished at: 2022-4-24 0:31:14:391:574 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + *(1) expected_result: + (1,0) + (2) expected_result: + (1,1) + +Q7 finished at: 2022-4-24 0:31:15:389:271 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:31:15:389:852 + Q5 finished at: 2022-4-24 0:31:15:390:170 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:31:15:390:642 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:31:35:389:593 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:31:35:389:948 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_full_write_skew_c1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..6ae0ba40 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,33 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:31:39:414:439 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:31:39:415:108 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:31:40:414:442 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 0:31:40:423:128 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-24 0:31:41:415:404 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-24 0:31:42:15:356 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_full_write_skew_c2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..e5151761 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,33 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:32:6:439:668 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:32:6:440:407 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:32:7:439:598 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 0:32:7:440:264 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-24 0:32:8:440:418 +Q6 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q6 failed at: 2022-4-24 0:32:9:40:355 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_full_write_skew_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..16678aff --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,35 @@ +#### db_type: tidb #### +#### test_type: dda_full_write_skew_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_full_write_skew_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_full_write_skew_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:32:34:464:560 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:32:34:465:227 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:32:35:464:577 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 0:32:35:465:226 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q5 finished at: 2022-4-24 0:32:36:465:395 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:32:36:466:62 +Q7 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q7 failed at: 2022-4-24 0:32:37:165:307 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_read_write_skew1_c1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..944d3891 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:33:0:489:788 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 0:33:0:490:347 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:33:1:489:782 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 0:33:1:490:476 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 0:33:1:490:946 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 0:33:3:490:44 +Q6 finished at: 2022-4-24 0:33:3:490:339 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 0:33:3:493:269 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:33:23:490:469 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:33:23:490:893 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_read_write_skew1_c2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..32294353 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew1_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew1_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew1_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:33:27:514:396 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,1) + +Q2 finished at: 2022-4-24 0:33:27:514:961 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:33:28:514:379 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 0:33:28:515:988 + Q5-T2 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q5 finished at: 2022-4-24 0:33:28:516:446 +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 0:33:30:514:701 +Q6 finished at: 2022-4-24 0:33:30:515:30 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:33:31:514:662 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,1) (1,1) + (1) expected_result: + (0,1) (1,2) + *(2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:33:51:515:38 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:33:51:515:421 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_read_write_skew2_c1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..d0a99545 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:33:55:539:980 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:33:55:540:730 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:33:56:540:17 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 0:33:56:541:460 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 0:33:57:540:234 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 0:33:57:540:867 + Q5 finished at: 2022-4-24 0:33:57:541:222 + Q8-T2 execute opt: 'COMMIT'; + Q8 finished at: 2022-4-24 0:33:58:540:269 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:34:18:540:673 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:34:18:541:38 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_read_write_skew2_c2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..707eaca4 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:34:22:565:625 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:34:22:566:271 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:34:23:565:569 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 0:34:23:567:681 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q6 finished at: 2022-4-24 0:34:24:565:848 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:34:26:565:856 + Q5 finished at: 2022-4-24 0:34:26:566:215 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 0:34:26:566:733 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:34:46:566:259 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:34:46:566:748 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_read_write_skew2_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..863b88ff --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,54 @@ +#### db_type: tidb #### +#### test_type: dda_read_write_skew2_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_dda_read_write_skew2_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_dda_read_write_skew2_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:34:50:591:434 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:34:50:592:203 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:34:51:591:339 + Q4-T2 execute sql: 'SELECT * FROM t1 WHERE k=1;' + current_result: + (1,0) + (1) expected_result: + (1,1) + *(2) expected_result: + (1,0) + + Q4 finished at: 2022-4-24 0:34:51:592:829 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q7-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=1;' +Q7 finished at: 2022-4-24 0:34:52:591:663 +Q8-T1 execute opt: 'COMMIT'; +Q8 finished at: 2022-4-24 0:34:52:592:349 + Q5 finished at: 2022-4-24 0:34:52:592:709 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:34:52:593:216 + Q9-T3 execute sql: 'SELECT * FROM t1 ORDER BY k;' + current_result: + (0,2) (1,1) + *(1) expected_result: + (0,2) (1,1) + (2) expected_result: + (0,1) (1,1) + + Q9 finished at: 2022-4-24 0:35:12:592:94 + Q10-T3 execute opt: 'COMMIT'; + Q10 finished at: 2022-4-24 0:35:12:592:581 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_mda_step_wat_c1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..1ea9ca05 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_mda_step_wat_c1.txt @@ -0,0 +1,40 @@ +#### db_type: tidb #### +#### test_type: mda_step_wat_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:35:16:616:269 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:35:16:616:928 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:35:17:616:292 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 0:35:17:618:88 + Q5-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q6-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q6 finished at: 2022-4-24 0:35:18:616:246 + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-24 0:35:18:617:13 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q5 finished at: 2022-4-24 0:35:19:617:144 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-24 0:35:20:517:114 + Q8 finished at: 2022-4-24 0:35:20:518:295 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_mda_step_wat_c2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..29f4773c --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_mda_step_wat_c2.txt @@ -0,0 +1,40 @@ +#### db_type: tidb #### +#### test_type: mda_step_wat_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_mda_step_wat_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (1, 0);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (2, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_mda_step_wat_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:35:45:642:400 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:35:45:643:179 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:35:46:642:365 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=1;' + Q4 finished at: 2022-4-24 0:35:46:643:34 + Q5-T3 execute sql: 'BEGIN PESSIMISTIC;' + Q5 finished at: 2022-4-24 0:35:47:642:328 + Q6-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q7-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=2;' + Q7 finished at: 2022-4-24 0:35:49:642:762 + Q8-T3 execute sql: 'UPDATE t1 SET v=3 WHERE k=1;' +Q9-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=2;' + Q6 finished at: 2022-4-24 0:35:50:643:381 +Q9 failed reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction errcode: HY000 +Q9 failed at: 2022-4-24 0:35:51:543:286 + Q8 finished at: 2022-4-24 0:35:51:642:921 + +Test Result: Rollback +Reason: [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.25-TiDB-v5.4.0]Deadlock found when trying to get lock; try restarting transaction + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_sda_dirty_write_1abort.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..06831831 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_write_1abort #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_1abort test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_1abort test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:28:5:214:848 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:28:5:215:496 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:28:6:214:831 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'ROLLBACK'; +Q5 finished at: 2022-4-24 0:28:7:214:958 + Q4 finished at: 2022-4-24 0:28:7:215:356 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:28:8:215:66 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-24 0:28:28:215:503 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-24 0:28:28:230:190 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:28:28:230:703 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_sda_dirty_write_2commit.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..73be7150 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_dirty_write_2commit #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_dirty_write_2commit test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_dirty_write_2commit test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:28:32:240:359 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:28:32:241:120 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:28:33:240:368 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute opt: 'COMMIT'; +Q5 finished at: 2022-4-24 0:28:34:240:592 + Q4 finished at: 2022-4-24 0:28:34:240:937 + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:28:35:240:544 + Q7-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + (1) expected_result: + (0,1) + *(2) expected_result: + (0,2) + + Q7 finished at: 2022-4-24 0:28:55:240:874 + Q8-T3 execute sql: 'DROP TABLE IF EXISTS t1;' + Q8 finished at: 2022-4-24 0:28:55:255:637 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:28:55:256:192 + +The current result is consistent with the [(2) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_sda_full_write.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_sda_full_write.txt new file mode 100644 index 00000000..217fd621 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_sda_full_write.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_full_write #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:28:59:267:499 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:28:59:268:147 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:29:0:267:491 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q5-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q5 finished at: 2022-4-24 0:29:1:267:729 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 0:29:1:268:300 + Q4 finished at: 2022-4-24 0:29:1:268:697 + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 0:29:2:267:723 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-24 0:29:22:268:106 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:29:22:268:466 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_sda_full_write_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..69b84722 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_sda_full_write_committed.txt @@ -0,0 +1,46 @@ +#### db_type: tidb #### +#### test_type: sda_full_write_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_full_write_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_full_write_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:29:26:291:95 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:29:26:291:756 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:29:27:291:122 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'UPDATE t1 SET v=3 WHERE k=0;' +Q6 finished at: 2022-4-24 0:29:28:291:345 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 0:29:28:292:25 + Q4 finished at: 2022-4-24 0:29:28:292:335 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 0:29:28:292:858 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,3) + + Q8 finished at: 2022-4-24 0:29:48:291:810 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:29:48:292:161 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_sda_lost_self_update_committed.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..a0919606 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,53 @@ +#### db_type: tidb #### +#### test_type: sda_lost_self_update_committed #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_self_update_committed test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_self_update_committed test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:30:47:363:713 +Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' +Q2 finished at: 2022-4-24 0:30:47:364:368 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:30:48:363:755 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' +Q6-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,1) + *(1) expected_result: + (0,1) + *(2) expected_result: + (0,1) + +Q6 finished at: 2022-4-24 0:30:49:363:937 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 0:30:49:364:553 + Q4 finished at: 2022-4-24 0:30:49:364:922 + Q5-T2 execute opt: 'COMMIT'; + Q5 finished at: 2022-4-24 0:30:49:365:382 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,2) + *(1) expected_result: + (0,2) + (2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 0:31:9:364:252 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:31:9:364:644 + +The current result is consistent with the [(1) expected_result] of serial scheduling + +Test Result: Avoid +Reason: Data anomaly did not occur and the data is consistent + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_sda_lost_update_c1.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..c0750b4d --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_sda_lost_update_c1.txt @@ -0,0 +1,51 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_c1 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c1 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c1 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:29:52:313:886 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 0:29:52:314:613 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:29:53:313:870 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 0:29:53:320:739 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q7-T2 execute opt: 'COMMIT'; + Q7 finished at: 2022-4-24 0:29:55:314:131 +Q5 finished at: 2022-4-24 0:29:55:314:471 +Q6-T1 execute opt: 'COMMIT'; +Q6 finished at: 2022-4-24 0:29:55:314:927 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 0:30:15:314:452 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:30:15:314:819 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_sda_lost_update_c2.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..160a3beb --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/repeatable-read/wat_sda_lost_update_c2.txt @@ -0,0 +1,51 @@ +#### db_type: tidb #### +#### test_type: sda_lost_update_c2 #### +#### isolation: repeatable-read #### + +current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas +expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory + +set TXN_ISOLATION = repeatable-read for each session +----------wat_sda_lost_update_c2 test prepare---------- +Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' +Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' +Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' +Q0-T1 execute opt: 'COMMIT'; + +----------wat_sda_lost_update_c2 test run---------- +Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' +Q1 finished at: 2022-4-24 0:30:19:338:642 +Q2-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' + current_result: + (0,0) + *(1) expected_result: + (0,0) + (2) expected_result: + (0,2) + +Q2 finished at: 2022-4-24 0:30:19:339:263 + Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' + Q3 finished at: 2022-4-24 0:30:20:338:594 + Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' + Q4 finished at: 2022-4-24 0:30:20:339:287 +Q5-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' + Q6-T2 execute opt: 'COMMIT'; + Q6 finished at: 2022-4-24 0:30:22:338:883 +Q5 finished at: 2022-4-24 0:30:22:339:190 +Q7-T1 execute opt: 'COMMIT'; +Q7 finished at: 2022-4-24 0:30:23:338:892 + Q8-T3 execute sql: 'SELECT * FROM t1;' + current_result: + (0,1) + (1) expected_result: + (0,2) + *(2) expected_result: + (0,1) + + Q8 finished at: 2022-4-24 0:30:43:339:299 + Q9-T3 execute opt: 'COMMIT'; + Q9 finished at: 2022-4-24 0:30:43:339:701 + +Test Result: Anomaly +Reason: Data anomaly is not recognized by the database, resulting in data inconsistencies + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/result_summary/read-committed_total-result.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/result_summary/read-committed_total-result.txt new file mode 100644 index 00000000..38745346 --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/result_summary/read-committed_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Anomaly + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Anomaly + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Avoid + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Anomaly + +rat_dda_read_skew_predicate_based_insert: Anomaly + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Anomaly + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Anomaly + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Anomaly + +iat_mda_step_iat_cross_phenomenon: Anomaly + +iat_mda_step_iat_causality_violation_anomaly: Anomaly + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/distributed_result/tidb_test/tidb_pessimistic_single/result_summary/repeatable-read_total-result.txt b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/result_summary/repeatable-read_total-result.txt new file mode 100644 index 00000000..42d5fc7b --- /dev/null +++ b/test_result/distributed_result/tidb_test/tidb_pessimistic_single/result_summary/repeatable-read_total-result.txt @@ -0,0 +1,108 @@ +rat_sda_dirty_read: Avoid + +rat_sda_non_repeatable_read: Avoid + +rat_sda_intermediate_read: Avoid + +rat_sda_intermediate_read_committed: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_delete: Avoid + +rat_sda_non_repeatable_read_predicate_based-phantom_insert: Avoid + +rat_sda_lost_self_update: Avoid + +rat_dda_write_read_skew: Anomaly + +rat_dda_write_read_skew_committed: Anomaly + +rat_dda_double_write_skew1: Avoid + +rat_dda_double_write_skew1_committed: Avoid + +rat_dda_double_write_skew2: Avoid + +rat_dda_read_skew: Avoid + +rat_dda_read_skew_predicate_based_delete: Avoid + +rat_dda_read_skew_predicate_based_insert: Avoid + +rat_dda_read_skew2: Avoid + +rat_dda_read_skew2_committed: Avoid + +rat_mda_step_rat: Anomaly + +rat_mda_step_rat_long_fork: Avoid + +rat_mda_step_rat_predicate_based_delete: Anomaly + +rat_mda_step_rat_predicate_based_insert: Anomaly + +wat_sda_dirty_write_1abort: Avoid + +wat_sda_dirty_write_2commit: Avoid + +wat_sda_full_write: Avoid + +wat_sda_full_write_committed: Avoid + +wat_sda_lost_update_c1: Anomaly + +wat_sda_lost_update_c2: Anomaly + +wat_sda_lost_self_update_committed: Avoid + +wat_dda_double_write_skew2_committed: Avoid + +wat_dda_full_write_skew_c1: Rollback + +wat_dda_full_write_skew_c2: Rollback + +wat_dda_full_write_skew_committed: Rollback + +wat_dda_read_write_skew1_c1: Anomaly + +wat_dda_read_write_skew1_c2: Anomaly + +wat_dda_read_write_skew2_c1: Anomaly + +wat_dda_read_write_skew2_c2: Anomaly + +wat_dda_read_write_skew2_committed: Anomaly + +wat_mda_step_wat_c1: Rollback + +wat_mda_step_wat_c2: Rollback + +iat_sda_non_repeatable_read_committed: Avoid + +iat_sda_lost_update_committed: Anomaly + +iat_dda_read_skew_committed: Avoid + +iat_dda_read_write_skew1_committed: Anomaly + +iat_dda_write_skew: Anomaly + +iat_dda_write_skew_predicate_based-intersecting_data: Anomaly + +iat_dda_write_skew_predicate_based-overdraft_protection: Anomaly + +iat_dda_write_skew_committed: Anomaly + +iat_mda_step_iat: Anomaly + +iat_mda_step_iat_predicate_based_delete: Anomaly + +iat_mda_step_iat_predicate_based_insert: Anomaly + +iat_mda_step_iat_uname_anomaly: Avoid + +iat_mda_step_iat_cross_phenomenon: Avoid + +iat_mda_step_iat_causality_violation_anomaly: Avoid + +iat_mda_step_iat_read_only_transaction_anomaly: Anomaly + diff --git a/test_result/readme.txt b/test_result/readme.txt new file mode 100644 index 00000000..ef38964a --- /dev/null +++ b/test_result/readme.txt @@ -0,0 +1,19 @@ +test_cases: it inclucdes 33 test cases that show in the paper, and some other cases from known anomalies, and predicate anomalies. +centrailized_result: the result are from single machine node +distributed_result: the result are from the distributed environment + +Each database result includes +(1) a summary for all tested result in folder +(2) test results at different isolation levels + +Test case structure: +Preparation: delete and construct table and rows +Execution: expected execution sequence +Validation: all serializable result + +Test result structure: +Execution: request and real exeuction with timestamps +Result: consistent (rollback or serializable execution) and inconsistent (non-serializable execution) test result + +Test databases: +MySQL, MyRocks, TDSQL, SQL Server, TiDB, Oracle, Oceanbase, Greenplum, PostgreSQL, CockroachDB, MongoDB \ No newline at end of file diff --git a/test_result/test_cases/iat_dda_read_skew_committed.txt b/test_result/test_cases/iat_dda_read_skew_committed.txt new file mode 100644 index 00000000..6dc7af49 --- /dev/null +++ b/test_result/test_cases/iat_dda_read_skew_committed.txt @@ -0,0 +1,26 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=1 WHERE k=1; +5-2-UPDATE t1 SET v=1 WHERE k=0; +6-2-COMMIT; +7-1-SELECT * from t1 WHERE k=1; +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +2-0,0 +7-1,0 +9-0,1 1,1 + +2-0,1 +7-1,1 +9-0,1 1,1 +} \ No newline at end of file diff --git a/test_result/test_cases/iat_dda_read_write_skew1_committed.txt b/test_result/test_cases/iat_dda_read_write_skew1_committed.txt new file mode 100644 index 00000000..794a5a36 --- /dev/null +++ b/test_result/test_cases/iat_dda_read_write_skew1_committed.txt @@ -0,0 +1,24 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=1; +5-2-UPDATE t1 SET v=1 WHERE k=0; +6-2-COMMIT; +7-1-UPDATE t1 SET v=1 WHERE k=1; +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +2-0,0 +9-0,1 1,2 + +2-0,1 +9-0,1 1,1 +} diff --git a/test_result/test_cases/iat_dda_write_skew.txt b/test_result/test_cases/iat_dda_write_skew.txt new file mode 100644 index 00000000..744cb016 --- /dev/null +++ b/test_result/test_cases/iat_dda_write_skew.txt @@ -0,0 +1,26 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-select * from t1 where k=0; +3-2-BEGIN; +4-2-select * from t1 where k=1; +5-2-update t1 set v=1 where k=0; +6-1-update t1 set v=1 where k=1; +7-1-COMMIT; +8-2-COMMIT; +9-3-select * from t1 ORDER BY k; +8-3-COMMIT; + +serializable { +2-0,0 +4-1,1 +9-0,1 1,1 + +2-0,1 +4-1,0 +9-0,1 1,1 +} diff --git a/test_result/test_cases/iat_dda_write_skew_committed.txt b/test_result/test_cases/iat_dda_write_skew_committed.txt new file mode 100644 index 00000000..d897428d --- /dev/null +++ b/test_result/test_cases/iat_dda_write_skew_committed.txt @@ -0,0 +1,26 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-select * from t1 where k=0; +3-2-BEGIN; +4-2-select * from t1 where k=1; +5-2-update t1 set v=1 where k=0; +6-2-COMMIT; +7-1-update t1 set v=1 where k=1; +8-1-COMMIT; +9-3-select * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +2-0,0 +4-1,1 +9-0,1 1,1 + +2-0,1 +4-1,0 +9-0,1 1,1 +} diff --git a/test_result/test_cases/iat_dda_write_skew_predicate_based-intersecting_data.txt b/test_result/test_cases/iat_dda_write_skew_predicate_based-intersecting_data.txt new file mode 100644 index 00000000..e286f7b1 --- /dev/null +++ b/test_result/test_cases/iat_dda_write_skew_predicate_based-intersecting_data.txt @@ -0,0 +1,31 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS mytab; +0-1-CREATE TABLE mytab(class int NOT NULL, value int NOT NULL); +0-1-INSERT INTO mytab VALUES (1, 10); +0-1-INSERT INTO mytab VALUES (1, 20); +0-1-INSERT INTO mytab VALUES (2, 100); +0-1-INSERT INTO mytab VALUES (2, 200); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT SUM(value) FROM mytab WHERE class = 1; +3-1-INSERT INTO mytab VALUES (2, 30); +4-2-BEGIN; +5-2-SELECT SUM(value) FROM mytab WHERE class = 2; +6-2-INSERT INTO mytab VALUES (1, 300); +7-2-COMMIT; +8-1-COMMIT; +9-3-SELECT SUM(value) FROM mytab WHERE class = 1; +10-3-SELECT SUM(value) FROM mytab WHERE class = 2; +12-3-COMMIT; + +serializable { +2-30, +5-330, +9-330, +10-330, + +2-330, +5-300, +9-330, +10-330, +} diff --git a/test_result/test_cases/iat_dda_write_skew_predicate_based-overdraft_protection.txt b/test_result/test_cases/iat_dda_write_skew_predicate_based-overdraft_protection.txt new file mode 100644 index 00000000..fe3720d6 --- /dev/null +++ b/test_result/test_cases/iat_dda_write_skew_predicate_based-overdraft_protection.txt @@ -0,0 +1,26 @@ +ParamNum:3 +0-1-DROP TABLE IF EXISTS account; +0-1-create table account (name varchar(255) not null, type varchar(255) not null, balance int not null, primary key (name, type)) +0-1-insert into account values ('kevin','saving', 500); +0-1-insert into account values ('kevin','checking', 500); +0-1-COMMIT; +1-1-BEGIN; +2-1-select type, balance from account where name = 'kevin'; +3-2-BEGIN; +4-2-select type, balance from account where name = 'kevin'; +5-2-update account set balance = balance + 900 where name = 'kevin' and type = 'saving'; +6-2-COMMIT; +7-1-update account set balance = balance + 900 where name = 'kevin' and type = 'checking'; +8-1-COMMIT: +9-3-select * from account; +10-3-COMMIT; + +serializable { +2-checking,500, saving,500, +4-checking,500, saving,1400, +9-kevin,checking,1400 kevin,saving,1400 + +2-checking,1400, saving,500, +4-checking,500, saving,500, +9-kevin,checking,1400 kevin,saving,1400 +} diff --git a/test_result/test_cases/iat_mda_step_iat.txt b/test_result/test_cases/iat_mda_step_iat.txt new file mode 100644 index 00000000..9f1a518a --- /dev/null +++ b/test_result/test_cases/iat_mda_step_iat.txt @@ -0,0 +1,53 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-select * from t1 where k=2; +3-2-BEGIN; +4-2-select * from t1 where k=0; +5-3-BEGIN; +6-3-select * from t1 where k=1; +7-1-update t1 set v=1 where k=0; +8-2-update t1 set v=1 where k=1; +9-3-update t1 set v=1 where k=2; +10-1-COMMIT; +11-2-COMMIT; +12-3-COMMIT; +13-4-select * from t1 ORDER BY k; +14-4-COMMIT; + +serializable { +2-2,0 +4-0,1 +6-1,1 +13-0,1 1,1 2,1 + +2-2,0 +4-0,1 +6-1,0 +13-0,1 1,1 2,1 + +2-2,0 +4-0,0 +6-1,1 +13-0,1 1,1 2,1 + +2-2,1 +4-0,0 +6-1,1 +13-0,1 1,1 2,1 + +2-2,1 +4-0,1 +6-1,0 +13-0,1 1,1 2,1 + +2-2,1 +4-0,0 +6-1,0 +13-0,1 1,1 2,1 +} diff --git a/test_result/test_cases/iat_mda_step_iat_causality_violation_anomaly.txt b/test_result/test_cases/iat_mda_step_iat_causality_violation_anomaly.txt new file mode 100644 index 00000000..74f59396 --- /dev/null +++ b/test_result/test_cases/iat_mda_step_iat_causality_violation_anomaly.txt @@ -0,0 +1,51 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-select * from t1 where k=0; +3-2-BEGIN; +4-2-update t1 set v=1 where k=0; +5-2-commit; +6-3-BEGIN; +7-3-select * from t1 where k=0; +8-3-update t1 set v=1 where k=1; +9-3-commit; +10-1-select * from t1 where k=1; +11-1-commit; +12-4-select * from t1 ORDER BY k; +13-4-commit; + +serializable { +2-0,0 +7-0,1 +10-1,0 +12-0,1 1,1 + +2-0,0 +7-0,0 +10-1,0 +12-0,1 1,1 + +2-0,1 +7-0,1 +10-1,1 +12-0,1 1,1 + +2-0,1 +7-0,1 +10-1,0 +12-0,1 1,1 + +2-0,0 +7-0,0 +10-1,1 +12-0,1 1,1 + +2-0,1 +7-0,0 +10-1,1 +12-0,1 1,1 +} diff --git a/test_result/test_cases/iat_mda_step_iat_cross_phenomenon.txt b/test_result/test_cases/iat_mda_step_iat_cross_phenomenon.txt new file mode 100644 index 00000000..de6d8b92 --- /dev/null +++ b/test_result/test_cases/iat_mda_step_iat_cross_phenomenon.txt @@ -0,0 +1,108 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-select * from t1 where k=0; +3-2-BEGIN; +4-2-select * from t1 where k=1; +5-3-BEGIN; +6-3-update t1 set v=1 where k=0; +7-3-commit; +8-4-BEGIN; +9-4-update t1 set v=1 where k=1; +10-4-commit; +11-2-select * from t1 where k=0; +12-2-commit; +13-1-select * from t1 where k=1; +14-1-commit; +15-5-select * from t1 ORDER BY k; +16-5-COMMIT; + +serializable { +2-0,0 +4-1,0 +13-1,0 +11-0,0 +15-0,1 1,1 + +2-0,0 +4-1,1 +13-1,0 +11-0,0 +15-0,1 1,1 + +2-0,0 +4-1,0 +13-1,0 +11-0,1 +15-0,1 1,1 + +2-0,0 +4-1,1 +13-1,0 +11-0,1 +15-0,1 1,1 + +2-0,0 +4-1,0 +13-1,1 +11-0,0 +15-0,1 1,1 + +2-0,1 +4-1,0 +13-1,0 +11-0,0 +15-0,1 1,1 + +2-0,1 +4-1,0 +13-1,1 +11-0,0 +15-0,1 1,1 + +2-0,0 +4-1,1 +13-1,1 +11-0,0 +15-0,1 1,1 + +2-0,1 +4-1,0 +13-1,0 +11-0,1 +15-0,1 1,1 + +2-0,1 +4-1,1 +13-1,1 +11-0,1 +15-0,1 1,1 + +2-0,0 +4-1,1 +13-1,1 +11-0,1 +15-0,1 1,1 + +2-0,1 +4-1,1 +13-1,1 +11-0,0 +15-0,1 1,1 + +2-0,1 +4-1,1 +13-1,0 +11-0,1 +15-0,1 1,1 + +2-0,1 +4-1,0 +13-1,1 +11-0,1 +15-0,1 1,1 +} diff --git a/test_result/test_cases/iat_mda_step_iat_predicate_based_delete.txt b/test_result/test_cases/iat_mda_step_iat_predicate_based_delete.txt new file mode 100644 index 00000000..b9a1ea80 --- /dev/null +++ b/test_result/test_cases/iat_mda_step_iat_predicate_based_delete.txt @@ -0,0 +1,53 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-select * from t1 where k=2; +3-2-BEGIN; +4-2-select * from t1 where k=0; +5-3-BEGIN; +6-3-select * from t1 where k=1; +7-1-DELETE FROM t1 WHERE k=0; +8-2-DELETE FROM t1 WHERE k=1; +9-3-DELETE FROM t1 WHERE k=2; +10-1-COMMIT; +11-2-COMMIT; +12-3-COMMIT; +13-4-select * from t1; +14-4-COMMIT; + +serializable { +2-2,0 +4-null +6-null +13-null + +2-2,0 +4-null +6-1,0 +13-null + +2-2,0 +4-0,0 +6-null +13-null + +2-null +4-0,0 +6-1,1 +13-null + +2-null +4-null +6-1,0 +13-null + +2-null +4-0,0 +6-1,0 +13-null +} \ No newline at end of file diff --git a/test_result/test_cases/iat_mda_step_iat_predicate_based_insert.txt b/test_result/test_cases/iat_mda_step_iat_predicate_based_insert.txt new file mode 100644 index 00000000..3f683ea3 --- /dev/null +++ b/test_result/test_cases/iat_mda_step_iat_predicate_based_insert.txt @@ -0,0 +1,50 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-COMMIT; +1-1-BEGIN; +2-1-select * from t1 where k=2; +3-2-BEGIN; +4-2-select * from t1 where k=0; +5-3-BEGIN; +6-3-select * from t1 where k=1; +7-1-INSERT INTO t1 VALUES (0, 0); +8-2-INSERT INTO t1 VALUES (1, 0); +9-3-INSERT INTO t1 VALUES (2, 0); +10-1-COMMIT; +11-2-COMMIT; +12-3-COMMIT; +13-4-select * from t1 ORDER BY k; +14-4-COMMIT; + +serializable { +2-null +4-0,1 +6-1,1 +13-0,1 1,1 2,1 + +2-null +4-0,1 +6-null +13-0,1 1,1 2,1 + +2-null +4-null +6-1,1 +13-0,1 1,1 2,1 + +2-2,1 +4-null +6-1,1 +13-0,1 1,1 2,1 + +2-2,1 +4-0,1 +6-null +13-0,1 1,1 2,1 + +2-2,1 +4-null +6-null +13-0,1 1,1 2,1 +} diff --git a/test_result/test_cases/iat_mda_step_iat_read_only_transaction_anomaly.txt b/test_result/test_cases/iat_mda_step_iat_read_only_transaction_anomaly.txt new file mode 100644 index 00000000..05df640e --- /dev/null +++ b/test_result/test_cases/iat_mda_step_iat_read_only_transaction_anomaly.txt @@ -0,0 +1,65 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-select * from t1 where k=0; +3-1-select * from t1 where k=1; +4-2-BEGIN; +5-2-select * from t1 where k=1; +6-2-update t1 set v=20 where k=1; +7-2-commit; +8-3-BEGIN; +9-3-select * from t1 where k=0; +10-3-select * from t1 where k=1; +11-3-commit; +12-1-update t1 set v=11 where k=0; +13-1-commit; +14-3-select * from t1 ORDER BY k; +15-3-COMMIT; + +serializable { +2-0,0 +3-1,0 +5-1,0 +9-0,11 +10-1,20 +14-0,11 1,20 + +2-0,0 +3-1,0 +5-1,0 +9-0,11 +10-1,0 +14-0,11 1,20 + +2-0,0 +3-1,20 +5-1,0 +9-0,0 +10-1,20 +14-0,11 1,20 + +2-0,0 +3-1,20 +5-1,0 +9-0,11 +10-1,20 +14-0,11 1,20 + +2-0,0 +3-1,0 +5-1,0 +9-0,0 +10-1,0 +14-0,11 1,20 + +2-0,0 +3-1,20 +5-1,0 +9-0,0 +10-1,0 +14-0,11 1,20 +} diff --git a/test_result/test_cases/iat_mda_step_iat_uname_anomaly.txt b/test_result/test_cases/iat_mda_step_iat_uname_anomaly.txt new file mode 100644 index 00000000..be4deaad --- /dev/null +++ b/test_result/test_cases/iat_mda_step_iat_uname_anomaly.txt @@ -0,0 +1,75 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-select * from t1 where k=1; +3-2-BEGIN; +4-2-select * from t1 where k=0; +5-2-update t1 set v=1 where k=0; +6-2-select * from t1 where k=1; +7-2-update t1 set v=1 where k=1; +8-2-commit; +9-3-BEGIN; +10-3-select * from t1 where k=2; +11-3-update t1 set v=1 where k=2; +12-3-select * from t1 where k=0; +13-3-update t1 set v=2 where k=0; +14-3-commit; +15-1-select * from t1 where k=2; +16-1-commit; +17-4-select * from t1 ORDER BY k; +18-4-commit; + +serializable { +2-1,0 +4-0,0 +6-1,0 +10-2,0 +12-0,1 +15-2,0 +17-0,2 1,1 2,1 + +2-1,0 +4-0,2 +6-1,0 +10-2,0 +12-0,0 +15-2,0 +17-0,2 1,1 2,1 + +2-1,1 +4-0,0 +6-1,0 +10-2,0 +12-0,1 +15-2,0 +17-0,2 1,1 2,1 + +2-1,2 +4-0,0 +6-1,0 +10-2,0 +12-0,1 +15-2,2 +17-0,2 1,1 2,1 + +2-1,0 +4-0,2 +6-1,0 +10-2,0 +12-0,0 +15-2,1 +17-0,2 1,1 2,1 + +2-1,1 +4-0,2 +6-1,0 +10-2,0 +12-0,0 +15-2,1 +17-0,2 1,1 2,1 +} \ No newline at end of file diff --git a/test_result/test_cases/iat_sda_lost_update_committed.txt b/test_result/test_cases/iat_sda_lost_update_committed.txt new file mode 100644 index 00000000..b8ecf732 --- /dev/null +++ b/test_result/test_cases/iat_sda_lost_update_committed.txt @@ -0,0 +1,22 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=0; +5-2-COMMIT; +6-1-UPDATE t1 SET v=1 WHERE k=0; +7-1-COMMIT; +8-3-SELECT * FROM t1; +9-3-COMMIT; + +serializable { +2-0,0 +8-0,2 + +2-0,2 +8-0,1 +} diff --git a/test_result/test_cases/iat_sda_non_repeatable_read_committed.txt b/test_result/test_cases/iat_sda_non_repeatable_read_committed.txt new file mode 100644 index 00000000..ab3a4efa --- /dev/null +++ b/test_result/test_cases/iat_sda_non_repeatable_read_committed.txt @@ -0,0 +1,24 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=1 WHERE k=0; +5-2-COMMIT; +6-1-SELECT * from t1 WHERE k=0; +7-1-COMMIT; +8-3-SELECT * FROM t1; +9-3-COMMIT; + +serializable { +2-0,0 +6-0,0 +8-0,1 + +2-0,1 +6-0,1 +8-0,1 +} diff --git a/test_result/test_cases/rat_dda_double_write_skew1.txt b/test_result/test_cases/rat_dda_double_write_skew1.txt new file mode 100644 index 00000000..83deae26 --- /dev/null +++ b/test_result/test_cases/rat_dda_double_write_skew1.txt @@ -0,0 +1,24 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-begin; +2-1-update t1 set v=1 where k=0; +3-2-begin; +4-2-update t1 set v=1 where k=1; +5-2-select * from t1 where k=0; +6-1-update t1 set v=2 where k=1; +7-2-commit; +8-1-commit; +9-3-SELECT * FROM t1 ORDER BY k; +10-3-COMMIT; + +serializable { +5-0,1 +9-0,1 1,1 + +5-0,0 +9-0,1 1,2 +} \ No newline at end of file diff --git a/test_result/test_cases/rat_dda_double_write_skew1_committed.txt b/test_result/test_cases/rat_dda_double_write_skew1_committed.txt new file mode 100644 index 00000000..bbe68e15 --- /dev/null +++ b/test_result/test_cases/rat_dda_double_write_skew1_committed.txt @@ -0,0 +1,24 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-begin; +2-1-update t1 set v=1 where k=0; +3-2-begin; +4-2-update t1 set v=1 where k=1; +5-2-select * from t1 where k=0; +6-2-commit; +7-1-update t1 set v=2 where k=1; +8-1-commit; +9-3-SELECT * FROM t1 ORDER BY k; +10-3-COMMIT; + +serializable { +5-0,1 +9-0,1 1,1 + +5-0,0 +9-0,1 1,2 +} diff --git a/test_result/test_cases/rat_dda_double_write_skew2.txt b/test_result/test_cases/rat_dda_double_write_skew2.txt new file mode 100644 index 00000000..9e81e864 --- /dev/null +++ b/test_result/test_cases/rat_dda_double_write_skew2.txt @@ -0,0 +1,24 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-begin; +2-1-update t1 set v=1 where k=0; +3-2-begin; +4-2-update t1 set v=1 where k=1; +5-2-update t1 set v=2 where k=0; +6-1-select * from t1 where k=1; +7-1-commit; +8-2-commit; +9-3-SELECT * FROM t1 ORDER BY k; +10-3-COMMIT; + +serializable { +6-1,0 +9-0,2 1,1 + +6-1,1 +9-0,1 1,1 +} \ No newline at end of file diff --git a/test_result/test_cases/rat_dda_read_skew.txt b/test_result/test_cases/rat_dda_read_skew.txt new file mode 100644 index 00000000..648f49b3 --- /dev/null +++ b/test_result/test_cases/rat_dda_read_skew.txt @@ -0,0 +1,26 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=1 WHERE k=1; +5-2-UPDATE t1 SET v=1 WHERE k=0; +6-1-SELECT * from t1 WHERE k=1; +7-2-COMMIT; +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +2-0,0 +6-1,0 +9-0,1 1,1 + +2-0,1 +6-1,1 +9-0,1 1,1 +} diff --git a/test_result/test_cases/rat_dda_read_skew2.txt b/test_result/test_cases/rat_dda_read_skew2.txt new file mode 100644 index 00000000..a3a4691d --- /dev/null +++ b/test_result/test_cases/rat_dda_read_skew2.txt @@ -0,0 +1,26 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k=1; +5-2-SELECT * from t1 WHERE k=0; +6-1-UPDATE t1 SET v=1 WHERE k=1; +7-1-COMMIT; +8-2-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +4-1,1 +5-0,1 +9-0,1 1,1 + +4-1,0 +5-0,0 +9-0,1 1,1 +} diff --git a/test_result/test_cases/rat_dda_read_skew2_committed.txt b/test_result/test_cases/rat_dda_read_skew2_committed.txt new file mode 100644 index 00000000..4a43fdbc --- /dev/null +++ b/test_result/test_cases/rat_dda_read_skew2_committed.txt @@ -0,0 +1,26 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k=1; +5-2-SELECT * from t1 WHERE k=0; +6-2-COMMIT; +7-1-UPDATE t1 SET v=1 WHERE k=1; +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +4-1,1 +5-0,1 +9-0,1 1,1 + +4-1,0 +5-0,0 +9-0,1 1,1 +} \ No newline at end of file diff --git a/test_result/test_cases/rat_dda_read_skew_predicate_based_delete.txt b/test_result/test_cases/rat_dda_read_skew_predicate_based_delete.txt new file mode 100644 index 00000000..efbe28e5 --- /dev/null +++ b/test_result/test_cases/rat_dda_read_skew_predicate_based_delete.txt @@ -0,0 +1,27 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-select * from t1 where v=0; +3-2-BEGIN; +4-2-DELETE FROM t1 WHERE k=1; +5-2-DELETE FROM t1 WHERE k=0; +6-2-COMMIT; +7-1-select * from t1 where v=0; +8-1-COMMIT: +9-3-select * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +2-null +7-null +9-null + + +2-0,0 1,0 +7-0,0 1,0 +9-null +} diff --git a/test_result/test_cases/rat_dda_read_skew_predicate_based_insert.txt b/test_result/test_cases/rat_dda_read_skew_predicate_based_insert.txt new file mode 100644 index 00000000..78b6e71a --- /dev/null +++ b/test_result/test_cases/rat_dda_read_skew_predicate_based_insert.txt @@ -0,0 +1,24 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-COMMIT; +1-1-BEGIN; +2-1-select * from t1 where v=0; +3-2-BEGIN; +4-2-insert into t1 values(1,0); +5-2-insert into t1 values(0,0); +6-2-COMMIT; +7-1-select * from t1 where v=0; +8-1-COMMIT: +9-3-select * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +2-null +7-null +9-0,0 1,0 + +2-0,0 1,0 +7-0,0 1,0 +9-0,0 1,0 +} diff --git a/test_result/test_cases/rat_dda_read_skew_predicate_based_insert_test.txt b/test_result/test_cases/rat_dda_read_skew_predicate_based_insert_test.txt new file mode 100644 index 00000000..a46aadab --- /dev/null +++ b/test_result/test_cases/rat_dda_read_skew_predicate_based_insert_test.txt @@ -0,0 +1,26 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT SUM(v) FROM t1 WHERE k >= 1 ; +3-2-BEGIN; +4-2-insert into t1 values(0,1); +5-2-insert into t1 values(1,2); +6-2-COMMIT; +7-1-SELECT SUM(v) FROM t1 WHERE k <= 0; +8-1-COMMIT: +9-3-select * from t1 ORDER BY k; +10-3-COMMIT; + + +serializable { +2-, +7-, +9-0,1 1,2 + + +2-1 +7-2 +9-0,1 1,2 +} diff --git a/test_result/test_cases/rat_dda_write_read_skew.txt b/test_result/test_cases/rat_dda_write_read_skew.txt new file mode 100644 index 00000000..90b9ada2 --- /dev/null +++ b/test_result/test_cases/rat_dda_write_read_skew.txt @@ -0,0 +1,26 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-update t1 set v=1 where k=0; +3-2-BEGIN; +4-2-update t1 set v=1 where k=1; +5-2-select * from t1 where k=0; +6-1-select * from t1 where k=1; +7-2-COMMIT; +8-1-commit; +9-3-select * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +5-0,1 +6-1,0 +9-0,1 1,1 + +5-0,0 +6-1,1 +9-0,1 1,1 +} \ No newline at end of file diff --git a/test_result/test_cases/rat_dda_write_read_skew_committed.txt b/test_result/test_cases/rat_dda_write_read_skew_committed.txt new file mode 100644 index 00000000..764cb1a2 --- /dev/null +++ b/test_result/test_cases/rat_dda_write_read_skew_committed.txt @@ -0,0 +1,29 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-update t1 set v=1 where k=0; +3-2-BEGIN; +4-2-update t1 set v=1 where k=1; +5-2-select * from t1 where k=0; +6-2-COMMIT; +7-1-select * from t1 where k=1; +8-1-COMMIT; +9-3-select * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +5-0,1 +7-1,0 +9-0,1 1,1 + +5-0,0 +7-1,1 +9-0,1 1,1 +} + + + diff --git a/test_result/test_cases/rat_mda_step_rat.txt b/test_result/test_cases/rat_mda_step_rat.txt new file mode 100644 index 00000000..6a3e0eb3 --- /dev/null +++ b/test_result/test_cases/rat_mda_step_rat.txt @@ -0,0 +1,53 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-update t1 set v=1 where k=0; +3-2-BEGIN; +4-2-update t1 set v=1 where k=1; +5-2-select * from t1 where k=0; +6-3-BEGIN; +7-3-update t1 set v=1 where k=2; +8-3-select * from t1 where k=1; +9-1-select * from t1 where k=2; +10-1-COMMIT; +11-2-COMMIT; +12-3-COMMIT; +13-4-select * from t1 ORDER BY k; +14-4-COMMIT; + +serializable { +5-0,1 +8-1,1 +9-2,0 +13-0,1 1,1 2,1 + +5-0,1 +8-1,0 +9-2,0 +13-0,1 1,1 2,1 + +5-0,0 +8-1,1 +9-2,0 +13-0,1 1,1 2,1 + +5-0,0 +8-1,1 +9-2,1 +13-0,1 1,1 2,1 + +5-0,1 +8-1,0 +9-2,1 +13-0,1 1,1 2,1 + +5-0,0 +8-1,0 +9-2,1 +13-0,1 1,1 2,1 +} diff --git a/test_result/test_cases/rat_mda_step_rat_long_fork.txt b/test_result/test_cases/rat_mda_step_rat_long_fork.txt new file mode 100644 index 00000000..9f0b1baa --- /dev/null +++ b/test_result/test_cases/rat_mda_step_rat_long_fork.txt @@ -0,0 +1,108 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-commit; +1-4-BEGIN; +2-4-select * from t1 where k=0; +3-1-BEGIN; +4-1-update t1 set v=1 where k=0; +5-3-BEGIN; +6-3-select * from t1 where k=1; +7-3-select * from t1 where k=0; +8-2-BEGIN; +9-2-update t1 set v=1 where k=1; +10-4-select * from t1 where k=1; +11-1-commit; +12-2-commit; +13-3-commit; +14-4-commit; +15-4-select * from t1 ORDER BY k; +16-4-commit; + +serializable { +2-0,0 +6-1,0 +7-0,0 +10-1,0 +15-0,1 1,1 + +2-0,1 +6-1,0 +7-0,0 +10-1,1 +15-0,1 1,1 + +2-0,0 +6-1,1 +7-0,1 +10-1,0 +15-0,1 1,1 + +2-0,1 +6-1,1 +7-0,1 +10-1,1 +15-0,1 1,1 + +2-0,1 +6-1,0 +7-0,1 +10-1,0 +15-0,1 1,1 + +2-0,0 +6-1,1 +7-0,0 +10-1,1 +15-0,1 1,1 + +2-0,1 +6-1,1 +7-0,1 +10-1,0 +15-0,1 1,1 + +2-0,1 +6-1,0 +7-0,1 +10-1,1 +15-0,1 1,1 + +2-0,0 +6-1,1 +7-0,1 +10-1,1 +15-0,1 1,1 + +2-0,1 +6-1,1 +7-0,0 +10-1,1 +15-0,1 1,1 + +2-0,0 +6-1,0 +7-0,0 +10-1,1 +15-0,1 1,1 + +2-0,1 +6-1,0 +7-0,0 +10-1,0 +15-0,1 1,1 + +2-0,0 +6-1,0 +7-0,1 +10-1,0 +15-0,1 1,1 + +2-0,0 +6-1,1 +7-0,0 +10-1,0 +15-0,1 1,1 +} diff --git a/test_result/test_cases/rat_mda_step_rat_predicate_based_delete.txt b/test_result/test_cases/rat_mda_step_rat_predicate_based_delete.txt new file mode 100644 index 00000000..877ed9de --- /dev/null +++ b/test_result/test_cases/rat_mda_step_rat_predicate_based_delete.txt @@ -0,0 +1,53 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 1); +0-1-INSERT INTO t1 VALUES (1, 1); +0-1-INSERT INTO t1 VALUES (2, 1); +0-1-COMMIT; +1-1-BEGIN; +2-1-DELETE FROM t1 WHERE k=0; +3-2-BEGIN; +4-2-DELETE FROM t1 WHERE k=1; +5-2-SELECT SUM(v) FROM t1 WHERE k = 0; +6-3-BEGIN; +7-3-DELETE FROM t1 WHERE k=2; +8-3-SELECT SUM(v) FROM t1 WHERE k = 1; +9-1-SELECT SUM(v) FROM t1 WHERE k = 2; +10-1-COMMIT; +11-2-COMMIT; +12-3-COMMIT; +13-4-select * from t1; +14-4-COMMIT; + +serializable { +5-, +8-, +9-1, +13-null + +5-, +8-1, +9-1, +13-null + +5-1, +8-, +9-1, +13-null + +5-1, +8-1, +9-, +13-null + +5-, +8-1, +9-, +13-null + +5-1, +8-1, +9-, +13-null +} diff --git a/test_result/test_cases/rat_mda_step_rat_predicate_based_insert.txt b/test_result/test_cases/rat_mda_step_rat_predicate_based_insert.txt new file mode 100644 index 00000000..06f68f2d --- /dev/null +++ b/test_result/test_cases/rat_mda_step_rat_predicate_based_insert.txt @@ -0,0 +1,50 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-COMMIT; +1-1-BEGIN; +2-1-INSERT INTO t1 VALUES (0, 1); +3-2-BEGIN; +4-2-INSERT INTO t1 VALUES (1, 1); +5-2-SELECT SUM(v) FROM t1 WHERE k = 0; +6-3-BEGIN; +7-3-INSERT INTO t1 VALUES (2, 1); +8-3-SELECT SUM(v) FROM t1 WHERE k = 1; +9-1-SELECT SUM(v) FROM t1 WHERE k = 2; +10-1-COMMIT; +11-2-COMMIT; +12-3-COMMIT; +13-4-select * from t1 ORDER BY k; +14-4-COMMIT; + +serializable { +5-, +8-1, +9-1, +13-0,1 1,1 2,1 + +5-, +8-1, +9-, +13-0,1 1,1 2,1 + +5-, +8-, +9-1, +13-0,1 1,1 2,1 + +5-1, +8-, +9-1, +13-0,1 1,1 2,1 + +5-1, +8-1, +9-, +13-0,1 1,1 2,1 + +5-1, +8-, +9-, +13-0,1 1,1 2,1 +} diff --git a/test_result/test_cases/rat_sda_dirty_read.txt b/test_result/test_cases/rat_sda_dirty_read.txt new file mode 100644 index 00000000..51a54867 --- /dev/null +++ b/test_result/test_cases/rat_sda_dirty_read.txt @@ -0,0 +1,18 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k = 0; +5-1-ROLLBACK; +6-2-COMMIT; +7-3-SELECT * FROM t1; +8-3-COMMIT; + +serializable { +4-0,0 +7-0,0 +} diff --git a/test_result/test_cases/rat_sda_intermediate_read.txt b/test_result/test_cases/rat_sda_intermediate_read.txt new file mode 100644 index 00000000..7054534f --- /dev/null +++ b/test_result/test_cases/rat_sda_intermediate_read.txt @@ -0,0 +1,23 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k=0; +5-1-UPDATE t1 SET v=2 WHERE k=0; +6-2-COMMIT; +7-1-COMMIT; +8-3-SELECT * from t1; +9-3-COMMIT; + +serializable { +4-0,2 +8-0,2 + +4-0,0 +8-0,2 +} + diff --git a/test_result/test_cases/rat_sda_intermediate_read_committed.txt b/test_result/test_cases/rat_sda_intermediate_read_committed.txt new file mode 100644 index 00000000..cd9132fe --- /dev/null +++ b/test_result/test_cases/rat_sda_intermediate_read_committed.txt @@ -0,0 +1,23 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k=0; +5-2-COMMIT; +6-1-UPDATE t1 SET v=2 WHERE k=0; +7-1-COMMIT; +8-3-SELECT * from t1; +9-3-COMMIT; + +serializable { +4-0,2 +8-0,2 + +4-0,0 +8-0,2 +} + diff --git a/test_result/test_cases/rat_sda_lost_self_update.txt b/test_result/test_cases/rat_sda_lost_self_update.txt new file mode 100644 index 00000000..31745804 --- /dev/null +++ b/test_result/test_cases/rat_sda_lost_self_update.txt @@ -0,0 +1,22 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=0; +5-1-SELECT * from t1 WHERE k=0; +6-1-COMMIT; +7-2-COMMIT; +8-3-SELECT * FROM t1; +9-3-COMMIT; + +serializable { +5-0,1 +8-0,2 + +5-0,1 +8-0,1 +} diff --git a/test_result/test_cases/rat_sda_non_repeatable_read.txt b/test_result/test_cases/rat_sda_non_repeatable_read.txt new file mode 100644 index 00000000..18d8be0b --- /dev/null +++ b/test_result/test_cases/rat_sda_non_repeatable_read.txt @@ -0,0 +1,24 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k=0; +3-2-BEGIN;; +4-2-UPDATE t1 SET v=1 WHERE k=0; +5-1-SELECT * from t1 WHERE k=0; +6-2-COMMIT; +7-1-COMMIT; +8-3-SELECT * FROM t1; +9-3-COMMIT; + +serializable { +2-0,0 +5-0,0 +8-0,1 + +2-0,1 +5-0,1 +8-0,1 +} \ No newline at end of file diff --git a/test_result/test_cases/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt b/test_result/test_cases/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt new file mode 100644 index 00000000..0ae57913 --- /dev/null +++ b/test_result/test_cases/rat_sda_non_repeatable_read_predicate_based-phantom_delete.txt @@ -0,0 +1,24 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE v=0; +3-2-BEGIN; +4-2-DELETE FROM t1 WHERE k=0; +5-2-COMMIT; +6-1-SELECT * from t1 WHERE v=0; +7-1-COMMIT; +8-3-SELECT * FROM t1; +9-3-COMMIT; + +serializable { +2-null +6-null +8-0,0 + +2-0,0 +6-0,0 +8-null +} diff --git a/test_result/test_cases/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt b/test_result/test_cases/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt new file mode 100644 index 00000000..408f7737 --- /dev/null +++ b/test_result/test_cases/rat_sda_non_repeatable_read_predicate_based-phantom_insert.txt @@ -0,0 +1,23 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE v=0; +3-2-BEGIN; +4-2-INSERT INTO t1 VALUES (0, 0); +5-2-COMMIT; +6-1-SELECT * from t1 WHERE v=0; +7-1-COMMIT; +8-3-SELECT * FROM t1; +9-3-COMMIT; + +serializable { +2-null +6-null +8-0,0 + +2-0,0 +6-0,0 +8-0,0 +} diff --git a/test_result/test_cases/wat_dda_double_write_skew2_committed.txt b/test_result/test_cases/wat_dda_double_write_skew2_committed.txt new file mode 100644 index 00000000..c925c802 --- /dev/null +++ b/test_result/test_cases/wat_dda_double_write_skew2_committed.txt @@ -0,0 +1,24 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-begin; +2-1-update t1 set v=1 where k=0; +3-2-begin; +4-2-update t1 set v=1 where k=1; +5-2-update t1 set v=2 where k=0; +6-2-commit; +7-1-select * from t1 where k=1; +8-1-commit; +9-3-SELECT * FROM t1 ORDER BY k; +10-3-COMMIT; + +serializable { +7-1,0 +9-0,2 1,1 + +7-1,1 +9-0,1 1,1 +} \ No newline at end of file diff --git a/test_result/test_cases/wat_dda_full_write_skew_c1.txt b/test_result/test_cases/wat_dda_full_write_skew_c1.txt new file mode 100644 index 00000000..2ad62d13 --- /dev/null +++ b/test_result/test_cases/wat_dda_full_write_skew_c1.txt @@ -0,0 +1,22 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=1; +5-2-UPDATE t1 SET v=2 WHERE k=0; +6-1-UPDATE t1 SET v=1 WHERE k=1; +7-1-COMMIT; +8-2-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +9-0,1 1,1 + +9-0,2 1,2 +} diff --git a/test_result/test_cases/wat_dda_full_write_skew_c2.txt b/test_result/test_cases/wat_dda_full_write_skew_c2.txt new file mode 100644 index 00000000..e047cc73 --- /dev/null +++ b/test_result/test_cases/wat_dda_full_write_skew_c2.txt @@ -0,0 +1,22 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=1; +5-2-UPDATE t1 SET v=2 WHERE k=0; +6-1-UPDATE t1 SET v=1 WHERE k=1; +7-2-COMMIT; +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +9-0,1 1,1 + +9-0,2 1,2 +} diff --git a/test_result/test_cases/wat_dda_full_write_skew_committed.txt b/test_result/test_cases/wat_dda_full_write_skew_committed.txt new file mode 100644 index 00000000..de5b71d0 --- /dev/null +++ b/test_result/test_cases/wat_dda_full_write_skew_committed.txt @@ -0,0 +1,22 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=1; +5-2-UPDATE t1 SET v=2 WHERE k=0; +6-2-COMMIT; +7-1-UPDATE t1 SET v=1 WHERE k=1; +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +9-0,1 1,1 + +9-0,2 1,2 +} diff --git a/test_result/test_cases/wat_dda_read_write_skew1_c1.txt b/test_result/test_cases/wat_dda_read_write_skew1_c1.txt new file mode 100644 index 00000000..e129c548 --- /dev/null +++ b/test_result/test_cases/wat_dda_read_write_skew1_c1.txt @@ -0,0 +1,24 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=1; +5-2-UPDATE t1 SET v=1 WHERE k=0; +6-1-UPDATE t1 SET v=1 WHERE k=1; +7-1-COMMIT; +8-2-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +2-0,0 +9-0,1 1,2 + +2-0,1 +9-0,1 1,1 +} diff --git a/test_result/test_cases/wat_dda_read_write_skew1_c2.txt b/test_result/test_cases/wat_dda_read_write_skew1_c2.txt new file mode 100644 index 00000000..ad1a73ee --- /dev/null +++ b/test_result/test_cases/wat_dda_read_write_skew1_c2.txt @@ -0,0 +1,24 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=1; +5-2-UPDATE t1 SET v=1 WHERE k=0; +6-1-UPDATE t1 SET v=1 WHERE k=1; +7-2-COMMIT; +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +2-0,0 +9-0,1 1,2 + +2-0,1 +9-0,1 1,1 +} diff --git a/test_result/test_cases/wat_dda_read_write_skew2_c1.txt b/test_result/test_cases/wat_dda_read_write_skew2_c1.txt new file mode 100644 index 00000000..2b92f31a --- /dev/null +++ b/test_result/test_cases/wat_dda_read_write_skew2_c1.txt @@ -0,0 +1,24 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k=1; +5-2-UPDATE t1 SET v=2 WHERE k=0; +6-1-UPDATE t1 SET v=1 WHERE k=1; +7-1-COMMIT; +8-2-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +4-1,1 +9-0,2 1,1 + +4-1,0 +9-0,1 1,1 +} diff --git a/test_result/test_cases/wat_dda_read_write_skew2_c2.txt b/test_result/test_cases/wat_dda_read_write_skew2_c2.txt new file mode 100644 index 00000000..8c9f9aa6 --- /dev/null +++ b/test_result/test_cases/wat_dda_read_write_skew2_c2.txt @@ -0,0 +1,24 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k=1; +5-2-UPDATE t1 SET v=2 WHERE k=0; +6-1-UPDATE t1 SET v=1 WHERE k=1; +7-2-COMMIT; +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +4-1,1 +9-0,2 1,1 + +4-1,0 +9-0,1 1,1 +} diff --git a/test_result/test_cases/wat_dda_read_write_skew2_committed.txt b/test_result/test_cases/wat_dda_read_write_skew2_committed.txt new file mode 100644 index 00000000..ade01f80 --- /dev/null +++ b/test_result/test_cases/wat_dda_read_write_skew2_committed.txt @@ -0,0 +1,24 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k=1; +5-2-UPDATE t1 SET v=2 WHERE k=0; +6-2-COMMIT; +7-1-UPDATE t1 SET v=1 WHERE k=1; +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +4-1,1 +9-0,2 1,1 + +4-1,0 +9-0,1 1,1 +} diff --git a/test_result/test_cases/wat_mda_step_wat_c1.txt b/test_result/test_cases/wat_mda_step_wat_c1.txt new file mode 100644 index 00000000..1a57bfed --- /dev/null +++ b/test_result/test_cases/wat_mda_step_wat_c1.txt @@ -0,0 +1,35 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-update t1 set v=1 where k=0; +3-2-BEGIN; +4-2-update t1 set v=2 where k=1; +5-2-update t1 set v=2 where k=0; +6-3-BEGIN; +7-3-update t1 set v=3 where k=2; +8-3-update t1 set v=3 where k=1; +9-1-update t1 set v=1 where k=2; +10-1-COMMIT; +11-2-COMMIT; +12-3-COMMIT; +13-4-select * from t1 ORDER BY k; +14-4-COMMIT; + +serializable { +13-0,2 1,3 2,3 + +13-0,2 1,2 2,3 + +13-0,1 1,3 2,3 + +13-0,1 1,3 2,1 + +13-0,2 1,2 2,1 + +13-0,1 1,2 2,1 +} diff --git a/test_result/test_cases/wat_mda_step_wat_c2.txt b/test_result/test_cases/wat_mda_step_wat_c2.txt new file mode 100644 index 00000000..df78d474 --- /dev/null +++ b/test_result/test_cases/wat_mda_step_wat_c2.txt @@ -0,0 +1,35 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-update t1 set v=1 where k=0; +3-2-BEGIN; +4-2-update t1 set v=2 where k=1; +5-3-BEGIN; +6-2-update t1 set v=2 where k=0; +7-3-update t1 set v=3 where k=2; +8-3-update t1 set v=3 where k=1; +9-1-update t1 set v=1 where k=2; +10-2-COMMIT; +11-1-COMMIT; +12-3-COMMIT; +13-4-select * from t1 ORDER BY k; +14-4-COMMIT; + +serializable { +13-0,2 1,3 2,3 + +13-0,2 1,2 2,3 + +13-0,1 1,3 2,3 + +13-0,1 1,3 2,1 + +13-0,2 1,2 2,1 + +13-0,1 1,2 2,1 +} diff --git a/test_result/test_cases/wat_sda_dirty_write_1abort.txt b/test_result/test_cases/wat_sda_dirty_write_1abort.txt new file mode 100644 index 00000000..3a0a598e --- /dev/null +++ b/test_result/test_cases/wat_sda_dirty_write_1abort.txt @@ -0,0 +1,20 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=0; +5-1-ROLLBACK; +6-2-COMMIT; +7-3-SELECT * FROM t1; +8-3-DROP TABLE IF EXISTS t1; +9-3-COMMIT; + +serializable { +7-0,1 + +7-0,2 +} \ No newline at end of file diff --git a/test_result/test_cases/wat_sda_dirty_write_2commit.txt b/test_result/test_cases/wat_sda_dirty_write_2commit.txt new file mode 100644 index 00000000..736f479f --- /dev/null +++ b/test_result/test_cases/wat_sda_dirty_write_2commit.txt @@ -0,0 +1,21 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=0; +5-1-COMMIT; +6-2-COMMIT; +7-3-SELECT * FROM t1; +8-3-DROP TABLE IF EXISTS t1; +9-3-COMMIT; + + +serializable { +7-0,1 + +7-0,2 +} diff --git a/test_result/test_cases/wat_sda_full_write.txt b/test_result/test_cases/wat_sda_full_write.txt new file mode 100644 index 00000000..c4c9ceaf --- /dev/null +++ b/test_result/test_cases/wat_sda_full_write.txt @@ -0,0 +1,20 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=0; +5-1-UPDATE t1 SET v=3 WHERE k=0; +6-1-COMMIT; +7-2-COMMIT; +8-3-SELECT * from t1; +9-3-COMMIT; + +serializable { +8-0,2 + +8-0,3 +} diff --git a/test_result/test_cases/wat_sda_full_write_committed.txt b/test_result/test_cases/wat_sda_full_write_committed.txt new file mode 100644 index 00000000..97b442de --- /dev/null +++ b/test_result/test_cases/wat_sda_full_write_committed.txt @@ -0,0 +1,20 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=0; +5-2-COMMIT; +6-1-UPDATE t1 SET v=3 WHERE k=0; +7-1-COMMIT; +8-3-SELECT * from t1; +9-3-COMMIT; + +serializable { +8-0,2 + +8-0,3 +} \ No newline at end of file diff --git a/test_result/test_cases/wat_sda_lost_self_update_committed.txt b/test_result/test_cases/wat_sda_lost_self_update_committed.txt new file mode 100644 index 00000000..7b8a0059 --- /dev/null +++ b/test_result/test_cases/wat_sda_lost_self_update_committed.txt @@ -0,0 +1,22 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=0; +5-2-COMMIT; +6-1-SELECT * from t1 WHERE k=0; +7-1-COMMIT; +8-3-SELECT * FROM t1; +9-3-COMMIT; + +serializable { +6-0,1 +8-0,2 + +6-0,1 +8-0,1 +} diff --git a/test_result/test_cases/wat_sda_lost_update_c1.txt b/test_result/test_cases/wat_sda_lost_update_c1.txt new file mode 100644 index 00000000..5bc21686 --- /dev/null +++ b/test_result/test_cases/wat_sda_lost_update_c1.txt @@ -0,0 +1,22 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=0; +5-1-UPDATE t1 SET v=1 WHERE k=0; +6-1-COMMIT; +7-2-COMMIT; +8-3-SELECT * FROM t1; +9-3-COMMIT; + +serializable { +2-0,0 +8-0,2 + +2-0,2 +8-0,1 +} \ No newline at end of file diff --git a/test_result/test_cases/wat_sda_lost_update_c2.txt b/test_result/test_cases/wat_sda_lost_update_c2.txt new file mode 100644 index 00000000..90c6cc76 --- /dev/null +++ b/test_result/test_cases/wat_sda_lost_update_c2.txt @@ -0,0 +1,22 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k=0; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=0; +5-1-UPDATE t1 SET v=1 WHERE k=0; +6-2-COMMIT; +7-1-COMMIT; +8-3-SELECT * FROM t1; +9-3-COMMIT; + +serializable { +2-0,0 +8-0,2 + +2-0,2 +8-0,1 +} \ No newline at end of file diff --git a/test_result/test_cases_pred/iat_dda_read_skew_committed_pred_delete.txt b/test_result/test_cases_pred/iat_dda_read_skew_committed_pred_delete.txt new file mode 100644 index 00000000..c0455a91 --- /dev/null +++ b/test_result/test_cases_pred/iat_dda_read_skew_committed_pred_delete.txt @@ -0,0 +1,29 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (3, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k>0 and k<2; +3-2-BEGIN; +4-2-DELETE FROM t1 WHERE k=3; +5-2-DELETE FROM t1 WHERE k=1; +6-2-COMMIT; +7-1-SELECT * from t1 WHERE k>2 and k<4; +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +2-null +7-null +9-0,0 2,0 4,0 + +2-1,0 +7-3,0 +9-0,0 2,0 4,0 +} \ No newline at end of file diff --git a/test_result/test_cases_pred/iat_dda_read_skew_committed_pred_insert.txt b/test_result/test_cases_pred/iat_dda_read_skew_committed_pred_insert.txt new file mode 100644 index 00000000..075fc22f --- /dev/null +++ b/test_result/test_cases_pred/iat_dda_read_skew_committed_pred_insert.txt @@ -0,0 +1,27 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k>0 and k<2; +3-2-BEGIN; +4-2-INSERT INTO t1 VALUES (3, 0); +5-2-INSERT INTO t1 VALUES (1, 0); +6-2-COMMIT; +7-1-SELECT * from t1 WHERE k>2 and k<4; +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +2-null +7-null +9-0,0 1,0 2,0 3,0 4,0 + +2-1,0 +7-3,0 +9-0,0 1,0 2,0 3,0 4,0 +} diff --git a/test_result/test_cases_pred/iat_dda_read_write_skew1_committed_pred_delete.txt b/test_result/test_cases_pred/iat_dda_read_write_skew1_committed_pred_delete.txt new file mode 100644 index 00000000..c71cf792 --- /dev/null +++ b/test_result/test_cases_pred/iat_dda_read_write_skew1_committed_pred_delete.txt @@ -0,0 +1,26 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (3, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k>0 and k<2; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=3; +5-2-DELETE FROM t1 WHERE k=1; +6-2-COMMIT; +7-1-UPDATE t1 SET v=1 WHERE k=3; +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +2-1,0 +9-0,0 2,0 3,2 + +2-null +9-0,0 2,0 3,1 +} diff --git a/test_result/test_cases_pred/iat_dda_read_write_skew1_committed_pred_insert.txt b/test_result/test_cases_pred/iat_dda_read_write_skew1_committed_pred_insert.txt new file mode 100644 index 00000000..5f70a267 --- /dev/null +++ b/test_result/test_cases_pred/iat_dda_read_write_skew1_committed_pred_insert.txt @@ -0,0 +1,26 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (3, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k>0 and k<2; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=3; +5-2-INSERT INTO t1 VALUES (1, 0); +6-2-COMMIT; +7-1-UPDATE t1 SET v=1 WHERE k=3; +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +2-null +9-0,0 1,0 2,0 3,2 + +2-1,0 +9-0,0 1,0 2,0 3,1 +} + diff --git a/test_result/test_cases_pred/iat_dda_write_skew_committed_pred_delete.txt b/test_result/test_cases_pred/iat_dda_write_skew_committed_pred_delete.txt new file mode 100644 index 00000000..b52d79ab --- /dev/null +++ b/test_result/test_cases_pred/iat_dda_write_skew_committed_pred_delete.txt @@ -0,0 +1,28 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (3, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-select * from t1 where k>0 and k<2; +3-2-BEGIN; +4-2-select * from t1 where k>2 and k<4; +5-2-DELETE FROM t1 WHERE k=1; +6-2-COMMIT; +7-1-DELETE FROM t1 WHERE k=3; +8-1-COMMIT; +9-3-select * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +2-1,0 +4-null +9-0,0 2,0 + +2-null +4-3,0 +9-0,0 2,0 +} diff --git a/test_result/test_cases_pred/iat_dda_write_skew_committed_pred_insert.txt b/test_result/test_cases_pred/iat_dda_write_skew_committed_pred_insert.txt new file mode 100644 index 00000000..1baa9499 --- /dev/null +++ b/test_result/test_cases_pred/iat_dda_write_skew_committed_pred_insert.txt @@ -0,0 +1,26 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-select * from t1 where k>0 and k<2; +3-2-BEGIN; +4-2-select * from t1 where k>2 and k<4; +5-2-INSERT INTO t1 VALUES (1, 0); +6-2-COMMIT; +7-1-INSERT INTO t1 VALUES (3, 0); +8-1-COMMIT; +9-3-select * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +2-null +4-3,0 +9-0,0 1,0 2,0 3,0 + +2-1,0 +4-null +9-0,0 1,0 2,0 3,0 +} diff --git a/test_result/test_cases_pred/iat_dda_write_skew_pred_delete.txt b/test_result/test_cases_pred/iat_dda_write_skew_pred_delete.txt new file mode 100644 index 00000000..d1a09e58 --- /dev/null +++ b/test_result/test_cases_pred/iat_dda_write_skew_pred_delete.txt @@ -0,0 +1,30 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (3, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-select * from t1 where k>0 and k<2; +3-2-BEGIN; +4-2-select * from t1 where k>2 and k<4; +5-2-DELETE FROM t1 WHERE k=1; +6-1-DELETE FROM t1 WHERE k=3; +7-1-COMMIT; +8-2-COMMIT; +9-3-select * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +2-1,0 +4-null +9-0,0 2,0 4,0 + +2-null +4-3,0 +9-0,0 2,0 4,0 +} + diff --git a/test_result/test_cases_pred/iat_dda_write_skew_pred_insert.txt b/test_result/test_cases_pred/iat_dda_write_skew_pred_insert.txt new file mode 100644 index 00000000..11c8e15d --- /dev/null +++ b/test_result/test_cases_pred/iat_dda_write_skew_pred_insert.txt @@ -0,0 +1,28 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-select * from t1 where k>0 and k<2; +3-2-BEGIN; +4-2-select * from t1 where k>2 and k<4; +5-2-INSERT INTO t1 VALUES (1, 0); +6-1-INSERT INTO t1 VALUES (3, 0); +7-1-COMMIT; +8-2-COMMIT; +9-3-select * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +2-null +4-3,0 +9-0,0 1,0 2,0 3,0 4,0 + +2-1,0 +4-null +9-0,0 1,0 2,0 3,0 4,0 +} + diff --git a/test_result/test_cases_pred/iat_mda_step_iat_pred_delete.txt b/test_result/test_cases_pred/iat_mda_step_iat_pred_delete.txt new file mode 100644 index 00000000..ea822ec7 --- /dev/null +++ b/test_result/test_cases_pred/iat_mda_step_iat_pred_delete.txt @@ -0,0 +1,57 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (3, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-INSERT INTO t1 VALUES (5, 0); +0-1-INSERT INTO t1 VALUES (6, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-select * from t1 where k>0 and k<2; +3-2-BEGIN; +4-2-select * from t1 where k>2 and k<4; +5-3-BEGIN; +6-3-select * from t1 where k>4 and k<6; +7-2-DELETE FROM t1 WHERE k=1; +8-3-DELETE FROM t1 WHERE k=3; +9-1-DELETE FROM t1 WHERE k=5; +10-1-COMMIT; +11-2-COMMIT; +12-3-COMMIT; +13-4-select * from t1 ORDER BY k; +14-4-COMMIT; + +serializable { +2-1,0 +4-3,0 +6-null +13-0,0 2,0 4,0 6,0 + +2-1,0 +4-null +6-null +13-0,0 2,0 4,0 6,0 + +2-null +4-3,0 +6-null +13-0,0 2,0 4,0 6,0 + +2-null +4-3,0 +6-5,0 +13-0,0 2,0 4,0 6,0 + +2-null +4-null +6-5,0 +13-0,0 2,0 4,0 6,0 + +2-1,0 +4-null +6-5,0 +13-0,0 2,0 4,0 6,0 +} diff --git a/test_result/test_cases_pred/iat_mda_step_iat_pred_insert.txt b/test_result/test_cases_pred/iat_mda_step_iat_pred_insert.txt new file mode 100644 index 00000000..5a2a7cc6 --- /dev/null +++ b/test_result/test_cases_pred/iat_mda_step_iat_pred_insert.txt @@ -0,0 +1,54 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-INSERT INTO t1 VALUES (6, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-select * from t1 where k>0 and k<2; +3-2-BEGIN; +4-2-select * from t1 where k>2 and k<4; +5-3-BEGIN; +6-3-select * from t1 where k>4 and k<6; +7-2-INSERT INTO t1 VALUES (1, 0); +8-3-INSERT INTO t1 VALUES (3, 0); +9-1-INSERT INTO t1 VALUES (5, 0); +10-1-COMMIT; +11-2-COMMIT; +12-3-COMMIT; +13-4-select * from t1 ORDER BY k; +14-4-COMMIT; + +serializable { +2-null +4-null +6-5,0 +13-0,0 1,0 2,0 3,0 4,0 5,0 6,0 + +2-null +4-3,0 +6-5,0 +13-0,0 1,0 2,0 3,0 4,0 5,0 6,0 + +2-1,0 +4-null +6-5,0 +13-0,0 1,0 2,0 3,0 4,0 5,0 6,0 + +2-1,0 +4-null +6-null +13-0,0 1,0 2,0 3,0 4,0 5,0 6,0 + +2-null +4-3,0 +6-null +13-0,0 1,0 2,0 3,0 4,0 5,0 6,0 + +2-1,0 +4-3,0 +6-null +13-0,0 1,0 2,0 3,0 4,0 5,0 6,0 +} diff --git a/test_result/test_cases_pred/iat_sda_non_repeatable_read_committed_pred_delete.txt b/test_result/test_cases_pred/iat_sda_non_repeatable_read_committed_pred_delete.txt new file mode 100644 index 00000000..3996f9eb --- /dev/null +++ b/test_result/test_cases_pred/iat_sda_non_repeatable_read_committed_pred_delete.txt @@ -0,0 +1,26 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k>0 and k<2; +3-2-BEGIN; +4-2-DELETE FROM t1 WHERE k=1; +5-2-COMMIT; +6-1-SELECT * from t1 WHERE k>0 and k<2; +7-1-COMMIT; +8-3-SELECT * FROM t1 ORDER BY k; +9-3-COMMIT; + +serializable { +2-null +6-null +8-0,0 2,0 + +2-1,0 +6-1,0 +8-0,0 2,0 +} diff --git a/test_result/test_cases_pred/iat_sda_non_repeatable_read_committed_pred_insert.txt b/test_result/test_cases_pred/iat_sda_non_repeatable_read_committed_pred_insert.txt new file mode 100644 index 00000000..d093e123 --- /dev/null +++ b/test_result/test_cases_pred/iat_sda_non_repeatable_read_committed_pred_insert.txt @@ -0,0 +1,25 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k>0 and k<2; +3-2-BEGIN; +4-2-INSERT INTO t1 VALUES (1, 0); +5-2-COMMIT; +6-1-SELECT * from t1 WHERE k>0 and k<2; +7-1-COMMIT; +8-3-SELECT * FROM t1 ORDER BY k; +9-3-COMMIT; + +serializable { +2-null +6-null +8-0,0 1,0 2,0 + +2-1,0 +6-1,0 +8-0,0 1,0 2,0 +} diff --git a/test_result/test_cases_pred/rat_dda_double_write_skew1_committed_pred_delete.txt b/test_result/test_cases_pred/rat_dda_double_write_skew1_committed_pred_delete.txt new file mode 100644 index 00000000..2e39bbcd --- /dev/null +++ b/test_result/test_cases_pred/rat_dda_double_write_skew1_committed_pred_delete.txt @@ -0,0 +1,26 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (3, 0); +0-1-COMMIT; +1-1-begin; +2-1-DELETE FROM t1 WHERE k=1; +3-2-begin; +4-2-update t1 set v=1 where k=3; +5-2-select * from t1 where k>0 and k<2; +6-2-commit; +7-1-update t1 set v=2 where k=3; +8-1-commit; +9-3-SELECT * FROM t1 ORDER BY k; +10-3-COMMIT; + +serializable { +5-1,0 +9-0,0 2,0 3,2 + +5-null +9-0,0 2,0 3,1 +} diff --git a/test_result/test_cases_pred/rat_dda_double_write_skew1_committed_pred_insert.txt b/test_result/test_cases_pred/rat_dda_double_write_skew1_committed_pred_insert.txt new file mode 100644 index 00000000..89cf24f4 --- /dev/null +++ b/test_result/test_cases_pred/rat_dda_double_write_skew1_committed_pred_insert.txt @@ -0,0 +1,25 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (3, 0); +0-1-COMMIT; +1-1-begin; +2-1-INSERT INTO t1 VALUES (1, 0); +3-2-begin; +4-2-update t1 set v=1 where k=3; +5-2-select * from t1 where k>0 and k<2; +6-2-commit; +7-1-update t1 set v=2 where k=3; +8-1-commit; +9-3-SELECT * FROM t1 ORDER BY k; +10-3-COMMIT; + +serializable { +5-1,0 +9-0,0 1,0 2,0 3,1 + +5-null +9-0,0 1,0 2,0 3,2 +} diff --git a/test_result/test_cases_pred/rat_dda_double_write_skew1_pred_delete.txt b/test_result/test_cases_pred/rat_dda_double_write_skew1_pred_delete.txt new file mode 100644 index 00000000..14934abb --- /dev/null +++ b/test_result/test_cases_pred/rat_dda_double_write_skew1_pred_delete.txt @@ -0,0 +1,26 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (3, 0); +0-1-COMMIT; +1-1-begin; +2-1-DELETE FROM t1 WHERE k=1; +3-2-begin; +4-2-update t1 set v=1 where k=3; +5-2-select * from t1 where k>0 and k<2; +6-1-update t1 set v=2 where k=3; +7-2-commit; +8-1-commit; +9-3-SELECT * FROM t1 ORDER BY k; +10-3-COMMIT; + +serializable { +5-1,0 +9-0,0 2,0 3,2 + +5-null +9-0,0 2,0 3,1 +} \ No newline at end of file diff --git a/test_result/test_cases_pred/rat_dda_double_write_skew1_pred_insert.txt b/test_result/test_cases_pred/rat_dda_double_write_skew1_pred_insert.txt new file mode 100644 index 00000000..b6f8be28 --- /dev/null +++ b/test_result/test_cases_pred/rat_dda_double_write_skew1_pred_insert.txt @@ -0,0 +1,25 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (3, 0); +0-1-COMMIT; +1-1-begin; +2-1-INSERT INTO t1 VALUES (1, 0); +3-2-begin; +4-2-update t1 set v=1 where k=3; +5-2-select * from t1 where k>0 and k<2; +6-1-update t1 set v=2 where k=3; +7-2-commit; +8-1-commit; +9-3-SELECT * FROM t1 ORDER BY k; +10-3-COMMIT; + +serializable { +5-1,0 +9-0,0 1,0 2,0 3,1 + +5-null +9-0,0 1,0 2,0 3,2 +} \ No newline at end of file diff --git a/test_result/test_cases_pred/rat_dda_double_write_skew2_pred_delete.txt b/test_result/test_cases_pred/rat_dda_double_write_skew2_pred_delete.txt new file mode 100644 index 00000000..df1bd0c1 --- /dev/null +++ b/test_result/test_cases_pred/rat_dda_double_write_skew2_pred_delete.txt @@ -0,0 +1,26 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (3, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-COMMIT; +1-1-begin; +2-1-update t1 set v=1 where k=1; +3-2-begin; +4-2-DELETE FROM t1 WHERE k=3; +5-2-update t1 set v=2 where k=1; +6-1-select * from t1 where k>2 and k<4; +7-1-commit; +8-2-commit; +9-3-SELECT * FROM t1 ORDER BY k; +10-3-COMMIT; + +serializable { +6-3,0 +9-1,2 2,0 4,0 + +6-null +9-1,1 2,0 4,0 +} \ No newline at end of file diff --git a/test_result/test_cases_pred/rat_dda_double_write_skew2_pred_insert.txt b/test_result/test_cases_pred/rat_dda_double_write_skew2_pred_insert.txt new file mode 100644 index 00000000..d957b3b8 --- /dev/null +++ b/test_result/test_cases_pred/rat_dda_double_write_skew2_pred_insert.txt @@ -0,0 +1,25 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-COMMIT; +1-1-begin; +2-1-update t1 set v=1 where k=1; +3-2-begin; +4-2-INSERT INTO t1 VALUES (3, 0); +5-2-update t1 set v=2 where k=1; +6-1-select * from t1 where k>2 and k<4; +7-1-commit; +8-2-commit; +9-3-SELECT * FROM t1 ORDER BY k; +10-3-COMMIT; + +serializable { +6-null +9-1,2 2,0 3,0 4,0 + +6-3,0 +9-1,1 2,0 3,0 4,0 +} \ No newline at end of file diff --git a/test_result/test_cases_pred/rat_dda_read_skew2_committed_pred_delete.txt b/test_result/test_cases_pred/rat_dda_read_skew2_committed_pred_delete.txt new file mode 100644 index 00000000..2f9f5ff2 --- /dev/null +++ b/test_result/test_cases_pred/rat_dda_read_skew2_committed_pred_delete.txt @@ -0,0 +1,29 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (3, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-DELETE FROM t1 WHERE k=1; +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k>2 and k<4; +5-2-SELECT * from t1 WHERE k>0 and k<2; +6-2-COMMIT; +7-1-DELETE FROM t1 WHERE k=3; +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +4-null +5-null +9-0,0 2,0 4,0 + +4-3,0 +5-1,0 +9-0,0 2,0 4,0 +} \ No newline at end of file diff --git a/test_result/test_cases_pred/rat_dda_read_skew2_committed_pred_insert.txt b/test_result/test_cases_pred/rat_dda_read_skew2_committed_pred_insert.txt new file mode 100644 index 00000000..a46b66ab --- /dev/null +++ b/test_result/test_cases_pred/rat_dda_read_skew2_committed_pred_insert.txt @@ -0,0 +1,27 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-INSERT INTO t1 VALUES (1, 0); +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k>2 and k<4; +5-2-SELECT * from t1 WHERE k>0 and k<2; +6-2-COMMIT; +7-1-INSERT INTO t1 VALUES (3, 0); +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +4-null +5-null +9-0,0 1,0 2,0 3,0 4,0 + +4-3,0 +5-1,0 +9-0,0 1,0 2,0 3,0 4,0 +} \ No newline at end of file diff --git a/test_result/test_cases_pred/rat_dda_read_skew2_pred_delete.txt b/test_result/test_cases_pred/rat_dda_read_skew2_pred_delete.txt new file mode 100644 index 00000000..4bb25619 --- /dev/null +++ b/test_result/test_cases_pred/rat_dda_read_skew2_pred_delete.txt @@ -0,0 +1,29 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (3, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-DELETE FROM t1 WHERE k=1; +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k>2 and k<4; +5-2-SELECT * from t1 WHERE k>0 and k<2; +6-1-DELETE FROM t1 WHERE k=3; +7-1-COMMIT; +8-2-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +4-null +5-null +9-0,0 2,0 4,0 + +4-3,0 +5-1,0 +9-0,0 2,0 4,0 +} \ No newline at end of file diff --git a/test_result/test_cases_pred/rat_dda_read_skew2_pred_insert.txt b/test_result/test_cases_pred/rat_dda_read_skew2_pred_insert.txt new file mode 100644 index 00000000..c7d1e308 --- /dev/null +++ b/test_result/test_cases_pred/rat_dda_read_skew2_pred_insert.txt @@ -0,0 +1,27 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-INSERT INTO t1 VALUES (1, 0); +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k>2 and k<4; +5-2-SELECT * from t1 WHERE k>0 and k<2; +6-1-INSERT INTO t1 VALUES (3, 0); +7-1-COMMIT; +8-2-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +4-null +5-null +9-0,0 1,0 2,0 3,0 4,0 + +4-3,0 +5-1,0 +9-0,0 1,0 2,0 3,0 4,0 +} \ No newline at end of file diff --git a/test_result/test_cases_pred/rat_dda_read_skew_pred_delete.txt b/test_result/test_cases_pred/rat_dda_read_skew_pred_delete.txt new file mode 100644 index 00000000..623afee5 --- /dev/null +++ b/test_result/test_cases_pred/rat_dda_read_skew_pred_delete.txt @@ -0,0 +1,29 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (3, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k>0 and k<2; +3-2-BEGIN; +4-2-DELETE FROM t1 WHERE k=3; +5-2-DELETE FROM t1 WHERE k=1; +6-1-SELECT * from t1 WHERE k>2 and k<4; +7-2-COMMIT; +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +2-null +6-null +9-0,0 2,0 4,0 + +2-1,0 +6-3,0 +9-0,0 2,0 4,0 +} diff --git a/test_result/test_cases_pred/rat_dda_read_skew_pred_insert.txt b/test_result/test_cases_pred/rat_dda_read_skew_pred_insert.txt new file mode 100644 index 00000000..2f874bd1 --- /dev/null +++ b/test_result/test_cases_pred/rat_dda_read_skew_pred_insert.txt @@ -0,0 +1,27 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k>0 and k<2; +3-2-BEGIN; +4-2-INSERT INTO t1 VALUES (3, 0); +5-2-INSERT INTO t1 VALUES (1, 0); +6-1-SELECT * from t1 WHERE k>2 and k<4; +7-2-COMMIT; +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +2-null +6-null +9-0,0 1,0 2,0 3,0 4,0 + +2-1,0 +6-3,0 +9-0,0 1,0 2,0 3,0 4,0 +} diff --git a/test_result/test_cases_pred/rat_dda_write_read_skew_committed_pred_delete.txt b/test_result/test_cases_pred/rat_dda_write_read_skew_committed_pred_delete.txt new file mode 100644 index 00000000..4249f743 --- /dev/null +++ b/test_result/test_cases_pred/rat_dda_write_read_skew_committed_pred_delete.txt @@ -0,0 +1,32 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (3, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-DELETE FROM t1 WHERE k=1; +3-2-BEGIN; +4-2-DELETE FROM t1 WHERE k=3; +5-2-select * from t1 where k>0 and k<2; +6-2-COMMIT; +7-1-select * from t1 where k>2 and k<4; +8-1-COMMIT; +9-3-select * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +5-1,0 +7-null +9-0,0 2,0 4,0 + +5-null +7-3,0 +9-0,0 2,0 4,0 +} + + + diff --git a/test_result/test_cases_pred/rat_dda_write_read_skew_committed_pred_insert.txt b/test_result/test_cases_pred/rat_dda_write_read_skew_committed_pred_insert.txt new file mode 100644 index 00000000..79f44430 --- /dev/null +++ b/test_result/test_cases_pred/rat_dda_write_read_skew_committed_pred_insert.txt @@ -0,0 +1,30 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-INSERT INTO t1 VALUES (1, 0); +3-2-BEGIN; +4-2-INSERT INTO t1 VALUES (3, 0); +5-2-select * from t1 where k>0 and k<2; +6-2-COMMIT; +7-1-select * from t1 where k>2 and k<4; +8-1-COMMIT; +9-3-select * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +5-1,0 +7-null +9-0,0 1,0 2,0 3,0 4,0 + +5-null +7-3,0 +9-0,0 1,0 2,0 3,0 4,0 +} + + + diff --git a/test_result/test_cases_pred/rat_dda_write_read_skew_pred_delete.txt b/test_result/test_cases_pred/rat_dda_write_read_skew_pred_delete.txt new file mode 100644 index 00000000..a6d31aee --- /dev/null +++ b/test_result/test_cases_pred/rat_dda_write_read_skew_pred_delete.txt @@ -0,0 +1,29 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (3, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-DELETE FROM t1 WHERE k=1; +3-2-BEGIN; +4-2-DELETE FROM t1 WHERE k=3; +5-2-select * from t1 where k>0 and k<2; +6-1-select * from t1 where k>2 and k<4; +7-2-COMMIT; +8-1-commit; +9-3-select * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +5-1,0 +6-null +9-0,0 2,0 4,0 + +5-null +6-3,0 +9-0,0 2,0 4,0 +} diff --git a/test_result/test_cases_pred/rat_dda_write_read_skew_pred_insert.txt b/test_result/test_cases_pred/rat_dda_write_read_skew_pred_insert.txt new file mode 100644 index 00000000..55f79d69 --- /dev/null +++ b/test_result/test_cases_pred/rat_dda_write_read_skew_pred_insert.txt @@ -0,0 +1,28 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-INSERT INTO t1 VALUES (1, 0); +3-2-BEGIN; +4-2-INSERT INTO t1 VALUES (3, 0); +5-2-select * from t1 where k>0 and k<2; +6-1-select * from t1 where k>2 and k<4; +7-2-COMMIT; +8-1-commit; +9-3-select * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +5-1,0 +6-null +9-0,0 1,0 2,0 3,0 4,0 + +5-null +6-3,0 +9-0,0 1,0 2,0 3,0 4,0 +} + diff --git a/test_result/test_cases_pred/rat_mda_step_rat_pred_delete.txt b/test_result/test_cases_pred/rat_mda_step_rat_pred_delete.txt new file mode 100644 index 00000000..5c009cdd --- /dev/null +++ b/test_result/test_cases_pred/rat_mda_step_rat_pred_delete.txt @@ -0,0 +1,57 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (3, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-INSERT INTO t1 VALUES (5, 0); +0-1-INSERT INTO t1 VALUES (6, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-DELETE FROM t1 WHERE k=1; +3-2-BEGIN; +4-2-DELETE FROM t1 WHERE k=3; +5-2-select * from t1 where k>0 and k<2; +6-3-BEGIN; +7-3-DELETE FROM t1 WHERE k=5; +8-3-select * from t1 where k>2 and k<4; +9-1-select * from t1 where k>4 and k<6; +10-1-COMMIT; +11-2-COMMIT; +12-3-COMMIT; +13-4-select * from t1 ORDER BY k; +14-4-COMMIT; + +serializable { +5-null +8-null +9-5,0 +13-0,0 2,0 4,0 6,0 + +5-null +8-3,0 +9-5,0 +13-0,0 2,0 4,0 6,0 + +5-1,0 +8-null +9-null +13-0,0 2,0 4,0 6,0 + +5-1,0 +8-null +9-5,0 +13-0,0 2,0 4,0 6,0 + +5-1,0 +8-3,0 +9-null +13-0,0 2,0 4,0 6,0 + +5-null +8-3,0 +9-null +13-0,0 2,0 4,0 6,0 +} diff --git a/test_result/test_cases_pred/rat_mda_step_rat_pred_insert.txt b/test_result/test_cases_pred/rat_mda_step_rat_pred_insert.txt new file mode 100644 index 00000000..b405fedd --- /dev/null +++ b/test_result/test_cases_pred/rat_mda_step_rat_pred_insert.txt @@ -0,0 +1,54 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-INSERT INTO t1 VALUES (6, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-INSERT INTO t1 VALUES (1, 0); +3-2-BEGIN; +4-2-INSERT INTO t1 VALUES (3, 0); +5-2-select * from t1 where k>0 and k<2; +6-3-BEGIN; +7-3-INSERT INTO t1 VALUES (5, 0); +8-3-select * from t1 where k>2 and k<4; +9-1-select * from t1 where k>4 and k<6; +10-1-COMMIT; +11-2-COMMIT; +12-3-COMMIT; +13-4-select * from t1 ORDER BY k; +14-4-COMMIT; + +serializable { +5-1,0 +8-3,0 +9-null +13-0,0 1,0 2,0 3,0 4,0 5,0 6,0 + +5-1,0 +8-null +9-null +13-0,0 1,0 2,0 3,0 4,0 5,0 6,0 + +5-null +8-3,0 +9-null +13-0,0 1,0 2,0 3,0 4,0 5,0 6,0 + +5-null +8-3,0 +9-5,0 +13-0,0 1,0 2,0 3,0 4,0 5,0 6,0 + +5-null +8-null +9-5,0 +13-0,0 1,0 2,0 3,0 4,0 5,0 6,0 + +5-1,0 +8-null +9-5,0 +13-0,0 1,0 2,0 3,0 4,0 5,0 6,0 +} diff --git a/test_result/test_cases_pred/rat_sda_dirty_read_pred_delete.txt b/test_result/test_cases_pred/rat_sda_dirty_read_pred_delete.txt new file mode 100644 index 00000000..8d57fc06 --- /dev/null +++ b/test_result/test_cases_pred/rat_sda_dirty_read_pred_delete.txt @@ -0,0 +1,20 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-DELETE FROM t1 WHERE k=1; +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k>0 and k<2; +5-1-ROLLBACK; +6-2-COMMIT; +7-3-SELECT * FROM t1 ORDER BY k; +8-3-COMMIT; + +serializable { +4-1,0 +7-0,0 1,0 2,0 +} diff --git a/test_result/test_cases_pred/rat_sda_dirty_read_pred_insert.txt b/test_result/test_cases_pred/rat_sda_dirty_read_pred_insert.txt new file mode 100644 index 00000000..c0c81e63 --- /dev/null +++ b/test_result/test_cases_pred/rat_sda_dirty_read_pred_insert.txt @@ -0,0 +1,19 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-INSERT INTO t1 VALUES (1, 0); +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k>0 and k<2; +5-1-ROLLBACK; +6-2-COMMIT; +7-3-SELECT * FROM t1 ORDER BY k; +8-3-COMMIT; + +serializable { +4-null +7-0,0 2,0 +} diff --git a/test_result/test_cases_pred/rat_sda_intermediate_read_committed_pred_delete.txt b/test_result/test_cases_pred/rat_sda_intermediate_read_committed_pred_delete.txt new file mode 100644 index 00000000..d133774d --- /dev/null +++ b/test_result/test_cases_pred/rat_sda_intermediate_read_committed_pred_delete.txt @@ -0,0 +1,25 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-DELETE FROM t1 WHERE k=1; +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k>0 and k<2; +5-2-COMMIT; +6-1-INSERT INTO t1 VALUES (1, 1); +7-1-COMMIT; +8-3-SELECT * from t1 ORDER BY k; +9-3-COMMIT; + +serializable { +4-1,0 +8-0,0 1,1 2,0 + +4-1,1 +8-0,0 1,1 2,0 +} + diff --git a/test_result/test_cases_pred/rat_sda_intermediate_read_committed_pred_insert.txt b/test_result/test_cases_pred/rat_sda_intermediate_read_committed_pred_insert.txt new file mode 100644 index 00000000..5ecc1cd4 --- /dev/null +++ b/test_result/test_cases_pred/rat_sda_intermediate_read_committed_pred_insert.txt @@ -0,0 +1,21 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-INSERT INTO t1 VALUES (1, 0); +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k>0 and k<2; +5-2-COMMIT; +6-1-DELETE FROM t1 WHERE k=1; +7-1-COMMIT; +8-3-SELECT * from t1; +9-3-COMMIT; + +serializable { +4-null +8-0,0 2,0 +} + diff --git a/test_result/test_cases_pred/rat_sda_intermediate_read_pred_delete.txt b/test_result/test_cases_pred/rat_sda_intermediate_read_pred_delete.txt new file mode 100644 index 00000000..af4e80c6 --- /dev/null +++ b/test_result/test_cases_pred/rat_sda_intermediate_read_pred_delete.txt @@ -0,0 +1,24 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-DELETE FROM t1 WHERE k=1; +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k>0 and k<2; +5-1-INSERT INTO t1 VALUES (1, 1); +6-2-COMMIT; +7-1-COMMIT; +8-3-SELECT * from t1 ORDER BY k; +9-3-COMMIT; + +serializable { +4-1,0 +8-0,0 1,1 2,0 + +4-1,1 +8-0,0 1,1 2,0 +} diff --git a/test_result/test_cases_pred/rat_sda_intermediate_read_pred_insert.txt b/test_result/test_cases_pred/rat_sda_intermediate_read_pred_insert.txt new file mode 100644 index 00000000..cfb9d64f --- /dev/null +++ b/test_result/test_cases_pred/rat_sda_intermediate_read_pred_insert.txt @@ -0,0 +1,21 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-INSERT INTO t1 VALUES (1, 0); +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k>0 and k<2; +5-1-DELETE FROM t1 WHERE k=1; +6-2-COMMIT; +7-1-COMMIT; +8-3-SELECT * from t1 ORDER BY k; +9-3-COMMIT; + +serializable { +4-null +8-0,0 2,0 +} + diff --git a/test_result/test_cases_pred/rat_sda_non_repeatable_read_pred_delete.txt b/test_result/test_cases_pred/rat_sda_non_repeatable_read_pred_delete.txt new file mode 100644 index 00000000..110ef8fa --- /dev/null +++ b/test_result/test_cases_pred/rat_sda_non_repeatable_read_pred_delete.txt @@ -0,0 +1,26 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k>0 and k<2; +3-2-BEGIN;; +4-2-DELETE FROM t1 WHERE k=1; +5-1-SELECT * from t1 WHERE k>0 and k<2; +6-2-COMMIT; +7-1-COMMIT; +8-3-SELECT * FROM t1 ORDER BY k; +9-3-COMMIT; + +serializable { +2-null +5-null +8-0,0 2,0 + +2-1,0 +5-1,0 +8-0,0 2,0 +} \ No newline at end of file diff --git a/test_result/test_cases_pred/rat_sda_non_repeatable_read_pred_insert.txt b/test_result/test_cases_pred/rat_sda_non_repeatable_read_pred_insert.txt new file mode 100644 index 00000000..74a9a5fd --- /dev/null +++ b/test_result/test_cases_pred/rat_sda_non_repeatable_read_pred_insert.txt @@ -0,0 +1,25 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k>0 and k<2; +3-2-BEGIN;; +4-2-INSERT INTO t1 VALUES (1, 0); +5-1-SELECT * from t1 WHERE k>0 and k<2; +6-2-COMMIT; +7-1-COMMIT; +8-3-SELECT * FROM t1 ORDER BY k; +9-3-COMMIT; + +serializable { +2-null +5-null +8-0,0 1,0 2,0 + +2-1,0 +5-1,0 +8-0,0 1,0 2,0 +} \ No newline at end of file diff --git a/test_result/test_cases_pred/wat_dda_double_write_skew2_committed_pred_delete.txt b/test_result/test_cases_pred/wat_dda_double_write_skew2_committed_pred_delete.txt new file mode 100644 index 00000000..59726af8 --- /dev/null +++ b/test_result/test_cases_pred/wat_dda_double_write_skew2_committed_pred_delete.txt @@ -0,0 +1,26 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (3, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-COMMIT; +1-1-begin; +2-1-update t1 set v=1 where k=01; +3-2-begin; +4-2-DELETE FROM t1 WHERE k=3; +5-2-update t1 set v=2 where k=1; +6-2-commit; +7-1-select * from t1 where k>2 and k<4; +8-1-commit; +9-3-SELECT * FROM t1 ORDER BY k; +10-3-COMMIT; + +serializable { +7-3,0 +9-1,2 2,0 4,0 + +7-null +9-1,1 2,0 4,0 +} \ No newline at end of file diff --git a/test_result/test_cases_pred/wat_dda_double_write_skew2_committed_pred_insert.txt b/test_result/test_cases_pred/wat_dda_double_write_skew2_committed_pred_insert.txt new file mode 100644 index 00000000..ced4fb61 --- /dev/null +++ b/test_result/test_cases_pred/wat_dda_double_write_skew2_committed_pred_insert.txt @@ -0,0 +1,25 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-COMMIT; +1-1-begin; +2-1-update t1 set v=1 where k=1; +3-2-begin; +4-2-INSERT INTO t1 VALUES (3, 0); +5-2-update t1 set v=2 where k=1; +6-2-commit; +7-1-select * from t1 where k>2 and k<4; +8-1-commit; +9-3-SELECT * FROM t1 ORDER BY k; +10-3-COMMIT; + +serializable { +7-null +9-1,2 2,0 3,0 4,0 + +7-3,0 +9-1,1 2,0 3,0 4,0 +} \ No newline at end of file diff --git a/test_result/test_cases_pred/wat_dda_read_write_skew1_c1_pred_delete.txt b/test_result/test_cases_pred/wat_dda_read_write_skew1_c1_pred_delete.txt new file mode 100644 index 00000000..50802dd2 --- /dev/null +++ b/test_result/test_cases_pred/wat_dda_read_write_skew1_c1_pred_delete.txt @@ -0,0 +1,26 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (3, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k>0 and k<2; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=3; +5-2-DELETE FROM t1 WHERE k=1; +6-1-UPDATE t1 SET v=1 WHERE k=3; +7-1-COMMIT; +8-2-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +2-1,0 +9-0,0 2,0 3,2 + +2-null +9-0,0 2,0 3,1 +} diff --git a/test_result/test_cases_pred/wat_dda_read_write_skew1_c1_pred_insert.txt b/test_result/test_cases_pred/wat_dda_read_write_skew1_c1_pred_insert.txt new file mode 100644 index 00000000..1c1cbb3f --- /dev/null +++ b/test_result/test_cases_pred/wat_dda_read_write_skew1_c1_pred_insert.txt @@ -0,0 +1,25 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (3, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-SELECT * from t1 WHERE k>0 and k<2; +3-2-BEGIN; +4-2-UPDATE t1 SET v=2 WHERE k=3; +5-2-INSERT INTO t1 VALUES (1, 0); +6-1-UPDATE t1 SET v=1 WHERE k=3; +7-1-COMMIT; +8-2-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +2-null +9-0,0 1,0 2,0 3,2 + +2-1,0 +9-0,0 1,0 2,0 3,1 +} diff --git a/test_result/test_cases_pred/wat_dda_read_write_skew2_c1_pred_delete.txt b/test_result/test_cases_pred/wat_dda_read_write_skew2_c1_pred_delete.txt new file mode 100644 index 00000000..7402019b --- /dev/null +++ b/test_result/test_cases_pred/wat_dda_read_write_skew2_c1_pred_delete.txt @@ -0,0 +1,26 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (3, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=1; +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k>2 and k<4; +5-2-UPDATE t1 SET v=2 WHERE k=1; +6-1-DELETE FROM t1 WHERE k=3; +7-1-COMMIT; +8-2-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +4-null +9-1,2 2,0 4,0 + +4-3,0 +9-1,1 2,0 4,0 +} diff --git a/test_result/test_cases_pred/wat_dda_read_write_skew2_c1_pred_insert.txt b/test_result/test_cases_pred/wat_dda_read_write_skew2_c1_pred_insert.txt new file mode 100644 index 00000000..76891b99 --- /dev/null +++ b/test_result/test_cases_pred/wat_dda_read_write_skew2_c1_pred_insert.txt @@ -0,0 +1,25 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=1; +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k>2 and k<4; +5-2-UPDATE t1 SET v=2 WHERE k=1; +6-1-INSERT INTO t1 VALUES (3, 0); +7-1-COMMIT; +8-2-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +4-3,0 +9-1,2 2,0 3,0 4,0 + +4-null +9-1,1 2,0 3,0 4,0 +} diff --git a/test_result/test_cases_pred/wat_dda_read_write_skew2_committed_pred_delete.txt b/test_result/test_cases_pred/wat_dda_read_write_skew2_committed_pred_delete.txt new file mode 100644 index 00000000..73bea307 --- /dev/null +++ b/test_result/test_cases_pred/wat_dda_read_write_skew2_committed_pred_delete.txt @@ -0,0 +1,26 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (3, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=1; +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k>2 and k<4; +5-2-UPDATE t1 SET v=2 WHERE k=1; +6-2-COMMIT; +7-1-DELETE FROM t1 WHERE k=3; +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +4-null +9-1,2 2,0 4,0 + +4-3,0 +9-1,1 2,0 4,0 +} diff --git a/test_result/test_cases_pred/wat_dda_read_write_skew2_committed_pred_insert.txt b/test_result/test_cases_pred/wat_dda_read_write_skew2_committed_pred_insert.txt new file mode 100644 index 00000000..a70dfd51 --- /dev/null +++ b/test_result/test_cases_pred/wat_dda_read_write_skew2_committed_pred_insert.txt @@ -0,0 +1,25 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (1, 0); +0-1-INSERT INTO t1 VALUES (2, 0); +0-1-INSERT INTO t1 VALUES (4, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=1; +3-2-BEGIN; +4-2-SELECT * from t1 WHERE k>2 and k<4; +5-2-UPDATE t1 SET v=2 WHERE k=1; +6-2-COMMIT; +7-1-INSERT INTO t1 VALUES (3, 0); +8-1-COMMIT; +9-3-SELECT * from t1 ORDER BY k; +10-3-COMMIT; + +serializable { +4-3,0 +9-1,2 2,0 3,0 4,0 + +4-null +9-1,1 2,0 3,0 4,0 +} diff --git a/test_result/test_cases_pred/wat_sda_lost_self_update_committed_pred_delete.txt b/test_result/test_cases_pred/wat_sda_lost_self_update_committed_pred_delete.txt new file mode 100644 index 00000000..98f36e9e --- /dev/null +++ b/test_result/test_cases_pred/wat_sda_lost_self_update_committed_pred_delete.txt @@ -0,0 +1,23 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-INSERT INTO t1 VALUES (1, 1); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-DELETE FROM t1 WHERE k=1; +5-2-COMMIT; +6-1-SELECT * from t1 WHERE v>0; +7-1-COMMIT; +8-3-SELECT * FROM t1; +9-3-COMMIT; + +serializable { +6-0,1 +8-0,1 + +6-0,1 1,1 +8-0,1 +} \ No newline at end of file diff --git a/test_result/test_cases_pred/wat_sda_lost_self_update_committed_pred_insert.txt b/test_result/test_cases_pred/wat_sda_lost_self_update_committed_pred_insert.txt new file mode 100644 index 00000000..d5cdb8f2 --- /dev/null +++ b/test_result/test_cases_pred/wat_sda_lost_self_update_committed_pred_insert.txt @@ -0,0 +1,22 @@ +ParamNum:2 +0-1-DROP TABLE IF EXISTS t1; +0-1-CREATE TABLE t1 (k INT PRIMARY KEY, v INT); +0-1-INSERT INTO t1 VALUES (0, 0); +0-1-COMMIT; +1-1-BEGIN; +2-1-UPDATE t1 SET v=1 WHERE k=0; +3-2-BEGIN; +4-2-INSERT INTO t1 VALUES (1, 1); +5-2-COMMIT; +6-1-SELECT * from t1 WHERE v>0; +7-1-COMMIT; +8-3-SELECT * FROM t1 ORDER BY k; +9-3-COMMIT; + +serializable { +6-0,1 +8-0,1 1,1 + +6-0,1 1,1 +8-0,1 1,1 +}